Skip to content

amico vault/note: mount-aware status/resolve, union query, routed note route - #131

Closed
aarontrowbridge wants to merge 3 commits into
b3-bookkeeping-verbsfrom
aaron/vault-mounts-verbs
Closed

amico vault/note: mount-aware status/resolve, union query, routed note route#131
aarontrowbridge wants to merge 3 commits into
b3-bookkeeping-verbsfrom
aaron/vault-mounts-verbs

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

What

Stacked on #125 (B3) — base branch is b3-bookkeeping-verbs; merge after it.

Closes the single-vault gap in the B3 spine verbs: vault_query.ts's vaultDir() was hardcoded to armonissima, and no verb knew the Armonia mount stack existed. Per depth-1 spec §7.3 (retrieval tools) + W-3 (routed librarian writes) and the approved vault-CLI spec's canonical mount semantics:

  • src/mounts.ts (new) — the mount-stack resolver: markers + mounts.toml order/kind/writable overrides, canonical kind precedence (restricted 3 < team 4), rescue rule, discovery-order unlisted append. Twin of the extension's substrate/mount_store.ts (PR Bootstrap parity: full Armonia mount-stack at session start (discovery, grants, splice, typed memory) #130) — headers cross-reference; unify-later follow-up named. Env seam for the bundle-exec test boundary: $AMICO_VAULTS_ROOT / $AMICO_MOUNTS_TOML ($AMICO_VAULT_DIR still wins, forcing the single-mount back-compat path).
  • vault status --json — field-compatible with the bash amico-vault status --json ({ok, mounts:[{id,path,kind,writable,last_sync,warnings}], error}, drift warnings with manifest-wins, git log -1 --format=%cr). Note: matches the bash envelope exactly, so no top-level verb/subcommand — unlike the other amico verbs, by design.
  • vault resolve <relpath> — first-hit across read precedence.
  • vault query — union over all mounts in precedence order with mount provenance on every hit; same-relpath collision → higher-precedence mount wins; --mount <id> restricts.
  • note route (new subcommand) — routed generic note writes by intent: first writable mount of the intent kind, else personal + route_intent: <kind> frontmatter stamp (never silently drop, never write a ro mount). --type experiment is rejected with a pointer to note write (schema-complete experiment notes stay note write's job). B3's note write/bump-best are byte-for-byte untouched.

Verified against the real machine

vault status reproduces this machine's session-start hook mount stack exactly (personal → restricted → team, manifest order); vault resolve STRATEGY.md first-hits armonissima; vault query returns cross-mount hits with provenance.

Testing

pnpm test: 229 passed (baseline 191 — +38 new, zero regressions; all pre-existing B3 suites additions-only). pnpm typecheck clean. New: mounts.test.ts fixture matrix (a)–(i), status/resolve/union-query verb tests, note route pure + bundle tests.

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

🤖 Generated with Claude Code

aarontrowbridge and others added 3 commits July 11, 2026 01:40
…ecedence (vault-cli spec canonical order)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…a stack

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…_intent fallback

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jack-champagne

Copy link
Copy Markdown
Member

Closing — already delivered.

aaron/vault-mounts-verbs tip c4ec87b ("feat(note): note route — routed generic note writes by intent + route_intent fallback") is a direct ancestor of main (d03d3c8) and git diff main...aaron/vault-mounts-verbs is empty.

Base was b3-bookkeeping-verbs (see #125), also fully in main.

Note this means #132, which stacked on this branch, has only 8 lines left that aren't in main — retargeting it to main rather than closing it.

cc @aaron — branch preserved.

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