akm docs

Docs–code drift register and intent questions — ruled 2026-07-26 (v0.9.0-rc.10)

Status: maintainer rulings recorded 2026-07-26 — all 19 questions ruled. Re-verified 2026-07-27 against 2d2edc1 (code identical to 453a0ba; the delta is docs-only). That pass corrected three register entries that had drifted from the tree — Q-12 (landed, not open), the R-004 companion item (user-facing print already removed), and the Q-18 remediation sketch (the suggested predicate overshoots — see the amended landmine note). Note: items below cite docs/agents/AGENTS.md / AGENTS.full.md. Those files were deleted during the 0.9.0 docs sweep; their still-true content now lives in src/assets/hints/cli-hints-full.md / cli-hints-short.md, which is what akm hints prints. Companion to: 0.9.0-public-api-issue-backlog.md (implementation-only findings). This register covers the complement: places where the documentation and the code disagree, and places where the intended implementation is genuinely unclear because the project's own decision records conflict with shipped behavior.

Method: three independent audits (README + guides; architecture/specs/agent docs + STABILITY/AGENTS/SECURITY; docs/reference) compared documented claims against src/ with file:line verification, plus live CLI execution for the highest-stakes items. Items verified by actually running the CLI are marked [verified live]. Line references may drift; every item names the file and observable behavior so it can be re-verified.

Reading order: Part 1 records the intent conflicts and now carries the maintainer rulings (2026-07-26) that settle them — the rulings table is the authoritative direction; the question bodies remain as the evidence record. Parts 2–3 are mechanical now that Part 1 is decided. Part 4 records false alarms and verified-clean surfaces so future audits don't re-litigate them.


Part 1 — Decision needed (now ruled): the intent conflicts

Each question cites both sides. "Docs-as-intent" means the fix is code work; "code-as-intent" means the fix is doc work — but several of these have the decision record itself (STABILITY.md, 0.9.0-decisions.md, ref.md) on the losing side, which is why a ruling was needed first.

Maintainer rulings — 2026-07-26

Ruled by the maintainer in session review. Each ruling names the winning side and the required follow-through; the question bodies below are kept as the evidence record.

Until each follow-through lands, these rulings supersede conflicting statements in the older records — 0.9.0-decisions.md (notably D3's mv removal and D9's --auto-accept wording), STABILITY.md (the mv-removal claim, the six-format wording amended by Q-04, the missing tier entries), ref.md, and the scaffolded stash assets such as facts/conventions/organization.md. Where any of those contradicts this table, the table wins; treat the contradiction as un-swept drift, not authority.

Q Ruling
Q-01 Keep akm mv. Supersede D3; add an Experimental tier entry for mv to STABILITY.md; rewrite the scaffolded facts/conventions/organization.md fact and the other D3-side docs to teach the command.
Q-02 Slash grammar only. Implement the decided slash form including bundle// enumeration; remove the colon form entirely — no alias, no deprecation window. Sweep search --help, akm hints, and the ref-prefix tests to slash.
Q-03 Delete the show view modes per D2 (SHOW_VIEW_MODES, normalizeShowArgv, hidden --akm* flags). Fragment refs (D1) are the successor.
Q-04 Implement basic support for all output formats on every non-exempt command, with text and md collapsed into a single format. Align the persisted output.format schema with the CLI's accepted set and fix the INVALID_FORMAT_VALUE hint. Follow-through detail: both text and md stay accepted as flag values resolving to the one collapsed renderer (amend here if a spelling is instead dropped); STABILITY.md's "all six formats" wording (:70-77) updates to the collapsed set; D7's exemption mechanism is in scope — exemptions must be declared and warned, never silent. Downstream: D-08's global --format table, the INVALID_FORMAT_VALUE hint, and completions (backlog R-052) update to the final accepted set.
Q-05 Implement both gates (experimental.workflowEngine, experimental.improveAutonomy) as STABILITY.md documents them.
Q-06 show-only is the intended 0.9.0 scope for fragment refs. State that scope in ref.md/D1; wider rollout is post-0.9.0.
Q-07 Honor D11: fix the ref-parser seam centrally so opaque adapter conceptIds are accepted by the ref-consuming commands (graph, tasks, improve, proposals, utility repo, indexer walk).
Q-08 Slash spelling only (env/<name>, secrets/<name>). Update every help/doc surface that teaches env:/secret:; no colon alias.
Q-09 Keep the code's provider taxonomy (filesystem/git/npm/website); fix the docs that teach local/managed/remote.
Q-10 --rerank was designed-then-dropped: remove the cli.md reference and the setup-wizard prose.
Q-11 Keep flat --name; hierarchical placement goes through --path, like other commands. Document --path in cli.md and drop the "slashes in names" claim. Doc-only work — verified 2026-07-26: workflow create already declares --path (workflow-cli.ts:204), already routes it through the shared normalizeCreateSubPath/combineCreatePath helpers (:227) used by knowledge, contribute, and the env/secret create paths, and its --name help already reads "flat, no '/'; use --path for a subdirectory" (:201). Only docs/reference/cli.md:574-577 is wrong.
Q-12 Implement the STABILITY.md contract: parse --auto-accept, warn "deprecated and ignored" in 0.9, hard error in 0.10. Align D9/E4 wording.
Q-13 Treat as a regression: restore the 7-day (static-index) and 24-hour (skills-sh) stale-fallback windows.
Q-14 Adopt the convention: every registered command gets a tier and the reference either documents it or explicitly lists it internal. extract, proposal drain, and improve canary are tiered Experimental. Open follow-through: tiers for lint, backup, and the workflow exec/driver family (run/brief/report/watch/abandon) are still unassigned — record them when the STABILITY.md re-tier (Part 5, step 3) lands.
Q-15 Code wins: fix the docs wording (raw/** is indexed as wiki-source documents, not pages).
Q-16 Trim §4 to the five implemented contracts (RankingContributor, SearchHitEnricher, ActionContributor, ProposalValidator, SessionLogHarness); delete the seven unimplemented entries. §3.9's seam name updates to the shipped RunnerSpec/executeRunner (runner-dispatch.ts) so the doc describes reality throughout.
Q-17 Do not keep the standalone brief: consolidate runtime-boundary-design.md into the other architecture docs, keeping only the still-necessary details; retire the file. Destination: fold the bun:sqlite/Bun.* import-boundary rule and the database.ts/runtime.ts export table into architecture.md (Module Boundaries / Tech Stack); drop the stale "Architect: investigate" checklists and the outdated 3-hard-import-files claim rather than carrying them over; remove the file's row from docs/architecture/README.md when retiring it.
Q-18 Both halves. The two-registry split stays the core truth: KNOWN_TYPES is the presentation vocabulary, PLACEMENT_SPECS the stash-resident subset, and the exhaustiveness check asserts placement keys ⊆ known types (adapter-emitted instruction docs round-trip via the Q-07 opaque-conceptId fix). And the akm adapter gains instruction as a stash-resident asset type — a PLACEMENT_SPECS entry with an instructions/ stash dir on the markdown spec — so instruction assets become creatable, browsable, and listed by akm info like knowledge.
Q-19 Fix the resolver: resolveSourcesForOrigin must match install refs (github:owner/repo) so //meta and the akm add error hint work as documented.

Implementation status against the base branch (claude/0-9-0-release-review-bcjxxu @ 453a0ba)

Re-verified 2026-07-26 after merging the base branch. The questions below were written against a8464f2; the base branch has since implemented part of the ruling set. Status per ruling:

Q Status Evidence
Q-01 Landed mv retained and declared Experimental (STABILITY.md:72); D3 explicitly excluded from the removal list (:345).
Q-02 Landed parseRefPrefixQuery now takes conceptId-prefix/bundle// slash forms and no colon form (fts-query.ts:88-100).
Q-03 Landed SHOW_VIEW_MODES and normalizeShowArgv deleted; #fragment golden replaces the lines-view golden.
Q-04 Conflict — see below All six formats implemented with an exemption registry (output/format-exempt.ts, cli/shared.ts:219-244), but text and md are separate renderers.
Q-05 Partial experimental.improveAutonomy shipped (config/schema/experimental.ts:29, improve/autonomy-gate.ts, reported by tasks doctor), and 453a0ba closed the two lanes that were still silently gated — memoryCleanup and contradiction have no processes.<name>.enabled flag, so applyAutonomyGate structurally could not see them and suppressed them with no warning, event, or doctor line (the exact silent no-op the contract forbids). It also moved the gate off the read-only analyzeMemoryCleanup onto applyMemoryCleanup, so review-first runs get their preview back. experimental.workflowEngine still has zero code.
Q-14 Partial The workflow exec/driver family is now tiered Experimental (STABILITY.md:230-240). extract, proposal drain, improve canary, lint, and backup still have no tier entry and no cli.md section.
Q-06 Open parseRefInput still rejects #fragment outright (asset/resolve-ref.ts:257-262); show still works only by bypassing it. Recommendation: the ruling makes this doc-only for 0.9.0 — add one "scope: show only in 0.9.0" sentence to ref.md § Fragments and D1's Status line; no code change.
Q-07 Renderer half advanced; parser half open 453a0ba replaced show's OKF-only branch with usesIndexedProjection (read/show.ts:536-559): OKF plus any indexed item whose type AKM does not place now keeps its adapter's projection. That is the format-agnostic direction D11 asked for, on the render seam. The parser seam is untouched — parseRefInput still throws when a conceptId has no known asset-type prefix (resolve-ref.ts:265-271), so graph, tasks, improve, proposals, the utility repo, and the indexer walk remain strict.
Q-08 Open Colon spellings still taught by env-cli.ts:392,455, secret-cli.ts:95,160, prompts.ts:78, AGENTS.md:44.
Q-09 Code correct VALID_SOURCE_KINDS unchanged (sources/sources-cli.ts:34) — the ruled direction; the doc sweep is outstanding.
Q-10 Open curate --rerank still advertised by the setup wizard (connection.ts:365,424); cli.md reference also unswept. Recommendation: two-line deletion in each file, no dependencies — batch with the Part 5 step-2 sweep.
Q-11 Open cli.md:613-614 still claims slashes are supported in workflow names.
Q-12 Landed (0.9 half) — the register had this wrong resolveScopeAfterRetiredAutoAccept (improve-cli.ts:103-117, shipped 2a68c7a) warns "--auto-accept was removed in 0.9 and is ignored", names the replacement (proposal drain --promote / triage applyMode: "promote"), announces the 0.10 hard error, and drops the poisoned positional — the space-separated form (--auto-accept 90) previously read 90 as the scope, matched nothing, and exited 0. Remaining: align D9/E4 wording (E4 still says the runtime "does not parse" the flag).
Q-13 Open No second stale window in the registry cache. Recommendation: add a per-provider staleWindowMs to fetchCachedJson (registry-cache.ts:136-141) and have getRegistryIndexCache return rows past TTL but inside the window with a stale: true marker — the doc'd 7d/24h numbers become the two providers' constants. Small, self-contained.
Q-15 Open wikis.md:59-60 still says raw/ is "never indexed as pages".
Q-16, Q-17 Open §4 still lists all twelve contracts; runtime-boundary-design.md still present.
Q-18 Open — and now has a landmine, see below instruction still absent from PLACEMENT_SPECS.
Q-19 Open resolveSourcesForOrigin still matches derived installation ids only (registry/origin-resolve.ts:18-23). Recommendation: also compare origin against each installation's install ref (installations.ts:98-110 already derives it) — an additive `

Q-04 conflict — RESOLVED 2026-07-27: keep six formats. The maintainer amended the ruling to accept D7 as shipped: six distinct formats (text for terminal rendering, md for document artifacts) plus the exemption registry. The collapse is off the table. Follow-through landed the same day: the INVALID_FORMAT_VALUE hint (errors.ts:111) and bash completions (completions.ts) now carry the six-value set, completions dropped the bogus --detail summary value and gained --shape, and the per-command --format help strings on search/curate/show were updated. Q-04's original follow-through detail in the rulings table is superseded by this note; STABILITY.md's six-format wording stands as-is. Related same-day rulings: R-029 — akm backup is removed from the CLI (the capability lives at akm-migrate backup/restore, which already existed; migration docs swept); R-047 — the scope-narrowing axis unifies on --filter for both search and show, --scope removed with no alias (the old spelling now fails loudly via the extra-positional guard, pinned by test). The paragraph below is kept as the evidence record.

Original conflict note: The ruling recorded above says "collapse text and md into a single format". The base branch instead landed D7 as six distinct formats: md gained a renderer registry plus a generic markdown fallback, explicitly so that "no command emits JSON under --format md any more" (cli/shared.ts:234-241). It also built the exemption registry D7 asked for (format-exempt.ts), which the ruling wanted. So the shipped work satisfies the ruling's first half and contradicts its second. Either the collapse is applied on top of D7 (deleting one of the two renderer paths), or the ruling is amended to accept six formats. Until that is decided, the Q-04 follow-through detail recorded in the table above is provisional.

Q-18 now collides with usesIndexedProjection — sequence the work. 453a0ba made show decide between the adapter's indexed projection and the AKM matcher by asking !placementTypes().includes(entry.type) (read/show.ts:557). Today instruction is not a placement type, so adapter-emitted CLAUDE.md/AGENTS.md items (claude/opencode adapters, tool-dir-shared.ts:110-112) take the projection and render with their indexed content — the behavior that commit was written to restore. The moment Q-18's ruling lands and instruction joins PLACEMENT_SPECS, that predicate flips to false for those items and show starts re-deriving them through recognizeMatch, reintroducing for instruction exactly the regression 453a0ba fixed for website/file. Implementing Q-18 therefore requires widening the predicate at the same time.

Amended 2026-07-27 — the sketch above overshoots. Gating on entry.adapterId !== "akm" would change behavior for four other adapters: agent-skills, akm-task, akm-workflow, and llm-wiki all publish document.content AND emit AKM-placed types (skill, task, workflow, knowledge) whose items deliberately render through AKM's bespoke type renderers today (a skill keeps its run-command action, a task its schedule view). Flipping them to the generic projection is a second regression wearing the fix's clothes. The correct shape is an explicit ownership signal rather than either inference: when instruction joins PLACEMENT_SPECS, either (a) route instruction-typed items from the claude/opencode adapters to the projection by adapter id — a two-member allowlist, honest about being one — or (b) add an adapter-declared ownsPresentation marker on the indexed document and let usesIndexedProjection read it. (b) is the durable fix; (a) is acceptable 0.9.0 scope. Either way, land a guard test pinning instruction-item show output BEFORE the PLACEMENT_SPECS change, so the flip fails a test instead of shipping silently. Ruled 2026-07-27: option (b), the ownsPresentation marker — adapters stamp presentation ownership on the documents they index and usesIndexedProjection reads the stamp; index.db being a regenerable cache, the schema addition needs only a reindex. Implement the marker together with (or before) the PLACEMENT_SPECS.instruction entry, guard test first. This remains the concrete cost of the two-registry split: placement is now load-bearing for rendering, not just for storage.

Q-01 — akm mv: decided removed, fully shipped. Which wins?

Q-02 — Ref-prefix browse grammar: slash (decided) vs colon (implemented)

Q-03 — akm show view modes: decided deleted, still live and advertised

Q-04 — --format universality: a Stable-tier contract with no implementation

Q-05 — experimental.workflowEngine / experimental.improveAutonomy: documented gates, zero code

Q-06 — Fragment refs (#fragment): implemented for show only

Q-07 — Opaque adapter conceptIds (the OKF/format-agnostic promise)

Q-08 — env/secret ref spelling: env/prod vs env:prod

Q-09 — akm list --kind: conceptual vs provider taxonomy

Q-10 — curate --rerank: two independent references, zero implementation

Q-11 — workflow create hierarchical names

Q-12 — --auto-accept removal contract: two docs, two contracts, code matches neither

Q-13 — Registry stale-fallback windows: doc'd tiers may be a code regression

Q-14 — What is public surface? (the undocumented command families)

akm lint, akm extract, akm backup, akm proposal drain, akm improve canary, and the workflow exec/driver family (run/brief/report/watch/abandon) have no section in docs/reference/cli.md (which calls itself authoritative), and STABILITY.md assigns them no tier. Only mv is marked Experimental anywhere. Deliberate hiding vs. doc debt is undecidable — and it matters for a 1.0 contract freeze. A convention is needed: every registered command gets a tier (stable/experimental/internal) and the reference either documents it or explicitly lists it as internal.

Q-15 — Wiki raw/** indexing vs "never indexed"

docs/guides/wikis.md:60 (and adapter prose elsewhere) say raw/ is structural and "never indexed as pages". The llm-wiki adapter indexes raw/**.md as first-class searchable documents with type: "wiki-source" (llm-wiki-adapter.ts:82-83,271,291 — "First-class addressable + searchable"). Literally consistent ("not pages"), practically misleading. Intended behavior or over-indexing?

Q-16 — functional-contract-patterns.md §4: aspiration or contract?

7 of 12 "Recommended Contracts" have no implementation (PathResolver, MatchContributor, MetadataContributor, LintContributor, ImproveContributor, IndexPostProcessor, AgentRunner); §3.9 states the AgentRunner seam as a rule, but the actual seam is RunnerSpec/executeRunner (runner-dispatch.ts). Mark the doc as aspirational, or reconcile the seam names.

Q-17 — runtime-boundary-design.md: shipped, amended, or superseded?

Still written as an open brief with unchecked "Architect: investigate" boxes (:32-37,69-73,104-106,132-140), yet both target files exist and are complete (src/storage/database.ts, src/runtime.ts — all 11 tabled exports present). Its "3 hard-import files" no longer match the tree. Originally flagged as needing a status banner; ruled instead (see the rulings table): consolidate the still-necessary details into the other architecture docs and retire the file.

Q-18 — The instruction asset type: half-registered

Present in KNOWN_TYPES/TYPE_PRESENTATION (renderer + action builder), absent from PLACEMENT_SPECS — so it is invisible to akm info, unbrowsable, and its refs don't round-trip (recognition-util.ts:92-106 vs asset-placement.ts:89-166). Register fully or remove; either way, add a compile-time exhaustiveness check tying the two registries together.

Q-19 — Install-ref meta resolution: aspirational error message

concepts.md:343 documents akm show github:owner/repo//meta, and showStashMeta's own error says "Run: akm add ${metaRef.origin}" (show.ts:149) — but resolveSourcesForOrigin matches derived installation ids that can never equal github:owner/repo (origin-resolve.ts:18-23, installations.ts:98-110). Either the resolver lost install-ref support or the doc + error message are aspirational.


Part 2 — Verified drift register (docs describe behavior the code doesn't have)

2.1 STABILITY.md (contract-tier claims)

2.2 Root AGENTS.md (contributor guidance)

2.3 docs/reference/cli.md

2.4 docs/reference/configuration.md

2.5 docs/reference/registry.md

2.6 docs/reference/data-and-telemetry.md

2.7 docs/reference/akm-eval.md

2.8 docs/guides/*

2.9 docs/architecture/* (architecture.md + internals)

2.10 docs/agents/* (the agent-facing docs)

2.11 docs/migration/v0.8-to-v0.9.md

2.12 In-CLI doc surfaces (shipped assets, help text)

Tracked in the backlog (R-001..R-006, R-052) and repeated here for completeness because they are documentation in the product's own voice: akm hints documents the removed wiki family and drifts by install method; show --format text renders type:name feedback commands; feedback help contradicts the immediate EMA update; a hint references akm events list; the scaffolded conventions fact contradicts akm mv; bash completions advertise --detail summary and omit md/html.


Part 3 — Code that still emits the retired type:name grammar

The grammar decision (STABILITY.md:42, ref.md:106, D-R3 "nowhere after the flip") is violated by live output, not just docs:


Part 4 — False alarms and verified-clean surfaces

Recorded so future audits don't re-litigate.


Part 5 — Suggested triage order

  1. Rulings — done 2026-07-26 (all 19; see the Part 1 table). They decided whether ~40% of Part 2 is doc work or code work. Of the execute-first trio, Q-02 has landed (slash enumeration incl. bundle//, colon form gone); Q-07's renderer half landed (usesIndexedProjection) with the parser half open; Q-08 is untouched. Q-08 and Q-07's parser seam are now the highest-leverage remaining code items.
  2. Sweep the agent-copy-paste surfaces (Part 3 + §2.10/2.12): everything an agent will paste from — hints, help examples, error messages, the show footer, AGENTS.md — should speak one grammar.
  3. Re-tier STABILITY.md so nothing marked Stable is unimplemented and every registered command has a tier (Q-14).
  4. Mechanical doc sweep for the remainder of Part 2, ideally with a CI check that executes every fenced akm … example in docs/ against a scratch stash (the --kind, --since 7d, remember --name a/b, and colon-spelling failures would all have been caught by running the docs).