akm-cli 0.9.0-rc.5 → 0.9.0-rc.7
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 +116 -26
- package/README.md +7 -7
- package/SECURITY.md +11 -10
- package/dist/akm +2 -2
- package/dist/akm-migrate-storage +2 -2
- package/dist/assets/hints/cli-hints-full.md +60 -73
- package/dist/assets/hints/cli-hints-short.md +8 -12
- package/dist/assets/improve-strategies/default.json +5 -7
- package/dist/assets/improve-strategies/frequent.json +2 -2
- package/dist/assets/improve-strategies/proactive-maintenance.json +2 -2
- package/dist/assets/improve-strategies/quick.json +1 -1
- package/dist/assets/improve-strategies/reflect-distill.json +3 -3
- package/dist/assets/improve-strategies/thorough.json +1 -1
- package/dist/assets/prompts/consolidate-system.md +5 -5
- package/dist/assets/prompts/extract-session.md +2 -6
- package/dist/assets/prompts/reflect-llm-framed-contract.md +11 -0
- package/dist/assets/prompts/reflect-llm-schema-contract.md +3 -0
- package/dist/assets/prompts/reflect-output-repair.md +3 -0
- package/dist/assets/stash-skeleton/README.md +10 -11
- package/dist/assets/stash-skeleton/facts/conventions/assets/agent.md +1 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/fact.md +1 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/knowledge.md +1 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/lesson.md +2 -2
- package/dist/assets/stash-skeleton/facts/conventions/assets/memory.md +2 -2
- package/dist/assets/stash-skeleton/facts/conventions/assets/script.md +1 -1
- package/dist/assets/stash-skeleton/facts/conventions/assets/skill.md +2 -2
- package/dist/assets/stash-skeleton/facts/conventions/assets/workflow.md +1 -1
- package/dist/assets/stash-skeleton/facts/conventions/backlinks.md +18 -18
- package/dist/assets/stash-skeleton/facts/conventions/domains.md +8 -9
- package/dist/assets/stash-skeleton/facts/conventions/organization.md +13 -15
- package/dist/assets/tasks/core/extract.yml +2 -2
- package/dist/assets/tasks/core/improve.yml +1 -1
- package/dist/assets/templates/html/health.html +2 -3
- package/dist/cli/config-migrate.js +1328 -101
- package/dist/cli/invocation.js +255 -0
- package/dist/cli/parse-args.js +20 -83
- package/dist/cli/shared.js +15 -37
- package/dist/cli.js +18 -49
- package/dist/commands/agent/agent-dispatch.js +2 -2
- package/dist/commands/agent/contribute-cli.js +5 -4
- package/dist/commands/bundle/bundle-cli.js +68 -0
- package/dist/commands/bundle/bundle.js +219 -0
- package/dist/commands/completions.js +2 -2
- package/dist/commands/config-cli.js +6 -3
- package/dist/commands/env/env-binding.js +13 -9
- package/dist/commands/env/env-cli.js +49 -48
- package/dist/commands/env/secret-cli.js +24 -10
- package/dist/commands/events.js +2 -2
- package/dist/commands/feedback-cli.js +59 -33
- package/dist/commands/graph/graph.js +6 -4
- package/dist/commands/health/advisories.js +4 -4
- package/dist/commands/health/html-report.js +190 -593
- package/dist/commands/health/improve-metrics.js +240 -188
- package/dist/commands/health/metrics.js +9 -17
- package/dist/commands/health/report-view-model.js +509 -0
- package/dist/commands/health/surfaces.js +6 -3
- package/dist/commands/health/types-checks.js +4 -0
- package/dist/commands/health/types-improve.js +22 -0
- package/dist/commands/health/types-metrics.js +4 -0
- package/dist/commands/health/types-result.js +7 -0
- package/dist/commands/health/types-runs.js +4 -0
- package/dist/commands/health/types-session-log.js +4 -0
- package/dist/commands/health/types-windows.js +4 -0
- package/dist/commands/health/types.js +26 -21
- package/dist/commands/health/windows.js +1 -2
- package/dist/commands/health.js +219 -161
- package/dist/commands/improve/collapse-detector.js +25 -14
- package/dist/commands/improve/consolidate/chunking.js +7 -5
- package/dist/commands/improve/consolidate.js +640 -740
- package/dist/commands/improve/content-hash.js +39 -0
- package/dist/commands/improve/distill/content-repair.js +4 -10
- package/dist/commands/improve/distill/promote-memory.js +73 -47
- package/dist/commands/improve/distill/quality-gate.js +30 -15
- package/dist/commands/improve/distill-promotion-policy.js +24 -885
- package/dist/commands/improve/distill.js +564 -341
- package/dist/commands/improve/eligibility.js +75 -36
- package/dist/commands/improve/extract-cli.js +6 -6
- package/dist/commands/improve/extract-prompt.js +5 -34
- package/dist/commands/improve/extract.js +524 -358
- package/dist/commands/improve/feedback-valence.js +2 -12
- package/dist/commands/improve/improve-cli.js +11 -20
- package/dist/commands/improve/improve-result-file.js +7 -6
- package/dist/commands/improve/improve-run-types.js +4 -0
- package/dist/commands/improve/improve-strategies.js +3 -9
- package/dist/commands/improve/improve.js +781 -668
- package/dist/commands/improve/locks.js +6 -2
- package/dist/commands/improve/loop-stages.js +938 -965
- package/dist/commands/improve/memory/derived-ref.js +122 -0
- package/dist/commands/improve/memory/memory-contradiction-detect.js +35 -38
- package/dist/commands/improve/memory/memory-improve.js +24 -37
- package/dist/commands/improve/outcome-loop.js +13 -33
- package/dist/commands/improve/preparation.js +886 -692
- package/dist/commands/improve/proactive-maintenance.js +33 -3
- package/dist/commands/improve/proposal-envelope.js +31 -0
- package/dist/commands/improve/reflect.js +962 -549
- package/dist/commands/improve/run-context.js +119 -0
- package/dist/commands/improve/salience.js +8 -4
- package/dist/commands/improve/session-asset.js +7 -3
- package/dist/commands/improve/shared.js +14 -40
- package/dist/commands/improve/source-identity.js +39 -26
- package/dist/commands/improve/triage.js +20 -17
- package/dist/commands/lint/base-linter.js +288 -295
- package/dist/commands/lint/index.js +132 -19
- package/dist/commands/mv-cli.js +257 -234
- package/dist/commands/observability-cli.js +2 -1
- package/dist/commands/proposal/diff-format.js +50 -0
- package/dist/commands/proposal/drain-policies.js +0 -6
- package/dist/commands/proposal/drain.js +17 -16
- package/dist/commands/proposal/proposal-cli.js +40 -77
- package/dist/commands/proposal/proposal-types.js +56 -0
- package/dist/commands/proposal/proposal.js +39 -1
- package/dist/commands/proposal/propose.js +41 -19
- package/dist/commands/proposal/repository.js +566 -486
- package/dist/commands/proposal/validators/proposal-quality-validators.js +22 -6
- package/dist/commands/proposal/validators/proposal-validators.js +6 -5
- package/dist/commands/proposal/validators/proposals.js +5 -4
- package/dist/commands/read/curate.js +50 -28
- package/dist/commands/read/knowledge.js +25 -16
- package/dist/commands/read/remember-cli.js +12 -4
- package/dist/commands/read/search-cli.js +33 -33
- package/dist/commands/read/search.js +68 -55
- package/dist/commands/read/show.js +54 -135
- package/dist/commands/remember.js +7 -5
- package/dist/commands/sources/add-cli.js +10 -24
- package/dist/commands/sources/bundle-config-ops.js +58 -0
- package/dist/commands/sources/history.js +13 -8
- package/dist/commands/sources/info.js +10 -11
- package/dist/commands/sources/init.js +12 -21
- package/dist/commands/sources/installed-stashes.js +151 -138
- package/dist/commands/sources/schema-repair.js +5 -3
- package/dist/commands/sources/self-update.js +9 -7
- package/dist/commands/sources/source-add.js +116 -154
- package/dist/commands/sources/source-clone.js +33 -14
- package/dist/commands/sources/source-manage.js +43 -32
- package/dist/commands/sources/sources-cli.js +12 -7
- package/dist/commands/sources/stash-cli.js +12 -5
- package/dist/commands/sources/stash-skeleton.js +1 -1
- package/dist/commands/tasks/default-tasks.js +13 -13
- package/dist/commands/tasks/tasks-cli.js +3 -3
- package/dist/commands/tasks/tasks.js +71 -31
- package/dist/commands/workflow-cli.js +22 -26
- package/dist/core/action-contributors.js +1 -1
- package/dist/core/activation-policy.js +49 -0
- package/dist/core/adapter/adapters/agent-skills-adapter.js +181 -0
- package/dist/core/adapter/adapters/akm-adapter.js +509 -0
- package/dist/core/adapter/adapters/akm-lint.js +381 -0
- package/dist/core/adapter/adapters/akm-metadata.js +416 -0
- package/dist/core/adapter/adapters/akm-task-adapter.js +150 -0
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +196 -0
- package/dist/core/adapter/adapters/claude-adapter.js +61 -0
- package/dist/core/adapter/adapters/dotenv-adapter.js +187 -0
- package/dist/core/adapter/adapters/generic-files-adapter.js +117 -0
- package/dist/core/adapter/adapters/index.js +80 -0
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +413 -0
- package/dist/core/adapter/adapters/okf-adapter.js +223 -0
- package/dist/core/adapter/adapters/opencode-adapter.js +68 -0
- package/dist/core/adapter/adapters/shared.js +286 -0
- package/dist/core/adapter/adapters/tool-dir-shared.js +212 -0
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +154 -0
- package/dist/core/adapter/bundle-adapter.js +4 -0
- package/dist/core/adapter/recognize-match.js +42 -0
- package/dist/core/adapter/registry.js +56 -0
- package/dist/core/adapter/types.js +4 -0
- package/dist/core/asset/asset-placement.js +229 -0
- package/dist/core/asset/asset-ref.js +107 -78
- package/dist/core/asset/asset-serialize.js +20 -0
- package/dist/core/asset/frontmatter.js +1 -1
- package/dist/core/asset/resolve-ref.js +223 -0
- package/dist/core/asset/stash-meta.js +1 -1
- package/dist/core/common.js +141 -49
- package/dist/core/config/config-io.js +0 -108
- package/dist/core/config/config-schema.js +94 -1039
- package/dist/core/config/config-sources.js +115 -36
- package/dist/core/config/config-types.js +16 -11
- package/dist/core/config/config-walker.js +4 -2
- package/dist/core/config/config.js +21 -26
- package/dist/core/config/engine-semantics.js +0 -4
- package/dist/core/config/schema/embedding.js +38 -0
- package/dist/core/config/schema/engines.js +116 -0
- package/dist/core/config/schema/feedback.js +31 -0
- package/dist/core/config/schema/improve-processes.js +395 -0
- package/dist/core/config/schema/improve.js +76 -0
- package/dist/core/config/schema/index-config.js +183 -0
- package/dist/core/config/schema/output.js +15 -0
- package/dist/core/config/schema/primitives.js +94 -0
- package/dist/core/config/schema/search.js +30 -0
- package/dist/core/config/schema/setup.js +27 -0
- package/dist/core/config/schema/sources-bundles.js +164 -0
- package/dist/core/config/schema/workflow.js +29 -0
- package/dist/core/env-secret-ref.js +113 -8
- package/dist/core/errors.js +1 -1
- package/dist/core/events-types.js +4 -0
- package/dist/core/file-change.js +16 -0
- package/dist/core/fs-txn.js +316 -0
- package/dist/core/git-message.js +59 -0
- package/dist/core/improve-result.js +9 -1
- package/dist/core/logs-db.js +1 -1
- package/dist/core/migration-backup.js +335 -162
- package/dist/core/paths.js +3 -6
- package/dist/core/platform.js +10 -0
- package/dist/core/recognition-util.js +130 -0
- package/dist/core/redaction.js +2 -2
- package/dist/core/standards/resolve-standards-context.js +47 -64
- package/dist/core/standards/resolve-type-conventions.js +3 -3
- package/dist/core/state/migrations.js +201 -8
- package/dist/core/state-db.js +38 -2
- package/dist/core/subprocess.js +303 -0
- package/dist/core/time.js +20 -0
- package/dist/core/type-presentation.js +130 -0
- package/dist/core/write-source.js +38 -67
- package/dist/indexer/bundle-identity-guard.js +91 -0
- package/dist/indexer/db/graph-db.js +1 -1
- package/dist/indexer/db/llm-cache.js +1 -1
- package/dist/indexer/ensure-index.js +28 -10
- package/dist/indexer/graph/graph-boost.js +28 -24
- package/dist/indexer/graph/graph-extraction.js +5 -6
- package/dist/indexer/graph/graph-types.js +4 -0
- package/dist/indexer/index-written-assets.js +44 -17
- package/dist/indexer/indexer.js +289 -153
- package/dist/indexer/init.js +18 -25
- package/dist/indexer/installations.js +224 -0
- package/dist/indexer/passes/dir-staleness.js +2 -1
- package/dist/indexer/passes/memory-inference.js +8 -4
- package/dist/indexer/passes/metadata.js +96 -243
- package/dist/indexer/scan/doc-to-entry.js +123 -0
- package/dist/indexer/scan/drain-dir.js +144 -0
- package/dist/indexer/search/db-search.js +171 -99
- package/dist/indexer/search/fts-query.js +1 -1
- package/dist/indexer/search/ranking-contributors.js +57 -7
- package/dist/indexer/search/ranking-types.js +4 -0
- package/dist/indexer/search/ranking.js +31 -6
- package/dist/indexer/search/search-attribution.js +67 -0
- package/dist/indexer/search/search-hit-enrichers.js +30 -40
- package/dist/indexer/search/search-source.js +109 -52
- package/dist/indexer/search/semantic-status.js +4 -1
- package/dist/indexer/usage/unmigrated-vaults-guard.js +2 -1
- package/dist/indexer/usage/usage-events.js +72 -9
- package/dist/indexer/walk/file-context.js +1 -44
- package/dist/indexer/walk/matchers.js +16 -32
- package/dist/indexer/walk/path-resolver.js +6 -5
- package/dist/indexer/walk/walker.js +4 -2
- package/dist/integrations/agent/engine-resolution.js +22 -0
- package/dist/integrations/agent/model-aliases.js +1 -1
- package/dist/integrations/agent/prompts.js +35 -11
- package/dist/integrations/agent/spawn.js +41 -270
- package/dist/integrations/harnesses/aider/agent-builder.js +2 -2
- package/dist/integrations/harnesses/aider/index.js +2 -11
- package/dist/integrations/harnesses/amazonq/agent-builder.js +1 -9
- package/dist/integrations/harnesses/amazonq/index.js +3 -16
- package/dist/integrations/harnesses/claude/config-import.js +1 -3
- package/dist/integrations/harnesses/claude/index.js +1 -12
- package/dist/integrations/harnesses/claude/session-log.js +27 -65
- package/dist/integrations/harnesses/codex/agent-builder.js +1 -2
- package/dist/integrations/harnesses/codex/index.js +2 -12
- package/dist/integrations/harnesses/copilot/agent-builder.js +2 -3
- package/dist/integrations/harnesses/copilot/index.js +1 -12
- package/dist/integrations/harnesses/gemini/agent-builder.js +1 -3
- package/dist/integrations/harnesses/gemini/index.js +1 -12
- package/dist/integrations/harnesses/ids.js +24 -0
- package/dist/integrations/harnesses/index.js +27 -2
- package/dist/integrations/harnesses/opencode/config-import.js +1 -3
- package/dist/integrations/harnesses/opencode/index.js +1 -12
- package/dist/integrations/harnesses/opencode/session-log.js +67 -110
- package/dist/integrations/harnesses/opencode-sdk/harness.js +2 -11
- package/dist/integrations/harnesses/openhands/agent-builder.js +3 -3
- package/dist/integrations/harnesses/openhands/index.js +2 -11
- package/dist/integrations/harnesses/pi/agent-builder.js +3 -11
- package/dist/integrations/harnesses/pi/index.js +3 -15
- package/dist/integrations/harnesses/shared.js +17 -0
- package/dist/integrations/harnesses/types.js +37 -2
- package/dist/integrations/lockfile.js +36 -0
- package/dist/integrations/session-logs/index.js +21 -12
- package/dist/integrations/session-logs/provider-base.js +113 -0
- package/dist/llm/embedders/deterministic.js +2 -2
- package/dist/llm/embedders/remote.js +8 -4
- package/dist/llm/graph-extract.js +7 -2
- package/dist/llm/metadata-enhance.js +43 -26
- package/dist/llm/structured-call.js +15 -7
- package/dist/migrate/legacy/config-source-migration.js +223 -0
- package/dist/migrate/legacy/content-migration.js +305 -0
- package/dist/migrate/legacy/legacy-layout.js +779 -0
- package/dist/migrate/legacy/legacy-paths.js +25 -0
- package/dist/migrate/legacy/legacy-stash-json.js +72 -0
- package/dist/migrate/legacy/proposal-fs-import.js +168 -0
- package/dist/migrate/legacy/task-target-ref-migration.js +272 -0
- package/dist/migrate/legacy/three-db-cutover.js +841 -0
- package/dist/migrate/legacy/workflow-migrations-bodies.js +52 -0
- package/dist/migrate/legacy/workflow-migrations-frozen.js +21 -0
- package/dist/migrate/legacy-ref-grammar.js +209 -0
- package/dist/output/command-registry.js +27 -0
- package/dist/output/html-render.js +11 -16
- package/dist/output/renderers.js +32 -276
- package/dist/output/shapes/passthrough.js +3 -9
- package/dist/output/shapes/registry.js +12 -6
- package/dist/output/text/command-format.js +547 -0
- package/dist/output/text/helpers.js +15 -1377
- package/dist/output/text/proposal-format.js +230 -0
- package/dist/output/text/registry.js +12 -6
- package/dist/output/text/show-directives.js +107 -0
- package/dist/output/text/show-format.js +103 -0
- package/dist/output/text/workflow-format.js +345 -0
- package/dist/output/text.js +1 -3
- package/dist/registry/build-index.js +13 -17
- package/dist/registry/providers/static-index.js +2 -2
- package/dist/registry/resolve.js +4 -90
- package/dist/registry/semver.js +93 -0
- package/dist/runtime.js +90 -0
- package/dist/schemas/akm-config.json +2956 -14890
- package/dist/scripts/migrate-storage.js +2312 -19643
- package/dist/setup/detect.js +5 -7
- package/dist/setup/engine-config.js +2 -1
- package/dist/setup/registry-stash-loader.js +1 -1
- package/dist/setup/semantic-assets.js +12 -9
- package/dist/setup/setup.js +109 -39
- package/dist/setup/steps/connection-shared.js +120 -0
- package/dist/setup/steps/connection.js +50 -274
- package/dist/setup/steps/platforms.js +1 -0
- package/dist/setup/steps/sources.js +13 -6
- package/dist/setup/steps/stashdir.js +5 -2
- package/dist/sources/freshness.js +39 -0
- package/dist/sources/providers/git-provider.js +29 -33
- package/dist/sources/providers/git-stash.js +10 -5
- package/dist/sources/providers/provider-utils.js +40 -18
- package/dist/sources/providers/website.js +1 -1
- package/dist/sources/resolve.js +5 -5
- package/dist/sources/snapshot-fetchers/types.js +4 -0
- package/dist/sources/{website-ingest.js → snapshot-fetchers/website-ingest.js} +105 -39
- package/dist/storage/database.js +47 -3
- package/dist/storage/engines/sqlite-migrations.js +34 -16
- package/dist/storage/locations.js +1 -2
- package/dist/storage/repositories/improve-runs-repository.js +0 -20
- package/dist/storage/repositories/index-connection.js +80 -0
- package/dist/storage/repositories/index-db.js +4 -3
- package/dist/storage/repositories/index-entries-repository.js +952 -0
- package/dist/{indexer/db/entry-mapper.js → storage/repositories/index-entry-mapper.js} +15 -2
- package/dist/storage/repositories/index-entry-types.js +4 -0
- package/dist/storage/repositories/index-fts-repository.js +164 -0
- package/dist/storage/repositories/index-llm-cache-repository.js +109 -0
- package/dist/storage/repositories/index-meta-repository.js +50 -0
- package/dist/{indexer/db/schema.js → storage/repositories/index-schema.js} +241 -100
- package/dist/storage/repositories/index-sql.js +12 -0
- package/dist/storage/repositories/index-utility-repository.js +369 -0
- package/dist/storage/repositories/index-vec-repository.js +245 -0
- package/dist/storage/repositories/proposals-repository.js +41 -50
- package/dist/storage/repositories/registry-cache.js +1 -1
- package/dist/storage/repositories/workflow-runs-repository.js +17 -11
- package/dist/tasks/backends/cron.js +5 -5
- package/dist/tasks/backends/exec-utils.js +21 -0
- package/dist/tasks/backends/index.js +6 -9
- package/dist/tasks/backends/launchd.js +16 -17
- package/dist/tasks/backends/schtasks.js +33 -41
- package/dist/tasks/backends/types.js +4 -0
- package/dist/tasks/parser.js +25 -5
- package/dist/tasks/runner.js +33 -39
- package/dist/tasks/validator.js +5 -6
- package/dist/workflows/authoring/authoring.js +8 -11
- package/dist/workflows/exec/brief.js +10 -7
- package/dist/workflows/exec/report.js +261 -156
- package/dist/workflows/exec/run-workflow.js +2 -1
- package/dist/workflows/exec/step-work.js +3 -9
- package/dist/workflows/program/parser.js +4 -60
- package/dist/workflows/renderer.js +11 -60
- package/dist/workflows/runtime/checkin.js +1 -1
- package/dist/workflows/runtime/plan-classifier.js +7 -4
- package/dist/workflows/runtime/runs.js +11 -10
- package/dist/workflows/runtime/unit-checkin.js +1 -1
- package/dist/workflows/runtime/unit-phases.js +20 -0
- package/dist/workflows/runtime/workflow-asset-loader.js +27 -16
- package/dist/workflows/validate-summary.js +2 -2
- package/dist/workflows/validator.js +18 -2
- package/docs/migration/release-notes/0.9.0.md +45 -3
- package/docs/migration/v0.8-to-v0.9.md +466 -262
- package/docs/{data-and-telemetry.md → reference/data-and-telemetry.md} +61 -17
- package/package.json +10 -9
- package/schemas/akm-config.json +2956 -14890
- package/dist/assets/help/help-accept.md +0 -12
- package/dist/assets/help/help-improve.md +0 -87
- package/dist/assets/help/help-proposals.md +0 -17
- package/dist/assets/help/help-propose.md +0 -17
- package/dist/assets/help/help-reject.md +0 -11
- package/dist/assets/improve-strategies/recombine-only.json +0 -23
- package/dist/assets/improve-strategies/synthesize.json +0 -17
- package/dist/assets/prompts/procedural-system.md +0 -44
- package/dist/assets/prompts/recombine-system.md +0 -40
- package/dist/assets/prompts/staleness-detect-system.md +0 -6
- package/dist/assets/templates/html/default.html +0 -78
- package/dist/assets/templates/html/vendor/echarts.min.js +0 -45
- package/dist/assets/wiki/index-template.md +0 -12
- package/dist/assets/wiki/ingest-workflow-template.md +0 -83
- package/dist/assets/wiki/log-template.md +0 -8
- package/dist/assets/wiki/schema-template.md +0 -61
- package/dist/commands/improve/calibration.js +0 -161
- package/dist/commands/improve/dedup.js +0 -482
- package/dist/commands/improve/hot-probation.js +0 -45
- package/dist/commands/improve/improve-auto-accept.js +0 -262
- package/dist/commands/improve/procedural.js +0 -403
- package/dist/commands/improve/recombine.js +0 -843
- package/dist/commands/improve/schema-similarity-gate.js +0 -168
- package/dist/commands/lint/agent-linter.js +0 -44
- package/dist/commands/lint/command-linter.js +0 -44
- package/dist/commands/lint/default-linter.js +0 -16
- package/dist/commands/lint/fact-linter.js +0 -39
- package/dist/commands/lint/knowledge-linter.js +0 -16
- package/dist/commands/lint/memory-linter.js +0 -61
- package/dist/commands/lint/registry.js +0 -41
- package/dist/commands/lint/skill-linter.js +0 -45
- package/dist/commands/lint/task-linter.js +0 -50
- package/dist/commands/lint/workflow-linter.js +0 -81
- package/dist/commands/proposal/legacy-import.js +0 -115
- package/dist/commands/wiki-cli.js +0 -291
- package/dist/core/asset/asset-registry.js +0 -76
- package/dist/core/asset/asset-spec.js +0 -316
- package/dist/core/eval/rank-metrics.js +0 -113
- package/dist/core/ripgrep/install.js +0 -163
- package/dist/core/ripgrep/resolve.js +0 -81
- package/dist/indexer/db/db.js +0 -1585
- package/dist/indexer/manifest.js +0 -170
- package/dist/indexer/passes/metadata-contributors.js +0 -31
- package/dist/integrations/harnesses/opencode-sdk/index.js +0 -25
- package/dist/output/text/wiki.js +0 -16
- package/dist/scripts/migrations/import-fs-improve-runs-to-db.js +0 -18229
- package/dist/scripts/migrations/v16-to-v17.js +0 -141
- package/dist/storage/repositories/consolidation-repository.js +0 -38
- package/dist/storage/repositories/recombine-repository.js +0 -213
- package/dist/wiki/wiki-templates.js +0 -15
- package/dist/wiki/wiki.js +0 -1013
- package/dist/workflows/db.js +0 -413
- package/docs/migration/release-notes/0.9.0-beta.60.md +0 -19
- /package/dist/sources/{wiki-fetchers → snapshot-fetchers}/registry.js +0 -0
- /package/dist/sources/{wiki-fetchers → snapshot-fetchers}/youtube.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# akm CLI — Full Reference
|
|
2
2
|
|
|
3
|
-
You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows,
|
|
3
|
+
You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, and memories via `akm`. Search your sources first before writing something from scratch.
|
|
4
4
|
|
|
5
5
|
## Search
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ akm search "knowledge:" # List every asset of a type
|
|
|
18
18
|
|
|
19
19
|
| Flag | Values | Default |
|
|
20
20
|
| --- | --- | --- |
|
|
21
|
-
| `--type` | `skill`, `command`, `agent`, `knowledge`, `workflow`, `script`, `memory`, `env`, `secret`, `
|
|
21
|
+
| `--type` | `skill`, `command`, `agent`, `knowledge`, `workflow`, `script`, `memory`, `env`, `secret`, `any` | `any` |
|
|
22
22
|
| `--source` | `stash`, `registry`, `both` | `stash` |
|
|
23
23
|
| `--limit` | number | `20` |
|
|
24
24
|
| `--format` | `json`, `jsonl`, `text`, `yaml` | `json` |
|
|
@@ -26,10 +26,10 @@ akm search "knowledge:" # List every asset of a type
|
|
|
26
26
|
| `--shape` | `human`, `agent`, `summary` (`summary` only on `show`) | `human` |
|
|
27
27
|
|
|
28
28
|
Ref-prefix queries (`"<type>:<prefix>/"` or a bare `"<type>:"`) return a
|
|
29
|
-
deterministic listing, not a relevance ranking.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
deterministic listing, not a relevance ranking. Drop the trailing slash and the
|
|
30
|
+
same text becomes an ordinary keyword search — resolving a single asset by its
|
|
31
|
+
`<subdir>/<name>` id is `akm show`'s job — and an explicit `--type` flag wins
|
|
32
|
+
over the type parsed from the query.
|
|
33
33
|
|
|
34
34
|
## Curate
|
|
35
35
|
|
|
@@ -46,15 +46,15 @@ akm curate "review architecture" --type workflow # Restrict to one asset type
|
|
|
46
46
|
Display an asset by ref. Knowledge assets support view modes as positional arguments.
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
|
-
akm show
|
|
50
|
-
akm show
|
|
51
|
-
akm show
|
|
52
|
-
akm show
|
|
53
|
-
akm show
|
|
54
|
-
akm show knowledge
|
|
55
|
-
akm show knowledge
|
|
56
|
-
akm show knowledge
|
|
57
|
-
akm show knowledge
|
|
49
|
+
akm show scripts/deploy.sh # Show script (returns run command)
|
|
50
|
+
akm show skills/code-review # Show skill (returns full content)
|
|
51
|
+
akm show commands/release # Show command (returns template)
|
|
52
|
+
akm show agents/architect # Show agent (returns system prompt)
|
|
53
|
+
akm show workflows/ship-release # Show parsed workflow steps
|
|
54
|
+
akm show knowledge/guide toc # Table of contents
|
|
55
|
+
akm show knowledge/guide section "Auth" # Specific section
|
|
56
|
+
akm show knowledge/guide lines 10 30 # Line range
|
|
57
|
+
akm show knowledge/my-doc # Show content (local or remote)
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
| Type | Key fields returned |
|
|
@@ -68,7 +68,6 @@ akm show knowledge:my-doc # Show content (local or remote)
|
|
|
68
68
|
| memory | `content` (recalled context) |
|
|
69
69
|
| env | `keys` (key names only — values and comment text never returned) |
|
|
70
70
|
| secret | `name` only (the whole file is the value — never returned) |
|
|
71
|
-
| wiki | `content` (same view modes as knowledge). For any wiki task, run `akm wiki list`. To ingest sources, `akm wiki ingest <name>` dispatches the configured agent (`defaults.engine` or `--engine`) to execute the ingest workflow. |
|
|
72
71
|
|
|
73
72
|
## Capture Knowledge While You Work
|
|
74
73
|
|
|
@@ -76,65 +75,53 @@ akm show knowledge:my-doc # Show content (local or remote)
|
|
|
76
75
|
akm remember "Deployment needs VPN access" # Record a memory in your stash
|
|
77
76
|
akm remember --name release-retro < notes.md # Save multiline memory from stdin
|
|
78
77
|
akm remember "note" --target my-other-stash # Route write to a named writable stash source
|
|
79
|
-
akm remember "note" --xref knowledge
|
|
80
|
-
akm remember "fix" --supersedes
|
|
78
|
+
akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable; ref must resolve)
|
|
79
|
+
akm remember "fix" --supersedes memories/old-note # Write a correction AND demote the old asset (beliefState: superseded)
|
|
81
80
|
akm import ./docs/auth-flow.md # Import a file as knowledge
|
|
82
|
-
akm import ./doc.md --xref knowledge
|
|
83
|
-
akm import ./new.md --supersedes knowledge
|
|
81
|
+
akm import ./doc.md --xref knowledge/auth-flow # Merge provenance xrefs into the imported doc's frontmatter
|
|
82
|
+
akm import ./new.md --supersedes knowledge/old # Import a correction AND demote the doc it replaces
|
|
84
83
|
akm import - --name scratch-notes < notes.md # Import stdin as a knowledge doc
|
|
85
84
|
akm import https://example.com/docs/auth # Fetch one URL and import it as knowledge
|
|
86
85
|
akm import ./doc.md --target my-other-stash # Route import to a named writable stash source
|
|
87
86
|
akm workflow create ship-release # Create a workflow asset in the stash
|
|
88
87
|
akm workflow validate workflows/foo.yaml # Validate a YAML v2/markdown workflow or ref; lists every error
|
|
89
|
-
akm workflow next
|
|
90
|
-
akm feedback
|
|
91
|
-
akm feedback
|
|
92
|
-
akm feedback
|
|
93
|
-
akm feedback env
|
|
88
|
+
akm workflow next workflows/ship-release # Start or resume the next workflow step
|
|
89
|
+
akm feedback skills/code-review --positive # Record that an asset helped
|
|
90
|
+
akm feedback agents/reviewer --negative # Record that an asset missed the mark
|
|
91
|
+
akm feedback memories/deployment-notes --positive # Works for memories too
|
|
92
|
+
akm feedback env/prod --positive # Records env feedback without surfacing values
|
|
94
93
|
```
|
|
95
94
|
|
|
96
95
|
Use `akm feedback` whenever an asset materially helps or fails so future search
|
|
97
96
|
ranking can learn from actual usage.
|
|
98
97
|
|
|
99
|
-
##
|
|
98
|
+
## LLM Wiki bundles
|
|
100
99
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
An LLM Wiki (Karpathy-style knowledge base) is a **bundle format**, not an akm
|
|
101
|
+
asset type — there is no `akm wiki` command family. akm's LLM Wiki adapter
|
|
102
|
+
recognizes one deterministically at install time: a bundle component whose root
|
|
103
|
+
holds a `schema.md` plus a `pages/` directory is mounted as an `llm-wiki`
|
|
104
|
+
component. Its pages are then indexed like any other content and resolve to
|
|
105
|
+
`bundle//conceptId` refs (e.g. `team-catalog//pages/attention`).
|
|
106
|
+
|
|
107
|
+
Install one as a source, then search and read its pages with the ordinary
|
|
108
|
+
commands — no wiki-specific verbs:
|
|
105
109
|
|
|
106
110
|
```sh
|
|
107
|
-
akm wiki
|
|
108
|
-
akm
|
|
109
|
-
akm
|
|
110
|
-
akm
|
|
111
|
-
akm wiki pages research # Page refs + descriptions (excludes schema/index/log; includes raw/)
|
|
112
|
-
akm wiki search research "attention" # Scoped search (equivalent to --type wiki --wiki research)
|
|
113
|
-
akm wiki stash research ./paper.md # Copy source into raw/<slug>.md (never overwrites)
|
|
114
|
-
akm wiki stash research https://example.com/paper # Fetch one URL into raw/<slug>.md
|
|
115
|
-
akm wiki stash research ./paper.md --target my-stash # Route write to a named writable stash source
|
|
116
|
-
echo "..." | akm wiki stash research - # stdin form
|
|
117
|
-
akm wiki lint research # Structural checks: orphans, broken xrefs, uncited raws, stale index
|
|
118
|
-
akm wiki ingest research # Dispatch defaults.engine to run the ingest workflow on this wiki
|
|
119
|
-
akm wiki ingest research --engine claude --model sonnet # Override engine and model
|
|
120
|
-
akm wiki ingest research --timeout-ms 600000 # Override the invocation timeout
|
|
121
|
-
akm wiki remove research -y # Delete pages/schema/index/log; preserves raw/ (--force is a deprecated alias for -y)
|
|
122
|
-
akm wiki remove research -y --with-sources # Full nuke, including raw/
|
|
111
|
+
akm add owner/llm-wiki-repo # Install an LLM Wiki bundle as a source (npm, GitHub, git, or local dir)
|
|
112
|
+
akm search "attention" # Wiki pages surface in ordinary search results
|
|
113
|
+
akm show team-catalog//pages/attention # Read a page by its bundle//conceptId ref (copy the ref from search)
|
|
114
|
+
akm list # Confirm the bundle is installed
|
|
123
115
|
```
|
|
124
116
|
|
|
125
|
-
|
|
126
|
-
dispatches the configured agent (`defaults.engine` or `--engine`) to execute
|
|
127
|
-
the wiki's ingest workflow end-to-end — schema read, source dedup, search,
|
|
128
|
-
page create/update, log entry, lint, reindex.** Wiki pages are also addressable as
|
|
129
|
-
`wiki:<name>/<page-path>` and show up in stash-wide `akm search` as
|
|
130
|
-
`type: wiki`. Files under `raw/` and the wiki root infrastructure files
|
|
117
|
+
Files under the bundle's `raw/` directory and the wiki infrastructure files
|
|
131
118
|
`schema.md`, `index.md`, and `log.md` are not indexed and do not appear in
|
|
132
119
|
search results. No `--llm` anywhere — akm never reasons about page content.
|
|
133
120
|
|
|
134
121
|
## Env files
|
|
135
122
|
|
|
136
123
|
A group of related CONFIGURATION for an app/service in one `.env` file at
|
|
137
|
-
`<
|
|
124
|
+
`<stash>/env/<name>.env`, sourced/injected wholesale. Key names are
|
|
138
125
|
discoverable; values and comment text stay on disk and never reach stdout or
|
|
139
126
|
the index (comments can contain commented-out credentials). akm does not edit
|
|
140
127
|
entries — you edit the file with your own editor and akm loads it.
|
|
@@ -143,31 +130,31 @@ entries — you edit the file with your own editor and akm loads it.
|
|
|
143
130
|
akm env create prod # Create an empty env file
|
|
144
131
|
akm env create prod --from-file ./.env # Ingest an existing .env
|
|
145
132
|
akm env list # List all env files across stashes with key names
|
|
146
|
-
akm show env
|
|
147
|
-
akm env run env
|
|
148
|
-
akm env run env
|
|
149
|
-
akm env export env
|
|
150
|
-
akm env path env
|
|
151
|
-
akm env remove env
|
|
133
|
+
akm show env/prod # Inspect key names (never values or comments)
|
|
134
|
+
akm env run env/prod -- ./deploy.sh # Run a command with the whole .env injected (the safe path)
|
|
135
|
+
akm env run env/prod -- $SHELL # Open an interactive shell with values injected
|
|
136
|
+
akm env export env/prod --out ./env.sh # Write a sourceable script to a file (mode 0600)
|
|
137
|
+
akm env path env/prod --quiet # Print the raw file path (for Docker `_FILE` / `--env-file`)
|
|
138
|
+
akm env remove env/prod # Delete the env file
|
|
152
139
|
```
|
|
153
140
|
|
|
154
141
|
## Secrets
|
|
155
142
|
|
|
156
143
|
A single sensitive value used on its own for authentication (a token, key, or
|
|
157
|
-
cert) — one file = one value at `<
|
|
144
|
+
cert) — one file = one value at `<stash>/secrets/<name>`. The ENTIRE file is
|
|
158
145
|
the value; only the name is ever surfaced.
|
|
159
146
|
|
|
160
147
|
```sh
|
|
161
|
-
printf '%s' "$TOKEN" | akm secret set
|
|
148
|
+
printf '%s' "$TOKEN" | akm secret set secrets/deploy-token # Store a single value
|
|
162
149
|
akm secret list # List secrets (names only)
|
|
163
|
-
akm secret path
|
|
164
|
-
akm secret run
|
|
165
|
-
akm secret remove
|
|
150
|
+
akm secret path secrets/deploy-token # Print the file path (Docker `_FILE`)
|
|
151
|
+
akm secret run secrets/deploy-token GITHUB_TOKEN -- gh release create v1.0.0 # Inject into one env var
|
|
152
|
+
akm secret remove secrets/deploy-token # Delete the secret
|
|
166
153
|
```
|
|
167
154
|
|
|
168
155
|
## Workflows
|
|
169
156
|
|
|
170
|
-
Workflows live under `<
|
|
157
|
+
Workflows live under `<stash>/workflows/` as markdown or YAML v2 (`.yaml`/`.yml`).
|
|
171
158
|
|
|
172
159
|
Ref-based workflow commands are scoped to the current project/worktree/directory,
|
|
173
160
|
so one active run does not block unrelated directories from starting the same
|
|
@@ -176,8 +163,8 @@ workflow. Direct run-id commands still target the exact run.
|
|
|
176
163
|
```sh
|
|
177
164
|
akm workflow template # Print a starter workflow template
|
|
178
165
|
akm workflow create ship-release # Scaffold a new workflow asset
|
|
179
|
-
akm workflow start
|
|
180
|
-
akm workflow next
|
|
166
|
+
akm workflow start workflows/ship-release # Start a new run in the current scope
|
|
167
|
+
akm workflow next workflows/ship-release # Advance to the next step (or auto-start) in the current scope
|
|
181
168
|
akm workflow complete <run-id> # Mark a step complete and advance
|
|
182
169
|
akm workflow status <run-id> # Show the exact run by id
|
|
183
170
|
akm workflow resume <run-id> # Resume a blocked or failed run
|
|
@@ -193,7 +180,7 @@ akm clone <ref> # Clone to working stash
|
|
|
193
180
|
akm clone <ref> --name new-name # Rename on clone
|
|
194
181
|
akm clone <ref> --dest ./project/.claude # Clone to custom location
|
|
195
182
|
akm clone <ref> --force # Overwrite existing
|
|
196
|
-
akm clone "npm:@scope/pkg//
|
|
183
|
+
akm clone "npm:@scope/pkg//scripts/deploy.sh" # Clone from remote package
|
|
197
184
|
```
|
|
198
185
|
|
|
199
186
|
When `--dest` is provided, `akm init` is not required first.
|
|
@@ -209,11 +196,11 @@ and re-keys the index row in place so the asset's learned ranking history
|
|
|
209
196
|
survives.
|
|
210
197
|
|
|
211
198
|
```sh
|
|
212
|
-
akm mv
|
|
213
|
-
akm mv
|
|
199
|
+
akm mv memories/projectA/old-note projectA/new-note # Rename; subdirectories allowed in the new name
|
|
200
|
+
akm mv memories/solo memories/renamed-solo # Same-type ref-shaped target also accepted
|
|
214
201
|
```
|
|
215
202
|
|
|
216
|
-
|
|
203
|
+
Cross-type targets, existing targets, `../` escapes, non-canonical
|
|
217
204
|
source spellings (the error names the canonical ref), `.derived` twin sources
|
|
218
205
|
(rename the base — the twin follows), and `.derived`-suffixed target names are
|
|
219
206
|
rejected (exit 2, nothing moved). Read-only sources are scanned but never
|
|
@@ -321,10 +308,10 @@ akm improve <ref> # Propose improvement fo
|
|
|
321
308
|
akm proposal list # List pending proposals
|
|
322
309
|
akm proposal show <id> # Render the proposal body
|
|
323
310
|
akm proposal diff <ref-or-id> # Diff by ref, UUID, or 8-char prefix
|
|
324
|
-
akm proposal diff
|
|
311
|
+
akm proposal diff skills/akm-dream # Diff by asset ref
|
|
325
312
|
akm proposal accept 7c115132 # Accept by UUID prefix
|
|
326
313
|
akm proposal accept <id> --target team-stash # Accept to a named writable stash source
|
|
327
|
-
akm proposal reject
|
|
314
|
+
akm proposal reject skills/my-skill --reason "not ready" # Reject by asset ref
|
|
328
315
|
akm proposal reject <id> --reason "..." # Archive with a reason
|
|
329
316
|
akm proposal revert <id> # Restore the pre-promotion content
|
|
330
317
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# akm CLI
|
|
2
2
|
|
|
3
|
-
You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows,
|
|
3
|
+
You have access to a searchable library of scripts, skills, commands, agents, knowledge documents, workflows, and memories via `akm`. Search your sources first before writing something from scratch.
|
|
4
4
|
|
|
5
5
|
## Agent Task Loop
|
|
6
6
|
|
|
@@ -11,12 +11,12 @@ For any task, follow this loop:
|
|
|
11
11
|
4. `akm feedback <ref> --positive` — record success
|
|
12
12
|
|
|
13
13
|
For workflow tasks:
|
|
14
|
-
1. `akm workflow next
|
|
14
|
+
1. `akm workflow next workflows/<name>` — get current step instructions
|
|
15
15
|
2. Do the step work in your workspace
|
|
16
16
|
3. `akm workflow complete <run-id> --step <step-id>` — mark done, get next step
|
|
17
17
|
|
|
18
18
|
Workflow runs are scoped to your current project/worktree/directory. Ref-based
|
|
19
|
-
commands like `workflow next
|
|
19
|
+
commands like `workflow next workflows/<name>`, `workflow status workflows/<name>`,
|
|
20
20
|
and `workflow list` operate within the current scope only.
|
|
21
21
|
|
|
22
22
|
## Quick Reference
|
|
@@ -31,20 +31,17 @@ akm show <ref> # View asset details
|
|
|
31
31
|
akm workflow next <ref> # Start or resume a workflow
|
|
32
32
|
akm remember "Deployment needs VPN access" # Record a memory in your stash
|
|
33
33
|
akm remember "note" --target my-stash # Route write to a named writable stash source
|
|
34
|
-
akm remember "note" --xref knowledge
|
|
35
|
-
akm remember "fix" --supersedes
|
|
34
|
+
akm remember "note" --xref knowledge/auth-flow # Cite provenance in frontmatter xrefs (repeatable)
|
|
35
|
+
akm remember "fix" --supersedes memories/old-note # Write a correction AND demote the superseded asset
|
|
36
36
|
akm import ./notes/release-checklist.md # Import a knowledge doc into your stash
|
|
37
37
|
akm import ./doc.md --target my-stash # Route import to a named writable stash source
|
|
38
|
-
akm
|
|
39
|
-
akm wiki ingest <name> # Dispatch an agent to run the ingest workflow (uses defaults.engine or --engine)
|
|
40
|
-
akm wiki stash <name> ./paper.md --target my-stash # Route wiki stash write to a named source
|
|
41
|
-
akm proposal diff skill:akm-dream # Diff proposal by ref, UUID, or 8-char prefix
|
|
38
|
+
akm proposal diff skills/akm-dream # Diff proposal by ref, UUID, or 8-char prefix
|
|
42
39
|
akm proposal accept 7c115132 # Accept by UUID prefix
|
|
43
|
-
akm proposal reject
|
|
40
|
+
akm proposal reject skills/my-skill --reason "..." # Reject by ref
|
|
44
41
|
akm feedback <ref> --positive|--negative # Record whether an asset helped
|
|
45
42
|
akm add <ref> # Add a source (npm, GitHub, git, local dir)
|
|
46
43
|
akm clone <ref> # Copy an asset to the working stash (optional --dest arg to clone to specific location)
|
|
47
|
-
akm mv
|
|
44
|
+
akm mv memories/old-note new-note # Rename an asset: inbound refs rewritten, ranking history preserved
|
|
48
45
|
akm sync # Commit (and push if writable remote) changes in the primary stash (--no-push to commit only)
|
|
49
46
|
akm improve --no-sync # Run improve without the end-of-run auto-commit
|
|
50
47
|
akm improve --no-push # Auto-commit but skip push for this run
|
|
@@ -64,7 +61,6 @@ akm registry search "<query>" # Search all registries
|
|
|
64
61
|
| memory | Recalled context (read the content for background information) |
|
|
65
62
|
| env | A `.env` file of related CONFIGURATION (many vars; sensitive or not — all protected); key names only. Inject with `akm env run <ref> -- <cmd>` (the agent-safe path — values stay on disk). |
|
|
66
63
|
| secret | A single sensitive value for AUTHENTICATION (token, key, cert); name only. Use `akm secret path` / `akm secret run`. |
|
|
67
|
-
| wiki | A page in a multi-wiki knowledge base. For any wiki task, start with `akm wiki list`. To ingest sources, run `akm wiki ingest <name>` — it dispatches the configured agent engine to execute the ingest workflow against the wiki's `raw/` directory. Run `akm wiki -h` for the full surface. |
|
|
68
64
|
|
|
69
65
|
When an asset meaningfully helps or fails, record that with `akm feedback` so
|
|
70
66
|
future search ranking can learn from real usage.
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Standard improve pass —
|
|
2
|
+
"description": "Standard improve pass — reflect, distill, consolidate, memory inference, graph extraction, and validation; improve-stage extract and proactive maintenance off.",
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
6
6
|
"limit": 25,
|
|
7
|
-
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "
|
|
7
|
+
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
|
|
8
8
|
},
|
|
9
9
|
"distill": { "enabled": true, "allowedTypes": ["memory"], "requirePlannedRefs": true },
|
|
10
10
|
"consolidate": { "enabled": true, "allowedTypes": ["memory"], "minPoolSize": 500 },
|
|
11
11
|
"memoryInference": { "enabled": true },
|
|
12
12
|
"graphExtraction": { "enabled": true },
|
|
13
|
-
"extract": { "enabled":
|
|
13
|
+
"extract": { "enabled": false, "triage": { "enabled": true, "minScore": 2 } },
|
|
14
14
|
"validation": { "enabled": true },
|
|
15
|
-
"proactiveMaintenance": { "enabled":
|
|
16
|
-
"triage": { "enabled": false, "applyMode": "queue", "policy": "personal-stash" }
|
|
17
|
-
"recombine": { "enabled": false },
|
|
18
|
-
"procedural": { "enabled": false }
|
|
15
|
+
"proactiveMaintenance": { "enabled": false, "dueDays": 30, "maxPerRun": 15 },
|
|
16
|
+
"triage": { "enabled": false, "applyMode": "queue", "policy": "personal-stash" }
|
|
19
17
|
},
|
|
20
18
|
"sync": { "enabled": true, "push": true }
|
|
21
19
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Frequent
|
|
2
|
+
"description": "Frequent inference pass — memory inference, graph extraction, and reflect; improve-stage extract off.",
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": { "enabled": true },
|
|
5
5
|
"distill": { "enabled": false },
|
|
6
6
|
"consolidate": { "enabled": false },
|
|
7
7
|
"memoryInference": { "enabled": true },
|
|
8
8
|
"graphExtraction": { "enabled": true },
|
|
9
|
-
"extract": { "enabled":
|
|
9
|
+
"extract": { "enabled": false, "minNewSessions": 3, "triage": { "enabled": true, "minScore": 2 } },
|
|
10
10
|
"triage": { "enabled": false },
|
|
11
11
|
"validation": { "enabled": false },
|
|
12
12
|
"proactiveMaintenance": { "enabled": false }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "
|
|
2
|
+
"description": "Opt-in proactive-maintenance pass — reflect, distill, proposal triage (promote, high budget), and the proactive-maintenance lane (maxPerRun 100); consolidate/memoryInference/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
6
|
-
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "
|
|
6
|
+
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
|
|
7
7
|
},
|
|
8
8
|
"distill": { "enabled": true, "allowedTypes": ["memory"] },
|
|
9
9
|
"consolidate": { "enabled": false },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
6
|
-
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "
|
|
6
|
+
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
|
|
7
7
|
},
|
|
8
8
|
"extract": { "enabled": false },
|
|
9
9
|
"distill": { "enabled": false },
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Reflect + distill
|
|
2
|
+
"description": "Reflect + distill pass — reflect, distill, memoryInference, and proposal triage (promote); proactiveMaintenance/consolidate/graphExtraction/extract off. Sync disabled: an interrupted run would otherwise leave an uncommitted backlog.",
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
6
|
-
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "
|
|
6
|
+
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
|
|
7
7
|
},
|
|
8
8
|
"distill": { "enabled": true, "allowedTypes": ["memory"] },
|
|
9
9
|
"consolidate": { "enabled": false },
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"maxDiffLines": 200,
|
|
25
25
|
"judgment": {}
|
|
26
26
|
},
|
|
27
|
-
"proactiveMaintenance": { "enabled":
|
|
27
|
+
"proactiveMaintenance": { "enabled": false, "dueDays": 30, "maxPerRun": 15 }
|
|
28
28
|
},
|
|
29
29
|
"sync": { "enabled": false }
|
|
30
30
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"processes": {
|
|
4
4
|
"reflect": {
|
|
5
5
|
"enabled": true,
|
|
6
|
-
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "
|
|
6
|
+
"allowedTypes": ["agent", "command", "knowledge", "lesson", "memory", "skill", "workflow"]
|
|
7
7
|
},
|
|
8
8
|
"distill": { "enabled": true, "allowedTypes": ["memory"] },
|
|
9
9
|
"consolidate": { "enabled": true, "allowedTypes": ["memory"] },
|
|
@@ -3,17 +3,17 @@ You are the akm consolidate assistant analyzing memory assets.
|
|
|
3
3
|
Rules:
|
|
4
4
|
1. MERGE: Two or more memories are substantially duplicated or closely related → propose merging. Return the primary ref to keep and secondary refs to delete. Do NOT include mergedContent — the merge will be executed in a separate step.
|
|
5
5
|
2. DELETE: Memory is clearly outdated, contradicted, or redundant → propose deletion. NEVER propose delete for memories annotated `(captureMode: hot)` — they are user-explicit and only the user can retire them. The downstream guard will refuse these regardless, so proposing them just wastes tokens.
|
|
6
|
-
3. PROMOTE: Memory expresses a stable, reusable fact suitable as a `knowledge
|
|
6
|
+
3. PROMOTE: Memory expresses a stable, reusable fact suitable as a `knowledge/` asset → propose promotion. Do NOT delete the source memory. NEVER propose promote / merge / contradict for memories annotated `(already queued)` — they have a pending proposal whose body matches; a duplicate will be deterministically dropped, so proposing them just wastes tokens.
|
|
7
7
|
4. CONTRADICT: Two memories assert logically exclusive facts such that following BOTH simultaneously is impossible — not merely related or overlapping. You MUST cite the exact sentence from Memory A and the exact sentence from Memory B that are in direct conflict. If you cannot cite specific opposing sentences, use KEEP instead. Sharing a topic, tool, domain, or workflow stage is NOT sufficient. Only direct factual opposites qualify: opposing recommended commands, opposing boolean flags, opposing version numbers, or mutually exclusive instructions. Use confidence ≥ 0.92 only; omit the op entirely if below that threshold.
|
|
8
8
|
5. KEEP: Memory is unique and current → omit from output.
|
|
9
9
|
|
|
10
10
|
Return ONLY JSON (no prose, no code fences):
|
|
11
11
|
{
|
|
12
12
|
"operations": [
|
|
13
|
-
{ "op": "merge", "primary": "
|
|
14
|
-
{ "op": "delete", "ref": "
|
|
15
|
-
{ "op": "promote", "ref": "
|
|
16
|
-
{ "op": "contradict", "ref": "
|
|
13
|
+
{ "op": "merge", "primary": "memories/<name>", "secondaries": ["memories/<name>", ...], "mergeStrategy": "synthesize", "confidence": 0.95 },
|
|
14
|
+
{ "op": "delete", "ref": "memories/<name>", "reason": "<brief reason>", "confidence": 0.90 },
|
|
15
|
+
{ "op": "promote", "ref": "memories/<name>", "knowledgeRef": "knowledge/<suggested-slug>", "reason": "<brief reason>", "description": "<one sentence describing the new knowledge asset>", "confidence": 0.92 },
|
|
16
|
+
{ "op": "contradict", "ref": "memories/<name>", "contradictedByRef": "memories/<name>", "reason": "<brief reason>", "confidence": 0.88 }
|
|
17
17
|
],
|
|
18
18
|
"warnings": ["<optional concerns>"]
|
|
19
19
|
}
|
|
@@ -46,22 +46,18 @@ Respond with EXACTLY one JSON object matching this shape:
|
|
|
46
46
|
"candidates": [
|
|
47
47
|
{
|
|
48
48
|
"type": "memory" | "lesson" | "knowledge",
|
|
49
|
-
"name": "<kebab-case-
|
|
49
|
+
"name": "<kebab-case name, e.g. jwt-token; optionally under one kebab-case scope, e.g. auth/jwt-token>",
|
|
50
50
|
"description": "<one sentence 20-400 chars>",
|
|
51
51
|
"when_to_use": "<one sentence 15-400 chars; REQUIRED only when type=lesson>",
|
|
52
52
|
"body": "<markdown body, 200-3000 chars typical>",
|
|
53
53
|
"confidence": <number 0.0-1.0>,
|
|
54
|
-
"evidence": "<one-line pointer to the moment in the session>"
|
|
55
|
-
"orderedActions": ["<action-1>", "<action-2>", ...],
|
|
56
|
-
"outcomeData": "<one sentence describing the outcome of the action sequence>"
|
|
54
|
+
"evidence": "<one-line pointer to the moment in the session>"
|
|
57
55
|
}
|
|
58
56
|
],
|
|
59
57
|
"rationale_if_empty": "<one sentence; REQUIRED when candidates is empty>"
|
|
60
58
|
}
|
|
61
59
|
```
|
|
62
60
|
|
|
63
|
-
`orderedActions` and `outcomeData` are **optional**. Include them only when the candidate represents a recurring action sequence (e.g. a recovery procedure, a build-fix recipe, a deployment checklist) where preserving the ordered steps adds future value. When present, `outcomeData` is required and must describe what happened when the sequence completed (success or failure). Omit both fields entirely for standalone facts, observations, or lessons that are not action-sequence-shaped.
|
|
64
|
-
|
|
65
61
|
## Rules
|
|
66
62
|
|
|
67
63
|
1. **Zero candidates is a valid and frequent answer.** Most sessions yield no new durable insight. When that's the case, return `{"candidates": [], "rationale_if_empty": "..."}` explaining what you saw and why it didn't rise to durable-knowledge level. Do not fabricate.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Respond with exactly this plain-text frame, with no prose or code fence around it:
|
|
2
|
+
|
|
3
|
+
{{REF_LINE}}AKM_REFLECT_CONFIDENCE: <number from 0 to 1>
|
|
4
|
+
AKM_REFLECT_FRONTMATTER_PATCH: {"description": null, "when_to_use": null}
|
|
5
|
+
AKM_REFLECT_CONTENT_BEGIN
|
|
6
|
+
<complete improved markdown body>
|
|
7
|
+
AKM_REFLECT_CONTENT_END
|
|
8
|
+
|
|
9
|
+
The first begin marker and final end marker delimit the body; marker lines between them are literal content. Put the complete markdown body between those outer markers. Quotes, Markdown fences, and backslashes inside the body are literal content; do not JSON-escape them. Emit the body only, without YAML frontmatter, because AKM preserves and merges the source frontmatter itself.
|
|
10
|
+
|
|
11
|
+
The frontmatter patch must be a one-line JSON object with exactly `description` and `when_to_use`. Keep a field `null` when it should not change. Supply a non-empty string only when adding or correcting that field; AKM merges those values through its existing sanitizer.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Respond only through the provider's native JSON schema. {{FIELD_RULE}}
|
|
2
|
+
|
|
3
|
+
`content` must contain the complete improved markdown body only, without YAML frontmatter. `frontmatterPatch` must contain exactly `description` and `when_to_use`; set either field to `null` when it should not change, or to a non-empty string when adding or correcting it. AKM merges that narrow patch with the source frontmatter and preserves target identity itself. `confidence` is your honest self-rated quality confidence from 0 to 1. Do not add prose or Markdown fences around the JSON response.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Your previous response could not be extracted using the required output contract. Reformat that response exactly once using the contract below. Preserve its proposed markdown verbatim: do not revise, summarize, or add content. Return only the repaired envelope.
|
|
2
|
+
|
|
3
|
+
{{OUTPUT_CONTRACT}}
|
|
@@ -18,7 +18,6 @@ consistency and reducing repeated context-setting.
|
|
|
18
18
|
| `tasks/` | Tasks | Scheduled or on-demand automation tasks |
|
|
19
19
|
| `lessons/` | Lessons | Durable lessons extracted from past sessions |
|
|
20
20
|
| `facts/` | Facts | Durable stash-level context; the house conventions in `facts/conventions/` are auto-surfaced to authoring agents |
|
|
21
|
-
| `wikis/` | Wikis | Agent-maintained knowledge bases (see `akm wiki`) |
|
|
22
21
|
| `scripts/` | Scripts | Executable helpers agents and humans can run |
|
|
23
22
|
| `env/`, `secrets/` | Env & Secrets | Configuration groups and single credentials; values are never content-indexed |
|
|
24
23
|
|
|
@@ -28,22 +27,22 @@ on the next `akm index` run (or when the background improve pipeline picks them
|
|
|
28
27
|
## How to organize assets
|
|
29
28
|
|
|
30
29
|
A file's path under its type directory becomes part of its ref
|
|
31
|
-
(`knowledge/auth/oauth-refresh-races.md` → `knowledge
|
|
30
|
+
(`knowledge/auth/oauth-refresh-races.md` → `knowledge/auth/oauth-refresh-races`),
|
|
32
31
|
and its segments are search terms: `akm search "auth" --type knowledge` narrows
|
|
33
32
|
to that subtree. Retrieval is search, not folder-browse, so pick subdirectories
|
|
34
33
|
deliberately. The house rules live in three convention facts under
|
|
35
34
|
`facts/conventions/` and are surfaced to agents automatically when they author
|
|
36
35
|
assets:
|
|
37
36
|
|
|
38
|
-
- **`
|
|
37
|
+
- **`facts/conventions/organization`** — the single path axis, chosen by asset
|
|
39
38
|
type. **Scope-born** types (`memory`, `lesson`, `task`, `env`, `secret`) go
|
|
40
39
|
under the current **project/client** slug; **reuse-born** types (`knowledge`,
|
|
41
|
-
`skill`, `
|
|
40
|
+
`skill`, `fact`, `script`) go under a stable **domain**; global types
|
|
42
41
|
stay at the type root.
|
|
43
|
-
- **`
|
|
42
|
+
- **`facts/conventions/backlinks`** — how to cross-link: a provenance xref
|
|
44
43
|
whenever an asset derives from another, sparse real associative links,
|
|
45
44
|
corrections as new assets, canonical entity naming.
|
|
46
|
-
- **`
|
|
45
|
+
- **`facts/conventions/domains`** — the (editable) domain vocabulary for
|
|
47
46
|
reuse-born assets, plus canonical entity spellings.
|
|
48
47
|
|
|
49
48
|
Per-type nuances live in `facts/conventions/assets/<type>.md`. All of these are
|
|
@@ -63,11 +62,11 @@ akm search "<query>"
|
|
|
63
62
|
akm search "<query>" --type skill
|
|
64
63
|
akm search "<query>" --type knowledge
|
|
65
64
|
|
|
66
|
-
# Show a specific asset by ref
|
|
67
|
-
akm show
|
|
68
|
-
akm show knowledge
|
|
69
|
-
akm show
|
|
70
|
-
akm show
|
|
65
|
+
# Show a specific asset by ref ([bundle//]conceptId)
|
|
66
|
+
akm show skills/<name>
|
|
67
|
+
akm show knowledge/<name>
|
|
68
|
+
akm show memories/<name>
|
|
69
|
+
akm show commands/<name>
|
|
71
70
|
|
|
72
71
|
# List available assets by type
|
|
73
72
|
akm list --type skill
|
|
@@ -40,5 +40,5 @@ Use an agent when a recurring task benefits from a specialized role, bounded res
|
|
|
40
40
|
## Placement & linking
|
|
41
41
|
|
|
42
42
|
- Agent definitions are usually **global**: keep them at the type root or under a
|
|
43
|
-
role/domain slug (`
|
|
43
|
+
role/domain slug (`agents/reviewer`). Point the agent at the standards and type
|
|
44
44
|
conventions it must read first via xrefs.
|
|
@@ -42,7 +42,7 @@ Use a fact for stable information that future agents should treat as true or nor
|
|
|
42
42
|
## Placement & linking
|
|
43
43
|
|
|
44
44
|
- Facts are **reuse-born**: give a policy/standard fact a domain-like prefix
|
|
45
|
-
(`
|
|
45
|
+
(`facts/policies/pii-handling`) or the type root for personal/meta facts.
|
|
46
46
|
- Facts are also the **delivery layer** for stash-wide conventions:
|
|
47
47
|
`category: convention` or `category: meta` facts are surfaced to every non-wiki
|
|
48
48
|
author, so this is where naming, placement, and linking house-rules live. Keep
|
|
@@ -42,7 +42,7 @@ Use a knowledge asset for durable reference material, synthesized explanations,
|
|
|
42
42
|
## Placement & linking
|
|
43
43
|
|
|
44
44
|
- Knowledge is **reuse-born**: file it under a stable **domain** prefix from
|
|
45
|
-
`
|
|
45
|
+
`facts/conventions/domains` (`knowledge/auth/oauth-refresh-races`), not under a
|
|
46
46
|
project — that domain slug is what any project searches to reuse it.
|
|
47
47
|
- Knowledge pages are the rewritable synthesized layer — update them in place.
|
|
48
48
|
Ingested source material stays immutable; corrections to it are new assets
|
|
@@ -40,10 +40,10 @@ Use a lesson to record:
|
|
|
40
40
|
- Update an existing lesson when new feedback sharpens the same judgment.
|
|
41
41
|
- Create a new lesson only when the trigger or failure mode is meaningfully different.
|
|
42
42
|
- Deprecate or revise stale lessons instead of allowing contradictory guidance to accumulate.
|
|
43
|
-
- When a lesson becomes broadly normative, consider promoting the stable rule into a `
|
|
43
|
+
- When a lesson becomes broadly normative, consider promoting the stable rule into a `facts/conventions/...` asset.
|
|
44
44
|
|
|
45
45
|
## Placement & linking
|
|
46
46
|
|
|
47
47
|
- Lessons are **scope-born**: file them under the **project/client** they were
|
|
48
|
-
learned in (`
|
|
48
|
+
learned in (`lessons/projectA/token-refresh-gotcha`) and xref the asset the
|
|
49
49
|
lesson corrects or refines.
|
|
@@ -40,8 +40,8 @@ Use a memory when a future agent would make a better decision by knowing a speci
|
|
|
40
40
|
## Placement & linking
|
|
41
41
|
|
|
42
42
|
- Memories are **scope-born**: file them under the **current project/client**
|
|
43
|
-
slug (`
|
|
43
|
+
slug (`memories/projectA/auth-token-refresh`) — the working context is the
|
|
44
44
|
answer, so no per-asset judgment is needed. Add the subject as a tag
|
|
45
45
|
(`tags: [auth, projectA]`) for cross-cutting recall.
|
|
46
46
|
- When a memory turns out to be domain-general, **append** a new
|
|
47
|
-
`knowledge
|
|
47
|
+
`knowledge/<domain>/…` asset that xrefs it — never rename the memory up a rung.
|
|
@@ -45,6 +45,6 @@ Use a script when a task is mechanical, repeatable, and better handled by a dete
|
|
|
45
45
|
## Placement & linking
|
|
46
46
|
|
|
47
47
|
- Scripts are **reuse-born**: file a general helper under a tool/domain slug
|
|
48
|
-
from `
|
|
48
|
+
from `facts/conventions/domains` (`scripts/build/release`). Use the project slug
|
|
49
49
|
only when the script hard-codes project-specific paths, endpoints, or
|
|
50
50
|
credentials.
|