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
package/docs/reference/cli.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The CLI is called `akm` (Agent Knowledge Manager). Commands default to structured
|
|
4
4
|
JSON at `--detail brief`. Use `--format json|jsonl|yaml|text|md|html`,
|
|
5
|
-
`--detail brief|normal|full
|
|
5
|
+
`--detail brief|normal|full|agent` when you want a
|
|
6
6
|
different presentation. Errors include `error` and `hint` fields.
|
|
7
7
|
|
|
8
8
|
This page is authoritative for the current CLI. For per-release behavior
|
|
@@ -19,14 +19,15 @@ These flags are accepted by all commands:
|
|
|
19
19
|
| --- | --- | --- | --- |
|
|
20
20
|
| `--format` | `json`, `jsonl`, `yaml`, `text`, `md`, `html` | `json` | Output format |
|
|
21
21
|
| `--output` | path | _(none)_ | Write rendered output to a file instead of stdout (all formats except `jsonl`) |
|
|
22
|
-
| `--detail` | `brief`, `normal`, `full` | `brief` | Output **verbosity** level |
|
|
23
|
-
| `--shape` | `human`, `agent`, `summary` | `human` | Output **projection** |
|
|
22
|
+
| `--detail` | `brief`, `normal`, `full`, `agent` | `brief` | Output **verbosity** level, or the `agent` projection |
|
|
24
23
|
| `--quiet` / `-q` | boolean | `false` | Suppress stderr warnings |
|
|
25
24
|
| `--verbose` | boolean | `false` | Enable verbose diagnostics gated behind `isVerbose()`. Parsed globally before any subcommand runs. The `AKM_VERBOSE` env var honours the same setting and wins when both are present (see `src/core/warn.ts`). |
|
|
26
25
|
|
|
27
|
-
`--detail` controls **how much** is returned
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
`--detail brief|normal|full` controls **how much** is returned. `--detail agent`
|
|
27
|
+
selects the token-lean action view on `search`, `curate` and `show`; every other
|
|
28
|
+
command ignores it. (`--shape`, which carried `agent` and `summary` before 0.10,
|
|
29
|
+
is gone: it is an unknown flag, exit 2. `--shape summary` had a projection only
|
|
30
|
+
on `show`; use `--detail brief` there.)
|
|
30
31
|
|
|
31
32
|
### `--format jsonl`
|
|
32
33
|
|
|
@@ -67,12 +68,12 @@ Scripted `setup` modes emit a normal format-aware result. Interactive `setup`
|
|
|
67
68
|
is a terminal UI and emits no result document. `agent` leaves inherited child
|
|
68
69
|
streams raw, then formats its final `agent-result` envelope normally.
|
|
69
70
|
|
|
70
|
-
### `--
|
|
71
|
+
### `--detail agent`
|
|
71
72
|
|
|
72
73
|
Strips output to only action-relevant fields:
|
|
73
74
|
|
|
74
75
|
- **search**: keeps `name`, canonical `ref`, absolute `path`, `editable`, `type`, `description`, `action`, `score`, and optional `estimatedTokens`/`keys`
|
|
75
|
-
- **show**: adds absolute `path`, `editable`, and the existing type-specific action/content fields on top of the canonical `ref` that every `show` shape returns (`ref` is not agent-exclusive
|
|
76
|
+
- **show**: adds absolute `path`, `editable`, and the existing type-specific action/content fields on top of the canonical `ref` that every `show` shape returns (`ref` is not agent-exclusive; every `show` response carries it)
|
|
76
77
|
- **curate**: local items keep canonical `ref`, absolute `path`, `editable`, and their follow-up fields
|
|
77
78
|
|
|
78
79
|
For local materialized assets, `editHint` is added only when `editable` is
|
|
@@ -93,20 +94,11 @@ them.
|
|
|
93
94
|
|
|
94
95
|
Every one of these commands also carries a `results` field — the identical
|
|
95
96
|
array, not a copy — alongside its semantic key, in every `--format`/`--detail`
|
|
96
|
-
combination
|
|
97
|
+
combination, including `--detail agent`. Code
|
|
97
98
|
written against a single command should keep using its semantic key for
|
|
98
99
|
clarity; code that needs to handle several list commands uniformly can read
|
|
99
100
|
`results` and never maintain a per-command lookup table.
|
|
100
101
|
|
|
101
|
-
### `--shape summary`
|
|
102
|
-
|
|
103
|
-
Valid **only on `akm show`**. Every other command rejects `--shape summary`
|
|
104
|
-
with an `INVALID_SHAPE_VALUE` usage error (exit 2) — an honest rejection rather
|
|
105
|
-
than a silent fallback. It returns a compact view suitable for capability
|
|
106
|
-
discovery:
|
|
107
|
-
|
|
108
|
-
- **show**: `type`, `name`, canonical `ref`, `description`, `tags`, `parameters`, `workflowTitle`, `action`, `run`, `origin`, `keys`, `links`
|
|
109
|
-
|
|
110
102
|
## Exit Codes and Error Envelope
|
|
111
103
|
|
|
112
104
|
Every command exits with one of the following codes:
|
|
@@ -550,7 +542,7 @@ ran, `keyword` when keyword-only search was intentional or semantic search was
|
|
|
550
542
|
not ready, and `fts-fallback` when a ready semantic backend failed during this
|
|
551
543
|
query. The last case also adds one sanitized, endpoint-naming entry to
|
|
552
544
|
`warnings`; it never repeats the provider/runtime error text. Both fields are
|
|
553
|
-
preserved by `--
|
|
545
|
+
preserved by `--detail agent` so machine consumers can lower their confidence
|
|
554
546
|
instead of treating keyword fallback as healthy semantic ranking.
|
|
555
547
|
|
|
556
548
|
Ranking fuses two candidate lists by reciprocal rank (k = 60, equal weights):
|
|
@@ -578,8 +570,7 @@ kept.
|
|
|
578
570
|
| `--belief` | `all`, `current`, `historical` | `all` | Memory belief filter. `current` keeps active memory beliefs; `historical` keeps contradicted/superseded/archived ones. |
|
|
579
571
|
| `--include-sessions` | flag | `false` | Include session assets, which are excluded from default results via `config.search.defaultExcludeTypes` |
|
|
580
572
|
| `--format` | `json`, `jsonl`, `yaml`, `text`, `md`, `html` | `json` | Output format |
|
|
581
|
-
| `--detail` | `brief`, `normal`, `full` | `brief` | Output verbosity level |
|
|
582
|
-
| `--shape` | `human`, `agent`, `summary` | `human` | Output projection. `--shape summary` is valid **only on `akm show`**; passing it here is an `INVALID_SHAPE_VALUE` usage error (exit 2), like on every other command. |
|
|
573
|
+
| `--detail` | `brief`, `normal`, `full`, `agent` | `brief` | Output verbosity level, or the `agent` projection |
|
|
583
574
|
|
|
584
575
|
`--filter` flags AND-join: every supplied key must match the entry's
|
|
585
576
|
`scope` for the entry to appear in the result set. Entries without any scope
|
|
@@ -603,7 +594,7 @@ availability:
|
|
|
603
594
|
it (`lexical rank 3`, `vector rank 12`); surfaced at `full`
|
|
604
595
|
|
|
605
596
|
The default brief shape is intentionally small. The exact field set per
|
|
606
|
-
detail level (and
|
|
597
|
+
detail level (and for `--detail agent`) is authoritative in
|
|
607
598
|
`src/output/shapes/helpers.ts` (`shapeSearchHit` / `shapeSearchHitForAgent`),
|
|
608
599
|
assembled into the shape registry by the `src/output/shapes.ts` barrel:
|
|
609
600
|
|
|
@@ -612,11 +603,7 @@ assembled into the shape registry by the `src/output/shapes.ts` barrel:
|
|
|
612
603
|
| `brief` (default) | `type`, `name`, `ref`, `action`, `estimatedTokens` | `name`, `installRef`, `score` |
|
|
613
604
|
| `normal` | `type`, `name`, `description`, `action`, `score`, `estimatedTokens`, optional `warnings`/`quality`/`keys` | `name`, `description`, `action`, `installRef`, `score`, optional `warnings` |
|
|
614
605
|
| `full` | full hit object (includes `ref`, `origin`, `tags`, `whyMatched`, optional `warnings`, optional `quality`, timings, bundle metadata) | full hit object |
|
|
615
|
-
|
|
|
616
|
-
|
|
617
|
-
`--shape summary` is **not valid on `search`** — see
|
|
618
|
-
[`--shape summary`](#--shape-summary) above; it is a usage error (exit 2)
|
|
619
|
-
everywhere except `akm show`.
|
|
606
|
+
| `agent` | `name`, `ref`, `type`, `path`, `editable`, conditional `editHint`, `description`, `action`, `score`, optional `estimatedTokens`/`keys` | no local access fields |
|
|
620
607
|
|
|
621
608
|
There is no registry `curated` boolean. Renderers surface an optional
|
|
622
609
|
`warnings: string[]` field on hits when a provider has non-fatal issues to
|
|
@@ -662,8 +649,7 @@ candidates (`search.curateRerank.topN`) by name, description and the start of
|
|
|
662
649
|
each asset's indexed content. Curate includes direct follow-up
|
|
663
650
|
commands such as `akm show <ref>` or `akm bundle add <ref>` so you can
|
|
664
651
|
immediately inspect or install what it found.
|
|
665
|
-
`--detail`
|
|
666
|
-
does not.
|
|
652
|
+
`--detail` (including `agent`) works on curate output.
|
|
667
653
|
Curate preserves the underlying search's `searchMode` and warnings.
|
|
668
654
|
Agent-shaped local items include `ref`, `path`, and `editable`, plus `editHint`
|
|
669
655
|
only for read-only items. Their `followUp` remains `akm show <ref>` rather than
|
|
@@ -720,8 +706,8 @@ akm show memories/retro --filter user=alice --filter agent=claude
|
|
|
720
706
|
human-authored orientation doc from a bundle's optional `.meta/` directory
|
|
721
707
|
(`<name>` defaults to `index`; `.meta/<name>.md` is tried before an
|
|
722
708
|
extensionless `.meta/<name>`). These files are never indexed, so they do not
|
|
723
|
-
appear in `akm search`. See [
|
|
724
|
-
|
|
709
|
+
appear in `akm search`. See [Concepts](../guides/concepts.md) for the full
|
|
710
|
+
convention.
|
|
725
711
|
|
|
726
712
|
`--filter` accepts the same `<key>=<value>` shape as `akm search --filter` — one
|
|
727
713
|
spelling for the scope-narrowing axis on both commands (`--scope` was removed
|
|
@@ -732,20 +718,15 @@ filter. A mismatch (or absent scope) returns `NotFoundError` so the caller
|
|
|
732
718
|
cannot accidentally read out-of-scope content.
|
|
733
719
|
|
|
734
720
|
The default `show` JSON includes the asset body when applicable. Canonical
|
|
735
|
-
`ref` is always present,
|
|
736
|
-
|
|
737
|
-
always present too, at every `--detail` level, in the `human` (default) and
|
|
738
|
-
`agent` shapes — `--shape summary` omits both, since it is a compact
|
|
739
|
-
capability-discovery view, not an edit-target view. None of `ref`/`path`/
|
|
721
|
+
`ref` is always present, at every `--detail` level, `agent` included. Absolute `path` and `editable` are
|
|
722
|
+
always present too. None of `ref`/`path`/
|
|
740
723
|
`editable` are gated behind `--detail full`. Use `--detail brief` for a
|
|
741
724
|
reduced metadata-first view without `content`/`template`/`prompt`;
|
|
742
725
|
`--detail full` adds verbose extras such as `schemaVersion` and, when
|
|
743
|
-
`editable` is `false`, `editHint`; `--
|
|
726
|
+
`editable` is `false`, `editHint`; `--detail agent` strips non-action metadata
|
|
744
727
|
(e.g. `origin`, `tags`) down to the action-relevant field set while still
|
|
745
|
-
including `ref`/`path`/`editable
|
|
746
|
-
|
|
747
|
-
`parameters`, `workflowTitle`, `action`, `run`, `origin`, and `keys`, plus the
|
|
748
|
-
optional fragment metadata described below.
|
|
728
|
+
including `ref`/`path`/`editable`, plus the optional fragment metadata
|
|
729
|
+
described below.
|
|
749
730
|
|
|
750
731
|
`links` lists the asset's declared links, grouped by kind: `outgoing` (the
|
|
751
732
|
assets its own `xrefs:`, `supersededBy:`, `contradictedBy:`,
|
|
@@ -817,7 +798,7 @@ akm workflow status 7c115132 # 8+ char run-id prefix also works
|
|
|
817
798
|
akm workflow resume <run-id>
|
|
818
799
|
akm workflow abandon <run-id>
|
|
819
800
|
akm workflow list --active
|
|
820
|
-
akm workflow list --children # also list child workflow runs
|
|
801
|
+
akm workflow list --children # also list child workflow runs (Experimental)
|
|
821
802
|
akm workflow list --all-scopes # include runs started from a different working directory
|
|
822
803
|
akm workflow plan workflows/ship-release # compile+freeze preview, zero writes
|
|
823
804
|
```
|
|
@@ -829,10 +810,10 @@ Subcommands:
|
|
|
829
810
|
|
|
830
811
|
| Subcommand | Description |
|
|
831
812
|
| --- | --- |
|
|
832
|
-
| `create <name>` | Validate and write a Markdown workflow under `workflows/`. `--path <dir>` places it in a subdirectory; `--from <file>` imports content; `--force`
|
|
833
|
-
| `run <run-id\|ref>` |
|
|
813
|
+
| `create <name>` | Validate and write a Markdown workflow under `workflows/`. `--path <dir>` places it in a subdirectory; `--from <file>` imports content; `--force` overwrites; `--print` prints the template that would be written instead of writing it |
|
|
814
|
+
| `run <run-id\|ref>` | Canonical start/resume/execute command. A ref starts a run or resumes the active run in the current scope (announced as `resumed: true`, see below); a run id continues that exact active run. `--new` starts a fresh run even when one is already active. Executes until completion, failure, verification rejection, interruption, or an explicit limit |
|
|
834
815
|
| `status <run-id\|ref>` | Show the full run state, including all step statuses. `--units` also lists per-unit rows from the run journal (diagnostics only). Renders a `children:` tree when the run composes child workflows. `--all-scopes` widens the ref-fallthrough lookup (only reached when the target does not resolve to a run id) to every scope instead of just the current one |
|
|
835
|
-
| `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs are excluded unless `--children` is passed. `--all-scopes` searches every scope instead of only the current one (#942) |
|
|
816
|
+
| `list` | List workflow runs (optionally filtered by `--ref`; `--active` shows only `status=active` runs, excluding `blocked`/`failed`/`completed`). Child workflow runs (the Experimental `unit: { workflow: … }` step) are excluded unless `--children` is passed. `--all-scopes` searches every scope instead of only the current one (#942) |
|
|
836
817
|
| `resume <run-id>` | Flip a `blocked` or `failed` run back to `active`. Completed runs cannot be resumed |
|
|
837
818
|
| `abandon <run-id>` | Mark a run failed so it stops counting as active (`resume` can reopen it) |
|
|
838
819
|
| `plan <ref>` | **Evolving.** Compile and freeze a workflow WITHOUT publishing a run: the canonical step graph, per-step frozen target kinds, task/child expansion, input bindings, source read set, and lowering notices — zero durable writes. Returns the full JSON envelope by default, like every other command; pass `--format text` for a human-readable summary |
|
|
@@ -848,8 +829,8 @@ workflow ref is never mistaken for one.
|
|
|
848
829
|
The public `workflow start`, `next`, and `complete` lifecycle was removed in
|
|
849
830
|
0.9, along with the experimental `brief`/`report` external-driver protocol.
|
|
850
831
|
Use `workflow run` for execution and `workflow status` for inspection. The
|
|
851
|
-
removed commands fail with an `UNKNOWN_COMMAND` envelope
|
|
852
|
-
|
|
832
|
+
removed commands fail with an `UNKNOWN_COMMAND` envelope; there are no
|
|
833
|
+
compatibility aliases.
|
|
853
834
|
|
|
854
835
|
There is also no `akm workflow template`, `validate`, or `watch`.
|
|
855
836
|
`workflow create --print` prints a starter, `akm lint --type workflows`
|
|
@@ -908,9 +889,8 @@ has nothing left to abort and nothing left to resume.
|
|
|
908
889
|
|
|
909
890
|
**What `--max-steps` counts.** The budget is spent by the **steps that
|
|
910
891
|
finish** — completed, failed, or gate-rejected with the loop budget spent — not
|
|
911
|
-
by entries in the `executed` report, which gains one per gate-loop iteration
|
|
912
|
-
|
|
913
|
-
one, a route-skipped step costs nothing (no work was dispatched for it), and a
|
|
892
|
+
by entries in the `executed` report, which gains one per gate-loop iteration.
|
|
893
|
+
So a step's whole bounded `gate.max_loops` loop costs one, and a
|
|
914
894
|
step the invocation left unfinished — an abort, a verification-judge outage —
|
|
915
895
|
costs nothing either, because the next invocation still owes that work.
|
|
916
896
|
`--max-retries` subtracts the same way: a reopened run's remaining budget is
|
|
@@ -922,7 +902,7 @@ budget is left. `gate.max_loops` (1–100) is the per-step ceiling;
|
|
|
922
902
|
`budget.max_units` and `budget.max_tokens` are the whole-run ceilings, seeded
|
|
923
903
|
from the unit journal so they hold across resumes.
|
|
924
904
|
|
|
925
|
-
`run` is
|
|
905
|
+
`run` is Experimental and does not consult `experimental.workflowEngine`. Every
|
|
926
906
|
non-empty `### gate` requires `workflow.judgeEngine` to name a configured LLM
|
|
927
907
|
or agent engine before a new run can be frozen. Gate evaluation is fail-closed.
|
|
928
908
|
|
|
@@ -943,7 +923,7 @@ when the cwd is inside it, otherwise the cwd itself. In practice this means:
|
|
|
943
923
|
akm workflow create ship-release
|
|
944
924
|
akm workflow create ship-release --from ./ship-release.md
|
|
945
925
|
akm workflow create ship-release --from ./ship-release.md --force
|
|
946
|
-
akm workflow create ship-release --force
|
|
926
|
+
akm workflow create ship-release --force
|
|
947
927
|
akm workflow create ship --path release # writes workflows/release/ship.md
|
|
948
928
|
```
|
|
949
929
|
|
|
@@ -951,14 +931,9 @@ akm workflow create ship --path release # writes workflows/release/ship
|
|
|
951
931
|
| --- | --- |
|
|
952
932
|
| `--path <dir>` | Relative subdirectory under `workflows/` to place the workflow in. The filename comes from `<name>`. |
|
|
953
933
|
| `--from <file>` | Import and validate a Markdown workflow from an existing file |
|
|
954
|
-
| `--force` | Overwrite an existing workflow
|
|
955
|
-
| `--reset` | Explicitly replace an existing workflow with a fresh template (use with `--force`) |
|
|
934
|
+
| `--force` | Overwrite an existing workflow: with `--from`, replace its content from that file; alone, replace it with a fresh template |
|
|
956
935
|
| `--print` | Print the Markdown template without creating anything |
|
|
957
936
|
|
|
958
|
-
`--force` requires either `--from <file>` (replace from a source file) or
|
|
959
|
-
`--reset` (explicitly acknowledge you are overwriting in place). Without one of
|
|
960
|
-
these, `--force` is rejected to prevent silent template overwrites.
|
|
961
|
-
|
|
962
937
|
`<name>` itself must be **flat** — `^[a-z0-9][a-z0-9._/-]*$` after combining
|
|
963
938
|
with `--path`, but the bare `--name` positional is rejected if it contains a
|
|
964
939
|
`/`. Hierarchical placement (`release/ship`) goes through `--path release
|
|
@@ -1013,11 +988,11 @@ Two output modes:
|
|
|
1013
988
|
- **`--format json`**: the full envelope — `ok`, `ref`, `title`,
|
|
1014
989
|
`sourceFormat`, `sourcePath`, `irVersion`, `planHash`, `published` (always
|
|
1015
990
|
`false`, so a consumer can never mistake this for a run envelope),
|
|
1016
|
-
`execution`, `budget?`, `params?`, `
|
|
991
|
+
`execution`, `budget?`, `params?`, `steps[]`, `notices[]`,
|
|
1017
992
|
`warnings[]`. Each step entry carries an `expansion` field
|
|
1018
993
|
naming how its target was reached: `{via: "direct"}`, `{via: "task",
|
|
1019
994
|
taskRef}`, or — for a step composing a child workflow —
|
|
1020
|
-
`{via: "child", childRef, childPlanHash,
|
|
995
|
+
`{via: "child", childRef, childPlanHash, steps[]}` with the
|
|
1021
996
|
child's own step list nested recursively in the same shape.
|
|
1022
997
|
|
|
1023
998
|
Text-mode example:
|
|
@@ -1028,13 +1003,11 @@ source: workflows/release.md
|
|
|
1028
1003
|
plan: irVersion 5, hash 4f2ba91c3d0e… (not published)
|
|
1029
1004
|
limits: maxConcurrency 4; budget max_units 50, max_tokens 100000
|
|
1030
1005
|
params: channel, version
|
|
1031
|
-
outputs: report <- steps.summarize.output
|
|
1032
1006
|
steps:
|
|
1033
1007
|
1. notify [command] direct
|
|
1034
1008
|
2. build [script] via tasks/plan-v4-task
|
|
1035
1009
|
3. dispatch [child-workflow] -> workflows/release-checklist (plan 91acbe20f5d1…)
|
|
1036
1010
|
with: channel="stable" (literal), files <- steps.build.output.files (reference)
|
|
1037
|
-
exports: report, changed_count
|
|
1038
1011
|
3.1 verify [command] direct
|
|
1039
1012
|
4. summarize [command] direct
|
|
1040
1013
|
read set:
|
|
@@ -1066,7 +1039,7 @@ Workflow markdown contract:
|
|
|
1066
1039
|
- Frontmatter carries the asset envelope and orchestration graph (`params`,
|
|
1067
1040
|
`steps`, `defaults`, and `budget`).
|
|
1068
1041
|
- Every `## <step-id>` heading must name a declared step exactly. Unit and map
|
|
1069
|
-
steps require a section
|
|
1042
|
+
steps require a section.
|
|
1070
1043
|
- An optional `### gate` inside a step section carries its gate rubric. Omitted
|
|
1071
1044
|
or empty rubric text skips validation.
|
|
1072
1045
|
|
|
@@ -1350,7 +1323,7 @@ akm upgrade --next # Install the newest prerelease (@next) instead of the
|
|
|
1350
1323
|
| `--check` | Report pending updates (CLI and per-harness plugins) without changing anything |
|
|
1351
1324
|
| `--force` | Force upgrade even if on latest version |
|
|
1352
1325
|
| `--skip-post-upgrade` | Skip the post-upgrade index rebuild |
|
|
1353
|
-
| `--next` | Follow the `next` prerelease channel: install the newest prerelease of akm (and of the OpenCode plugin, see
|
|
1326
|
+
| `--next` | Follow the `next` prerelease channel: install the newest prerelease of akm (and of the OpenCode plugin, see the Prereleases section below). Works with `--check`, `--force` and `-q` |
|
|
1354
1327
|
|
|
1355
1328
|
Offline, or to migrate without a release check, run `akm migrate apply`
|
|
1356
1329
|
directly: it is the same step.
|
|
@@ -1367,7 +1340,19 @@ stopping the CLI upgrade.
|
|
|
1367
1340
|
| --- | --- | --- |
|
|
1368
1341
|
| Claude Code | `claude` is on `PATH`, the `akm-plugins` marketplace is configured and `akm@akm-plugins` is installed | `claude plugin marketplace update akm-plugins`, then `claude plugin update akm@akm-plugins` |
|
|
1369
1342
|
| Codex | `codex` is on `PATH` and `akm@akm-plugins` is installed from the `akm-plugins` marketplace | `codex plugin marketplace upgrade akm-plugins` (this also refreshes the installed plugin cache) |
|
|
1370
|
-
| OpenCode | `akm-opencode` is cached at `$XDG_CACHE_HOME/opencode/packages/akm-opencode@latest` (default `~/.cache/opencode/...`) and `opencode` is on `PATH` | If npm's `akm-opencode@latest` differs from the cached version and no OpenCode process is running: the cache directory is moved to the trash (never deleted), then `opencode debug config` is run from a temporary directory to fetch the new version. While OpenCode runs the update is `deferred` to a later `akm upgrade`. |
|
|
1343
|
+
| OpenCode 1 | `akm-opencode` is cached at `$XDG_CACHE_HOME/opencode/packages/akm-opencode@latest` (default `~/.cache/opencode/...`) and `opencode` is on `PATH` | If npm's `akm-opencode@latest` differs from the cached version and no OpenCode process is running: the cache directory is moved to the trash (never deleted), then `opencode debug config` is run from a temporary directory to fetch the new version. While OpenCode runs the update is `deferred` to a later `akm upgrade`. |
|
|
1344
|
+
| OpenCode 2 | `akm-opencode-v2` is named under `"plugins"` in the global OpenCode config (`opencode.json` or `.jsonc`) and cached at `$XDG_CACHE_HOME/opencode/npm/akm-opencode-v2@latest/<build>/`, and the `opencode` on `PATH` is OpenCode 2 | Same rule as OpenCode 1, with `akm-opencode-v2`: the cache folder is moved to the trash, then `opencode plugin add akm-opencode-v2` is run from a temporary directory (for a spec the config already names it only re-installs the cache; it does not touch the config). Listed only on a host that has the plugin, so an OpenCode 1 host reports exactly what it did before. |
|
|
1345
|
+
|
|
1346
|
+
The two OpenCode plugins never touch each other: `akm-opencode` is only looked
|
|
1347
|
+
for in OpenCode 1's cache and `plugin` key, `akm-opencode-v2` only in OpenCode
|
|
1348
|
+
2's cache and `plugins` key. Before moving a cache, akm reads `opencode
|
|
1349
|
+
--version` and skips the plugin when the `opencode` on `PATH` is the other
|
|
1350
|
+
major, since only the matching major can re-create that cache; akm never
|
|
1351
|
+
installs or replaces `opencode`. A spec that appears only under the legacy
|
|
1352
|
+
`plugin` key for OpenCode 2 is skipped with a note (`opencode plugin add`
|
|
1353
|
+
would write a `plugins` entry). Which OpenCode major akm itself drives is
|
|
1354
|
+
[detected from the engine's binary](configuration.md#engines), independent of this
|
|
1355
|
+
step.
|
|
1371
1356
|
|
|
1372
1357
|
Claude Code does not update third-party marketplaces on its own (the Claude
|
|
1373
1358
|
desktop app turns plugin updates off), and OpenCode never re-checks a cached
|
|
@@ -1375,7 +1360,7 @@ plugin, so neither moves without this step. Codex refreshes its git
|
|
|
1375
1360
|
marketplaces at every start.
|
|
1376
1361
|
|
|
1377
1362
|
The result gains a `plugins` array, one entry per harness:
|
|
1378
|
-
`{ "harness": "claude-code" | "codex" | "opencode", "outcome": ..., "from"?, "to"?, "message"? }`.
|
|
1363
|
+
`{ "harness": "claude-code" | "codex" | "opencode" | "opencode-v2", "outcome": ..., "from"?, "to"?, "message"? }`.
|
|
1379
1364
|
`outcome` is `updated`, `current`, `skipped`, `deferred` or `failed`; under
|
|
1380
1365
|
`--check` it can also be `pending` or `unknown`. `--check` does not fetch the
|
|
1381
1366
|
Claude Code or Codex marketplaces, so for them it reports `unknown` (whether a
|
|
@@ -1393,7 +1378,9 @@ target is the akm-cli that `akm-opencode@latest` depends on
|
|
|
1393
1378
|
The result then carries `lockstep: { plugin, pinnedVersion, newestVersion, heldBack }`,
|
|
1394
1379
|
`latestVersion` is the pinned version, the install names that exact version
|
|
1395
1380
|
rather than `@latest`, and the text output says the CLI is held back. The CLI
|
|
1396
|
-
is never moved backwards to meet the pin.
|
|
1381
|
+
is never moved backwards to meet the pin. With both OpenCode plugins present
|
|
1382
|
+
(`akm-opencode` and `akm-opencode-v2`), the CLI is held to the older of their
|
|
1383
|
+
two pins, and `lockstep.plugin` names the one that sets it. Claude Code and Codex have no
|
|
1397
1384
|
in-process copy and are not part of this rule.
|
|
1398
1385
|
|
|
1399
1386
|
Lockstep fails closed. When the OpenCode plugin is cached but the pin cannot
|
|
@@ -1431,6 +1418,10 @@ carries `channel: "next"` (`"latest"` otherwise); no other field changes.
|
|
|
1431
1418
|
`@latest` does, or its `akm-cli` pin is unreadable, the CLI is held where it is and the OpenCode entry
|
|
1432
1419
|
is `failed`, exactly as in the stable lockstep above.
|
|
1433
1420
|
|
|
1421
|
+
OpenCode 2's `akm-opencode-v2` follows the same rule with its own spec:
|
|
1422
|
+
`{ "plugins": ["akm-opencode-v2@next"] }`, cached under
|
|
1423
|
+
`$XDG_CACHE_HOME/opencode/npm/akm-opencode-v2@next/`.
|
|
1424
|
+
|
|
1434
1425
|
Without that line the OpenCode entry is `skipped`, its message names the line
|
|
1435
1426
|
to add, and lockstep stays against the `@latest` pin, so the CLI does not go
|
|
1436
1427
|
past what OpenCode will run.
|
|
@@ -1530,7 +1521,10 @@ CI or fresh environments without running `akm setup` first.
|
|
|
1530
1521
|
### sync
|
|
1531
1522
|
|
|
1532
1523
|
Stage and commit local changes in a git-backed bundle. If the bundle has a
|
|
1533
|
-
remote configured and is marked `writable: true`,
|
|
1524
|
+
remote configured and is marked `writable: true`, `akm sync` first fetches the
|
|
1525
|
+
remote, brings in what another host pushed (a fast-forward when it can, otherwise
|
|
1526
|
+
git's default merge), and then pushes. A merge that conflicts is aborted: your
|
|
1527
|
+
commit stays, the push is skipped, and `reason` names the conflicting files.
|
|
1534
1528
|
|
|
1535
1529
|
> **Note:** there is no `akm save` command — use `akm sync`.
|
|
1536
1530
|
|
|
@@ -1562,8 +1556,9 @@ value also looks like a format token.
|
|
|
1562
1556
|
| Not a git repo | Exit 0, `skipped: true` in JSON output — no error |
|
|
1563
1557
|
| Git repo, no remote | Stage and commit only |
|
|
1564
1558
|
| Git repo, has remote, not writable | Stage and commit only |
|
|
1565
|
-
| Git repo, has remote, `writable: true` | Stage, commit, and push |
|
|
1566
|
-
| Writable with a remote,
|
|
1559
|
+
| Git repo, has remote, `writable: true` | Stage, commit, fetch, fast-forward or merge the upstream, and push |
|
|
1560
|
+
| Writable with a remote, nothing to commit, upstream has moved | Fast-forward or merge the upstream; nothing is pushed unless there is a new commit |
|
|
1561
|
+
| Writable with a remote, but no upstream branch, the fetch fails, or the merge conflicts | Stage and commit; the merge is aborted, the push is skipped, and `reason` says `not pushed: ...` |
|
|
1567
1562
|
| Writable with a remote and ahead of its upstream | Stage, commit, and push, unpushed commits included |
|
|
1568
1563
|
| Any writable repo with `--no-push` | Stage and commit only (push suppressed) |
|
|
1569
1564
|
|
|
@@ -1714,8 +1709,8 @@ file path, a single HTTP/HTTPS URL, or `-` for stdin.
|
|
|
1714
1709
|
|
|
1715
1710
|
**Write target resolution:** the destination is the working bundle
|
|
1716
1711
|
(`defaultBundle`) unless `defaultWriteTarget` is set in config, which
|
|
1717
|
-
overrides it to a named source. An explicit `--
|
|
1718
|
-
both. The full order is `--
|
|
1712
|
+
overrides it to a named source. An explicit `--bundle <name>` flag overrides
|
|
1713
|
+
both. The full order is `--bundle` → `defaultWriteTarget` → working bundle →
|
|
1719
1714
|
`ConfigError`. See [Configuration](configuration.md#bundles-and-write-target) for
|
|
1720
1715
|
details.
|
|
1721
1716
|
|
|
@@ -1732,14 +1727,14 @@ akm import ./notes/oauth-quirks.md --xref knowledge/auth/vendor-x-token-api
|
|
|
1732
1727
|
akm import ./notes/modern-guide.md --supersedes knowledge/legacy-guide
|
|
1733
1728
|
|
|
1734
1729
|
# Route the write to a specific writable bundle:
|
|
1735
|
-
akm import ./docs/auth-flow.md --
|
|
1730
|
+
akm import ./docs/auth-flow.md --bundle team-bundle
|
|
1736
1731
|
```
|
|
1737
1732
|
|
|
1738
1733
|
| Flag | Description |
|
|
1739
1734
|
| --- | --- |
|
|
1740
1735
|
| `--name` | Optional knowledge name. Defaults to the source filename, URL path, or a slug from stdin content |
|
|
1741
1736
|
| `--force` | Overwrite an existing knowledge document with the same name |
|
|
1742
|
-
| `--
|
|
1737
|
+
| `--bundle <name>` | Override the write destination. Accepts a source name from your config; falls back to `defaultWriteTarget` then the working bundle. |
|
|
1743
1738
|
| `--xref <ref>` | Cross-reference ref merged into the document's `xrefs:` frontmatter list. Repeatable. A document without frontmatter gains a block; a document with valid frontmatter keeps every existing key and value and gets the refs dedupe-appended (never a nested second block). Each ref must resolve in the write target or a configured source; an unresolvable ref fails with exit 2 before anything is written. If the document's existing frontmatter is not a parseable YAML mapping, the import fails (exit 2) rather than rewriting the block lossily — fix the frontmatter or import without `--xref`, which preserves the file verbatim. |
|
|
1744
1739
|
| `--supersedes <ref>` | Ref of an existing asset this document corrects. Repeatable. Imports the correction with the old ref merged into its `xrefs:` AND demotes the old asset (`beliefState: superseded` + `supersededBy: [<new ref>]`, a metadata-only frontmatter edit), then reindexes it. Same validation (including the self-supersede rejection), skipped-demotion (`applied: false`), idempotence, and git-boundary-commit behaviour as on `remember` (see above). |
|
|
1745
1740
|
|
|
@@ -1772,17 +1767,27 @@ its description, title or `when_to_use` from your reason. Improve does not
|
|
|
1772
1767
|
rewrite an asset's text. Once you have verified the correct fact, attach the
|
|
1773
1768
|
exact fix with `--replace`, `--with` and `--source`: akm checks that each
|
|
1774
1769
|
`--replace` text appears exactly once and that the frontmatter still parses,
|
|
1775
|
-
records nothing if either check fails, and
|
|
1776
|
-
proposal
|
|
1770
|
+
records nothing if either check fails, and applies the edit at once, with no
|
|
1771
|
+
review or gate: it files a `feedback` proposal and accepts it in the same command
|
|
1772
|
+
(the accept is a normal one, committed to a git-backed bundle, and
|
|
1773
|
+
`akm proposal revert` undoes it). If the accept refuses, the proposal is
|
|
1774
|
+
rejected, the file is left alone and the command fails. The asset stays eligible
|
|
1775
|
+
for improve like any other.
|
|
1777
1776
|
To mark the asset's history, with or without a text fix, add `--superseded-by
|
|
1778
1777
|
<ref>` (another asset replaces it) or `--outdated` (it describes a past state
|
|
1779
1778
|
and no single asset replaces it), with `--reason` and `--source`. The same single
|
|
1780
|
-
|
|
1779
|
+
edit sets the asset's `beliefState` (`superseded`, or `deprecated`) and, for
|
|
1781
1780
|
`--superseded-by`, adds the successor's ref to its `supersededBy` list, by
|
|
1782
1781
|
editing only those lines of the frontmatter. `--positive` records that an asset
|
|
1783
|
-
helped (it raises its ranking) and does not trigger a rewrite.
|
|
1784
|
-
|
|
1785
|
-
|
|
1782
|
+
helped (it raises its ranking) and does not trigger a rewrite. Feedback
|
|
1783
|
+
changes `akm search` and `akm curate` ranking at once, with no reindex: each
|
|
1784
|
+
recorded positive raises the asset's score and each negative lowers it, the
|
|
1785
|
+
same way for every asset, so an asset with 5 positives ranks higher than one
|
|
1786
|
+
with 2, and each further vote counts for a little less. The effect is small: it
|
|
1787
|
+
reorders close matches and does not override relevance. Only feedback recorded
|
|
1788
|
+
as the user counts, not feedback from improve, task or audit runs; the output's
|
|
1789
|
+
`rankingUpdate.applied` says which it was (`true`, or `false` with a `reason`).
|
|
1790
|
+
Feedback also updates the utility score that improve and `akm metrics` read.
|
|
1786
1791
|
|
|
1787
1792
|
```sh
|
|
1788
1793
|
akm feedback scripts/deploy.sh --positive
|
|
@@ -1804,9 +1809,9 @@ akm feedback knowledge/api-v1 --negative --reason "describes the retired v1 API"
|
|
|
1804
1809
|
| `--reason` | What is wrong with the asset's content and what should change; not for `akm` command errors. Attached to the feedback event (required for negative feedback by default, and always with a fix: `--replace`, `--superseded-by` or `--outdated`) |
|
|
1805
1810
|
| `--replace <text>` | Exact text to correct, copied verbatim from the asset file; it must appear exactly once. Repeatable, each paired in order with a `--with`. Negative feedback only |
|
|
1806
1811
|
| `--with <text>` | The corrected text for the matching `--replace`. Use `--with=<text>` for a value that starts with `-` |
|
|
1807
|
-
| `--source <where>` | The URL, command or file that shows the correct fact. Required with `--replace`, `--superseded-by` and `--outdated`;
|
|
1808
|
-
| `--superseded-by <ref>` | The ref of the asset that replaces this one. The
|
|
1809
|
-
| `--outdated` | The asset describes a past state and no single asset replaces it. The
|
|
1812
|
+
| `--source <where>` | The URL, command or file that shows the correct fact. Required with `--replace`, `--superseded-by` and `--outdated`; kept on the proposal as the audit trail |
|
|
1813
|
+
| `--superseded-by <ref>` | The ref of the asset that replaces this one. The edit sets `beliefState: superseded` and adds the ref, as its `bundle//conceptId`, to `supersededBy`; `contradicted` and `archived` stay, a ref already listed is not added again, and a scalar `supersededBy` becomes a list. The ref must be indexed and must not be the asset itself, or nothing is recorded; nor is anything when the asset already says all this (the fix changes nothing). Negative feedback only; may be combined with `--replace`/`--with`, not with `--outdated`; markdown assets only |
|
|
1814
|
+
| `--outdated` | The asset describes a past state and no single asset replaces it. The edit sets `beliefState: deprecated`, unless the asset already says `superseded`, `contradicted` or `archived`. Negative feedback only; may be combined with `--replace`/`--with`, not with `--superseded-by`; markdown assets only |
|
|
1810
1815
|
| `--tag` | Tag to attach to the feedback (repeatable, e.g. `--tag slice:train --tag team:platform`) |
|
|
1811
1816
|
| `--applied-to <ref>` | Credit a `lessons/<name>` lesson that helped resolve this task. When combined with `--positive`, appends this feedback ref to the target lesson's `lessonStrength[]` frontmatter array (dedup, idempotent). A non-lesson target, or a missing `--positive`, produces a warning rather than silently doing nothing. |
|
|
1812
1817
|
|
|
@@ -1921,15 +1926,16 @@ akm registry remove my-team --yes # Skip the confirmation prompt
|
|
|
1921
1926
|
Inspect or apply every pending migration in one plan. `akm migrate` is a thin
|
|
1922
1927
|
wrapper over the standalone `akm-migrate` executable (installed alongside
|
|
1923
1928
|
`akm`, and embedded in the release binary), which owns every historical shape
|
|
1924
|
-
akm
|
|
1929
|
+
akm 0.9.15 and later wrote so the CLI proper reads only current schemas. The steps,
|
|
1925
1930
|
in order:
|
|
1926
1931
|
|
|
1927
1932
|
1. config.json rewritten in its current shape (`configFile`): retired and
|
|
1928
|
-
unknown keys dropped,
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
+
unknown keys dropped, `configVersion` bumped — the same pipeline every
|
|
1934
|
+
load already runs in memory, so this only persists it, under a backup. A
|
|
1935
|
+
config older than 0.9.15 (the legacy `stashDir`/`sources[]`/`installed`
|
|
1936
|
+
layout, an `extraParams` key that shadows a first-class engine field) is
|
|
1937
|
+
not converted by 0.10 and blocks this step: run `akm migrate apply` under
|
|
1938
|
+
akm 0.9.x first;
|
|
1933
1939
|
2. pending `state.db` migrations, historical-destructive ones included, with
|
|
1934
1940
|
a verified sibling safety copy (`stateMigrations`) — the only path besides
|
|
1935
1941
|
`akm upgrade` that admits released migration 018, which an ordinary
|
|
@@ -1984,7 +1990,6 @@ akm config set output.detail full # Set one key
|
|
|
1984
1990
|
akm config set output.detail full --silent # Set without the post-write config dump on stdout
|
|
1985
1991
|
akm config unset llm # Remove an optional key
|
|
1986
1992
|
akm config path # Print path to config file
|
|
1987
|
-
akm config path --all # Print all config-related paths
|
|
1988
1993
|
akm config diff other-host/config.json # Effective-config differences, secrets redacted
|
|
1989
1994
|
```
|
|
1990
1995
|
|
|
@@ -1996,7 +2001,7 @@ Subcommands:
|
|
|
1996
2001
|
| `list` | List current configuration |
|
|
1997
2002
|
| `set <key> <value>` | Set one config key; prints the resulting config with `ok: true` |
|
|
1998
2003
|
| `unset <key>` | Unset an optional key, or a whole `embedding`/engine section; prints the resulting config with `ok: true` |
|
|
1999
|
-
| `path` |
|
|
2004
|
+
| `path` | Print the config file path (`akm info` reports the bundle, config, data, cache and state directories). Load-bearing: `config path` is the one subcommand the CLI still allows to run when the on-disk config itself fails to load, so you always have a way to locate a broken config. |
|
|
2000
2005
|
| `diff <path\|bundle//path>` | Compare this instance's effective config (its own `extends` already applied) against another config file or bundle-relative file (loaded through the same loader — its `extends` honoured too); prints sorted `{ path, local, other }` rows for every differing leaf, secrets redacted on both sides. |
|
|
2001
2006
|
|
|
2002
2007
|
`set` and `unset` accept `--silent` to suppress the post-write config dump
|
|
@@ -2048,14 +2053,13 @@ column borrow its model from a configured engine instead of a literal string.
|
|
|
2048
2053
|
|
|
2049
2054
|
### help
|
|
2050
2055
|
|
|
2051
|
-
Print the sectioned command overview, detailed help for any command,
|
|
2052
|
-
|
|
2056
|
+
Print the sectioned command overview, detailed help for any command, or a
|
|
2057
|
+
release's migration guidance.
|
|
2053
2058
|
|
|
2054
2059
|
```sh
|
|
2055
2060
|
akm help # Sectioned command overview (same as `akm --help`)
|
|
2056
2061
|
akm help bundle # Detailed options and subcommands for `bundle`
|
|
2057
2062
|
akm help env # Detailed options and subcommands for `env`
|
|
2058
|
-
akm help agents # Agent-facing usage instructions
|
|
2059
2063
|
akm help migrate 0.6.0 # Notes for a specific release
|
|
2060
2064
|
akm help migrate v0.6.0 # v-prefix accepted
|
|
2061
2065
|
akm help migrate v0.6.0-rc1 # Prereleases normalize to the stable note
|
|
@@ -2074,22 +2078,12 @@ unknown version prints the list of bundled notes so you can pick one that
|
|
|
2074
2078
|
exists. See [`CONTRIBUTING.md`](https://github.com/itlackey/akm/blob/main/.github/CONTRIBUTING.md#shipping-a-release--migration-notes)
|
|
2075
2079
|
for the per-release workflow.
|
|
2076
2080
|
|
|
2077
|
-
### help agents
|
|
2078
|
-
|
|
2079
|
-
Print agent-facing instructions for using `akm`. Add this output to your
|
|
2080
|
-
`AGENTS.md`, `CLAUDE.md`, or system prompt so your agent knows how to use
|
|
2081
|
-
the CLI. Prints the short guide by default; pass `--full` for the complete
|
|
2082
|
-
one.
|
|
2083
|
-
|
|
2084
|
-
```sh
|
|
2085
|
-
akm help agents
|
|
2086
|
-
```
|
|
2087
|
-
|
|
2088
2081
|
### hints
|
|
2089
2082
|
|
|
2090
|
-
Print the agent-facing CLI guide
|
|
2091
|
-
|
|
2092
|
-
|
|
2083
|
+
Print the agent-facing CLI guide. Add this output to your `AGENTS.md`,
|
|
2084
|
+
`CLAUDE.md`, or system prompt so your agent knows how to use the CLI. The
|
|
2085
|
+
complete guide is the default; use `--detail brief` for the compact version.
|
|
2086
|
+
(`akm help agents`, the short-first form, was removed in 0.10.)
|
|
2093
2087
|
|
|
2094
2088
|
```sh
|
|
2095
2089
|
akm hints
|
|
@@ -2146,9 +2140,9 @@ akm does not manage individual keys — edit the `.env` file directly (`$EDITOR
|
|
|
2146
2140
|
"$(akm env path <ref>)"`). `env remove <ref>` removes the whole file.
|
|
2147
2141
|
|
|
2148
2142
|
Env mutations (`create`, `remove`) pick their write destination the same way
|
|
2149
|
-
every other write command does: an explicit `--
|
|
2143
|
+
every other write command does: an explicit `--bundle <source>` wins, else
|
|
2150
2144
|
`defaultWriteTarget`, else the working bundle. The chosen source must be
|
|
2151
|
-
writable — a non-writable `--
|
|
2145
|
+
writable — a non-writable `--bundle`/`defaultWriteTarget` fails with a
|
|
2152
2146
|
`ConfigError` before anything is written — and on a git-backed writable target
|
|
2153
2147
|
the mutation lands in a single boundary commit (filesystem targets are
|
|
2154
2148
|
committed by `akm sync`; `env/` stays out of git when your bundle `.gitignore`
|
|
@@ -2212,7 +2206,7 @@ akm env create prod --from-file ./.env # seed from an existing .env (byte-for
|
|
|
2212
2206
|
printf 'A=1\nB=2\n' | akm env create prod --from-stdin
|
|
2213
2207
|
akm env create prod --path staging # creates env/staging/prod.env
|
|
2214
2208
|
akm env create prod --sensitive # hidden from `env list` and the search index
|
|
2215
|
-
akm env create prod --
|
|
2209
|
+
akm env create prod --bundle team # write to the `team` source
|
|
2216
2210
|
```
|
|
2217
2211
|
|
|
2218
2212
|
| Flag | Description |
|
|
@@ -2221,7 +2215,7 @@ akm env create prod --target team # write to the `team` source
|
|
|
2221
2215
|
| `--from-file <path>` | Seed the env file from an existing `.env` at this path |
|
|
2222
2216
|
| `--from-stdin` | Seed the env file from stdin |
|
|
2223
2217
|
| `--sensitive` | Exclude this env file from `env list` output and the search index |
|
|
2224
|
-
| `--
|
|
2218
|
+
| `--bundle <source>` | Override the write destination (falls back to `defaultWriteTarget` then the working bundle) |
|
|
2225
2219
|
|
|
2226
2220
|
Creates `env/prod.env` with mode 0600. Empty `create` is a no-op if the file
|
|
2227
2221
|
exists; `--from-file`/`--from-stdin` **refuse to clobber** an existing env (remove
|
|
@@ -2336,7 +2330,7 @@ of multi-line material. Writes are atomic (mode 0600) under an exclusive
|
|
|
2336
2330
|
`<secret>.lock`. Maximum size is 5 MB.
|
|
2337
2331
|
|
|
2338
2332
|
`secret set` selects its write destination like every other write command: an
|
|
2339
|
-
explicit `--
|
|
2333
|
+
explicit `--bundle <source>` wins, else `defaultWriteTarget`, else the working
|
|
2340
2334
|
bundle. The chosen source must be writable (a non-writable target fails with a
|
|
2341
2335
|
`ConfigError`), and on a git-backed writable target the mutation lands in a
|
|
2342
2336
|
single boundary commit. Reads (`list`, `run`) still span all configured sources.
|
|
@@ -2570,7 +2564,7 @@ tombstone under `.akm/memory-cleanup/archive/` and is not reported (#884). Also
|
|
|
2570
2564
|
`dangerous-env-key` findings for env files (the same key set `akm bundle add`
|
|
2571
2565
|
enforces — see [Dangerous env key audit](#dangerous-env-key-audit) — but
|
|
2572
2566
|
non-blocking here; `lint` only warns). `--type workflows` structurally parses
|
|
2573
|
-
and compiles
|
|
2567
|
+
and compiles Markdown workflows; errors surface as
|
|
2574
2568
|
`invalid-workflow-structure` findings (0.9.0: this is the only
|
|
2575
2569
|
structural-validation surface now that `akm workflow validate` is gone).
|
|
2576
2570
|
|
|
@@ -2616,9 +2610,9 @@ akm improve skills/code-review
|
|
|
2616
2610
|
akm improve workflows/release-checklist --task "reduce duplication"
|
|
2617
2611
|
akm improve --skip-if-locked # for high-frequency scheduled runs: skip (exit 0) if a run is already in progress
|
|
2618
2612
|
akm improve --require-engines # for scheduled runs: abort (exit 78) instead of degrading if an engine/credential is unavailable
|
|
2619
|
-
akm improve --no-sync # skip the end-of-run git
|
|
2613
|
+
akm improve --no-sync # skip the pre-run and end-of-run git sync entirely (default: on for git-backed bundles)
|
|
2620
2614
|
akm improve --sync --no-push # commit only, skip the push after it
|
|
2621
|
-
akm improve --
|
|
2615
|
+
akm improve --dry-run --strategy consolidate # preview consolidate's resolved engine/model routing; nothing is dispatched
|
|
2622
2616
|
akm improve lessons/my-lesson --show-prompt --format text # print the composed reflect prompt for one asset, unwrapped; no lock/index/engine call
|
|
2623
2617
|
akm improve report # LLM usage/routing report for the most recent real run
|
|
2624
2618
|
akm improve report --run <id> # ...for one specific improve_runs id
|
|
@@ -2628,37 +2622,37 @@ akm improve judge < revision.json # reflect's quality judge on one revision
|
|
|
2628
2622
|
|
|
2629
2623
|
| Flag | Description |
|
|
2630
2624
|
| --- | --- |
|
|
2631
|
-
| `--run <id>` | `report` scope only (#944): show the usage report for one specific `improve_runs` row instead of the most recent real run. Mutually exclusive with `--since`. Rejected with any other scope, or no scope. |
|
|
2632
|
-
| `--since <window>` | `report` scope only (#944): aggregate the usage report over every real (non-dry-run) run started since `<window>` (a duration like `24h`/`7d`, or an ISO timestamp) instead of one run. Mutually exclusive with `--run`. Rejected with any other scope, or no scope. |
|
|
2633
2625
|
| `--task` | Optional extra guidance for this improvement pass |
|
|
2634
2626
|
| `--dry-run` | Show the schema-v2 result on stdout without creating config, data, state, cache, bundle, log, or result artifacts. Dry-run results are never persisted, including on errors or signals. |
|
|
2635
|
-
| `--plan` | Alias for `--dry-run` (#947). Sets the exact same internal flag; no separate code path. Prefer this spelling when the goal is previewing `plan.processes` (resolved process -> engine -> model routing) rather than checking what would be written. |
|
|
2636
2627
|
| `--bundle` | Select the bundle the run improves and writes to (default: `defaultWriteTarget`, else the working bundle); only that bundle's assets are planned. When the ref scope is bundle-qualified, it must name the same bundle |
|
|
2637
2628
|
| `--limit <n>` | Cap the refs the run processes, highest salience first (refs routed to distill only come last). Overrides the strategy's `processes.reflect.limit` and `limit` |
|
|
2638
2629
|
| `--timeout-ms <ms>` | Wall-clock budget for the run (default: `7200000` = 2 hours) |
|
|
2639
|
-
| `--require-feedback-signal` | Turn the
|
|
2630
|
+
| `--require-feedback-signal` | Turn the proactive-maintenance lane off for the run, so only assets with recent feedback are planned |
|
|
2640
2631
|
| `--strategy <name>` | Override the active improve strategy (a built-in or entry under `improve.strategies`) |
|
|
2641
2632
|
| `--json-to-stdout` | Also emit the full persisted JSON result on stdout for a live run. Without this flag, stdout stays empty. Dry-runs always emit their result and are never persisted. |
|
|
2642
2633
|
| `--skip-if-locked` | If another improve run already holds the lock, skip gracefully (exit 0) instead of failing with "already running" (exit 75, `TransientError`, code `IMPROVE_LOCK_HELD` — field follow-up to #948: two legitimate `improve` invocations colliding on this lock is ordinary, retryable contention, not a broken config file). Use for high-frequency scheduled runs so they don't pile up failures while a longer run is in progress. |
|
|
2643
2634
|
| `--require-engines` | Abort (exit 78, before any indexing, lock, or log side effect) if the active strategy would enable a process whose engine or credential cannot be resolved in this process's environment, OR whose endpoint fails a bounded reachability probe — the same probe `akm health`'s `default-llm-engine`/`configured-engines` checks run, once per distinct endpoint. An agent engine's check is that its binary is on PATH, and an `opencode-sdk` engine's is both its binary and, when it sets `llmEngine`, that LLM fallback's endpoint. Without this flag, improve degrades gracefully: it skips the affected processes and reports them in the result's `skippedProcesses`. Recommended alongside `--skip-if-locked` for scheduled runs, since the operator's own shell can pass config validation while a scheduler's stripped-down environment (see #953) cannot. |
|
|
2644
2635
|
| `--show-prompt` | Print the composed reflect prompt (#952) for one asset and exit — before any lock, index write, or engine dispatch. Requires a fully-qualified asset ref as the scope (`akm improve lessons/my-lesson --show-prompt`); rejected with a type or whole-bundle scope. The default output format is JSON, which carries the prompt as a `prompt` field (escaped into one line) alongside the resolved `engine`/`engineKind`; pass `--format text` to print the prompt itself, unwrapped and readable by eye. |
|
|
2645
|
-
| `--sync` / `--no-sync` |
|
|
2646
|
-
| `--push` / `--no-push` | Push after the end-of-run sync
|
|
2636
|
+
| `--sync` / `--no-sync` | Sync the git-backed primary bundle like `akm sync` (fetch and merge the upstream, commit, push) before the run, and commit (and optionally push) when it finishes. A conflict or fetch failure before the run only warns; the run continues on the local state. Default: on for git-backed bundles (per profile config). |
|
|
2637
|
+
| `--push` / `--no-push` | Push after the pre-run and end-of-run sync commits when writable with a remote configured. `--no-push` commits only, skipping the push. Default: per profile config (`true`). `sync.push` stays outside the autonomy gate — this is a per-run opt-out, not a default change. |
|
|
2647
2638
|
|
|
2648
2639
|
`akm improve` is the public entrypoint for whole-bundle, type-scoped, and
|
|
2649
2640
|
ref-scoped improvement. It owns the memory-cleanup and lesson-distillation
|
|
2650
2641
|
flow. A qualified scope such as `team//skills/code-review` selects that bundle;
|
|
2651
2642
|
a different explicit `--bundle` is a usage error.
|
|
2652
2643
|
|
|
2644
|
+
A type scope that matches no asset in the stash (a misspelt type, say) prints a warning on stderr, with the
|
|
2645
|
+
nearest real type when one is close, and plans nothing; the exit code stays 0.
|
|
2646
|
+
|
|
2653
2647
|
A run improves one bundle, the one it writes to, and plans only that bundle's
|
|
2654
2648
|
assets: an asset that lives in another bundle is left alone even when that
|
|
2655
2649
|
bundle is writable, and a bare ref scope (`akm improve skills/x`) resolves
|
|
2656
2650
|
inside the write target only. To improve another bundle, name it
|
|
2657
2651
|
(`akm improve --bundle team`, or `akm improve team//skills/code-review`). A
|
|
2658
2652
|
scheduled `akm improve` therefore covers only its write target: schedule one
|
|
2659
|
-
`akm improve --bundle <name>` run per other bundle. `--dry-run`
|
|
2660
|
-
|
|
2661
|
-
`AKM_BUNDLE_DIR`, then `defaultBundle`), so
|
|
2653
|
+
`akm improve --bundle <name>` run per other bundle. `--dry-run`
|
|
2654
|
+
resolves the bundle the way a live run does (the working bundle starts from
|
|
2655
|
+
`AKM_BUNDLE_DIR`, then `defaultBundle`), so it previews the bundle a live run
|
|
2662
2656
|
improves.
|
|
2663
2657
|
|
|
2664
2658
|
Every stage records what it did with each asset in the improve ledger
|
|
@@ -2687,10 +2681,10 @@ covering doc that ranks lower than the 20th nearest goes unseen. With no stored
|
|
|
2687
2681
|
vector (semantic search off, or the memory not indexed yet) that check does
|
|
2688
2682
|
nothing and the exact slug and whole-body checks still apply.
|
|
2689
2683
|
|
|
2690
|
-
No built-in strategy turns the improve-stage extract process on
|
|
2691
|
-
`
|
|
2692
|
-
|
|
2693
|
-
|
|
2684
|
+
No built-in strategy turns the improve-stage extract process on. Set the
|
|
2685
|
+
selected strategy's process `enabled: true` to opt in. Proactive maintenance is
|
|
2686
|
+
on in `default`; set `processes.proactiveMaintenance.enabled: false` to turn it
|
|
2687
|
+
off. The stage toggle does not disable a direct
|
|
2694
2688
|
`akm proposal extract --type <harness>` or `akm proposal extract --auto`
|
|
2695
2689
|
invocation.
|
|
2696
2690
|
|
|
@@ -2719,18 +2713,16 @@ newer than distill's last attempt. It skips a memory flagged wrong and not
|
|
|
2719
2713
|
edited since (a negative feedback in that window judged the body it still has,
|
|
2720
2714
|
or, recorded without that body's hash, is newer than the file's last write),
|
|
2721
2715
|
and a memory whose only feedback in that window is positive with no reason or
|
|
2722
|
-
note, unless the ref is explicit.
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
(salience and outcome) and plan nothing, so improve does not rewrite on a
|
|
2728
|
-
proactive cadence; they pick only refs in the
|
|
2716
|
+
note, unless the ref is explicit. In a strategy that enables
|
|
2717
|
+
`proactiveMaintenance` (`default` does), a further lane plans refs with no such
|
|
2718
|
+
feedback that are due for a revisit: at most `maxPerRun` (default 15) per run,
|
|
2719
|
+
only refs not reflected or distilled for `dueDays` (default 30), so each comes up
|
|
2720
|
+
at most once a month. It picks only refs in the
|
|
2729
2721
|
[retrieval scope](https://github.com/itlackey/akm/blob/main/docs/architecture/improvement.md#retrieval-scope): returned by
|
|
2730
2722
|
`search`, `curate` or `show`, or named by feedback, in the last 90 days, or new
|
|
2731
2723
|
material no improve stage has processed. The planned refs are ranked by salience
|
|
2732
2724
|
and cut to the limit; an explicit ref scope bypasses every gate. Use
|
|
2733
|
-
`--require-feedback-signal` to turn
|
|
2725
|
+
`--require-feedback-signal` to turn that lane off for the run.
|
|
2734
2726
|
|
|
2735
2727
|
When the active strategy enables a process (or the triage judgment engine)
|
|
2736
2728
|
whose engine or credential cannot be resolved in this process's environment,
|
|
@@ -2745,7 +2737,7 @@ itself. `ok` and the exit code are unchanged either way, matching `extract`'s
|
|
|
2745
2737
|
`skippedProcesses` (or pass `--require-engines` to abort instead of
|
|
2746
2738
|
degrading). `reason` names which engine and which credential reference (an env
|
|
2747
2739
|
var, `apiKeyFile` path, or `secret://` reference — never its value) is
|
|
2748
|
-
missing. A `--dry-run
|
|
2740
|
+
missing. A `--dry-run` preview never dispatches, so it never aborts
|
|
2749
2741
|
on an unavailable credential either — even a strategy left with every process
|
|
2750
2742
|
disabled this way still returns its plan, with the affected processes in
|
|
2751
2743
|
`skippedProcesses`.
|
|
@@ -2796,11 +2788,11 @@ still carries that engine's `engine`/`model`/`engineKind` alongside
|
|
|
2796
2788
|
`unavailable`, rather than omitting them the way a never-configured process
|
|
2797
2789
|
does — so a preview can show what would have run. This table is
|
|
2798
2790
|
resolved before any dispatch on every invocation (dry or live), so
|
|
2799
|
-
`akm improve --dry-run --strategy <name>`
|
|
2791
|
+
`akm improve --dry-run --strategy <name>` previews an ad-hoc
|
|
2800
2792
|
strategy override without changing config first; `akm health`'s
|
|
2801
2793
|
`active-improve-strategy` check performs the equivalent resolution but only
|
|
2802
2794
|
for the configured default strategy (`defaults.improveStrategy`), and reports
|
|
2803
|
-
no model or per-process notices.
|
|
2795
|
+
no model or per-process notices. `--dry-run` does not probe
|
|
2804
2796
|
engine reachability over the network — pair with `akm health --probe` (or the
|
|
2805
2797
|
default probe-on behavior) to check whether a named engine actually answers.
|
|
2806
2798
|
|
|
@@ -2825,9 +2817,12 @@ destination than `memory`.
|
|
|
2825
2817
|
`akm improve report` (#944) answers "which engine did each model-calling process
|
|
2826
2818
|
use this run, how much did it cost, and which enabled processes made zero
|
|
2827
2819
|
calls (and why)" without hand-written SQLite against `state.db`. It is a
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2820
|
+
real subcommand (`report` is not an asset type, so it is not a scope of the
|
|
2821
|
+
improve run). It takes two flags of its own, `--run <id>` (the usage report for
|
|
2822
|
+
one specific `improve_runs` row instead of the most recent real run) and
|
|
2823
|
+
`--since <window>` (aggregate over every real, non-dry-run run started since a
|
|
2824
|
+
duration like `24h`/`7d` or an ISO timestamp); they are mutually exclusive, and on
|
|
2825
|
+
`akm improve` itself they are unknown flags (exit 2).
|
|
2831
2826
|
|
|
2832
2827
|
Every real (non-dry-run) `akm improve` invocation persists a `usageReport`
|
|
2833
2828
|
field on the result (`result_json` in `improve_runs`, and in the
|
|
@@ -2862,7 +2857,7 @@ support.
|
|
|
2862
2857
|
|
|
2863
2858
|
#### improve judge
|
|
2864
2859
|
|
|
2865
|
-
`akm improve judge` runs reflect's quality judge on one revision and prints its
|
|
2860
|
+
`akm improve judge` (a real subcommand; `--strategy` is its only flag) runs reflect's quality judge on one revision and prints its
|
|
2866
2861
|
verdict, for testing a judge engine on revisions whose right answer you know. It
|
|
2867
2862
|
reads `{"source": "...", "candidate": "...", "feedback": "...", "ref": "..."}` JSON
|
|
2868
2863
|
from stdin (`feedback` and `ref` are optional; `ref` names the revised asset,
|
|
@@ -2889,15 +2884,15 @@ single queue.
|
|
|
2889
2884
|
|
|
2890
2885
|
New qualified proposals record their destination source name and materialized
|
|
2891
2886
|
root. `proposal diff`, `accept`, and `revert` use that recorded target by
|
|
2892
|
-
default; an explicit `--
|
|
2887
|
+
default; an explicit `--bundle` must resolve to the same source and root or the
|
|
2893
2888
|
command fails with exit 2. An unbound proposal in a selected non-primary queue
|
|
2894
2889
|
uses that authenticated queue root. A short historical unbound proposal
|
|
2895
|
-
mutation requires either an explicit `--
|
|
2890
|
+
mutation requires either an explicit `--bundle` or a selected `--queue` that
|
|
2896
2891
|
authenticates its root; it never falls back to an ambient write target.
|
|
2897
2892
|
|
|
2898
2893
|
#### proposal extract
|
|
2899
2894
|
|
|
2900
|
-
**
|
|
2895
|
+
**Evolving** (see [STABILITY.md](../../STABILITY.md)): measured by the extract eval; 0.10 is still settling the improve defaults, so it is not yet Stable.
|
|
2901
2896
|
|
|
2902
2897
|
Extract durable insights from native coding-agent session files (claude-code,
|
|
2903
2898
|
codex, opencode) and queue them as proposals. This is the standalone
|
|
@@ -3055,7 +3050,7 @@ akm proposal accept <id>
|
|
|
3055
3050
|
akm proposal accept 7c115132 # 8-char UUID prefix
|
|
3056
3051
|
akm proposal accept skills/akm-dream # Asset ref
|
|
3057
3052
|
akm proposal accept <id> --queue team-bundle
|
|
3058
|
-
akm proposal accept <id> --
|
|
3053
|
+
akm proposal accept <id> --bundle team-bundle # Must match a recorded target
|
|
3059
3054
|
akm proposal accept --generator reflect -y # Bulk-accept by generator (requires -y)
|
|
3060
3055
|
akm proposal accept --generator reflect --max-diff-lines 50 -y # ...only if <= 50 lines
|
|
3061
3056
|
akm proposal accept --generator reflect --older-than 7 --dry-run # Preview a bulk accept
|
|
@@ -3064,7 +3059,7 @@ akm proposal accept --generator reflect --older-than 7 --dry-run # Preview a bu
|
|
|
3064
3059
|
| Flag | Description |
|
|
3065
3060
|
| --- | --- |
|
|
3066
3061
|
| `--queue <source>` | Select the proposal queue by configured writable source name |
|
|
3067
|
-
| `--
|
|
3062
|
+
| `--bundle <name>` | Write destination; must match the proposal's recorded target |
|
|
3068
3063
|
| `--generator <name>` | Bulk-accept all pending proposals from this generator (e.g. `reflect`, `distill`). Requires no positional id. |
|
|
3069
3064
|
| `--max-diff-lines` | When bulk-accepting, only accept proposals whose content is `<=` this many lines. Larger proposals are skipped. |
|
|
3070
3065
|
| `--older-than` | When bulk-accepting, only accept proposals created (or last reopened) more than this many days ago |
|
|
@@ -3184,8 +3179,8 @@ A reopened retire proposal no longer counts as a settled pair for the pair
|
|
|
3184
3179
|
pass, and while it is pending that pair is not proposed a second time. The
|
|
3185
3180
|
proposal's `improve_ledger` row goes back to what the mint wrote (a retire
|
|
3186
3181
|
proposal's mint writes none, so the row its rejection created is dropped).
|
|
3187
|
-
The age that retention expiry and `--older-than` see restarts at the reopen
|
|
3188
|
-
|
|
3182
|
+
The age that retention expiry and `--older-than` see restarts at the reopen,
|
|
3183
|
+
and a `proposal_reopened` event is appended.
|
|
3189
3184
|
Accepting a reopened retire proposal archives the retired file exactly as for
|
|
3190
3185
|
any retire proposal, and `akm proposal revert` restores it byte-exactly.
|
|
3191
3186
|
|
|
@@ -3204,13 +3199,13 @@ to `reverted` and appends a `proposal_reverted` event to the audit log.
|
|
|
3204
3199
|
akm proposal revert <id>
|
|
3205
3200
|
akm proposal revert skills/akm-dream # Asset ref
|
|
3206
3201
|
akm proposal revert <id> --queue team-bundle
|
|
3207
|
-
akm proposal revert <id> --
|
|
3202
|
+
akm proposal revert <id> --bundle team-bundle # Must match a recorded target
|
|
3208
3203
|
```
|
|
3209
3204
|
|
|
3210
3205
|
| Flag | Description |
|
|
3211
3206
|
| --- | --- |
|
|
3212
3207
|
| `--queue <source>` | Select the proposal queue by configured writable source name |
|
|
3213
|
-
| `--
|
|
3208
|
+
| `--bundle <name>` | Select the destination for an unbound proposal, or confirm a recorded destination; a conflict with a recorded target is rejected |
|
|
3214
3209
|
|
|
3215
3210
|
Accepts the full proposal UUID or the asset ref. UUID prefixes are **not**
|
|
3216
3211
|
supported for reverting (archived proposals require the full identifier). Errors
|
|
@@ -3227,13 +3222,13 @@ akm proposal diff <id>
|
|
|
3227
3222
|
akm proposal diff skills/akm-dream # Asset ref form
|
|
3228
3223
|
akm proposal diff 7c115132 # 8-char UUID prefix
|
|
3229
3224
|
akm proposal diff <id> --queue team-bundle
|
|
3230
|
-
akm proposal diff <id> --
|
|
3225
|
+
akm proposal diff <id> --bundle team-bundle # Must match a recorded target
|
|
3231
3226
|
```
|
|
3232
3227
|
|
|
3233
3228
|
| Flag | Description |
|
|
3234
3229
|
| --- | --- |
|
|
3235
3230
|
| `--queue <source>` | Select the proposal queue by configured writable source name |
|
|
3236
|
-
| `--
|
|
3231
|
+
| `--bundle <name>` | Select an unbound destination or confirm a recorded one for `proposal accept`, `diff`, or `revert`; a conflict with a recorded target is rejected |
|
|
3237
3232
|
|
|
3238
3233
|
`proposal accept` runs full validation before promoting. `proposal reject`
|
|
3239
3234
|
requires `--reason`.
|
|
@@ -3280,8 +3275,15 @@ one at a time. One rule decides each proposal: a proposal whose quality judge
|
|
|
3280
3275
|
passed on its current content is accepted (unless its target changed since it
|
|
3281
3276
|
was minted — that one is auto-rejected as `stale-target`); an empty diff is
|
|
3282
3277
|
rejected; a proposal that reflect or distill deferred for review is left for a
|
|
3283
|
-
person;
|
|
3284
|
-
is
|
|
3278
|
+
person; a proposal from the proactive-maintenance lane (no feedback behind it)
|
|
3279
|
+
is left for a person too (reason `proactive-needs-review`), even when its judge
|
|
3280
|
+
passed it; everything else goes to the judgment tier when one is enabled, and
|
|
3281
|
+
is otherwise left for review. The judgment tier may accept only a consolidate
|
|
3282
|
+
promotion (a memory proposed as a new knowledge note); any other kind it would
|
|
3283
|
+
accept, such as a retirement or a reflect revision, is left for a
|
|
3284
|
+
person (reason `judgment-not-promotion`). Judged over every kind, the tier
|
|
3285
|
+
accepted unsafe retirements, applied exact fixes unreviewed and changed notes
|
|
3286
|
+
nobody had touched: 6 to 14 harmed items a night on two models (#1132). A reflect revision that changes the body, and
|
|
3285
3287
|
every distill lesson or knowledge promotion, is deferred for review even when
|
|
3286
3288
|
its judge passes it. Default mode stages decisions (queue mode); pass
|
|
3287
3289
|
`--promote` to actually accept.
|
|
@@ -3300,7 +3302,7 @@ akm proposal drain --strategy default --promote -y # Read the triage block from
|
|
|
3300
3302
|
| `--dry-run` | List what would be accepted/rejected/deferred, without writing |
|
|
3301
3303
|
| `--max-accepts` | Hard per-run accept ceiling; accepts beyond this are reported as `skippedByCap` |
|
|
3302
3304
|
| `--older-than` | Only consider proposals created (or last reopened) more than this many days ago |
|
|
3303
|
-
| `--judgment` | Explicitly enable the judgment tier for this standalone drain, including when the selected strategy says `judgment.enabled: false`; execution overrides still come from that strategy. Without this flag, strategy judgment config does not enable standalone drain judgment. A missing runner remains a no-op with a logged `triage_deferred` summary. |
|
|
3305
|
+
| `--judgment` | Explicitly enable the judgment tier for this standalone drain, including when the selected strategy says `judgment.enabled: false`; it accepts only consolidate promotions (#1132); execution overrides still come from that strategy. Without this flag, strategy judgment config does not enable standalone drain judgment. A missing runner remains a no-op with a logged `triage_deferred` summary. |
|
|
3304
3306
|
| `-y`, `--yes` | Skip the confirmation prompt (required in non-interactive mode for promotion) |
|
|
3305
3307
|
|
|
3306
3308
|
### feedback (`--reason`)
|
|
@@ -3326,15 +3328,14 @@ shell commands. It manages on-disk task definitions under
|
|
|
3326
3328
|
(cron / launchd / schtasks). Task source v4 YAML (`version: 4`) is the only
|
|
3327
3329
|
executable source contract this release accepts; `akm task add` writes v4 —
|
|
3328
3330
|
see the canonical [Tasks reference](tasks.md). The
|
|
3329
|
-
group is `add | enable | disable | run | explain | validate |
|
|
3331
|
+
group is `add | enable | disable | run | explain | validate | sync | doctor | history | prune`
|
|
3330
3332
|
— there is no `show` or `remove`; use `akm show tasks/<id>` to inspect one
|
|
3331
3333
|
task. Use `task enable` / `task disable` for host-local activation; edit the
|
|
3332
3334
|
file only to change the authored schedule or remove the task.
|
|
3333
|
-
|
|
3334
|
-
spellings return the identical envelope.
|
|
3335
|
+
List tasks with `akm search --type task`.
|
|
3335
3336
|
|
|
3336
3337
|
```sh
|
|
3337
|
-
akm task
|
|
3338
|
+
akm search --type task # List tasks (cross-bundle)
|
|
3338
3339
|
akm show tasks/<id> # Inspect one task
|
|
3339
3340
|
akm task add <id> --schedule "@daily" \ # Register a new task and install it
|
|
3340
3341
|
--command "akm improve --strategy default"
|
|
@@ -3345,7 +3346,6 @@ akm task enable team//tasks/nightly # Add local activation and sync its bu
|
|
|
3345
3346
|
akm task disable team//tasks/nightly # Remove local activation and unschedule it
|
|
3346
3347
|
akm task run <id> # Execute now (what the scheduler calls)
|
|
3347
3348
|
akm task explain <ref> # Read-only: declared inputs, target, schedule — spawns nothing
|
|
3348
|
-
akm task validate <path> # Read-only: parse one task file by path, report sync's diagnostic
|
|
3349
3349
|
akm task history [<id>] [--id <id>] [--limit <n>] # Recent runs from state.db (positional id == --id)
|
|
3350
3350
|
akm task sync # Reconcile activated refs from all enabled configured bundles
|
|
3351
3351
|
akm task sync --dry-run # Preview the reconcile — zero scheduler writes
|
|
@@ -3361,13 +3361,6 @@ this host's scheduler activation), `--force` (overwrite an existing task with
|
|
|
3361
3361
|
the same id), and `--rebind` (also point the bundle's installed scheduler rows
|
|
3362
3362
|
at this akm invocation, as `akm task sync --rebind` does).
|
|
3363
3363
|
|
|
3364
|
-
`akm task list [<query>] [--limit <n>] [--from local|registry|all]` is a
|
|
3365
|
-
pure alias for `akm search --type task` with the query, `--limit`, and
|
|
3366
|
-
`--from` flags passed through — same envelope, same `results` alias, no
|
|
3367
|
-
second implementation. 0.9.0 removed `task list` as a redundant
|
|
3368
|
-
implementation of task listing (see the 0.9.0 CHANGELOG entry); this
|
|
3369
|
-
reintroduces only the spelling, not the logic.
|
|
3370
|
-
|
|
3371
3364
|
`akm task explain <ref> [input flags]` prints a task's declared `inputs:`,
|
|
3372
3365
|
the values that would actually be supplied (with provenance), the resolved
|
|
3373
3366
|
target, effective execution settings, and schedule bindings — **read-only**:
|
|
@@ -3375,28 +3368,6 @@ it never spawns anything, writes history, or touches the scheduler. A
|
|
|
3375
3368
|
secret-shaped value prints as `<redacted>`. See
|
|
3376
3369
|
[`akm task explain`](tasks.md#akm-task-explain).
|
|
3377
3370
|
|
|
3378
|
-
`akm task validate <path>` parses ONE task file by filesystem path — not a
|
|
3379
|
-
concept ref or id, and the file need not live in any configured bundle —
|
|
3380
|
-
and reports the same diagnostic `akm task sync` would produce for it,
|
|
3381
|
-
INCLUDING sync's own cron-dialect check and its per-schedule-entry
|
|
3382
|
-
input-contract check (so a file `sync` would reject can never be reported
|
|
3383
|
-
`valid` here): `{ok, path, sourceVersion, outcome, reason?,
|
|
3384
|
-
resolved?}` where `outcome` is `valid` (parses as task source v4 directly
|
|
3385
|
-
and passes both sync checks), `blocked` (task v2/v3 that must first be
|
|
3386
|
-
rewritten by `akm migrate apply`), `invalid` (the YAML doesn't parse, or the document fails schema
|
|
3387
|
-
validation, or it parsed but fails one of the two sync checks), or
|
|
3388
|
-
`not-a-task` (the YAML parses but never declares a `version:` field — not
|
|
3389
|
-
shaped like a task source). `resolved` is the compiled task shape
|
|
3390
|
-
`akm task sync` itself would build a scheduler binding from — id, the
|
|
3391
|
-
compiled schema version, resolved `uses`/`run` target, declared `inputs`
|
|
3392
|
-
contract, and `schedule` bindings — present only on `valid`.
|
|
3393
|
-
Unlike `akm task explain`, it never runs execution lowering: a command-kind
|
|
3394
|
-
task validates the same whether or not the local config has an engine
|
|
3395
|
-
configured. Exits 0 for `valid`, 1 for
|
|
3396
|
-
`blocked`/`invalid`/`not-a-task`, 2 for a missing or unreadable path.
|
|
3397
|
-
**Read-only**: it never touches the scheduler and never requires the file to
|
|
3398
|
-
be indexed or wired into a bundle.
|
|
3399
|
-
|
|
3400
3371
|
`akm task run` is what cron / launchd / schtasks invoke at the scheduled
|
|
3401
3372
|
time. Each run is recorded as a row in the durable `task_history` table
|
|
3402
3373
|
(`state.db`), surfaced by `akm task history` — **not** by `akm log`; there is
|