Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3d52920
docs(adr): ADR-097 — Browser MAE is a KB surface, not a browser editor
cuttlefisch Aug 5, 2026
747a6c7
test(sync): Phase 0 spike — browser Yjs converges with a real KbNodeDoc
cuttlefisch Aug 5, 2026
30516cf
test(sync): multi-device identity spike — Rebind cannot express multi…
cuttlefisch Aug 5, 2026
18ddc88
test(sync): device secret-storage + revocation spike — devices are no…
cuttlefisch Aug 5, 2026
03799bb
test(sync): forward-secrecy spike — rotate-per-revocation is blocked …
cuttlefisch Aug 5, 2026
0e037b1
test(daemon): write-fencing spike — revocation is rotation-free but o…
cuttlefisch Aug 5, 2026
eccddad
docs(adr): ADR-098 — durable identity for network clients
cuttlefisch Aug 5, 2026
ddfbfa2
docs(adr): ADR-099 (browser sync transport) + ADR-100 (browser edit s…
cuttlefisch Aug 5, 2026
cdc1243
Merge remote-tracking branch 'origin/main' into feat/browser-kb-surface
cuttlefisch Aug 5, 2026
1f4d3c4
spike(kb): ADR-100 D4 — measure the org parser, and correct the question
cuttlefisch Aug 5, 2026
6935546
spike(kb): measure the wasm bundle size — D4's last open condition cl…
cuttlefisch Aug 5, 2026
edbab2d
chore(adr-kb): regenerate for ADRs 097-100
cuttlefisch Aug 6, 2026
4c987fa
Merge branch 'main' into feat/browser-kb-surface
cuttlefisch Aug 6, 2026
3eea36f
Merge main into feat/browser-kb-surface
cuttlefisch Aug 6, 2026
492e46c
Merge branch 'main' into feat/browser-kb-surface
github-actions[bot] Aug 6, 2026
8ad93bb
Merge branch 'main' into feat/browser-kb-surface
cuttlefisch Aug 7, 2026
31cda14
Merge branch 'main' into feat/browser-kb-surface
cuttlefisch Aug 7, 2026
57280a5
Merge branch 'main' into feat/browser-kb-surface
cuttlefisch Aug 7, 2026
1a8467d
Merge branch 'main' into feat/browser-kb-surface
cuttlefisch Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ These are derived from analysis of 35 years of Emacs git history. They are non-n

12. **Local-first by design.** MAE satisfies 5 of 7 Ink & Switch local-first ideals today (no spinners, multi-device, network optional, collaboration without conflict, user ownership). P2P collaboration and E2E encryption will complete the remaining two. The daemon is an optimization for persistence and discovery, not a requirement for collaboration. **The daemon is configurable (`daemon_mode` = `off` / `on-demand` / `shared`) with the in-process embedded KB as the *floor* (the default, not a fallback); it earns placement only by an objective value category — SHARED across frontends, OUTLIVES editor sessions, COORDINATES peers, or DURABILITY. Features that genuinely require it (P2P sharing, continuous shared-KB sync) are gated + surfaced as such. See ADR-035 for the editor↔daemon boundary.**

**Amendment — the browser surface (ADR-097 D2).** One surface cannot satisfy this and is
carved out explicitly rather than quietly excepted: a browser client has no in-process MAE
core to fall back to and reaches MAE only over the network, so **for Browser MAE the daemon
is a hard requirement, not an optimization.** The carve-out is deliberately narrow — it binds
only to the browser surface, leaves native MAE's `daemon_mode = off` default and embedded-KB
floor untouched, and does not concede online-only operation (a browser holding CRDT state in
IndexedDB still edits offline and converges later). What is genuinely given up, and only
here, is the "no server needed at all" property. Recorded per principle #17 rather than
violated silently.

13. **Cross-platform parity (macOS + Linux) is a development constraint, not an afterthought.** MAE is developed and run across macOS and Linux *simultaneously* (often on the same branch, same day). Every script, path-resolution, and tool invocation MUST behave identically on both — or fail loudly with a portable fallback, never silently no-op on one platform. A "fix" that only works on one developer's machine is not a fix; it manufactures the stop-and-go cross-machine debugging this principle exists to prevent. Concretely:
- **Directory resolution is XDG-first on ALL platforms.** Honor `XDG_CONFIG_HOME` / `XDG_DATA_HOME` when set, then fall back to the platform default. The bare `dirs` / `directories` crate follows Apple conventions on macOS (`~/Library/Application Support`) and *ignores* XDG — so calling `dirs::config_dir()` / `dirs::data_dir()` directly breaks env-var test isolation and contradicts the documented `~/.config/mae` + `~/.local/share/mae` contract. Use the XDG-first helpers (`mae-mcp::identity::default_collab_dir`, `mae-mcp::keystore`, editor `pkg/paths.rs::{dirs_candidate,data_dir_candidate}`), never raw `dirs::*` for primary config/data paths.
- **Shell scripts use portable tooling.** No Linux-only commands without a fallback: `ss` → `lsof` → `netstat`; `timeout` → `gtimeout` → optional/omitted; avoid GNU-only behavior (`sed -i` arg differences, `readlink -f`, `mktemp` templates, `date` flags). Prefer POSIX; gate platform branches on capability (`command -v`), not `uname`. Keep the Linux path first so CI/driver behavior is unchanged.
Expand Down Expand Up @@ -638,7 +648,21 @@ the whole node — `kind`/`todo_state`/`priority`/`aliases`/`properties`/`source
schema behind a `schema_v` key, with tolerant readers and **no upcast-on-read**, so a v1 document
opens unchanged and two peers can never author clashing migration ops; supersedes ADR-092 D4's
"editable is bounded by what syncs", and is the prerequisite that makes a lossless text-KB migration
possible at all). The holistic sharing story + security audits live in `docs/KB_SHARING.md`,
possible at all), **ADR-095** (MCP elicitation carries the ask state), **ADR-096** (Scheme is the
only editor config surface — deprecating `config.toml`, *proposed, phased*), and **ADR-097**
(Browser MAE is a KB surface, not a browser editor — scopes the web frontend to KB work and
narrowly amends principle #12 for it, *proposed*), and **ADR-098** (durable identity for network
clients — the membership subject is a stable *member* key, not a device key; devices obtain it from
recovery-key-sealed secret storage; the OIDC-principal↔fingerprint binding lives in daemon state
*outside* the CRDT so an IdP migration rewrites a mutable table rather than an unrewritable signed
log; AD groups gate the session while CRDT membership stays owner-authored. *Proposed, phased,
blocked on #176*; evidence in `docs/research/098-*.md`), **ADR-099** (bidirectional sync transport
for browser clients — WebSocket on the existing OAuth listener, re-framing MAE's own already
doc-scoped envelope rather than speaking y-protocols, so one session multiplexes N documents;
*proposed*, supersedes ADR-074 D1 for the write path only), and **ADR-100** (the browser KB edit
surface — structured chrome bound to ADR-093's schema v2 with zero round-trip, plus source-backed
live preview over the body `Y.Text`; block WYSIWYG permitted only as a projection, never a second
source of truth; *proposed*, D4's org-parser choice gated on a WASM spike). The holistic sharing story + security audits live in `docs/KB_SHARING.md`,
`docs/E2E_ENCRYPTION.md`, and `docs/SECURITY_REVIEW.md`.

> **This index goes stale silently and has done so before** — ADR-068 through 091 were missing
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/mae-adr.cozo.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ec30dd12d9b9441e3595f1f19ea8d245f8781d4a492624e79230708d7f506052 assets/mae-adr.cozo
ed1073570c5ebce69bba5b429ed0452715d339bcc4115c4950f109297517575a assets/mae-adr.cozo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified assets/mae-adr.cozo/db
Binary file not shown.
Loading
Loading