akm-cli 0.9.30 → 0.9.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +10 -10
- package/ROADMAP.md +112 -0
- package/dist/commands/improve/improve-cli.js +33 -12
- package/dist/core/file-lock.js +10 -1
- package/dist/llm/client.js +33 -3
- package/dist/scripts/akm-migrate-node.js +5 -1
- package/dist/scripts/akm-migrate.js +5 -1
- package/docs/README.md +42 -41
- package/docs/agents/README.md +15 -0
- package/docs/agents/agent-install.md +14 -0
- package/docs/architecture/README.md +67 -0
- package/docs/architecture/adapters.md +272 -0
- package/docs/architecture/akm-architecture-decision-history.md +2055 -0
- package/docs/architecture/akm-core-principles.md +126 -0
- package/docs/architecture/architecture.md +579 -0
- package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +550 -0
- package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +72 -0
- package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +142 -0
- package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +189 -0
- package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +97 -0
- package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +108 -0
- package/docs/architecture/decisions/0006-task-source-version-routing.md +124 -0
- package/docs/architecture/decisions/0007-workflow-composition-bounds.md +83 -0
- package/docs/architecture/decisions/0008-task-binding-normalization.md +88 -0
- package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +80 -0
- package/docs/architecture/decisions/0010-driver-protocol-cut.md +36 -0
- package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +125 -0
- package/docs/architecture/decisions/README.md +62 -0
- package/docs/architecture/improvement.md +440 -0
- package/docs/architecture/internals/classification.md +154 -0
- package/docs/architecture/internals/fresh-host-rebuild-runbook.md +40 -0
- package/docs/architecture/internals/functional-contract-patterns.md +340 -0
- package/docs/architecture/internals/health-advisories.md +110 -0
- package/docs/architecture/internals/improve-workflow.md +713 -0
- package/docs/architecture/internals/indexing.md +498 -0
- package/docs/architecture/internals/registry-network-boundary.md +57 -0
- package/docs/architecture/internals/search.md +249 -0
- package/docs/architecture/internals/storage-locations.md +943 -0
- package/docs/architecture/persisted-data-compat.md +59 -0
- package/docs/architecture/reviews/env-secret-access.md +319 -0
- package/docs/architecture/runtime-boundary-design.md +153 -0
- package/docs/architecture/specs/0.9.0-close-out-plan.md +361 -0
- package/docs/architecture/specs/0.9.0-decisions.md +528 -0
- package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +745 -0
- package/docs/architecture/specs/0.9.0-open-items-register.md +135 -0
- package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +740 -0
- package/docs/architecture/specs/0.9.0-release-surface-review.md +636 -0
- package/docs/architecture/specs/agent-command-engine-model-design.md +513 -0
- package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +501 -0
- package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +291 -0
- package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +2059 -0
- package/docs/architecture/specs/di-seams-plan.md +539 -0
- package/docs/architecture/specs/driver-protocol-keep-or-cut.md +275 -0
- package/docs/architecture/specs/fact-asset-type.md +142 -0
- package/docs/architecture/specs/improve-collapse-churn-detector-design.md +634 -0
- package/docs/architecture/specs/okf-support.md +148 -0
- package/docs/architecture/specs/ref.md +329 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/README.md +72 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +152 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +352 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +300 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +402 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +758 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +645 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +602 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +74 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +15 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +132 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +147 -0
- package/docs/architecture/specs/stash-conventions-code-spec.md +275 -0
- package/docs/architecture/specs/stash-organization-conventions.md +377 -0
- package/docs/architecture/specs/task-workflow-format-unification.md +721 -0
- package/docs/architecture/specs/workflow-engine-buy-vs-build.md +231 -0
- package/docs/architecture/specs/workflow-format-unification.md +437 -0
- package/docs/architecture/testing/manual-testing-checklist.md +3420 -0
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +924 -0
- package/docs/architecture/testing/task-workflow-manual-tests.md +1817 -0
- package/docs/architecture/testing/testing-workflow.md +446 -0
- package/docs/architecture/workflow-engine.md +274 -0
- package/docs/guides/README.md +33 -0
- package/docs/guides/author-bundles.md +310 -0
- package/docs/guides/author-workflows.md +520 -0
- package/docs/guides/bundles.md +321 -0
- package/docs/guides/capture-knowledge.md +136 -0
- package/docs/guides/claude-code-vs-akm-workflows.md +30 -0
- package/docs/guides/concepts.md +93 -0
- package/docs/guides/discover-and-load.md +158 -0
- package/docs/guides/getting-started.md +240 -0
- package/docs/guides/improve-the-library.md +246 -0
- package/docs/guides/knowledge-management.md +18 -0
- package/docs/guides/recipes/headless-install.md +97 -0
- package/docs/guides/recipes/website-source.md +28 -0
- package/docs/guides/run-workflows.md +279 -0
- package/docs/guides/scheduling.md +123 -0
- package/docs/guides/use-with-any-agent.md +129 -0
- package/docs/guides/wikis.md +81 -0
- package/docs/maintainers/README.md +19 -0
- package/docs/maintainers/curate-workmap.md +336 -0
- package/docs/maintainers/eval.md +3 -0
- package/docs/maintainers/local-development.md +108 -0
- package/docs/maintainers/release-checklist.md +103 -0
- package/docs/migration/README.md +2 -2
- package/docs/migration/release-notes/0.0.13.md +1 -1
- package/docs/migration/release-notes/0.1.0.md +1 -1
- package/docs/migration/release-notes/0.2.0.md +1 -1
- package/docs/migration/release-notes/0.3.0.md +1 -1
- package/docs/migration/release-notes/0.5.0.md +1 -1
- package/docs/migration/release-notes/0.6.0.md +1 -1
- package/docs/migration/release-notes/0.7.0.md +1 -1
- package/docs/migration/release-notes/0.7.3.md +2 -2
- package/docs/migration/release-notes/0.7.4.md +1 -1
- package/docs/migration/release-notes/0.7.5.md +1 -1
- package/docs/migration/release-notes/0.8.0.md +1 -1
- package/docs/migration/release-notes/0.9.0.md +1 -1
- package/docs/migration/release-notes/0.9.14.md +1 -1
- package/docs/migration/release-notes/0.9.15.md +1 -1
- package/docs/migration/release-notes/0.9.16.md +1 -1
- package/docs/migration/release-notes/0.9.17.md +1 -1
- package/docs/migration/release-notes/0.9.19.md +1 -1
- package/docs/migration/release-notes/0.9.2.md +1 -1
- package/docs/migration/release-notes/README.md +27 -31
- package/docs/migration/v0.5-to-v0.6.md +759 -0
- package/docs/migration/v0.8-to-v0.9.md +1 -1
- package/docs/plans/0.9.2-agent-command-workflow-plan.md +423 -0
- package/docs/posts/README.md +30 -0
- package/docs/posts/akm-command-tour.md +495 -0
- package/docs/posts/akm-logo-sized.webp +0 -0
- package/docs/posts/belief-aware-memory-12.md +139 -0
- package/docs/posts/config-v2-lessons-16.md +191 -0
- package/docs/posts/improve-loop-autonomous-10.md +225 -0
- package/docs/posts/improve-pipeline-debugging-0803.md +179 -0
- package/docs/posts/intro-part-01.md +76 -0
- package/docs/posts/intro-part-02.md +221 -0
- package/docs/posts/intro-part-03.md +190 -0
- package/docs/posts/intro-part-04.md +221 -0
- package/docs/posts/llm-mode-reflect-13.md +166 -0
- package/docs/posts/openpalm-built-on-akm.md +86 -0
- package/docs/posts/progressive-disclosure-06.md +129 -0
- package/docs/posts/proposal-safety-net-15.md +112 -0
- package/docs/posts/release-0.5.0.md +247 -0
- package/docs/posts/release-0.6.0.md +117 -0
- package/docs/posts/release-0.7.0.md +159 -0
- package/docs/posts/release-0.8.0.md +332 -0
- package/docs/posts/scattered-skills-05.md +100 -0
- package/docs/posts/task-assets-persistent-workflows-11.md +222 -0
- package/docs/posts/team-skills-07.md +198 -0
- package/docs/posts/wiki-agent-knowledge-08.md +223 -0
- package/docs/posts/workflows-vaults-09.md +321 -0
- package/docs/product-surface.md +54 -0
- package/docs/reference/README.md +1 -2
- package/docs/reference/asset-types.md +168 -0
- package/docs/reference/cli.md +5 -6
- package/docs/reference/env-and-secrets.md +126 -0
- package/docs/reference/memory.md +124 -0
- package/docs/reference/refs.md +156 -0
- package/docs/reference/registry.md +489 -0
- package/docs/reference/website-sources.md +141 -0
- package/package.json +12 -15
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
# 0.9.0 release surface review — v2 (reconciled action list)
|
|
2
|
+
|
|
3
|
+
Supersedes v1 of this document. v1 was an end-to-end critical sweep of the
|
|
4
|
+
user-facing surface (41 top-level commands, ~120 subcommands, ~230 flags, the
|
|
5
|
+
Zod config schema, env vars, output contracts). v2 reconciles it with three
|
|
6
|
+
inputs:
|
|
7
|
+
|
|
8
|
+
1. **Owner corrections** — `--type` is free-form *by design*; the global
|
|
9
|
+
`--format` set must work on **all** commands with no bespoke shims;
|
|
10
|
+
migration code should live outside the main tool; test-only env vars should
|
|
11
|
+
not ship; `akm bundle` should be removed as duplicative; the `show` view
|
|
12
|
+
modes should be replaced by `#fragment` section addressing.
|
|
13
|
+
2. **The improve-autonomy review** — do not gate the whole `akm improve`
|
|
14
|
+
feature; gate *autonomy* (direct mutation, auto-promotion) behind an explicit
|
|
15
|
+
opt-in, keep the feature and its schedules visibly alive. (Unattended push
|
|
16
|
+
was in this list originally; D8 leaves it ungated — see the outcome note in
|
|
17
|
+
C6.)
|
|
18
|
+
3. **A verification pass** (8 parallel read-only audits of the tree) that
|
|
19
|
+
confirmed, refuted, or sharpened each claim. Two v1 claims were wrong and
|
|
20
|
+
are corrected below.
|
|
21
|
+
|
|
22
|
+
**Corrections to v1:**
|
|
23
|
+
|
|
24
|
+
- v1 said `AKM_DISABLE_PROJECT_CONTEXT=1` was the working escape hatch for the
|
|
25
|
+
broken `--no-project-context` flag. **False** — that env var is never read
|
|
26
|
+
anywhere in `src/` (it survives only in help text at
|
|
27
|
+
`src/commands/read/search-cli.ts:68` and comments). There is currently *no*
|
|
28
|
+
working way to disable the project-context boost. Same for
|
|
29
|
+
`AKM_DISABLE_SCOPED_UTILITY` (comments only).
|
|
30
|
+
- v1 recommended validating `search --type` against a closed enum. **Wrong
|
|
31
|
+
direction** — `IndexDocument.type` is an open string by contract
|
|
32
|
+
(`src/core/adapter/types.ts:156-157`), the closed union was deliberately
|
|
33
|
+
deleted (`src/core/recognition-util.ts:71-77`), and adapters emit types
|
|
34
|
+
outside the placement set (`website`, `wiki-source`, open `pageKind`
|
|
35
|
+
values). The fix is documentation, not validation.
|
|
36
|
+
|
|
37
|
+
Grouped by action. Ordering within groups is by cost-of-deferral.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## A. Fix — defects, before anything else
|
|
42
|
+
|
|
43
|
+
### A1. `akm search --no-project-context` is a no-op, and there is no fallback
|
|
44
|
+
|
|
45
|
+
`search-cli.ts:65` declares an arg literally named `no-project-context`; the
|
|
46
|
+
parser's `--no-*` negation makes passing it identical to omitting it. With the
|
|
47
|
+
env var confirmed dead (see corrections), the boost cannot be disabled at all.
|
|
48
|
+
|
|
49
|
+
**Action:** declare `project-context` (boolean, default `true`) so
|
|
50
|
+
`--no-project-context` works via native negation — the same pattern `sync
|
|
51
|
+
--push/--no-push` already uses. Remove the dead `AKM_DISABLE_PROJECT_CONTEXT`
|
|
52
|
+
mention from the help text (or implement it deliberately; pick one). Replace
|
|
53
|
+
the current test (which only asserts the flag doesn't touch `process.env`)
|
|
54
|
+
with one that asserts the boost is actually disabled.
|
|
55
|
+
|
|
56
|
+
### A2. Fresh installs emit a fault-shaped warning on every search
|
|
57
|
+
|
|
58
|
+
**Status: superseded by R-039 / X-RULING-9** — `semanticSearchMode` now
|
|
59
|
+
defaults to `"off"` (`src/core/config/schema/*.ts`: `.default("off")`), so a
|
|
60
|
+
bare/headless install no longer attempts semantic search or emits this
|
|
61
|
+
warning at all; the interactive `akm setup` wizard still pre-selects it on,
|
|
62
|
+
with the download warning moved ahead of the prompt. The finding below is
|
|
63
|
+
kept as the evidence record for the default that motivated the ruling.
|
|
64
|
+
|
|
65
|
+
Verified end-to-end at the time: `semanticSearchMode` defaulted to `auto`
|
|
66
|
+
(`config.ts:108`); with no embedding configured the implicit local-transformers
|
|
67
|
+
path fails (optional dependency, or offline), `verifyIndexState` writes
|
|
68
|
+
`blocked` (`indexer.ts:1699-1715`), and every subsequent search for 24h-cycles
|
|
69
|
+
emits *"Semantic search is currently blocked … until the semantic backend is
|
|
70
|
+
healthy again"* (`db-search.ts:222-226`) — describing a fault when the state
|
|
71
|
+
is "not configured".
|
|
72
|
+
|
|
73
|
+
**Action:** split the `blocked` branch at `db-search.ts:196-226` on the same
|
|
74
|
+
predicate the `pending` branch already uses (`!config.embedding?.endpoint ||
|
|
75
|
+
!config.embedding?.model`, line 205):
|
|
76
|
+
|
|
77
|
+
- **Unconfigured** → no warning (or the existing actionable #480-style note:
|
|
78
|
+
configure `embedding` or set `semanticSearchMode off`). The out-of-box
|
|
79
|
+
`warnings` array must be empty/stable for scripted consumers.
|
|
80
|
+
- **Configured-but-failing** → keep the warning, enriched with the status
|
|
81
|
+
ledger's `reason`/`message` (already in scope, currently discarded) and the
|
|
82
|
+
retry instruction.
|
|
83
|
+
|
|
84
|
+
### A3. `--type` help text: document free-form, stop implying an enum
|
|
85
|
+
|
|
86
|
+
Types are an open set by design (see corrections). But the help enum on
|
|
87
|
+
`search`/`curate` lists 10 of the 13 placement types (omits `task`,
|
|
88
|
+
`session`, `fact`), omits `instruction`, and omits the entire adapter-defined
|
|
89
|
+
space; `cli-hints-full.md:21` repeats the stale list; completions only
|
|
90
|
+
complete placement types.
|
|
91
|
+
|
|
92
|
+
**Action:** rewrite the `--type` description on `search` and `curate` (and
|
|
93
|
+
`cli-hints-full.md`): *"Asset type filter. Built-in types: skill, command,
|
|
94
|
+
agent, knowledge, workflow, script, memory, env, secret, lesson, task,
|
|
95
|
+
session, fact, instruction — or any adapter-defined type (e.g. `website`,
|
|
96
|
+
`wiki-source`, a wiki `pageKind`). Matching is exact; an unknown type returns
|
|
97
|
+
no hits. Default: any."* No validation added — a typo returning zero hits is
|
|
98
|
+
the documented contract of a free-form filter.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## B. One output contract — every global format on every command
|
|
103
|
+
|
|
104
|
+
Owner direction: `json|jsonl|yaml|text|md|html` must all work on all commands;
|
|
105
|
+
no bespoke shims. The verification pass mapped the full gap: 37 commands
|
|
106
|
+
silently emit JSON under `--format text`; `md` silently emits JSON everywhere
|
|
107
|
+
except `health`; `html` throws everywhere except `health`; `jsonl` is per-item
|
|
108
|
+
only for `search`; ~10 surfaces bypass `output()` entirely.
|
|
109
|
+
|
|
110
|
+
### B1. Registry-driven renderers with generic fallbacks
|
|
111
|
+
|
|
112
|
+
The infrastructure exists — the shapes and text registries already follow the
|
|
113
|
+
exact pattern (`src/output/shapes.ts:78-99`, `src/output/text.ts:104-133`).
|
|
114
|
+
|
|
115
|
+
**Action:**
|
|
116
|
+
- Add md and html renderer registries mirroring shapes/text. `output()`
|
|
117
|
+
becomes a uniform lookup: shape → (registered renderer ?? generic renderer
|
|
118
|
+
for that format) → `deliverRendered`. The `html` throw and the silent `md`
|
|
119
|
+
JSON fallback in `shared.ts:201-215` both disappear.
|
|
120
|
+
- **Generic md renderer:** key-value table for flat fields, md table for the
|
|
121
|
+
envelope's dominant array field, fenced JSON for nested objects.
|
|
122
|
+
- **Generic html renderer:** one `generic.html` template (styled shell around
|
|
123
|
+
the md rendering). `resolveTemplatePath`/`escapeHtml` already exist.
|
|
124
|
+
- **Generic text fallback:** route `formatPlain`'s `null` branch through the
|
|
125
|
+
generic md renderer instead of pretty JSON — closes the 37-command text gap
|
|
126
|
+
in one move.
|
|
127
|
+
- **jsonl list-awareness:** replace the `search`-only special case
|
|
128
|
+
(`text.ts:138-148`) with a declared per-shape list field (per-item lines +
|
|
129
|
+
`_kind:"trailer"` envelope line — the precedent `log tail` already ships).
|
|
130
|
+
- **health** keeps its rich html/md output by *registering* its renderers
|
|
131
|
+
(moving `renderRunsDetailMd`/`renderWindowCompareMd` and the ECharts
|
|
132
|
+
template behind the registry); the pre-`output()` intercepts in `cli.ts`
|
|
133
|
+
are deleted. The report layout is presentation, not contract.
|
|
134
|
+
- Snapshot test: every command × 6 formats produces non-empty output with the
|
|
135
|
+
expected leading bytes.
|
|
136
|
+
|
|
137
|
+
### B2. Remove `akm graph export --format`
|
|
138
|
+
|
|
139
|
+
Verified clean: the local flag already leaks into the global mode (one token,
|
|
140
|
+
two parsers), the two payload formats map 1:1 to the global values with the
|
|
141
|
+
same defaults, and payload (`--out` file) vs envelope (stdout) never collide.
|
|
142
|
+
|
|
143
|
+
**Action:** delete the local arg; the export handler reads
|
|
144
|
+
`getOutputMode().format`; keep a UsageError for payload formats other than
|
|
145
|
+
`json|jsonl`. This also removes the last subcommand-declared `format:` arg —
|
|
146
|
+
which is what forced the citty workarounds in `sync` and `env unset`
|
|
147
|
+
(`sources-cli.ts:214-256`, `env-cli.ts:470-482`); delete those too.
|
|
148
|
+
|
|
149
|
+
### B3. Migrate raw-stdout bypasses onto `output()`
|
|
150
|
+
|
|
151
|
+
`config path` (bare), `config validate` success strings, and `migrate
|
|
152
|
+
status|apply` (`console.log(JSON.stringify(plan))`, unshaped, unstamped)
|
|
153
|
+
bypass the envelope entirely; `env path`/`secret path` print a raw scalar and
|
|
154
|
+
ignore `--format json` (breaking `| jq` pipelines).
|
|
155
|
+
|
|
156
|
+
**Action:** give each a passthrough shape and route through `output()`. Path
|
|
157
|
+
commands keep raw-scalar output in `text` mode; gain `{path}` envelopes under
|
|
158
|
+
json/yaml/jsonl. (Payload *values* of env/secret remain excluded from
|
|
159
|
+
structured output — that security contract is untouched.)
|
|
160
|
+
|
|
161
|
+
### B4. Declare the format-exempt set
|
|
162
|
+
|
|
163
|
+
Some surfaces are exempt *by nature*: `completions` (output is a bash
|
|
164
|
+
program), `env run`/`secret run`/`agent` child stdio, the interactive `setup`
|
|
165
|
+
wizard branch, and document payloads (`workflow template`, `hints`,
|
|
166
|
+
`help migrate`).
|
|
167
|
+
|
|
168
|
+
**Action:** a `FORMAT_EXEMPT_COMMANDS` set in `src/cli/shared.ts` that (a)
|
|
169
|
+
emits a stderr note when a non-default `--format` is passed to an exempt
|
|
170
|
+
command, (b) generates the exemption table in `docs/reference/cli.md`, and
|
|
171
|
+
(c) powers a test asserting every command is either exempt or 6-format
|
|
172
|
+
capable.
|
|
173
|
+
|
|
174
|
+
### B5. Cleanup that falls out
|
|
175
|
+
|
|
176
|
+
Widen `OutputConfigSchema.format` to the full six values (users currently
|
|
177
|
+
cannot persist `jsonl|md|html`); delete the vestigial `distill`/`reflect`
|
|
178
|
+
shape+text registrations (no `output()` call sites exist); delete the
|
|
179
|
+
doc-only local `format:` arg declarations on search/curate/show with their
|
|
180
|
+
stale enums; fix the stale "fall back to YAML" comments.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## C. Remove — deletions while 0.9.x still permits them
|
|
185
|
+
|
|
186
|
+
### C1. Remove `akm bundle` (list/show/items)
|
|
187
|
+
|
|
188
|
+
Owner decision, and verification confirmed it is cheap: undocumented in
|
|
189
|
+
`docs/reference/cli.md`, absent from STABILITY.md, zero consumers outside its
|
|
190
|
+
own CLI file and one test.
|
|
191
|
+
|
|
192
|
+
**Action:** delete `src/commands/bundle/` and the three passthrough shapes.
|
|
193
|
+
Preserve the unique data additively on `akm list` (a passthrough shape, so
|
|
194
|
+
all additive): `default` marker + top-level `defaultBundle`, the desired
|
|
195
|
+
source descriptor (`kind`/`locator`/`maxPages`), `registryId`, the full lock
|
|
196
|
+
block (`resolvedRevision`/`integrity`/`manifestDigest`/`adapterIds`/
|
|
197
|
+
`installedAt`), `components`, and per-bundle `itemCount`/`byType` (one
|
|
198
|
+
`getAllEntries` pass grouped by `bundleId`). Per-bundle item *enumeration*
|
|
199
|
+
lands in C2. This also retires the pre-bundle `--kind local|managed|remote`
|
|
200
|
+
vocabulary (rename values to the bundle model while touching it).
|
|
201
|
+
|
|
202
|
+
### C2. Replace the `<type>:` browse grammar with conceptId-prefix browsing
|
|
203
|
+
|
|
204
|
+
**Status: SHIPPED** (D4, ruled Q-02). `parseRefPrefixQuery` now accepts
|
|
205
|
+
`bundle//`-qualified and bare conceptId-prefix slash forms; the colon
|
|
206
|
+
grammar has no code path. See
|
|
207
|
+
[the drift register](0.9.0-docs-code-drift-register.md#q-02--ref-prefix-browse-grammar-slash-decided-vs-colon-implemented)
|
|
208
|
+
for the verified-live evidence.
|
|
209
|
+
|
|
210
|
+
Three confirmed defects in the current grammar: it resurrects the singular
|
|
211
|
+
`type:` spelling the release just removed; it validates against
|
|
212
|
+
`placementTypes()` so adapter-defined types can never be enumerated; and it
|
|
213
|
+
matches `namePrefix` against name-space while every displayed ref is in
|
|
214
|
+
plural conceptId-space — copying a displayed ref prefix (`memories/projecta/`)
|
|
215
|
+
into a query silently degrades to keyword FTS.
|
|
216
|
+
|
|
217
|
+
**Action:** replace `parseRefPrefixQuery` with conceptId-prefix enumeration:
|
|
218
|
+
`akm search "memories/"`, `akm search "memories/projecta/"`, and
|
|
219
|
+
bundle-qualified `akm search "team//"` / `"team//skills/"`. This matches the
|
|
220
|
+
canonical `bundle//conceptId` grammar, covers adapter types (their conceptIds
|
|
221
|
+
are enumerable even when their type strings are foreign), and gives C1 its
|
|
222
|
+
`bundle items` replacement (`akm search "team//"` = all items in bundle
|
|
223
|
+
`team`). Also lift the empty-query rejection when `--source <bundle>` names a
|
|
224
|
+
configured source, and document named `--source` in the flag table (today it
|
|
225
|
+
is prose-only).
|
|
226
|
+
|
|
227
|
+
### C3. Replace `akm show <ref> toc|section|lines|frontmatter|full` with `#fragment`
|
|
228
|
+
|
|
229
|
+
Owner decision. One spec decision is required first, because the verification
|
|
230
|
+
pass found the grammar is **stable-on-paper, rejected-in-practice**:
|
|
231
|
+
STABILITY.md declares `[bundle//]conceptId[#fragment]` Stable, yet
|
|
232
|
+
`parseRefInput` rejects every fragment at every input boundary
|
|
233
|
+
(`resolve-ref.ts:263-269`), and the spec defines the fragment as an
|
|
234
|
+
adapter-owned **export selector** (spec §11.3, `ref.md:24`) for the
|
|
235
|
+
unimplemented Tier-B exports system — not a heading anchor.
|
|
236
|
+
|
|
237
|
+
**Action:**
|
|
238
|
+
1. **Write the spec decision:** for markdown-document assets the fragment
|
|
239
|
+
resolves to a heading (GitHub-style slug match over `parseMarkdownToc`
|
|
240
|
+
headings, falling back to case-insensitive raw heading text — today's
|
|
241
|
+
`extractSection` semantics). Fragments remain adapter-owned selectors
|
|
242
|
+
elsewhere; the two uses coexist per the spec's own "adapter-owned and
|
|
243
|
+
opaque to the core" language, but written down. Amend `ref.md`, spec
|
|
244
|
+
§11.3, and STABILITY.md.
|
|
245
|
+
2. **Implement:** drop the fragment rejection on the `show` path (add
|
|
246
|
+
`fragment` to `AssetRef` or re-parse via `parseBundleRef` in show);
|
|
247
|
+
`akm show knowledge/guide#authentication` renders that section. An
|
|
248
|
+
unmatched fragment errors with the list of available fragment slugs —
|
|
249
|
+
this absorbs `toc`'s discovery role.
|
|
250
|
+
3. **Delete** the whole view-mode apparatus: `normalizeShowArgv` + the
|
|
251
|
+
`process.argv` mutation in `cli.ts`, `SHOW_VIEW_MODES`, the hidden
|
|
252
|
+
`--akmView/--akmHeading/--akmStart/--akmEnd` flags, the `KnowledgeView`
|
|
253
|
+
threading, the renderer switch, and the view-only markdown helpers
|
|
254
|
+
(`extractLineRange`, `extractFrontmatterOnly`, `formatToc`;
|
|
255
|
+
`parseMarkdownToc` stays — it has non-view consumers). `full` is the
|
|
256
|
+
no-fragment default. `lines` is dropped (every response carries `path`;
|
|
257
|
+
callers can slice the file). `frontmatter` is dropped; if a raw-YAML
|
|
258
|
+
projection proves needed it returns later as a `--shape` value, which
|
|
259
|
+
STABILITY.md already designates as the projection axis.
|
|
260
|
+
4. CHANGELOG migration note (the positional view grammar was a documented
|
|
261
|
+
Stable spelling; 0.9.x may break it, but it must be called out).
|
|
262
|
+
|
|
263
|
+
### C3b. Remove `akm mv`
|
|
264
|
+
|
|
265
|
+
> **Outcome: NOT ADOPTED.** `akm mv` ships in 0.9.0. The findings below stand —
|
|
266
|
+
> they are what classifies the command **Experimental** and outside the
|
|
267
|
+
> stability contract, and why the documented rename procedure is a plain
|
|
268
|
+
> filesystem move plus `akm index` and `akm lint`. The removal action list and
|
|
269
|
+
> the transaction-kind cleanup it prescribes are not being carried out. See
|
|
270
|
+
> [D3 in the decision record](./0.9.0-decisions.md#d3--renames-are-delete--create-akm-mv-ships-experimental).
|
|
271
|
+
> The rest of this section is the review as written.
|
|
272
|
+
|
|
273
|
+
Reverses this document's earlier "gate it behind `experimental.mv`"
|
|
274
|
+
recommendation. A dedicated review recommended removal; every load-bearing
|
|
275
|
+
claim in it verified against the tree, and the decisive one is that this is a
|
|
276
|
+
*correctness inversion*, not a rough edge — an experimental flag would ship
|
|
277
|
+
silent content corruption to whoever opts in.
|
|
278
|
+
|
|
279
|
+
Verified findings:
|
|
280
|
+
|
|
281
|
+
- **Its primary integrity promise is inverted.** Spec §11.1 names the command
|
|
282
|
+
directly: *"Lint's missing-ref scan and `akm mv`'s inbound-xref rewriting
|
|
283
|
+
operate only on these anchored [`bundle//conceptId`] forms; bare short refs
|
|
284
|
+
in prose are not recognized as refs."* `buildRewritePatterns`
|
|
285
|
+
(`mv-cli.ts:167-186`) emits five patterns — three dead `type:name`
|
|
286
|
+
spellings and two bare-conceptId spellings — and **no `bundle//` arm at
|
|
287
|
+
all**. It rewrites exactly what the spec says is not a ref, and leaves
|
|
288
|
+
every real prose ref dangling. The code's own comment asserts the opposite
|
|
289
|
+
of the spec ("needs no arm here … always emitted SHORT").
|
|
290
|
+
- **The reserved-file guard the spec requires of it does not exist.**
|
|
291
|
+
`ref.md:83-91` says item writes "(`placeNew`, **`akm mv`**, item
|
|
292
|
+
write-transactions) refuse a reserved-filename target". The validation
|
|
293
|
+
block (`mv-cli.ts:1205-1250`) checks cross-type, `.md` alias, empty name,
|
|
294
|
+
empty path segments, and the `.derived` suffix — there is no `index.md` /
|
|
295
|
+
`log.md` check anywhere in the file.
|
|
296
|
+
- **It bypasses the bundle model**: seven hardcoded types
|
|
297
|
+
(`MV_SUPPORTED_TYPES`, `mv-cli.ts:104`), primary writable stash only, paths
|
|
298
|
+
reconstructed from type/name rather than resolved through the index.
|
|
299
|
+
- **It can change bundle provenance**: the finalizing
|
|
300
|
+
`indexWrittenAssets(stashDir, …)` call omits `bundleId`
|
|
301
|
+
(`mv-cli.ts:1071`), so the indexer re-derives identity from the stash path
|
|
302
|
+
(`index-written-assets.ts:101-108`).
|
|
303
|
+
- **Docs and code disagree on failure**: `cli.md:957-964` promises "the move
|
|
304
|
+
still succeeds" with warnings; the implementation throws after the
|
|
305
|
+
irreversible filesystem commit (`mv-cli.ts:1064`, `1078`).
|
|
306
|
+
- **Cost**: 1,452 LOC plus ~2,190 LOC of tests, and two permanent entries in
|
|
307
|
+
the function-size ratchet (`run` 294 lines,
|
|
308
|
+
`withAssetMutationLease#arg1` 282) — for what its own originating spec
|
|
309
|
+
called "the highest-effort, lowest-frequency operation".
|
|
310
|
+
|
|
311
|
+
**Action:**
|
|
312
|
+
1. Delete the command, `src/commands/mv-cli.ts`, its tests, its hints, and
|
|
313
|
+
the `mv` event type.
|
|
314
|
+
2. **Delete the `mv` transaction kind and the indexer's hook for it.**
|
|
315
|
+
`index-written-assets.ts:78-81` hardcodes
|
|
316
|
+
`recoverTxnsForRoot(stashDir, j => j.kind === "mv")` on *every* write-path
|
|
317
|
+
index refresh, and `requireKind` throws on an unregistered kind
|
|
318
|
+
(`fs-txn.ts:122-125`). Deleting `mv-cli.ts` removes the
|
|
319
|
+
`registerTxnKind("mv", …)` side effect while leaving the caller — so a
|
|
320
|
+
single leftover journal would hard-fail every subsequent index refresh.
|
|
321
|
+
Old journals are being ignored by decision, so: remove the hook, and make
|
|
322
|
+
`recoverTxnsForRoot` sweep unknown kinds instead of throwing.
|
|
323
|
+
3. Document renames as delete + create: move the file, update intentional
|
|
324
|
+
refs, `akm index`, `akm lint`. The destination gets a fresh identity and
|
|
325
|
+
fresh learned state. Cross-bundle movement is copy/import + delete, never
|
|
326
|
+
identity-preserving.
|
|
327
|
+
4. **Amend spec §11.2**, which currently says a rename "MUST use an explicit
|
|
328
|
+
state-rekey transaction" — that was a product choice made in the same
|
|
329
|
+
refactor, not an independent constraint (see D3 in the decision record).
|
|
330
|
+
5. If real usage later shows that preserving learned state through renames
|
|
331
|
+
matters, reintroduce a narrow same-bundle `akm rename` built the right
|
|
332
|
+
way: resolve through the index, adapter-owned placement, qualified refs
|
|
333
|
+
only, rewrite only anchored `bundle//conceptId` forms, one old→new state
|
|
334
|
+
mapping, and rebuild derived index data rather than preserving row IDs.
|
|
335
|
+
|
|
336
|
+
### C4. Remove `akm config enable|disable`
|
|
337
|
+
|
|
338
|
+
A hardcoded alias for one vendor registry (`skills.sh`), currently listed
|
|
339
|
+
Stable. **Action:** remove; the replacement is
|
|
340
|
+
`akm registry add https://skills.sh` / `akm registry remove skills.sh`.
|
|
341
|
+
|
|
342
|
+
### C5. Remove the undocumented `akm init --stashDir/--stash-dir` aliases
|
|
343
|
+
|
|
344
|
+
They point at a config key 0.9.0 hard-rejects. **Action:** delete
|
|
345
|
+
(`stash-cli.ts:73-75`).
|
|
346
|
+
|
|
347
|
+
### C6. Move `upgrade --skip-checksum` off the flag surface
|
|
348
|
+
|
|
349
|
+
A tab-completable way to disable integrity verification on a self-updating
|
|
350
|
+
binary. **Action:** remove the flag; keep the recovery hatch as
|
|
351
|
+
`AKM_UPGRADE_SKIP_CHECKSUM=1`, documented as internal.
|
|
352
|
+
|
|
353
|
+
### C7. Split `akm add --allow-insecure`
|
|
354
|
+
|
|
355
|
+
One flag authorizes two unrelated risks (plain-HTTP transport; installing
|
|
356
|
+
bundles whose env keys — `LD_PRELOAD`, `PATH` — can hijack execution via
|
|
357
|
+
`akm env run`). **Action:** `--allow-insecure-transport` and
|
|
358
|
+
`--allow-dangerous-env-keys`, each gating only its own check.
|
|
359
|
+
|
|
360
|
+
### C8. Scrub internal tracker IDs and retired-grammar examples from help text
|
|
361
|
+
|
|
362
|
+
`"F-6:"` ×8, `"(F-3 / #384)"`, `"(F-4 / #385)"`, `"(#485)"`, `"(#22)"`,
|
|
363
|
+
`"(v1 spec §4.2)"` in flag descriptions; `skill:akm-dream`,
|
|
364
|
+
`memory:projectA/old-note`, `knowledge:auth-flow`, `npm:…//script:deploy.sh`
|
|
365
|
+
examples in ~8 help strings that use the removed `type:name` grammar; the
|
|
366
|
+
`stashDir` mentions in `init --set-default`, `setup --dir`, `config get`
|
|
367
|
+
help. **Action:** one help-text sweep; goldens update.
|
|
368
|
+
|
|
369
|
+
### C9. Env-var hygiene (the shippable subset of "eliminate test-only vars")
|
|
370
|
+
|
|
371
|
+
Verified disposition — full elimination is not achievable (SIGKILL
|
|
372
|
+
crash-recovery tests structurally require a real child process; the
|
|
373
|
+
deterministic embedder exists for *cross-version* out-of-process benchmarks),
|
|
374
|
+
but the surface shrinks a lot:
|
|
375
|
+
|
|
376
|
+
- **Delete now:** `AKM_DEBUG_LLM` (one read, zero setters — fold into
|
|
377
|
+
`AKM_VERBOSE`); all mentions of the dead `AKM_DISABLE_PROJECT_CONTEXT` /
|
|
378
|
+
`AKM_DISABLE_SCOPED_UTILITY` (see A1); the stale `AKM_ECHARTS` comment.
|
|
379
|
+
- **Replace with DI:** `AKM_ABLATE_CONTRIBUTORS` — the filter is already a
|
|
380
|
+
pure function; thread an option through `RankEntriesOptions` and delete the
|
|
381
|
+
env read (`ranking.ts:251`). Its claimed eval consumer doesn't use it.
|
|
382
|
+
- **Compile out of release builds:** the three `AKM_TEST_MIGRATION_*`
|
|
383
|
+
crash/fault-injection hooks, via `bun build --define` (the same mechanism
|
|
384
|
+
as `AKM_VERSION`) — dev/test builds keep them, shipped binaries physically
|
|
385
|
+
lack them. (If D1 lands, they leave the core package entirely.)
|
|
386
|
+
- **Keep but reclassify:** `AKM_FORCE_SETUP_TMP_STASH` is *not* test-only —
|
|
387
|
+
the production guard's error message instructs real operators to set it;
|
|
388
|
+
document as supported. `AKM_FORCE_INIT_TMP_STASH` is inert in production
|
|
389
|
+
(its guard only fires under a test runner) and is needed by spawned-CLI
|
|
390
|
+
tests; keep, documented internal. `AKM_EMBED_DETERMINISTIC`,
|
|
391
|
+
`AKM_CLAUDE_PROJECTS_DIR`, `AKM_NODE_ENTRY`, `AKM_EVENT_SOURCE`,
|
|
392
|
+
`AKM_SESSION_ID`/`AKM_AGENT_HARNESS` — internal-documented (H3).
|
|
393
|
+
- Fix the stale `AKM_PROFILE_<NAME>_API_KEY` comment (the real pattern is
|
|
394
|
+
`AKM_ENGINE_<NAME>_API_KEY`).
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## D. Extract — migration machinery out of the core
|
|
399
|
+
|
|
400
|
+
### D1. Move apply/backup/restore into a separately published `akm-migrate`
|
|
401
|
+
|
|
402
|
+
Owner direction, and the audit sized it: **~8,820 LOC of production migration
|
|
403
|
+
code + ~7,130 LOC of tests/fixtures** ship inside every binary today, pinned
|
|
404
|
+
to a one-time 0.8→0.9 cutover, spread across five surfaces (`akm migrate`,
|
|
405
|
+
`akm backup` — which hard-rejects any `--for` value except the literal
|
|
406
|
+
`0.9.0` — `akm config migrate`, the `akm-migrate-storage` bin, plus startup
|
|
407
|
+
gates).
|
|
408
|
+
|
|
409
|
+
**Action (target end-state):**
|
|
410
|
+
- **Move to `akm-migrate` (own repo/package):**
|
|
411
|
+
`scripts/akm-migrate/migrate/**`, `scripts/akm-migrate/config-migrate.ts`,
|
|
412
|
+
`scripts/akm-migrate/migration-backup.ts`,
|
|
413
|
+
`scripts/migrate-storage.ts` + launchers, and the `migrate`/`backup`
|
|
414
|
+
command bodies, re-homed as `akm-migrate status|apply|backup|restore`.
|
|
415
|
+
Vendor the frozen legacy ref grammar's four live-core imports so it becomes
|
|
416
|
+
genuinely frozen.
|
|
417
|
+
- **Core keeps (~1.6k LOC):** the pending-operation journal gate, the
|
|
418
|
+
migration-ledger inspect/assert + divergent-schema refusal, the config
|
|
419
|
+
hard-reject, the skew advisory, the vaults guard, `akm help migrate`
|
|
420
|
+
(release-notes rendering only), and ~40-line forwarder stubs: `akm migrate`
|
|
421
|
+
/ `akm backup` detect state and either spawn `akm-migrate` from PATH or
|
|
422
|
+
print the exact `npx akm-migrate@<pinned>` line. Refusal messages are
|
|
423
|
+
reworded to name the external tool.
|
|
424
|
+
- **Version-skew is the main hazard:** exact-pin peer dependency plus a
|
|
425
|
+
generation handshake (the migrate tool refuses a CLI whose migration
|
|
426
|
+
generation it doesn't match).
|
|
427
|
+
- **Remove from core now regardless:** the `akm config migrate` alias, and
|
|
428
|
+
the `akm-migrate-storage` bin entry from `package.json` (its npm-only
|
|
429
|
+
precedent already exists — `install.sh` never shipped it).
|
|
430
|
+
- **If the extraction doesn't make 0.9.0:** ship 0.9.0 with all five surfaces
|
|
431
|
+
declared *internal, removed at 0.10* in STABILITY.md and the CHANGELOG, so
|
|
432
|
+
the later removal is a documented plan, not a break. The extraction itself
|
|
433
|
+
can land in a 0.9.x patch (the series allows it).
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## E. Improve — gate autonomy, not the feature
|
|
438
|
+
|
|
439
|
+
Adopting the split model from the autonomy review; the lane audit confirmed
|
|
440
|
+
its factual basis and added one item it missed. Verified direct-mutation
|
|
441
|
+
lanes: **consolidate** (merge writes, archive+hard-delete of secondaries,
|
|
442
|
+
`contradictedBy` frontmatter edges), **memoryInference** (`.derived.md`
|
|
443
|
+
children + parent frontmatter rewrites), **memory cleanup / belief-state
|
|
444
|
+
archiving** — which runs on *any* improve run covering memories, **not gated
|
|
445
|
+
by any strategy flag at all** (`eligibility.ts:500-510`), **triage
|
|
446
|
+
`applyMode: "promote"`** (real `writeAssetToSource` accepts; wired in
|
|
447
|
+
`reflect-distill` and `proactive-maintenance`), **extract session indexing**
|
|
448
|
+
(`indexSessions` default *on*, direct `sessions/**` writes), and **unattended
|
|
449
|
+
sync+push** (`push ?? true`, enabled in 8 of 10 strategies). Reflect,
|
|
450
|
+
distill, extract candidates, validation, and proactiveMaintenance selection
|
|
451
|
+
are proposal-queued; graphExtraction touches only the regenerable index.
|
|
452
|
+
|
|
453
|
+
### E1. `akm improve` stays on by default, review-first
|
|
454
|
+
|
|
455
|
+
Keep the command, the default schedules, and the proposal-generating lanes
|
|
456
|
+
(reflect, distill, extract, validation, proactiveMaintenance selection,
|
|
457
|
+
graphExtraction) exactly as they are. No blanket experimental gate.
|
|
458
|
+
|
|
459
|
+
### E2. One autonomy gate for the mutating lanes
|
|
460
|
+
|
|
461
|
+
**Action:** a single config opt-in — `experimental.improveAutonomy: true`
|
|
462
|
+
(mechanism per F1) — required for: consolidate's merge/delete/contradict
|
|
463
|
+
operations (its memory→knowledge *promotion* proposals stay ungated), the
|
|
464
|
+
memory cleanup + contradiction pre-pass, memoryInference's direct writes,
|
|
465
|
+
triage `applyMode: "promote"` (including the judgment tier's accepts), and
|
|
466
|
+
unattended **push** (commit stays; `push` default flips to `false` — an
|
|
467
|
+
hourly cron job pushing to a remote is not a defensible default).
|
|
468
|
+
|
|
469
|
+
> **Outcome note (D8):** the push half was NOT adopted. `sync.push` keeps its
|
|
470
|
+
> `true` default and stays outside the gate — it publishes already-committed
|
|
471
|
+
> content to a remote the user configured for that purpose, and it already has
|
|
472
|
+
> `sync.push: false` and `--no-push`. The other five lanes are gated as
|
|
473
|
+
> recommended. See D8 in the decision record.
|
|
474
|
+
|
|
475
|
+
Ship an
|
|
476
|
+
`experimental-autonomous` strategy that enables all of it with the existing
|
|
477
|
+
guardrails (bounded triage ceilings, validators, protected refs, budgets,
|
|
478
|
+
audit events); `reflect-distill` and `proactive-maintenance` keep their
|
|
479
|
+
promote wiring but refuse to run it without the gate.
|
|
480
|
+
|
|
481
|
+
Two deliberate scope notes: extract's `indexSessions` (additive-only
|
|
482
|
+
`sessions/**` writes) and distill's salience frontmatter stamp
|
|
483
|
+
(metadata-only) stay ungated but get documented as direct writes in H1.
|
|
484
|
+
|
|
485
|
+
### E3. Never a silent no-op
|
|
486
|
+
|
|
487
|
+
A scheduled run that hits a gated lane emits an `improve_skipped` event with
|
|
488
|
+
the exact config key to set, surfaces in `akm tasks doctor`, and raises a
|
|
489
|
+
health advisory. Existing 0.8-era schedules therefore keep running
|
|
490
|
+
review-first and *tell* the operator what changed.
|
|
491
|
+
|
|
492
|
+
### E4. `--auto-accept`: remove the retired flag
|
|
493
|
+
|
|
494
|
+
The strict 0.9 runtime does not preserve a dead confidence-gate flag. Scheduled
|
|
495
|
+
commands must remove it and use the explicit replacement when promotion is
|
|
496
|
+
desired:
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
akm improve && akm proposal drain --promote --yes
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
(defaults: `personal-stash` policy, 25-accept ceiling), plus the config-only
|
|
503
|
+
alternative (triage block with `applyMode: "promote"` — noting it drains the
|
|
504
|
+
*standing* backlog, see E5).
|
|
505
|
+
|
|
506
|
+
### E5. Close the same-run promotion gap
|
|
507
|
+
|
|
508
|
+
Verified: triage runs only as a **pre-pass** before generation
|
|
509
|
+
(`improve.ts:241-243`); with config-only triage, run N's proposals promote at
|
|
510
|
+
the start of run N+1. The compound command above is currently the only
|
|
511
|
+
same-slot shape. **Action:** add an opt-in post-generation drain
|
|
512
|
+
(`triage.postPass: true` or `akm improve --drain`) sharing the same policy,
|
|
513
|
+
ceilings, and gate — so the documented replacement doesn't need shell `&&`
|
|
514
|
+
chaining to match 0.8 behavior.
|
|
515
|
+
|
|
516
|
+
### E6. Setup: ask about schedules explicitly; align `--yes` with interactive
|
|
517
|
+
|
|
518
|
+
Today interactive setup installs OS scheduler entries (hourly + 4-hourly
|
|
519
|
+
LLM-calling improve jobs) with only a "server install?" question, while
|
|
520
|
+
`--yes` installs none — materially different installs. **Action:** one
|
|
521
|
+
explicit question — "Install scheduled maintenance tasks? (review-first;
|
|
522
|
+
they queue proposals for your review)" — and `--yes` registers the same
|
|
523
|
+
review-first task set (autonomous variants additionally require the E2
|
|
524
|
+
gate). Upgrades: existing schedules continue review-first with the E3
|
|
525
|
+
signposting; customized 0.8 profiles get a documented manual migration.
|
|
526
|
+
|
|
527
|
+
### E7. Declare the tuning config experimental
|
|
528
|
+
|
|
529
|
+
`improve.strategies.*.processes.*` (~60 fields, most commented "Default
|
|
530
|
+
OFF" / "advisory in v1") and `index.*` (catchall pass names, retired-but-
|
|
531
|
+
tolerated keys, "accept-any until Chunk 2" fields) are still being designed —
|
|
532
|
+
the roadmap says so. **Action:** STABILITY.md declares both key families
|
|
533
|
+
Experimental (droppable in any 0.9.x/0.10.x release); schema-reject or delete
|
|
534
|
+
the already-deprecated `symmetricValence`. The `akm improve` *command*
|
|
535
|
+
surface stays Evolving.
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## F. Gate — one experimental mechanism for the half-built surfaces
|
|
540
|
+
|
|
541
|
+
### F1. A single `experimental.*` config namespace
|
|
542
|
+
|
|
543
|
+
Scattered "EXPERIMENTAL:" help-text labels gate nothing today. **Action:**
|
|
544
|
+
one mechanism — `experimental.<feature>: true` config keys (settable via
|
|
545
|
+
`akm config set`). An ungated invocation fails with a structured error naming
|
|
546
|
+
the exact key (never a silent no-op, per E3). Features:
|
|
547
|
+
|
|
548
|
+
- `experimental.workflowEngine` — `akm workflow run|brief|report|watch` and
|
|
549
|
+
YAML program creation (`workflow create <name>.yaml` currently routes users
|
|
550
|
+
onto the experimental engine from a stable verb; live `TODO(R2)` markers
|
|
551
|
+
remain in the engine). Classic markdown workflows and
|
|
552
|
+
`start/next/complete/status/list` stay stable and ungated.
|
|
553
|
+
- `experimental.improveAutonomy` — E2.
|
|
554
|
+
|
|
555
|
+
(`akm mv` was the third candidate here; C3b recommended removal instead. That
|
|
556
|
+
recommendation was not adopted — mv ships classified Experimental, with the
|
|
557
|
+
documented rename procedure routed around it. See D3 in the decision record.)
|
|
558
|
+
|
|
559
|
+
`akm graph` needs no gate — it is read-only diagnostics — but gets classified
|
|
560
|
+
Experimental in H1. `health --format html` is resolved by B1 (a registered
|
|
561
|
+
renderer; layout documented as non-contractual).
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
## G. Unify — naming, while breaking is still cheap
|
|
566
|
+
|
|
567
|
+
- **G1.** `--filter` (search) vs `--scope` (show) are the same multi-tenant
|
|
568
|
+
narrowing with identical syntax. Pick one spelling (recommend `--filter`);
|
|
569
|
+
alias-free.
|
|
570
|
+
- **G2.** `--source` means "bundle name/path" on `graph` but
|
|
571
|
+
`stash|registry|both` on `search`/`curate`. Rename the latter axis to
|
|
572
|
+
`--from stash|registry|both`; named-bundle narrowing stays on `--source`
|
|
573
|
+
(documented, per C2).
|
|
574
|
+
- **G3.** `--target` = write destination on write commands (keep), but
|
|
575
|
+
"bundle to operate on" on `tasks` (rename to `--bundle`). Positional
|
|
576
|
+
`target`s on `workflow`/`remove` are fine (positionals, different axis).
|
|
577
|
+
- **G4.** `claude` vs `claude-code`: make the harness id `claude` canonical
|
|
578
|
+
everywhere; `extract --type` accepts both, docs use `claude`. Fix
|
|
579
|
+
`extract --auto`'s description ("every available harness" = 2 of 10
|
|
580
|
+
registered).
|
|
581
|
+
- **G5.** Help-text spellings `--dryRun`/`--showSimilar` → `--dry-run`/
|
|
582
|
+
`--show-similar` (both parse already; the help is what gets scripted).
|
|
583
|
+
- **G6.** Small polish, one pass: `curate --limit` default `"4"` → numeric
|
|
584
|
+
handling note; `hints --detail` shadowing the global flag with a different
|
|
585
|
+
default; bare `akm tasks` → keep the doctor default but document it.
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
## H. Document — make STABILITY.md whole
|
|
590
|
+
|
|
591
|
+
- **H1.** Classify the twelve unlisted top-level commands (`health`, `graph`
|
|
592
|
+
(Experimental), `upgrade`, `registry`, `migrate`/`backup` (per D1:
|
|
593
|
+
internal, removal scheduled), `lint`, `extract`, `hints`, `completions`,
|
|
594
|
+
`init`) and every `env`/`secret` write verb. Note the two ungated direct
|
|
595
|
+
writes kept in E2's scope notes.
|
|
596
|
+
- **H2.** Fix stale enumerations: agent backends (10, not 5), improve
|
|
597
|
+
strategies (10, not 5), the free-form type story (A3), every `stashDir`
|
|
598
|
+
and `type:name` mention (C8).
|
|
599
|
+
- **H3.** ✅ **Shipped** — `STABILITY.md` § "Environment variables" now
|
|
600
|
+
carries a supported/internal-split table. **Add the env-var table:**
|
|
601
|
+
**supported** (`AKM_STASH_DIR`,
|
|
602
|
+
`AKM_CONFIG_DIR`, `AKM_DATA_DIR`, `AKM_CACHE_DIR`, api-key vars incl.
|
|
603
|
+
`AKM_ENGINE_<NAME>_API_KEY`, `AKM_VERBOSE`, `AKM_DEBUG`,
|
|
604
|
+
`AKM_NON_INTERACTIVE`, `AKM_REGISTRY_URL`, `AKM_NPM_REGISTRY`,
|
|
605
|
+
`AKM_SQLITE_JOURNAL_MODE`, `AKM_BIN`, `AKM_FORCE_SETUP_TMP_STASH`) vs
|
|
606
|
+
**internal, no compatibility guarantee** (`AKM_NODE_ENTRY`,
|
|
607
|
+
`AKM_EVENT_SOURCE`, `AKM_SESSION_ID`/`AKM_AGENT_HARNESS`,
|
|
608
|
+
`AKM_EMBED_DETERMINISTIC`, `AKM_CLAUDE_PROJECTS_DIR`,
|
|
609
|
+
`AKM_FORCE_INIT_TMP_STASH`, `AKM_STATE_DIR`, and — until compiled out —
|
|
610
|
+
`AKM_TEST_MIGRATION_*`).
|
|
611
|
+
- **H4.** Make the ref-grammar entry truthful: `#fragment` is consumed by
|
|
612
|
+
`akm show` on markdown-document assets (heading slug) and reserved as an
|
|
613
|
+
adapter-owned selector elsewhere (per C3's spec decision); reconcile the
|
|
614
|
+
1.0-freeze line, which currently spells the grammar *without* the fragment.
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
## Suggested cut line for 0.9.0
|
|
619
|
+
|
|
620
|
+
1. **A1–A3** — defects; A1 especially (there is currently *no* way to disable
|
|
621
|
+
the boost).
|
|
622
|
+
2. **E2 + E3 + E4's warning text** — the autonomy gate and the no-silent-no-op
|
|
623
|
+
rule are the difference between "review-first by default" being true and
|
|
624
|
+
being marketing. E5/E6 can follow in 0.9.x.
|
|
625
|
+
3. **C1–C3b** — the four structural removals (bundle, browse grammar, show
|
|
626
|
+
views→fragment, mv). Each gets dramatically more expensive after release;
|
|
627
|
+
C3 requires its one-paragraph spec decision first, and C3b must land its
|
|
628
|
+
txn-kind cleanup in the same change or the indexer breaks.
|
|
629
|
+
4. **B1–B2** — the format contract. If the generic renderers slip, the
|
|
630
|
+
minimum bar is: uniform UsageError for unimplemented md/html (no silent
|
|
631
|
+
JSON), and the `graph export --format` removal.
|
|
632
|
+
5. **C4–C9** — cheap deletions, all one-way doors after 0.9.x.
|
|
633
|
+
6. **D1** — extraction can land in a 0.9.x patch, but the *declaration*
|
|
634
|
+
(migrate/backup internal, removal scheduled) must ship in 0.9.0's
|
|
635
|
+
STABILITY.md.
|
|
636
|
+
7. **G, H** — naming unification and the docs pass close the release.
|