akm-cli 0.9.30 → 0.10.261001-beta
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 +438 -0
- package/README.md +10 -10
- package/ROADMAP.md +112 -0
- package/STABILITY.md +99 -57
- package/dist/api-node.mjs +20 -0
- package/dist/api.d.ts +23 -0
- package/dist/api.js +45 -0
- package/dist/assets/hints/cli-hints-full.md +15 -29
- package/dist/assets/hints/cli-hints-short.md +2 -2
- package/dist/assets/improve-strategies/default.json +3 -3
- package/dist/assets/prompts/consolidate-pair.md +9 -7
- package/dist/assets/stash-skeleton/README.md +1 -1
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
- package/dist/cli/shared.js +31 -48
- package/dist/cli/unknown-flags.js +6 -43
- package/dist/cli.js +8 -34
- package/dist/commands/agent/contribute-cli.js +1 -1
- package/dist/commands/completions.js +1 -2
- package/dist/commands/config-cli.js +5 -28
- package/dist/commands/env/env-cli.js +5 -5
- package/dist/commands/env/secret-cli.js +2 -2
- package/dist/commands/feedback-cli.js +75 -49
- package/dist/commands/health/checks.js +41 -16
- package/dist/commands/health/plugin-staleness.js +52 -22
- package/dist/commands/improve/autonomy-gate.js +5 -3
- package/dist/commands/improve/consolidate/chunking.js +3 -10
- package/dist/commands/improve/consolidate/continuity-check.js +4 -4
- package/dist/commands/improve/consolidate/pair-pass.js +29 -10
- package/dist/commands/improve/consolidate.js +10 -65
- package/dist/commands/improve/distill/lesson-update.js +91 -0
- package/dist/commands/improve/distill-guards.js +1 -43
- package/dist/commands/improve/distill.js +148 -21
- package/dist/commands/improve/eligibility.js +14 -1
- package/dist/commands/improve/extract-cli.js +1 -1
- package/dist/commands/improve/extract-prompt.js +17 -7
- package/dist/commands/improve/extract.js +5 -7
- package/dist/commands/improve/improve-cli.js +125 -118
- package/dist/commands/improve/improve-strategies.js +8 -12
- package/dist/commands/improve/improve.js +134 -52
- package/dist/commands/improve/loop-stages.js +18 -5
- package/dist/commands/improve/planner.js +0 -1
- package/dist/commands/improve/preparation.js +40 -99
- package/dist/commands/improve/proactive-maintenance.js +2 -2
- package/dist/commands/improve/reflect-noise.js +3 -55
- package/dist/commands/improve/reflect.js +29 -34
- package/dist/commands/improve/retrieval-queries.js +37 -0
- package/dist/commands/improve/retrieval-scope.js +2 -2
- package/dist/commands/improve/salience.js +2 -9
- package/dist/commands/improve/session-asset.js +4 -1
- package/dist/commands/improve/stage.js +23 -12
- package/dist/commands/lint/index.js +5 -20
- package/dist/commands/observability-cli.js +3 -9
- package/dist/commands/proposal/drain.js +43 -6
- package/dist/commands/proposal/proposal-cli.js +11 -31
- package/dist/commands/proposal/repository.js +20 -14
- package/dist/commands/proposal/validators/proposal-quality-validators.js +0 -3
- package/dist/commands/read/knowledge.js +3 -3
- package/dist/commands/read/remember-cli.js +0 -13
- package/dist/commands/read/search-cli.js +29 -97
- package/dist/commands/read/search.js +0 -11
- package/dist/commands/read/show.js +0 -19
- package/dist/commands/sources/plugin-upgrade.js +164 -101
- package/dist/commands/sources/sources-cli.js +1 -15
- package/dist/commands/sources/stash-cli.js +6 -14
- package/dist/commands/tasks/tasks-cli.js +4 -115
- package/dist/commands/workflow/plan.js +11 -33
- package/dist/commands/workflow-cli.js +2 -7
- package/dist/core/adapter/adapter-ids.js +1 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
- package/dist/core/adapter/adapters/akm-adapter.js +9 -48
- package/dist/core/adapter/adapters/akm-lint.js +10 -26
- package/dist/core/adapter/adapters/akm-metadata.js +2 -72
- package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
- package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
- package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
- package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
- package/dist/core/adapter/recognize-match.js +3 -4
- package/dist/core/common.js +18 -2
- package/dist/core/config/config-schema.js +12 -15
- package/dist/core/config/config-types.js +6 -15
- package/dist/core/config/config-walker.js +6 -23
- package/dist/core/config/config.js +17 -80
- package/dist/core/config/engine-semantics.js +7 -3
- package/dist/core/config/schema/engines.js +7 -7
- package/dist/core/config/schema/improve-processes.js +10 -63
- package/dist/core/config/schema/improve.js +2 -21
- package/dist/core/config/schema/index-config.js +6 -39
- package/dist/core/env-secret-ref.js +2 -45
- package/dist/core/errors.js +1 -2
- package/dist/core/extra-params.js +2 -86
- package/dist/core/file-lock.js +12 -7
- package/dist/core/improve-result.js +13 -1
- package/dist/core/mutation-target.js +2 -2
- package/dist/core/paths.js +4 -0
- package/dist/core/recognition-util.js +4 -5
- package/dist/core/run-lock.js +1 -1
- package/dist/core/subprocess.js +49 -0
- package/dist/core/warn.js +21 -4
- package/dist/core/write-source.js +3 -3
- package/dist/execution/target-ref.js +1 -2
- package/dist/indexer/indexer.js +15 -6
- package/dist/indexer/passes/memory-inference.js +15 -6
- package/dist/indexer/search/db-search.js +49 -36
- package/dist/indexer/search/fts-query.js +0 -19
- package/dist/indexer/search/ranking.js +29 -1
- package/dist/indexer/usage/usage-events.js +21 -16
- package/dist/integrations/agent/engine-resolution.js +5 -2
- package/dist/integrations/agent/index.js +1 -1
- package/dist/integrations/agent/profiles.js +41 -98
- package/dist/integrations/agent/request-lowering.js +3 -3
- package/dist/integrations/harnesses/aider/index.js +5 -0
- package/dist/integrations/harnesses/amazonq/index.js +1 -0
- package/dist/integrations/harnesses/claude/config-import.js +2 -3
- package/dist/integrations/harnesses/claude/index.js +5 -0
- package/dist/integrations/harnesses/codex/index.js +1 -0
- package/dist/integrations/harnesses/copilot/index.js +1 -0
- package/dist/integrations/harnesses/gemini/index.js +1 -0
- package/dist/integrations/harnesses/index.js +18 -39
- package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
- package/dist/integrations/harnesses/opencode/config-import.js +121 -52
- package/dist/integrations/harnesses/opencode/index.js +22 -0
- package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
- package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
- package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
- package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
- package/dist/integrations/harnesses/opencode/session-log.js +104 -115
- package/dist/integrations/harnesses/opencode/version.js +98 -0
- package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
- package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
- package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +254 -0
- package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
- package/dist/integrations/harnesses/openhands/index.js +1 -0
- package/dist/integrations/harnesses/pi/index.js +1 -0
- package/dist/integrations/harnesses/shared.js +2 -0
- package/dist/integrations/harnesses/types.js +2 -0
- package/dist/llm/client.js +74 -14
- package/dist/output/cli-hints.js +1 -1
- package/dist/output/context.js +10 -19
- package/dist/output/format-exempt.js +5 -8
- package/dist/output/shapes/helpers.js +1 -22
- package/dist/output/shapes/passthrough.js +0 -1
- package/dist/output/shapes.js +3 -31
- package/dist/output/stdout.js +5 -1
- package/dist/output/text/command-format.js +6 -1
- package/dist/output/text/workflow-format.js +4 -22
- package/dist/scripts/akm-migrate-node.js +15769 -16731
- package/dist/scripts/akm-migrate.js +16339 -17297
- package/dist/setup/detect.js +10 -4
- package/dist/setup/harness-config-import.js +5 -14
- package/dist/setup/setup.js +1 -1
- package/dist/setup/steps/tasks.js +12 -13
- package/dist/sources/providers/git-stash.js +94 -13
- package/dist/storage/repositories/index-utility-repository.js +2 -32
- package/dist/storage/repositories/index-vec-repository.js +4 -0
- package/dist/storage/repositories/task-history-repository.js +0 -5
- package/dist/storage/repositories/workflow-runs-repository.js +5 -15
- package/dist/tasks/embedded.js +2 -1
- package/dist/tasks/run/run-command-task.js +9 -1
- package/dist/tasks/run/run-workflow-task.js +4 -3
- package/dist/tasks/run/task-history.js +0 -2
- package/dist/tasks/run/task-log.js +38 -1
- package/dist/tasks/schedule-gates.js +39 -0
- package/dist/tasks/scheduler-binding.js +0 -16
- package/dist/tasks/scheduler-sync.js +3 -97
- package/dist/tasks/source/bounded-document.js +1 -1
- package/dist/tasks/source/task-source-v4.js +2 -12
- package/dist/tasks/task-run-reserved-flags.js +2 -31
- package/dist/workflows/authoring/authoring.js +6 -6
- package/dist/workflows/compile.js +8 -65
- package/dist/workflows/exec/child-workflow.js +22 -3
- package/dist/workflows/exec/native-executor.js +12 -147
- package/dist/workflows/exec/run-workflow.js +31 -103
- package/dist/workflows/exec/step-work.js +9 -178
- package/dist/workflows/exec/unit-dispatch.js +0 -10
- package/dist/workflows/freeze/environment.js +3 -44
- package/dist/workflows/freeze/freeze.js +8 -41
- package/dist/workflows/freeze/targets/child-workflow.js +27 -63
- package/dist/workflows/freeze/targets/command.js +2 -16
- package/dist/workflows/freeze/targets/shell.js +0 -2
- package/dist/workflows/freeze/task-bindings.js +2 -28
- package/dist/workflows/ir/params.js +12 -2
- package/dist/workflows/parser.js +82 -232
- package/dist/workflows/plan.js +1 -1
- package/dist/workflows/renderer.js +10 -19
- package/dist/workflows/runtime/run-plan.js +11 -53
- package/dist/workflows/runtime/runs.js +4 -27
- package/dist/workflows/source-files.js +12 -16
- package/dist/workflows/source-semantics.js +1 -93
- package/docs/README.md +43 -42
- package/docs/agents/README.md +15 -0
- package/docs/agents/agent-install.md +14 -0
- package/docs/architecture/0.10-process-rules.md +827 -0
- package/docs/architecture/README.md +67 -0
- package/docs/architecture/adapters.md +258 -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 +578 -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 +479 -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 +719 -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 +248 -0
- package/docs/architecture/internals/storage-locations.md +943 -0
- package/docs/architecture/persisted-data-compat.md +68 -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 +532 -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 +432 -0
- package/docs/architecture/testing/manual-testing-checklist.md +3411 -0
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +924 -0
- package/docs/architecture/testing/task-workflow-manual-tests.md +1720 -0
- package/docs/architecture/testing/testing-workflow.md +446 -0
- package/docs/architecture/workflow-engine.md +223 -0
- package/docs/guides/README.md +33 -0
- package/docs/guides/author-bundles.md +310 -0
- package/docs/guides/author-workflows.md +490 -0
- package/docs/guides/bundles.md +323 -0
- package/docs/guides/capture-knowledge.md +136 -0
- package/docs/guides/claude-code-vs-akm-workflows.md +29 -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 +247 -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 +131 -0
- package/docs/guides/use-with-any-agent.md +174 -0
- package/docs/guides/wikis.md +81 -0
- package/docs/integration/bundling-akm.md +7 -6
- package/docs/maintainers/README.md +19 -0
- package/docs/maintainers/curate-workmap.md +335 -0
- package/docs/maintainers/eval.md +3 -0
- package/docs/maintainers/local-development.md +108 -0
- package/docs/maintainers/release-checklist.md +135 -0
- package/docs/migration/README.md +4 -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.10.0.md +201 -0
- 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 +28 -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/migration/v0.9-to-v0.10.md +507 -0
- 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 +2 -2
- package/docs/reference/api.md +65 -0
- package/docs/reference/asset-types.md +166 -0
- package/docs/reference/bundle-types.md +2 -4
- package/docs/reference/cli.md +163 -192
- package/docs/reference/configuration.md +101 -20
- package/docs/reference/data-and-telemetry.md +2 -2
- 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/supported-formats.md +3 -4
- package/docs/reference/tasks.md +12 -19
- package/docs/reference/website-sources.md +141 -0
- package/docs/reference/workflow-schema.md +89 -317
- package/docs/reference/workflows.md +20 -48
- package/package.json +23 -16
- package/schemas/akm-config.json +2 -243
- package/schemas/akm-task.json +2 -3
- package/schemas/akm-workflow.json +47 -84
- package/dist/assets/improve-strategies/catchup.json +0 -41
- package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
- package/dist/assets/improve-strategies/quick.json +0 -17
- package/dist/assets/improve-strategies/reflect-distill.json +0 -29
- package/dist/assets/improve-strategies/thorough.json +0 -49
- package/dist/assets/prompts/retrieval-relevance-judge.md +0 -6
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
- package/dist/cli/retired-commands.js +0 -118
- package/dist/commands/improve/retrieval-gate.js +0 -132
- package/dist/commands/tasks/validate.js +0 -176
- package/dist/core/config/legacy-source-shape-shim.js +0 -117
- package/dist/indexer/feedback/utility-policy.js +0 -75
- package/dist/integrations/harnesses/ids.js +0 -28
- package/dist/tasks/source/task-source-v3-frozen.js +0 -424
- package/dist/tasks/source/task-to-v4.js +0 -863
- package/dist/workflows/exec/worktree.js +0 -372
- package/dist/workflows/freeze/child-output-references.js +0 -83
- package/dist/workflows/freeze/identity.js +0 -22
- package/dist/workflows/freeze/targets/script.js +0 -50
- package/dist/workflows/freeze/targets/task.js +0 -124
- package/dist/workflows/github-yaml.js +0 -506
- package/dist/workflows/runtime/run-outputs.js +0 -80
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# OKF format support
|
|
2
|
+
|
|
3
|
+
**Status:** DECIDED (0.9.0). OKF is a first-class format supported by AKM
|
|
4
|
+
through the built-in `okf` adapter. First-class means every applicable case in
|
|
5
|
+
the conformance runbook passes end to end; adapter-local recognition alone is
|
|
6
|
+
not sufficient.
|
|
7
|
+
|
|
8
|
+
## The decision
|
|
9
|
+
|
|
10
|
+
OKF is AKM's least-common-denominator format for Markdown concepts and generic
|
|
11
|
+
read behavior. AKM can install, recognize, index, search, and show conformant
|
|
12
|
+
OKF bundles without converting them to an AKM-native layout. OKF support is
|
|
13
|
+
held to the observable conformance contract in the
|
|
14
|
+
[OKF v0.2 conformance runbook](../testing/okf-v0.2-conformance-runbook.md).
|
|
15
|
+
|
|
16
|
+
That baseline does not make OKF AKM's database schema or force non-Markdown
|
|
17
|
+
formats through Markdown. In particular, OKF is **not**:
|
|
18
|
+
|
|
19
|
+
- an AKM asset type;
|
|
20
|
+
- a serialization imposed on scripts, YAML tasks, environment files, secrets,
|
|
21
|
+
Agent Skills, or other native non-Markdown assets;
|
|
22
|
+
- a replacement for adapter-owned capability, validation, redaction, placement,
|
|
23
|
+
or execution rules.
|
|
24
|
+
|
|
25
|
+
The core provides path identity, open descriptive types, generic Markdown
|
|
26
|
+
content/fragment reads, and a normalized search projection. Adapters add
|
|
27
|
+
behavior to that baseline. They never narrow the core by rejecting an item only
|
|
28
|
+
because its `type` is unfamiliar.
|
|
29
|
+
|
|
30
|
+
## First-class support contract
|
|
31
|
+
|
|
32
|
+
For a bundle selected as `adapter: okf`, AKM must provide all of the following:
|
|
33
|
+
|
|
34
|
+
1. Every conformant non-reserved Markdown concept is recognized with its OKF
|
|
35
|
+
path-minus-`.md` concept ID.
|
|
36
|
+
2. `type`, `title`, `description`, `tags`, and `timestamp` are read according
|
|
37
|
+
to OKF rules. Unknown types and unknown frontmatter fields remain valid.
|
|
38
|
+
3. `index.md` and `log.md` retain their OKF structural meaning and are not
|
|
39
|
+
indexed as concepts.
|
|
40
|
+
4. OKF links are retained as relationships. A dangling link does not prevent
|
|
41
|
+
indexing.
|
|
42
|
+
5. A ref emitted by search for an OKF concept is accepted by show and other
|
|
43
|
+
applicable ref-consuming commands. Adapter-owned concept IDs such as
|
|
44
|
+
`tables/customers` must not be rejected merely because they do not use an
|
|
45
|
+
AKM bundle placement directory.
|
|
46
|
+
6. Markdown heading fragments are accepted as input-only selectors and never
|
|
47
|
+
become part of durable identity.
|
|
48
|
+
7. An OKF target without adapter-owned authoring rejects AKM-native write
|
|
49
|
+
commands before touching disk. AKM must never silently place native files in
|
|
50
|
+
an OKF bundle.
|
|
51
|
+
|
|
52
|
+
The shipped `okf` adapter is consumer-only. Its supported behavior is the
|
|
53
|
+
portable content/fragment baseline; it does not infer task, command, script,
|
|
54
|
+
environment, or secret capabilities from an arbitrary OKF `type` value.
|
|
55
|
+
|
|
56
|
+
## Progressive enhancement
|
|
57
|
+
|
|
58
|
+
AKM Markdown is an OKF-compatible superset. Newly authored AKM Markdown emits a
|
|
59
|
+
non-empty native `type` plus any AKM-specific frontmatter required by its asset
|
|
60
|
+
kind. The `akm` adapter still derives native identity and capability from its
|
|
61
|
+
directory, extension, filename, and content rules; frontmatter `type` does not
|
|
62
|
+
override those rules. Existing legacy Markdown without `type` remains readable
|
|
63
|
+
and is upgraded when AKM creates or semantically rewrites it rather than during
|
|
64
|
+
indexing.
|
|
65
|
+
|
|
66
|
+
The result is progressive enhancement:
|
|
67
|
+
|
|
68
|
+
1. Any OKF type gets path identity, indexing, search, content show, and heading
|
|
69
|
+
fragments through the `okf` adapter.
|
|
70
|
+
2. The `akm` adapter recognizes AKM-owned types and adds their specialized
|
|
71
|
+
behavior: command prompts, runnable scripts, workflows, tasks, redacted
|
|
72
|
+
environment/secret views, memories, lessons, and other native capabilities.
|
|
73
|
+
3. Unknown `type` values remain valid data. They get generic behavior unless
|
|
74
|
+
the selected adapter explicitly adds more.
|
|
75
|
+
|
|
76
|
+
`akm bundle create` records `adapter: akm`. `akm bundle add` records the detected adapter, and an
|
|
77
|
+
explicit configured adapter always wins over probing. Strong native AKM layout
|
|
78
|
+
evidence wins before the broader OKF probe because AKM Markdown is an OKF
|
|
79
|
+
superset. An index-less bundle containing conformant typed Markdown can still be
|
|
80
|
+
recognized as OKF.
|
|
81
|
+
|
|
82
|
+
The normalized `IndexDocument` is the additive cross-format projection. Its
|
|
83
|
+
basic Markdown fields align with OKF, while adapters may project additional
|
|
84
|
+
metadata and capabilities without changing identity.
|
|
85
|
+
|
|
86
|
+
## v0.2 update (#730)
|
|
87
|
+
|
|
88
|
+
OKF v0.2 (Google Cloud) adds a trust/provenance frontmatter family
|
|
89
|
+
(`generated`/`verified`/`sources`) and a lifecycle family
|
|
90
|
+
(`status`/`stale_after`), standardizes an actor convention
|
|
91
|
+
(`<producer>/<version>` / `human:<id>` / `process:<id>`), and makes one
|
|
92
|
+
breaking-with-fallback change: `timestamp` is superseded by `generated.at`,
|
|
93
|
+
with consumers permitted (and expected) to fall back to the legacy
|
|
94
|
+
`timestamp` field when `generated`/`generated.at` is absent. The decision
|
|
95
|
+
above is unchanged by this update — the `okf` adapter remains **consumer-only**
|
|
96
|
+
and the read/write split stays exactly where §5/§5.1 already drew it:
|
|
97
|
+
|
|
98
|
+
- **Read side (any OKF bundle, third-party or AKM-authored):** the `okf`
|
|
99
|
+
adapter parses the full v0.2 family — `generated.at` (with the `timestamp`
|
|
100
|
+
fallback), `verified` (a list, or v0.2's permitted single-mapping
|
|
101
|
+
shorthand), `sources` (an object list), `status`, `stale_after`, and
|
|
102
|
+
`okf_version` — leniently, exactly like every other optional OKF field
|
|
103
|
+
(missing, malformed, or foreign values never reject a document). These land
|
|
104
|
+
on new, NAMESPACED `IndexDocument` fields (`provenance`, `lifecycleStatus`,
|
|
105
|
+
`staleAfter`, `okfVersion`) rather than overloading the three AKM-native
|
|
106
|
+
fields that already occupy adjacent names: `sources?: string[]` (wiki
|
|
107
|
+
citation strings), `generation?: number` (consolidation merge depth), and
|
|
108
|
+
the existing `quality: "generated"` enum value. See
|
|
109
|
+
`akm-0.9.0-bundle-adapter-spec.md` §0.1 for the full mapping.
|
|
110
|
+
- **Write side (AKM-native assets only, through the proposal path):** since
|
|
111
|
+
AKM Markdown is already an OKF-compatible superset (the progressive-
|
|
112
|
+
enhancement contract above), the new provenance fields are *written* only
|
|
113
|
+
to AKM-native assets, at proposal-promotion time (`promoteProposal`) —
|
|
114
|
+
never through the `okf` adapter, which stays consumer-only. Accepting a
|
|
115
|
+
proposal stamps the v0.2 families using the existing
|
|
116
|
+
`source`/`sourceRun`/`gateDecision`/`review` provenance the proposals system
|
|
117
|
+
already tracks in `state.db`.
|
|
118
|
+
|
|
119
|
+
The on-disk shape is deliberately **hybrid**:
|
|
120
|
+
|
|
121
|
+
- `generated: {by, at}` and `verified: [{by, at}]` are written **bare at the
|
|
122
|
+
top level**, exactly as OKF v0.2 spells them. Neither key has any
|
|
123
|
+
pre-existing AKM consumer, so spelling them the spec's way costs nothing
|
|
124
|
+
and makes the OKF-superset claim above true *for trust metadata* — a
|
|
125
|
+
third-party OKF v0.2 reader pointed at an AKM bundle sees conformant
|
|
126
|
+
provenance rather than one unrecognized `provenance:` key.
|
|
127
|
+
- `sources` alone stays namespaced as `provenance: {sources: [...]}`,
|
|
128
|
+
because a bare top-level `sources:` genuinely collides with the
|
|
129
|
+
pre-existing wiki citation-**string** convention noted above.
|
|
130
|
+
|
|
131
|
+
Every AKM-native markdown type is stamped. `workflow` is the only type whose
|
|
132
|
+
frontmatter is parsed against a closed allowlist, and that allowlist admits
|
|
133
|
+
these keys; a re-validation fallback (promote unstamped, warn) is retained
|
|
134
|
+
only as a backstop should a future type add a closed allowlist.
|
|
135
|
+
|
|
136
|
+
`stale_after`-driven re-verification and trust-tier ranking are explicitly
|
|
137
|
+
out of scope for 0.9.0 (an 0.9.x improve-tuning track).
|
|
138
|
+
|
|
139
|
+
OKF is a month-old, single-vendor **Draft** with no governance body; AKM
|
|
140
|
+
vendors a frozen copy of the spec rules it implements rather than tracking
|
|
141
|
+
upstream live. See the conformance runbook for the pinned upstream reference.
|
|
142
|
+
|
|
143
|
+
## See also
|
|
144
|
+
|
|
145
|
+
- [`akm-0.9.0-bundle-adapter-spec.md`](./akm-0.9.0-bundle-adapter-spec.md)
|
|
146
|
+
defines the concrete `okf` and `akm` adapter boundaries.
|
|
147
|
+
- [`ref.md`](./ref.md) defines the cross-format ref grammar.
|
|
148
|
+
- [`0.9.0-decisions.md`](./0.9.0-decisions.md) records this positioning as D11.
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# Ref Format
|
|
2
|
+
|
|
3
|
+
A `ref` is the identifier that `akm search` returns for items and `akm show`
|
|
4
|
+
consumes.
|
|
5
|
+
|
|
6
|
+
Agents should not parse refs or construct them by hand. The intended flow is:
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
search -> pick a hit -> pass its ref to show
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
> **Status.** This document is normative for 0.9.0 and is the target the
|
|
13
|
+
> implementation is being brought to. Sections marked **[0.9.0 change]**
|
|
14
|
+
> describe decisions taken during the 0.9.0 surface review that the code does
|
|
15
|
+
> not yet fully implement; see
|
|
16
|
+
> [`0.9.0-release-surface-review.md`](./0.9.0-release-surface-review.md) and
|
|
17
|
+
> [`0.9.0-decisions.md`](./0.9.0-decisions.md).
|
|
18
|
+
|
|
19
|
+
## Item Refs
|
|
20
|
+
|
|
21
|
+
Item refs use this wire format:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
[bundle//]conceptId[#fragment]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Part | Required | Description |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `bundle` | no | Workspace bundle slug (e.g. `personal`, `team-catalog`) that owns the item. Separated from the rest of the ref by `//`. When omitted, the ref resolves against the containing bundle (content-internal refs) or, for CLI/API input, against `defaultBundle` and then the remaining bundles in installation-priority order. |
|
|
30
|
+
| `conceptId` | yes | Adapter-defined path within the bundle, `/`-separated and canonicalized by that adapter. Examples: `knowledge/http-caching`, `skills/code-review`, `scripts/db/migrate/run.sh`, `tables/customers`. |
|
|
31
|
+
| `fragment` | no | Selector for a part of the item. For markdown-document items the core interprets it as a **section selector**; for every other item kind it is an adapter-owned selector, opaque to the core. See [Fragments](#fragments). |
|
|
32
|
+
|
|
33
|
+
`type` is **no longer part of a ref**. Identity is a path, not a `type:name`
|
|
34
|
+
pair, and a conceptId is an **opaque path** — akm does not parse meaning out of
|
|
35
|
+
its segments. `skills/deploy` and `workflows/deploy` are distinct concepts that
|
|
36
|
+
never collide because their paths differ, not because their first segment is a
|
|
37
|
+
recognized word.
|
|
38
|
+
|
|
39
|
+
An item's `type` is an **attribute of the resolved item**, supplied by the
|
|
40
|
+
selected adapter, never a predicate parsed out of the ref string. The `okf`
|
|
41
|
+
adapter reads it from OKF frontmatter; the `akm` adapter derives it from its
|
|
42
|
+
native matcher and placement rules. This is why a ref into any bundle —
|
|
43
|
+
`okfbundle//tables/customers`, `wiki//pages/attention` — is just as addressable
|
|
44
|
+
as `personal//memories/vpn-note`. See
|
|
45
|
+
[`okf-support.md`](./okf-support.md).
|
|
46
|
+
|
|
47
|
+
Refs are parsed by `parseBundleRef` in `src/core/asset/asset-ref.ts`. The
|
|
48
|
+
grammar (normative spec §11.1) is:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
ref := [ bundle "//" ] concept-id [ "#" fragment ]
|
|
52
|
+
bundle := any run of non-space chars excluding : . # /
|
|
53
|
+
concept-id := adapter-canonical path within the bundle, / -separated, NFC, case-sensitive
|
|
54
|
+
fragment := section slug (markdown-document items) | adapter-owned selector
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The bundle slug excludes `:`, `.`, `#`, `/`, and whitespace so a `bundle//conceptId`
|
|
58
|
+
token is lexically distinct from a URL (whose scheme carries a `:` before `//`) and
|
|
59
|
+
so the first `//` unambiguously bounds the bundle.
|
|
60
|
+
|
|
61
|
+
### AKM concept ids and adapter layouts
|
|
62
|
+
|
|
63
|
+
The subdirectory prefix is the item's placement directory:
|
|
64
|
+
|
|
65
|
+
| Subdir | Holds | Example conceptId |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `scripts/` | Executable scripts | `scripts/deploy.sh` |
|
|
68
|
+
| `skills/` | Skill directories (`SKILL.md`) | `skills/code-review` |
|
|
69
|
+
| `commands/` | Slash-command templates | `commands/release` |
|
|
70
|
+
| `agents/` | Agent definitions | `agents/reviewer` |
|
|
71
|
+
| `knowledge/` | Reference documents | `knowledge/api-guide` |
|
|
72
|
+
| `workflows/` | Workflow documents / programs | `workflows/ship-release` |
|
|
73
|
+
| `memories/` | Recalled context fragments | `memories/deployment-notes` |
|
|
74
|
+
| `lessons/` | Distilled feedback lessons | `lessons/retry-backoff` |
|
|
75
|
+
| `facts/` | Durable bundle-level facts | `facts/team/tool-stack` |
|
|
76
|
+
| `sessions/` | Indexed agent sessions | `sessions/claude/2026-07-24-abc` |
|
|
77
|
+
| `env/` | `.env` configuration groups | `env/prod` |
|
|
78
|
+
| `secrets/` | Single sensitive values | `secrets/deploy-token` |
|
|
79
|
+
| `tasks/` | Scheduled / on-demand tasks | `tasks/nightly-sync` |
|
|
80
|
+
|
|
81
|
+
These are the subdirs the **`akm` adapter** places into and interprets according
|
|
82
|
+
to its own matcher rules. Other bundles use whatever paths their adapters
|
|
83
|
+
declare — an OKF bundle emits `tables/customers`, an LLM wiki emits
|
|
84
|
+
`pages/attention`, and a website snapshot emits its crawled path. Every one of
|
|
85
|
+
those is an equally valid conceptId; the core does not require the leading
|
|
86
|
+
segment to be an AKM placement directory.
|
|
87
|
+
|
|
88
|
+
### Examples
|
|
89
|
+
|
|
90
|
+
- `scripts/deploy.sh`
|
|
91
|
+
- `skills/code-review`
|
|
92
|
+
- `knowledge/api-guide`
|
|
93
|
+
- `commands/release`
|
|
94
|
+
- `agents/reviewer`
|
|
95
|
+
- `memories/deployment-notes`
|
|
96
|
+
- `env/prod`
|
|
97
|
+
- `personal//knowledge/http-caching`
|
|
98
|
+
- `team-catalog//workflows/release`
|
|
99
|
+
- `knowledge/api-guide#authentication` (section selector)
|
|
100
|
+
|
|
101
|
+
### Rejected
|
|
102
|
+
|
|
103
|
+
- `viking://skills/deploy` (URI scheme — a `:` before `//` is not a bundle slug)
|
|
104
|
+
- `skills/../../../etc/passwd` (path traversal)
|
|
105
|
+
- `github:owner/repo` (this is an install ref, parsed elsewhere)
|
|
106
|
+
- the pre-0.9.0 `<type>:<name>` grammar (e.g. the old colon-typed spelling) — dead;
|
|
107
|
+
parsed only by the frozen migrator
|
|
108
|
+
|
|
109
|
+
## Fragments
|
|
110
|
+
|
|
111
|
+
**Scope: `show` only in 0.9.0 (ruled 2026-07-26, Q-06).** `parseRefInput`
|
|
112
|
+
still rejects any `#fragment` outright; `show` is the only command that
|
|
113
|
+
accepts one, by bypassing that shared parser. Every other ref-consuming
|
|
114
|
+
command (graph, tasks, improve, proposals, the utility repo, the indexer
|
|
115
|
+
walk) routes through `parseRefInput` and does not accept fragments yet.
|
|
116
|
+
Wider rollout is post-0.9.0.
|
|
117
|
+
|
|
118
|
+
**[0.9.0 change]** Before 0.9.0 the fragment production existed in the grammar
|
|
119
|
+
and in this document, but every input boundary rejected it
|
|
120
|
+
(`parseRefInput` threw `INVALID_FLAG_VALUE` for any `#fragment`) and nothing
|
|
121
|
+
consumed it. It was stable on paper and unusable in practice. 0.9.0 resolves
|
|
122
|
+
that by giving it one concrete meaning the core implements, and keeping the
|
|
123
|
+
adapter-owned meaning for everything else.
|
|
124
|
+
|
|
125
|
+
**Markdown-document items — section selector (core-implemented).** For an item
|
|
126
|
+
whose adapter presents it as a markdown document, the fragment names a section:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
akm show knowledge/api-guide#authentication
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Resolution is: slugify each heading in the document (lowercase, non-alphanumeric
|
|
133
|
+
runs collapsed to `-`, trimmed) and match the fragment against those slugs;
|
|
134
|
+
fall back to a case-insensitive match against raw heading text. The selected
|
|
135
|
+
region runs from that heading to the next heading of the same or higher level.
|
|
136
|
+
A fragment that matches no heading is an error that **lists the available
|
|
137
|
+
fragment slugs** — that error is the discovery mechanism, replacing the removed
|
|
138
|
+
`toc` view mode.
|
|
139
|
+
|
|
140
|
+
**Every other item kind — adapter-owned selector.** Per normative spec §11.3,
|
|
141
|
+
when one item exposes multiple exports the adapter MAY append a stable
|
|
142
|
+
fragment (`team//tools/toolbox#deploy`). The fragment is adapter-owned and
|
|
143
|
+
opaque to the core. The two meanings coexist because the core only interprets
|
|
144
|
+
fragments for items whose adapter declares them markdown documents; for
|
|
145
|
+
everything else it passes the fragment through untouched.
|
|
146
|
+
|
|
147
|
+
**Fragments are input-only.** Durable state — index rows, state keys, proposal
|
|
148
|
+
targets, bindings — never stores a fragment. A stored ref carrying one is
|
|
149
|
+
invalid.
|
|
150
|
+
|
|
151
|
+
### Superseded: the `akm show` view-mode grammar
|
|
152
|
+
|
|
153
|
+
**[0.9.0 change]** `akm show <ref> toc|section "H"|lines A B|frontmatter|full`
|
|
154
|
+
is removed. It was a second argv parser (`normalizeShowArgv` rewrote
|
|
155
|
+
`process.argv` and injected hidden `--akmView` / `--akmHeading` / `--akmStart` /
|
|
156
|
+
`--akmEnd` flags), and its view keywords were reserved words in ref position.
|
|
157
|
+
|
|
158
|
+
| Old | New |
|
|
159
|
+
| --- | --- |
|
|
160
|
+
| `akm show X section "Auth"` | `akm show X#auth` |
|
|
161
|
+
| `akm show X full` | `akm show X` (no fragment = whole item) |
|
|
162
|
+
| `akm show X toc` | `akm show X#<unmatched>` lists available fragment slugs |
|
|
163
|
+
| `akm show X lines 10 30` | removed — every response carries `path`; slice the file |
|
|
164
|
+
| `akm show X frontmatter` | removed — if a raw-YAML projection proves necessary it returns as a `--shape` value, the designated projection axis |
|
|
165
|
+
|
|
166
|
+
## Ref-prefix enumeration (browse)
|
|
167
|
+
|
|
168
|
+
**[0.9.0 change]** Browsing a subtree uses a **conceptId prefix**, matching the
|
|
169
|
+
grammar refs are actually emitted in:
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
akm search "memories/" # every memory in scope
|
|
173
|
+
akm search "memories/projecta/" # one subtree
|
|
174
|
+
akm search "team-catalog//" # every item in one bundle
|
|
175
|
+
akm search "team-catalog//skills/" # one subtree of one bundle
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
A trailing `/` is required for a non-empty prefix, giving exact `/`-boundary
|
|
179
|
+
subtree semantics (`projecta/` cannot match a sibling `projectalpha/`). A query
|
|
180
|
+
with interior whitespace is prose, not a prefix — it stays an ordinary keyword
|
|
181
|
+
search.
|
|
182
|
+
|
|
183
|
+
This replaces the pre-0.9.0 `akm search "<type>:"` / `"<type>:<prefix>/"`
|
|
184
|
+
grammar, which had three defects: it resurrected the singular `type:` spelling
|
|
185
|
+
the release removed; it validated against the `akm` adapter's placement types,
|
|
186
|
+
so items from every other adapter could not be enumerated at all; and it
|
|
187
|
+
matched against item *names* while every displayed ref is a conceptId — so
|
|
188
|
+
copying a ref prefix out of search output and pasting it back in silently
|
|
189
|
+
degraded to a keyword search.
|
|
190
|
+
|
|
191
|
+
Because enumeration is now prefix-matching over conceptIds, it covers every
|
|
192
|
+
adapter's items uniformly, and `bundle//` enumeration replaces the removed
|
|
193
|
+
`akm bundle items` command.
|
|
194
|
+
|
|
195
|
+
## Asset types are free-form
|
|
196
|
+
|
|
197
|
+
`type` is adapter-supplied metadata that presents, ranks, and filters — it
|
|
198
|
+
never executes and never identifies. The OKF adapter reads the open OKF `type`
|
|
199
|
+
field and defaults it according to OKF adapter rules; other adapters derive a
|
|
200
|
+
type from their native formats. `IndexDocument.type` is an open string by
|
|
201
|
+
contract, and adapters emit types outside the `akm` adapter's placement set
|
|
202
|
+
(`website`, `wiki-source`, an LLM-wiki page's `pageKind`, `instruction`, and
|
|
203
|
+
anything an OKF bundle author writes).
|
|
204
|
+
|
|
205
|
+
Consequently `akm search --type <t>` is an **exact string match against an open
|
|
206
|
+
set, deliberately unvalidated**: an unrecognized type returns zero hits rather
|
|
207
|
+
than an error, because "unrecognized" is not a decidable property. Callers that
|
|
208
|
+
want a closed set should filter on conceptId prefix instead (see above).
|
|
209
|
+
|
|
210
|
+
The closed set still applies where a type must select a *write placement* —
|
|
211
|
+
`akm proposal new <type> <name>`, `placeNew` — because those need a directory to write to.
|
|
212
|
+
|
|
213
|
+
## Reserved structural files
|
|
214
|
+
|
|
215
|
+
For the OKF adapter, `index.md` (directory listing / progressive disclosure)
|
|
216
|
+
and `log.md` (update history) are reserved structural files at every level and
|
|
217
|
+
are never concepts. The `akm` and `llm-wiki` adapters independently reserve
|
|
218
|
+
the same names as part of their own format contracts. Other adapters own their
|
|
219
|
+
reserved-name rules; the cross-format ref grammar does not impose OKF
|
|
220
|
+
structure on them. Item writes must follow the selected adapter's rules.
|
|
221
|
+
|
|
222
|
+
## Install Refs (distinct grammar)
|
|
223
|
+
|
|
224
|
+
`akm add` and one-shot `akm clone` accept a different ref grammar. Install
|
|
225
|
+
refs locate an upstream kit to fetch; they are **not** item refs and are
|
|
226
|
+
parsed by `parseRegistryRef` in `src/registry/resolve.ts`.
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
install-ref := github-ref | git-url | npm-pkg | https-url | skills-sh-slug | local-path
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Examples: `github:owner/repo#v1.2.3`, `git+https://gitlab.com/org/kit`,
|
|
233
|
+
`@scope/kit`, `https://docs.example.com`, `skills.sh:code-review`,
|
|
234
|
+
`./path/to/kit`.
|
|
235
|
+
|
|
236
|
+
The two parsers are intentionally distinct — each rejects the other's inputs.
|
|
237
|
+
Item refs never carry URI schemes; install refs are not addressable through
|
|
238
|
+
`akm show`.
|
|
239
|
+
|
|
240
|
+
## Bundle prefix
|
|
241
|
+
|
|
242
|
+
When a ref includes a bundle prefix, `akm show` narrows lookup to that bundle:
|
|
243
|
+
|
|
244
|
+
```text
|
|
245
|
+
team-catalog//scripts/deploy.sh
|
|
246
|
+
personal//knowledge/my-notes
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
When absent, a short ref from CLI/API input resolves to `defaultBundle` if the
|
|
250
|
+
conceptId exists there, otherwise to the first bundle containing it in installation
|
|
251
|
+
priority order (first match wins, deterministically). A short ref inside bundle
|
|
252
|
+
content resolves against its **containing** bundle. To pin lookup to a single
|
|
253
|
+
bundle programmatically, use `resolveRef(input, { only: bundleId })` — there is no
|
|
254
|
+
ref spelling for "primary only".
|
|
255
|
+
|
|
256
|
+
## Refs in prose
|
|
257
|
+
|
|
258
|
+
Refs embedded in prose MUST use the fully-qualified `bundle//conceptId` form —
|
|
259
|
+
the bundle-slug charset makes such a token lexically anchored — or a native
|
|
260
|
+
link form owned by the adapter (OKF links, wiki links). **Bare short refs in
|
|
261
|
+
prose are not refs**: `memories/foo` in a sentence is ordinary text, and no
|
|
262
|
+
tool may rewrite it.
|
|
263
|
+
|
|
264
|
+
Only lint's missing-ref scan honours this rule today. The other consumer,
|
|
265
|
+
`akm mv`'s inbound-ref rewriting, was defective: it implemented the rule
|
|
266
|
+
exactly inverted (it rewrote bare conceptIds and matched no `bundle//` pattern
|
|
267
|
+
at all), so it rewrote prose that is not a ref while leaving real anchored
|
|
268
|
+
refs dangling. That defect is why `akm mv` shipped **Experimental** earlier in
|
|
269
|
+
the 0.9.0 cycle and was never covered by the stability contract.
|
|
270
|
+
|
|
271
|
+
**Amended 2026-07-30.** `akm mv` was removed outright before the 0.9.0
|
|
272
|
+
release (no alias, no stub — see [`0.9.0-decisions.md` §D3](./0.9.0-decisions.md#d3--renames-are-delete--create-akm-mv-ships-experimental)).
|
|
273
|
+
There is no tool today that rewrites inbound refs on rename; see "Renames and
|
|
274
|
+
moves" below for the current procedure.
|
|
275
|
+
|
|
276
|
+
## Renames and moves
|
|
277
|
+
|
|
278
|
+
**[0.9.0 change]** A rename or move is **delete plus create**. The destination
|
|
279
|
+
is a new identity: it gets a fresh index row, and learned state (utility,
|
|
280
|
+
salience, outcomes, usage history) does not follow it.
|
|
281
|
+
|
|
282
|
+
```sh
|
|
283
|
+
mv ~/akm/memories/old-note.md ~/akm/memories/new-note.md
|
|
284
|
+
# update any intentional refs to it
|
|
285
|
+
akm index
|
|
286
|
+
akm lint # confirms nothing dangles
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Moving an item **between bundles** is copy/import followed by deletion from the
|
|
290
|
+
source. Both the bundle and the concept identity change; there is no
|
|
291
|
+
identity-preserving cross-bundle move.
|
|
292
|
+
|
|
293
|
+
This supersedes the pre-0.9.0 rule that a rename "MUST use an explicit
|
|
294
|
+
state-rekey transaction". That rule was a product choice made during the bundle
|
|
295
|
+
refactor, not a constraint the architecture imposes. `akm mv`, which implemented
|
|
296
|
+
the superseded rule, shipped briefly as an **Experimental** surface outside
|
|
297
|
+
the stability contract, because its inbound-ref rewriting was inverted (above),
|
|
298
|
+
then was removed outright before the 0.9.0 release. The procedure above —
|
|
299
|
+
plain filesystem move, then `akm index`, then `akm lint` — is the only
|
|
300
|
+
supported path today. If preserving learned state through renames later proves
|
|
301
|
+
materially valuable, a narrow same-bundle `akm rename` can return — resolving
|
|
302
|
+
through the index, using adapter-owned placement, accepting qualified refs,
|
|
303
|
+
rewriting only anchored prose refs, applying one qualified old→new state
|
|
304
|
+
mapping, and rebuilding derived index data rather than preserving row IDs.
|
|
305
|
+
|
|
306
|
+
**Amended 2026-07-30.** Carrying learned state (utility, salience, usage
|
|
307
|
+
history) across a rename is opt-in and out-of-band: run
|
|
308
|
+
`bun scripts/rekey-asset-ref.ts <old-ref> <new-ref>` from a source checkout
|
|
309
|
+
**before** `akm index`, and it re-keys the `entries` row plus
|
|
310
|
+
`asset_salience`/`asset_outcome`/`usage_events` in place rather than letting
|
|
311
|
+
`akm index` mint a fresh row. Automated garbage collection of orphaned rows
|
|
312
|
+
left by renames that skip this script is tracked as issue #733; until it
|
|
313
|
+
lands, the script is the only path. See
|
|
314
|
+
[`v0.9.0-troubleshooting.md`](../../migration/v0.9.0-troubleshooting.md) for
|
|
315
|
+
the full walkthrough.
|
|
316
|
+
|
|
317
|
+
## Usage Notes
|
|
318
|
+
|
|
319
|
+
Consumers should use structured fields like `conceptId` and `bundle` for display,
|
|
320
|
+
and pass the full `ref` string back to `show` as the lookup token.
|
|
321
|
+
|
|
322
|
+
## Canonical Form
|
|
323
|
+
|
|
324
|
+
Refs are emitted in canonical form: the bundle slug (when qualified), the
|
|
325
|
+
adapter-canonical conceptId, and an optional `#fragment`. The adapter decides
|
|
326
|
+
whether an on-disk extension is stripped: OKF and AKM Markdown items strip
|
|
327
|
+
`.md`, scripts retain executable extensions, and directory-items such as
|
|
328
|
+
skills resolve on the directory path (`skills/<dir>`, not
|
|
329
|
+
`skills/<dir>/SKILL`).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Review corpus — task/workflow format unification
|
|
2
|
+
|
|
3
|
+
Reference record for
|
|
4
|
+
[`../../task-workflow-format-unification.md`](../../task-workflow-format-unification.md).
|
|
5
|
+
Every revision of that spec from v8 onward was shaped by these reviews; the
|
|
6
|
+
spec's §11 cross-references findings by the ids used here.
|
|
7
|
+
|
|
8
|
+
## Round 0 — three independent adversarial reviews of spec v7
|
|
9
|
+
|
|
10
|
+
Three reviewers, identical briefs, no shared context — overlap between
|
|
11
|
+
reports is therefore independent confirmation, and unanimous findings
|
|
12
|
+
(3/3) were treated as settled facts.
|
|
13
|
+
|
|
14
|
+
| File | Contents |
|
|
15
|
+
|---|---|
|
|
16
|
+
| [`opus-review-1.md`](./opus-review-1.md) | Reviewer 1 full report |
|
|
17
|
+
| [`opus-review-2.md`](./opus-review-2.md) | Reviewer 2 full report |
|
|
18
|
+
| [`opus-review-3.md`](./opus-review-3.md) | Reviewer 3 full report |
|
|
19
|
+
| [`findings-consolidated.md`](./findings-consolidated.md) | Deduplicated findings (C1–C5, M1–M13, minors) with per-reviewer attribution — the ids the spec's §11 uses |
|
|
20
|
+
|
|
21
|
+
Outcome: v7 → v8 full redesign (IR v4 invocation union, hashVersion 5,
|
|
22
|
+
two output schemas, cascade built-not-exposed, `with:`, env provenance
|
|
23
|
+
split, migration rebuilt).
|
|
24
|
+
|
|
25
|
+
## Round 1 — four-lens panel on spec v8
|
|
26
|
+
|
|
27
|
+
| File | Lens |
|
|
28
|
+
|---|---|
|
|
29
|
+
| [`panel-r1-coverage.md`](./panel-r1-coverage.md) | Findings-coverage audit: does §11 resolve each round-0 finding, or just name it |
|
|
30
|
+
| [`panel-r1-architecture.md`](./panel-r1-architecture.md) | Module boundaries and seams against the codebase's own idioms |
|
|
31
|
+
| [`panel-r1-adversarial.md`](./panel-r1-adversarial.md) | Fresh defect hunt on what v8 itself introduced |
|
|
32
|
+
| [`panel-r1-security.md`](./panel-r1-security.md) | Script-execution policy, env/redaction contracts, migration mechanics |
|
|
33
|
+
|
|
34
|
+
Outcome: v8 → v9. Headline: the per-bundle script-execution grant was
|
|
35
|
+
withdrawn (contradicted `activation-policy.ts`'s no-new-trust-machinery
|
|
36
|
+
decision) in favor of exact 07 P1-D ceiling inheritance; persona snapshot
|
|
37
|
+
added to the hash preimage; `with:` merge defined; tombstone read-only
|
|
38
|
+
carve-out and interruption-safe conversion ordering.
|
|
39
|
+
|
|
40
|
+
## Round 2 — verification on spec v9
|
|
41
|
+
|
|
42
|
+
| File | Lens |
|
|
43
|
+
|---|---|
|
|
44
|
+
| [`panel-r2-verification.md`](./panel-r2-verification.md) | Every round-1 critical/major re-checked against v9 and code — verdict: **all fixes hold** |
|
|
45
|
+
| [`panel-r2-adversarial.md`](./panel-r2-adversarial.md) | Cold pass, no prior context — verdict: no design flaws; two evidence corrections (the real placeholder filler; indexer-classifier recognition), both applied |
|
|
46
|
+
|
|
47
|
+
## Library evaluations — buy-vs-build investigation
|
|
48
|
+
|
|
49
|
+
Three independent investigations into replacing the hand-rolled engine
|
|
50
|
+
with a third-party library, all verified against live artifacts rather
|
|
51
|
+
than training knowledge. Decision record:
|
|
52
|
+
[`../../workflow-engine-buy-vs-build.md`](../../workflow-engine-buy-vs-build.md).
|
|
53
|
+
|
|
54
|
+
| File | Scope |
|
|
55
|
+
|---|---|
|
|
56
|
+
| [`library-eval-bunqueue.md`](./library-eval-bunqueue.md) | bunqueue — full rubric + source read |
|
|
57
|
+
| [`library-eval-openworkflow.md`](./library-eval-openworkflow.md) | OpenWorkflow — full rubric, **executed** (SIGKILL durability probe, reproduced schema collision) |
|
|
58
|
+
| [`library-eval-alternatives.md`](./library-eval-alternatives.md) | Landscape survey — 25+ candidates against the no-server / SQLite / Bun+Windows / license constraints |
|
|
59
|
+
|
|
60
|
+
Outcome: **build**. ~6% of `exec`+`ir` is the generic durable-execution
|
|
61
|
+
concern libraries sell; the best candidate deletes 8–12% while removing
|
|
62
|
+
cancellation, concurrency caps, and transactional atomicity.
|
|
63
|
+
|
|
64
|
+
## Reading notes
|
|
65
|
+
|
|
66
|
+
- Reports cite `file:line` against the branch state they reviewed
|
|
67
|
+
(`claude/release-0-9-0-polish-d6sycl` @ `71bb686` + this spec's branch);
|
|
68
|
+
lines drift as the base moves.
|
|
69
|
+
- Not every claim in the raw reports survived verification — e.g. round 1's
|
|
70
|
+
"the `tools:` ceiling doesn't exist" was disproven (`show.ts:433-445`).
|
|
71
|
+
Where a report and the spec disagree, the spec's §11 records the
|
|
72
|
+
adjudication and is authoritative.
|