Skip to content

Bootstrap parity: full Armonia mount-stack at session start (discovery, grants, splice, typed memory) - #130

Merged
Rchari1 merged 4 commits into
mainfrom
aaron/mount-stack-parity
Jul 14, 2026
Merged

Bootstrap parity: full Armonia mount-stack at session start (discovery, grants, splice, typed memory)#130
Rchari1 merged 4 commits into
mainfrom
aaron/mount-stack-parity

Conversation

@aarontrowbridge

@aarontrowbridge aarontrowbridge commented Jul 11, 2026

Copy link
Copy Markdown
Member

What

Amicode sessions now see the full Armonia mount stack — not just the personal vault. Implements the bootstrap parity half (Components 1–4) of the context-lifecycle spec (spec-20260707-002846), extension-side only, zero fork patches:

  • substrate/mount_store.ts (new) — TS port of the amico-plugin session-start hook's discovery: .amico-vault.toml markers under ~/.amico/vaults/, mounts.toml order/kind/writable overrides, canonical kind precedence, skip-with-warning semantics.
  • Per-mount external_directory read grants in the injected opencode config — the agent can read notes/cards across the whole stack on demand.
  • "Mount stack (Armonia)" splice into the injected AGENTS.md — one line per mount + condensed resolution/write-routing rules (mirrors the amico-vault skill).
  • Typed memory store (read side + distiller write side)<personal>/amicode/memory/{type}_{topic}.md + MEMORY.md index; only the index is spliced, facts load on demand. DISTILLER.md now writes typed facts and maintains the index; KNOWLEDGE.md/DEMOS.md frozen (idempotent migration pointer).

Semantics (single source of truth)

Canonical kind order per the approved vault-CLI spec (spec-20260703-053956): personal 0 · engagement 1 · project 2 · restricted 3 · team 4 · public 5 · unknown 6. Note: this deliberately corrects the Ombra draft's table (which swaps team/restricted). Two oracle-parity subtleties replicated + tested: manifest-kind override applies before the missing-kind skip (rescue rule), and manifest-unlisted mounts append in discovery order.

Parity oracle: amico-plugin/hooks/session-start on feat/amico-vault-mounts-toml (amico-plugin PR #27).

The three-state vaultDir contract is preserved exactly (undefined → auto-resolve stack / "" → personalization off, no grants, no splice / path → single forced personal mount). Read-posture note: grants are read grants even for ro mounts (the permission surface has no r/w split); write discipline stays distiller-side.

Testing

pnpm test: 460 passed | 3 skipped (baseline 435 | 3 — +25 new, zero regressions). pnpm typecheck clean. New suites: mount_store.test.ts (fixture matrix incl. rescue + discovery-order + restricted rank), splice sections, three-state prep contract. One new test mutates HOME (restored in finally) to hermetically exercise auto-resolve — flagged for reviewer attention.

Deliberately deferred

Ombra C2's compaction knobs + summarizer model pin; Ombra itself (C5–C9); resolver unification with the amico-run twin (packages/amico-run/src/mounts.ts, see #131) — headers cross-reference.

CI: expected red on the pre-existing private-fork binary token issue — unrelated.

🤖 Generated with Claude Code

aarontrowbridge and others added 4 commits July 11, 2026 01:45
…recedence (spec-20260707-002846 C1)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…60707-002846 C3/C4 read side)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… prep (spec-20260707-002846 C1–C4 read side; C2's compaction knobs deliberately deferred)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…260707-002846 C4)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Rchari1
Rchari1 merged commit f91ab25 into main Jul 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants