akm-cli 0.9.30 → 0.10.261001-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +438 -0
- package/README.md +10 -10
- package/ROADMAP.md +112 -0
- package/STABILITY.md +99 -57
- package/dist/api-node.mjs +20 -0
- package/dist/api.d.ts +23 -0
- package/dist/api.js +45 -0
- package/dist/assets/hints/cli-hints-full.md +15 -29
- package/dist/assets/hints/cli-hints-short.md +2 -2
- package/dist/assets/improve-strategies/default.json +3 -3
- package/dist/assets/prompts/consolidate-pair.md +9 -7
- package/dist/assets/stash-skeleton/README.md +1 -1
- package/dist/assets/tasks/improve/akm-improve-consolidate.yml +1 -1
- package/dist/cli/shared.js +31 -48
- package/dist/cli/unknown-flags.js +6 -43
- package/dist/cli.js +8 -34
- package/dist/commands/agent/contribute-cli.js +1 -1
- package/dist/commands/completions.js +1 -2
- package/dist/commands/config-cli.js +5 -28
- package/dist/commands/env/env-cli.js +5 -5
- package/dist/commands/env/secret-cli.js +2 -2
- package/dist/commands/feedback-cli.js +75 -49
- package/dist/commands/health/checks.js +41 -16
- package/dist/commands/health/plugin-staleness.js +52 -22
- package/dist/commands/improve/autonomy-gate.js +5 -3
- package/dist/commands/improve/consolidate/chunking.js +3 -10
- package/dist/commands/improve/consolidate/continuity-check.js +4 -4
- package/dist/commands/improve/consolidate/pair-pass.js +29 -10
- package/dist/commands/improve/consolidate.js +10 -65
- package/dist/commands/improve/distill/lesson-update.js +91 -0
- package/dist/commands/improve/distill-guards.js +1 -43
- package/dist/commands/improve/distill.js +148 -21
- package/dist/commands/improve/eligibility.js +14 -1
- package/dist/commands/improve/extract-cli.js +1 -1
- package/dist/commands/improve/extract-prompt.js +17 -7
- package/dist/commands/improve/extract.js +5 -7
- package/dist/commands/improve/improve-cli.js +125 -118
- package/dist/commands/improve/improve-strategies.js +8 -12
- package/dist/commands/improve/improve.js +134 -52
- package/dist/commands/improve/loop-stages.js +18 -5
- package/dist/commands/improve/planner.js +0 -1
- package/dist/commands/improve/preparation.js +40 -99
- package/dist/commands/improve/proactive-maintenance.js +2 -2
- package/dist/commands/improve/reflect-noise.js +3 -55
- package/dist/commands/improve/reflect.js +29 -34
- package/dist/commands/improve/retrieval-queries.js +37 -0
- package/dist/commands/improve/retrieval-scope.js +2 -2
- package/dist/commands/improve/salience.js +2 -9
- package/dist/commands/improve/session-asset.js +4 -1
- package/dist/commands/improve/stage.js +23 -12
- package/dist/commands/lint/index.js +5 -20
- package/dist/commands/observability-cli.js +3 -9
- package/dist/commands/proposal/drain.js +43 -6
- package/dist/commands/proposal/proposal-cli.js +11 -31
- package/dist/commands/proposal/repository.js +20 -14
- package/dist/commands/proposal/validators/proposal-quality-validators.js +0 -3
- package/dist/commands/read/knowledge.js +3 -3
- package/dist/commands/read/remember-cli.js +0 -13
- package/dist/commands/read/search-cli.js +29 -97
- package/dist/commands/read/search.js +0 -11
- package/dist/commands/read/show.js +0 -19
- package/dist/commands/sources/plugin-upgrade.js +164 -101
- package/dist/commands/sources/sources-cli.js +1 -15
- package/dist/commands/sources/stash-cli.js +6 -14
- package/dist/commands/tasks/tasks-cli.js +4 -115
- package/dist/commands/workflow/plan.js +11 -33
- package/dist/commands/workflow-cli.js +2 -7
- package/dist/core/adapter/adapter-ids.js +1 -2
- package/dist/core/adapter/adapters/agent-skills-adapter.js +0 -4
- package/dist/core/adapter/adapters/akm-adapter.js +9 -48
- package/dist/core/adapter/adapters/akm-lint.js +10 -26
- package/dist/core/adapter/adapters/akm-metadata.js +2 -72
- package/dist/core/adapter/adapters/akm-task-adapter.js +0 -5
- package/dist/core/adapter/adapters/akm-workflow-adapter.js +9 -28
- package/dist/core/adapter/adapters/dotenv-adapter.js +1 -20
- package/dist/core/adapter/adapters/generic-files-adapter.js +0 -10
- package/dist/core/adapter/adapters/llm-wiki-adapter.js +0 -4
- package/dist/core/adapter/adapters/tool-dir-shared.js +0 -24
- package/dist/core/adapter/adapters/website-snapshot-adapter.js +4 -4
- package/dist/core/adapter/recognize-match.js +3 -4
- package/dist/core/common.js +18 -2
- package/dist/core/config/config-schema.js +12 -15
- package/dist/core/config/config-types.js +6 -15
- package/dist/core/config/config-walker.js +6 -23
- package/dist/core/config/config.js +17 -80
- package/dist/core/config/engine-semantics.js +7 -3
- package/dist/core/config/schema/engines.js +7 -7
- package/dist/core/config/schema/improve-processes.js +10 -63
- package/dist/core/config/schema/improve.js +2 -21
- package/dist/core/config/schema/index-config.js +6 -39
- package/dist/core/env-secret-ref.js +2 -45
- package/dist/core/errors.js +1 -2
- package/dist/core/extra-params.js +2 -86
- package/dist/core/file-lock.js +12 -7
- package/dist/core/improve-result.js +13 -1
- package/dist/core/mutation-target.js +2 -2
- package/dist/core/paths.js +4 -0
- package/dist/core/recognition-util.js +4 -5
- package/dist/core/run-lock.js +1 -1
- package/dist/core/subprocess.js +49 -0
- package/dist/core/warn.js +21 -4
- package/dist/core/write-source.js +3 -3
- package/dist/execution/target-ref.js +1 -2
- package/dist/indexer/indexer.js +15 -6
- package/dist/indexer/passes/memory-inference.js +15 -6
- package/dist/indexer/search/db-search.js +49 -36
- package/dist/indexer/search/fts-query.js +0 -19
- package/dist/indexer/search/ranking.js +29 -1
- package/dist/indexer/usage/usage-events.js +21 -16
- package/dist/integrations/agent/engine-resolution.js +5 -2
- package/dist/integrations/agent/index.js +1 -1
- package/dist/integrations/agent/profiles.js +41 -98
- package/dist/integrations/agent/request-lowering.js +3 -3
- package/dist/integrations/harnesses/aider/index.js +5 -0
- package/dist/integrations/harnesses/amazonq/index.js +1 -0
- package/dist/integrations/harnesses/claude/config-import.js +2 -3
- package/dist/integrations/harnesses/claude/index.js +5 -0
- package/dist/integrations/harnesses/codex/index.js +1 -0
- package/dist/integrations/harnesses/copilot/index.js +1 -0
- package/dist/integrations/harnesses/gemini/index.js +1 -0
- package/dist/integrations/harnesses/index.js +18 -39
- package/dist/integrations/harnesses/opencode/agent-builder.js +60 -35
- package/dist/integrations/harnesses/opencode/config-import.js +121 -52
- package/dist/integrations/harnesses/opencode/index.js +22 -0
- package/dist/integrations/harnesses/opencode/plugin-layout.js +68 -0
- package/dist/integrations/harnesses/opencode/session-log-types.js +12 -0
- package/dist/integrations/harnesses/opencode/session-log-v1.js +72 -0
- package/dist/integrations/harnesses/opencode/session-log-v2.js +140 -0
- package/dist/integrations/harnesses/opencode/session-log.js +104 -115
- package/dist/integrations/harnesses/opencode/version.js +98 -0
- package/dist/integrations/harnesses/opencode-sdk/{harness.js → index.js} +5 -17
- package/dist/integrations/harnesses/opencode-sdk/sdk-runner.js +105 -206
- package/dist/integrations/harnesses/opencode-sdk/v1-adapter.js +199 -0
- package/dist/integrations/harnesses/opencode-sdk/v2-adapter.js +254 -0
- package/dist/integrations/harnesses/opencode-sdk/wire.js +66 -0
- package/dist/integrations/harnesses/openhands/index.js +1 -0
- package/dist/integrations/harnesses/pi/index.js +1 -0
- package/dist/integrations/harnesses/shared.js +2 -0
- package/dist/integrations/harnesses/types.js +2 -0
- package/dist/llm/client.js +74 -14
- package/dist/output/cli-hints.js +1 -1
- package/dist/output/context.js +10 -19
- package/dist/output/format-exempt.js +5 -8
- package/dist/output/shapes/helpers.js +1 -22
- package/dist/output/shapes/passthrough.js +0 -1
- package/dist/output/shapes.js +3 -31
- package/dist/output/stdout.js +5 -1
- package/dist/output/text/command-format.js +6 -1
- package/dist/output/text/workflow-format.js +4 -22
- package/dist/scripts/akm-migrate-node.js +15769 -16731
- package/dist/scripts/akm-migrate.js +16339 -17297
- package/dist/setup/detect.js +10 -4
- package/dist/setup/harness-config-import.js +5 -14
- package/dist/setup/setup.js +1 -1
- package/dist/setup/steps/tasks.js +12 -13
- package/dist/sources/providers/git-stash.js +94 -13
- package/dist/storage/repositories/index-utility-repository.js +2 -32
- package/dist/storage/repositories/index-vec-repository.js +4 -0
- package/dist/storage/repositories/task-history-repository.js +0 -5
- package/dist/storage/repositories/workflow-runs-repository.js +5 -15
- package/dist/tasks/embedded.js +2 -1
- package/dist/tasks/run/run-command-task.js +9 -1
- package/dist/tasks/run/run-workflow-task.js +4 -3
- package/dist/tasks/run/task-history.js +0 -2
- package/dist/tasks/run/task-log.js +38 -1
- package/dist/tasks/schedule-gates.js +39 -0
- package/dist/tasks/scheduler-binding.js +0 -16
- package/dist/tasks/scheduler-sync.js +3 -97
- package/dist/tasks/source/bounded-document.js +1 -1
- package/dist/tasks/source/task-source-v4.js +2 -12
- package/dist/tasks/task-run-reserved-flags.js +2 -31
- package/dist/workflows/authoring/authoring.js +6 -6
- package/dist/workflows/compile.js +8 -65
- package/dist/workflows/exec/child-workflow.js +22 -3
- package/dist/workflows/exec/native-executor.js +12 -147
- package/dist/workflows/exec/run-workflow.js +31 -103
- package/dist/workflows/exec/step-work.js +9 -178
- package/dist/workflows/exec/unit-dispatch.js +0 -10
- package/dist/workflows/freeze/environment.js +3 -44
- package/dist/workflows/freeze/freeze.js +8 -41
- package/dist/workflows/freeze/targets/child-workflow.js +27 -63
- package/dist/workflows/freeze/targets/command.js +2 -16
- package/dist/workflows/freeze/targets/shell.js +0 -2
- package/dist/workflows/freeze/task-bindings.js +2 -28
- package/dist/workflows/ir/params.js +12 -2
- package/dist/workflows/parser.js +82 -232
- package/dist/workflows/plan.js +1 -1
- package/dist/workflows/renderer.js +10 -19
- package/dist/workflows/runtime/run-plan.js +11 -53
- package/dist/workflows/runtime/runs.js +4 -27
- package/dist/workflows/source-files.js +12 -16
- package/dist/workflows/source-semantics.js +1 -93
- package/docs/README.md +43 -42
- package/docs/agents/README.md +15 -0
- package/docs/agents/agent-install.md +14 -0
- package/docs/architecture/0.10-process-rules.md +827 -0
- package/docs/architecture/README.md +67 -0
- package/docs/architecture/adapters.md +258 -0
- package/docs/architecture/akm-architecture-decision-history.md +2055 -0
- package/docs/architecture/akm-core-principles.md +126 -0
- package/docs/architecture/architecture.md +578 -0
- package/docs/architecture/comparisons/claude-code-vs-akm-workflows-full.md +550 -0
- package/docs/architecture/decisions/0001-no-interpolation-attached-structured-context.md +72 -0
- package/docs/architecture/decisions/0002-unit-reuse-and-input-hash-scope.md +142 -0
- package/docs/architecture/decisions/0003-child-env-allowlist-and-provenance.md +189 -0
- package/docs/architecture/decisions/0004-task-input-contract-and-flag-coercion.md +97 -0
- package/docs/architecture/decisions/0005-task-result-vocabulary-and-legacy-read-mapping.md +108 -0
- package/docs/architecture/decisions/0006-task-source-version-routing.md +124 -0
- package/docs/architecture/decisions/0007-workflow-composition-bounds.md +83 -0
- package/docs/architecture/decisions/0008-task-binding-normalization.md +88 -0
- package/docs/architecture/decisions/0009-child-run-publication-column-parity.md +80 -0
- package/docs/architecture/decisions/0010-driver-protocol-cut.md +36 -0
- package/docs/architecture/decisions/0011-engine-run-loop-invariants.md +125 -0
- package/docs/architecture/decisions/README.md +62 -0
- package/docs/architecture/improvement.md +479 -0
- package/docs/architecture/internals/classification.md +154 -0
- package/docs/architecture/internals/fresh-host-rebuild-runbook.md +40 -0
- package/docs/architecture/internals/functional-contract-patterns.md +340 -0
- package/docs/architecture/internals/health-advisories.md +110 -0
- package/docs/architecture/internals/improve-workflow.md +719 -0
- package/docs/architecture/internals/indexing.md +498 -0
- package/docs/architecture/internals/registry-network-boundary.md +57 -0
- package/docs/architecture/internals/search.md +248 -0
- package/docs/architecture/internals/storage-locations.md +943 -0
- package/docs/architecture/persisted-data-compat.md +68 -0
- package/docs/architecture/reviews/env-secret-access.md +319 -0
- package/docs/architecture/runtime-boundary-design.md +153 -0
- package/docs/architecture/specs/0.9.0-close-out-plan.md +361 -0
- package/docs/architecture/specs/0.9.0-decisions.md +532 -0
- package/docs/architecture/specs/0.9.0-docs-code-drift-register.md +745 -0
- package/docs/architecture/specs/0.9.0-open-items-register.md +135 -0
- package/docs/architecture/specs/0.9.0-public-api-issue-backlog.md +740 -0
- package/docs/architecture/specs/0.9.0-release-surface-review.md +636 -0
- package/docs/architecture/specs/agent-command-engine-model-design.md +513 -0
- package/docs/architecture/specs/akm-0.9.0-bundle-adapter-spec.md +501 -0
- package/docs/architecture/specs/akm-0.9.0-ref-grammar-decision.md +291 -0
- package/docs/architecture/specs/akm-format-neutral-bundle-workspace-spec.md +2059 -0
- package/docs/architecture/specs/di-seams-plan.md +539 -0
- package/docs/architecture/specs/driver-protocol-keep-or-cut.md +275 -0
- package/docs/architecture/specs/fact-asset-type.md +142 -0
- package/docs/architecture/specs/improve-collapse-churn-detector-design.md +634 -0
- package/docs/architecture/specs/okf-support.md +148 -0
- package/docs/architecture/specs/ref.md +329 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/README.md +72 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/findings-consolidated.md +152 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-alternatives.md +352 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-bunqueue.md +300 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/library-eval-openworkflow.md +402 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-1.md +758 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-2.md +645 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/opus-review-3.md +602 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-adversarial.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-architecture.md +27 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-coverage.md +74 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r1-security.md +15 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-adversarial.md +132 -0
- package/docs/architecture/specs/reviews/task-workflow-unification/panel-r2-verification.md +147 -0
- package/docs/architecture/specs/stash-conventions-code-spec.md +275 -0
- package/docs/architecture/specs/stash-organization-conventions.md +377 -0
- package/docs/architecture/specs/task-workflow-format-unification.md +721 -0
- package/docs/architecture/specs/workflow-engine-buy-vs-build.md +231 -0
- package/docs/architecture/specs/workflow-format-unification.md +432 -0
- package/docs/architecture/testing/manual-testing-checklist.md +3411 -0
- package/docs/architecture/testing/okf-v0.2-conformance-runbook.md +924 -0
- package/docs/architecture/testing/task-workflow-manual-tests.md +1720 -0
- package/docs/architecture/testing/testing-workflow.md +446 -0
- package/docs/architecture/workflow-engine.md +223 -0
- package/docs/guides/README.md +33 -0
- package/docs/guides/author-bundles.md +310 -0
- package/docs/guides/author-workflows.md +490 -0
- package/docs/guides/bundles.md +323 -0
- package/docs/guides/capture-knowledge.md +136 -0
- package/docs/guides/claude-code-vs-akm-workflows.md +29 -0
- package/docs/guides/concepts.md +93 -0
- package/docs/guides/discover-and-load.md +158 -0
- package/docs/guides/getting-started.md +240 -0
- package/docs/guides/improve-the-library.md +247 -0
- package/docs/guides/knowledge-management.md +18 -0
- package/docs/guides/recipes/headless-install.md +97 -0
- package/docs/guides/recipes/website-source.md +28 -0
- package/docs/guides/run-workflows.md +279 -0
- package/docs/guides/scheduling.md +131 -0
- package/docs/guides/use-with-any-agent.md +174 -0
- package/docs/guides/wikis.md +81 -0
- package/docs/integration/bundling-akm.md +7 -6
- package/docs/maintainers/README.md +19 -0
- package/docs/maintainers/curate-workmap.md +335 -0
- package/docs/maintainers/eval.md +3 -0
- package/docs/maintainers/local-development.md +108 -0
- package/docs/maintainers/release-checklist.md +135 -0
- package/docs/migration/README.md +4 -2
- package/docs/migration/release-notes/0.0.13.md +1 -1
- package/docs/migration/release-notes/0.1.0.md +1 -1
- package/docs/migration/release-notes/0.10.0.md +201 -0
- package/docs/migration/release-notes/0.2.0.md +1 -1
- package/docs/migration/release-notes/0.3.0.md +1 -1
- package/docs/migration/release-notes/0.5.0.md +1 -1
- package/docs/migration/release-notes/0.6.0.md +1 -1
- package/docs/migration/release-notes/0.7.0.md +1 -1
- package/docs/migration/release-notes/0.7.3.md +2 -2
- package/docs/migration/release-notes/0.7.4.md +1 -1
- package/docs/migration/release-notes/0.7.5.md +1 -1
- package/docs/migration/release-notes/0.8.0.md +1 -1
- package/docs/migration/release-notes/0.9.0.md +1 -1
- package/docs/migration/release-notes/0.9.14.md +1 -1
- package/docs/migration/release-notes/0.9.15.md +1 -1
- package/docs/migration/release-notes/0.9.16.md +1 -1
- package/docs/migration/release-notes/0.9.17.md +1 -1
- package/docs/migration/release-notes/0.9.19.md +1 -1
- package/docs/migration/release-notes/0.9.2.md +1 -1
- package/docs/migration/release-notes/README.md +28 -31
- package/docs/migration/v0.5-to-v0.6.md +759 -0
- package/docs/migration/v0.8-to-v0.9.md +1 -1
- package/docs/migration/v0.9-to-v0.10.md +507 -0
- package/docs/plans/0.9.2-agent-command-workflow-plan.md +423 -0
- package/docs/posts/README.md +30 -0
- package/docs/posts/akm-command-tour.md +495 -0
- package/docs/posts/akm-logo-sized.webp +0 -0
- package/docs/posts/belief-aware-memory-12.md +139 -0
- package/docs/posts/config-v2-lessons-16.md +191 -0
- package/docs/posts/improve-loop-autonomous-10.md +225 -0
- package/docs/posts/improve-pipeline-debugging-0803.md +179 -0
- package/docs/posts/intro-part-01.md +76 -0
- package/docs/posts/intro-part-02.md +221 -0
- package/docs/posts/intro-part-03.md +190 -0
- package/docs/posts/intro-part-04.md +221 -0
- package/docs/posts/llm-mode-reflect-13.md +166 -0
- package/docs/posts/openpalm-built-on-akm.md +86 -0
- package/docs/posts/progressive-disclosure-06.md +129 -0
- package/docs/posts/proposal-safety-net-15.md +112 -0
- package/docs/posts/release-0.5.0.md +247 -0
- package/docs/posts/release-0.6.0.md +117 -0
- package/docs/posts/release-0.7.0.md +159 -0
- package/docs/posts/release-0.8.0.md +332 -0
- package/docs/posts/scattered-skills-05.md +100 -0
- package/docs/posts/task-assets-persistent-workflows-11.md +222 -0
- package/docs/posts/team-skills-07.md +198 -0
- package/docs/posts/wiki-agent-knowledge-08.md +223 -0
- package/docs/posts/workflows-vaults-09.md +321 -0
- package/docs/product-surface.md +54 -0
- package/docs/reference/README.md +2 -2
- package/docs/reference/api.md +65 -0
- package/docs/reference/asset-types.md +166 -0
- package/docs/reference/bundle-types.md +2 -4
- package/docs/reference/cli.md +163 -192
- package/docs/reference/configuration.md +101 -20
- package/docs/reference/data-and-telemetry.md +2 -2
- package/docs/reference/env-and-secrets.md +126 -0
- package/docs/reference/memory.md +124 -0
- package/docs/reference/refs.md +156 -0
- package/docs/reference/registry.md +489 -0
- package/docs/reference/supported-formats.md +3 -4
- package/docs/reference/tasks.md +12 -19
- package/docs/reference/website-sources.md +141 -0
- package/docs/reference/workflow-schema.md +89 -317
- package/docs/reference/workflows.md +20 -48
- package/package.json +23 -16
- package/schemas/akm-config.json +2 -243
- package/schemas/akm-task.json +2 -3
- package/schemas/akm-workflow.json +47 -84
- package/dist/assets/improve-strategies/catchup.json +0 -41
- package/dist/assets/improve-strategies/proactive-maintenance.json +0 -24
- package/dist/assets/improve-strategies/quick.json +0 -17
- package/dist/assets/improve-strategies/reflect-distill.json +0 -29
- package/dist/assets/improve-strategies/thorough.json +0 -49
- package/dist/assets/prompts/retrieval-relevance-judge.md +0 -6
- package/dist/assets/tasks/improve/akm-improve-catchup.yml +0 -6
- package/dist/assets/tasks/improve/akm-improve-frequent.yml +0 -4
- package/dist/assets/tasks/improve/akm-improve-nightly.yml +0 -4
- package/dist/cli/retired-commands.js +0 -118
- package/dist/commands/improve/retrieval-gate.js +0 -132
- package/dist/commands/tasks/validate.js +0 -176
- package/dist/core/config/legacy-source-shape-shim.js +0 -117
- package/dist/indexer/feedback/utility-policy.js +0 -75
- package/dist/integrations/harnesses/ids.js +0 -28
- package/dist/tasks/source/task-source-v3-frozen.js +0 -424
- package/dist/tasks/source/task-to-v4.js +0 -863
- package/dist/workflows/exec/worktree.js +0 -372
- package/dist/workflows/freeze/child-output-references.js +0 -83
- package/dist/workflows/freeze/identity.js +0 -22
- package/dist/workflows/freeze/targets/script.js +0 -50
- package/dist/workflows/freeze/targets/task.js +0 -124
- package/dist/workflows/github-yaml.js +0 -506
- package/dist/workflows/runtime/run-outputs.js +0 -80
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Your Agent Doesn't Know What the Community Already Figured Out
|
|
3
|
+
cover_image: 'https://raw.githubusercontent.com/itlackey/akm/main/docs/posts/akm-logo-sized.webp'
|
|
4
|
+
series: akm-knowledge
|
|
5
|
+
description: How to connect your agent to curated community knowledge with the Context Hub integration
|
|
6
|
+
tags:
|
|
7
|
+
- ai
|
|
8
|
+
- agents
|
|
9
|
+
- cli
|
|
10
|
+
- skills
|
|
11
|
+
published: true
|
|
12
|
+
id: 3363736
|
|
13
|
+
date: '2026-03-18T18:09:15Z'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
> This is a dated article from AKM's publishing archive. For current product behavior, see the
|
|
17
|
+
> [documentation index](https://github.com/itlackey/akm/blob/main/docs/README.md).
|
|
18
|
+
|
|
19
|
+
This is part four in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. In [part one](https://dev.to/itlackey/your-ai-agents-skill-list-is-getting-out-of-hand-32ck), I covered why progressive disclosure beats dumping everything into context. [Part two](https://dev.to/itlackey/you-already-have-dozens-of-agent-skills-you-just-cant-find-them) showed how `akm` unifies your local assets across platforms into one searchable stash. [Part three](https://dev.to/itlackey/your-agents-memory-shouldnt-disappear-when-the-session-ends) added remote context via OpenViking for teams that need persistent, shared knowledge. *(note: OpenViking is not supported in akm v1 — see Part three's deprecation notice for details)*
|
|
20
|
+
|
|
21
|
+
All of that assumed you were building your own library from scratch. Your skills. Your knowledge docs. Your team's accumulated context. That's fine — and it's necessary — but it ignores a much larger resource: everything everyone else has already built.
|
|
22
|
+
|
|
23
|
+
Right now, there are high-quality skills and knowledge documents sitting in public repositories that solve problems you're going to hit next week. Prompt-chaining patterns. API integration guides. Framework-specific coding conventions. Stuff that experienced practitioners have refined and published, ready to use. Your agent has no idea any of it exists.
|
|
24
|
+
|
|
25
|
+
That's what the [Context Hub](https://github.com/andrewyng/context-hub) integration fixes.
|
|
26
|
+
|
|
27
|
+
## What Is Context Hub?
|
|
28
|
+
|
|
29
|
+
Context Hub is a public GitHub repository — originally curated by Andrew Ng's team — structured specifically for agent consumption. It organizes community-contributed knowledge and skills into a browsable, searchable hierarchy under a `content/` directory. Each entry is either a `DOC.md` (knowledge) or a `SKILL.md` (skill), with frontmatter metadata for descriptions, tags, languages, and versions.
|
|
30
|
+
|
|
31
|
+
Think of it like a curated package registry, except instead of code libraries, it's agent context. Each document is a self-contained piece of knowledge or a skill definition that any agent can pick up and use immediately. No installation, no dependencies, no build step.
|
|
32
|
+
|
|
33
|
+
The structure is intentionally simple:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
content/
|
|
37
|
+
openai/
|
|
38
|
+
docs/
|
|
39
|
+
chat-api/
|
|
40
|
+
python/
|
|
41
|
+
DOC.md
|
|
42
|
+
skills/
|
|
43
|
+
prompt-chaining/
|
|
44
|
+
SKILL.md
|
|
45
|
+
anthropic/
|
|
46
|
+
docs/
|
|
47
|
+
tool-use/
|
|
48
|
+
typescript/
|
|
49
|
+
DOC.md
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Every entry gets indexed into the same search pipeline as your local assets, which means `akm` can search and display it the same way it handles anything else in your stash.
|
|
53
|
+
|
|
54
|
+
## One Command to Connect
|
|
55
|
+
|
|
56
|
+
If you already have `akm` installed:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
akm add context-hub # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
That's the full setup. Under the hood, this adds the default Context Hub repository as a git source. It downloads the repo as an archive, extracts it into a local cache, and on the next `akm index`, every `DOC.md` and `SKILL.md` gets indexed into the same FTS5 search pipeline as your local assets.
|
|
63
|
+
|
|
64
|
+
The cache refreshes automatically every 12 hours. If the network is down, it falls back to stale cache for up to 7 days. Your local stash still works regardless — the Context Hub provider degrades gracefully without taking anything else down with it.
|
|
65
|
+
|
|
66
|
+
Verify it's registered:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
akm list # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
You should see `context-hub` in the list alongside your local stash directories and any other providers you've configured.
|
|
73
|
+
|
|
74
|
+
## Search Works the Same Way
|
|
75
|
+
|
|
76
|
+
Here's what changes in practice: nothing about your workflow. You still run `akm search`. The difference is that results now include entries from Context Hub alongside your local assets.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
akm search "prompt chaining patterns"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This might return a local skill you wrote last month *and* a community-contributed skill from Context Hub. The results are unified — same ranking, same format, same `type:name` refs. Context Hub assets go through the same scoring pipeline as everything else. No special handling, no second-class results.
|
|
83
|
+
|
|
84
|
+
Want to narrow it down to just skills?
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
akm search "api integration" --type skill
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or just knowledge documents?
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
akm search "coding standards" --type knowledge
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The type filter applies across all sources — local, remote, and Context Hub alike.
|
|
97
|
+
|
|
98
|
+
## Show Works Too
|
|
99
|
+
|
|
100
|
+
When you find something useful, load it the same way you'd load any other asset:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
akm show skill:prompt-chaining
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Your agent gets the full content — frontmatter, description, the complete skill definition — in the same format as every other `akm show` result. It doesn't need to know the asset lives on GitHub. It doesn't need a GitHub token. It just works. The ref is `type:name`, same as a local asset.
|
|
107
|
+
|
|
108
|
+
Context Hub assets support the same view modes as local knowledge docs:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Table of contents
|
|
112
|
+
akm show knowledge:chat-api toc
|
|
113
|
+
|
|
114
|
+
# A specific section
|
|
115
|
+
akm show knowledge:chat-api section "Authentication"
|
|
116
|
+
|
|
117
|
+
# A line range
|
|
118
|
+
akm show knowledge:chat-api lines 10 25
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For large documents, the `toc` and `section` views keep context lean. Your agent can scan the table of contents first, then pull only the section it needs. Progressive disclosure all the way down.
|
|
122
|
+
|
|
123
|
+
## Custom Context Hub Repositories
|
|
124
|
+
|
|
125
|
+
The default `akm add context-hub` points at Andrew Ng's repository, but you're not limited to that. Any GitHub repository works as a git source — you don't need to follow a specific directory convention. `akm` walks the repo, classifies files by type, and indexes everything.
|
|
126
|
+
|
|
127
|
+
Say your organization maintains an internal knowledge base for agent context — API references, architecture decisions, coding standards:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
akm add https://github.com/your-org/team-knowledge --provider git --name "team-knowledge" # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Now `akm search` queries your team's knowledge base alongside the public Context Hub and your local stash. All in one search. You can add as many git sources as you want — each gets its own cache and index.
|
|
134
|
+
|
|
135
|
+
Need a specific branch instead of `main`?
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
akm add https://github.com/your-org/team-knowledge/tree/staging --provider git --name "team-staging" # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The provider parses the GitHub URL and pulls the right branch automatically.
|
|
142
|
+
|
|
143
|
+
## What Your Agent Actually Sees
|
|
144
|
+
|
|
145
|
+
This is where the pieces from the whole series come together. After four posts, here's what a fully-wired `akm search` looks like from your agent's perspective:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
akm search "deploy containers to production"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Results might include:
|
|
152
|
+
|
|
153
|
+
1. A local script from your primary stash — the deploy script you wrote last month
|
|
154
|
+
2. A team skill from an installed GitHub stash — the Docker Compose workflow your teammate packaged
|
|
155
|
+
3. A knowledge doc from OpenViking — the architecture decision about container orchestration from last sprint *(note: OpenViking is not supported in akm v1 — see Part three's deprecation notice for details)*
|
|
156
|
+
4. A community skill from Context Hub — a battle-tested container deployment pattern that 50 other people have already vetted
|
|
157
|
+
|
|
158
|
+
Four different sources. One result set. One `akm show` command to load whichever one the agent needs. Everything else stays out of context.
|
|
159
|
+
|
|
160
|
+
The agent doesn't need to care about where an asset lives. Local file, managed source, OpenViking server, git repo — every result uses the same `type:name` ref. The agent searches, picks, loads, and gets to work.
|
|
161
|
+
|
|
162
|
+
## The Full Stack
|
|
163
|
+
|
|
164
|
+
Here's what the complete setup looks like after four posts:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Install
|
|
168
|
+
curl -fsSL https://raw.githubusercontent.com/itlackey/akm/main/install.sh | bash
|
|
169
|
+
akm setup
|
|
170
|
+
|
|
171
|
+
# Local platform assets
|
|
172
|
+
akm add ~/.claude/skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
173
|
+
akm add .opencode/skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
174
|
+
akm add .cursor/rules # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
175
|
+
|
|
176
|
+
# Community and team stashes
|
|
177
|
+
akm add github:your-org/team-agent-toolkit # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
178
|
+
akm add @scope/deploy-skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
179
|
+
|
|
180
|
+
# Community knowledge (Context Hub is just a git repo)
|
|
181
|
+
akm add context-hub # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
182
|
+
|
|
183
|
+
# Team knowledge (any git repo works)
|
|
184
|
+
akm add https://github.com/your-org/team-knowledge --provider git --name team-knowledge # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
185
|
+
|
|
186
|
+
# Remote context server
|
|
187
|
+
akm add https://your-viking.internal:1933 --provider openviking --name team-context --options '{"apiKey":"..."}' # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
188
|
+
|
|
189
|
+
# Build the local index
|
|
190
|
+
akm index
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Drop the `AGENTS.md` snippet into every project:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
## Resources & Capabilities
|
|
197
|
+
|
|
198
|
+
You have access to a searchable library of scripts, skills, commands, agents,
|
|
199
|
+
knowledge, and memories via the `akm` CLI. Use `akm -h` for details.
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
And your agent has access to everything: local skills, platform assets, team stashes, community registries, remote knowledge, persistent memories, and curated community context. One search, one interface.
|
|
203
|
+
|
|
204
|
+
## Why This Matters
|
|
205
|
+
|
|
206
|
+
The value of agent skills and knowledge compounds when it's shared. A prompt-chaining pattern that one person refines over a weekend becomes infrastructure when a thousand agents can find it. A coding standard document that one team writes becomes a community resource when it's discoverable from any stash.
|
|
207
|
+
|
|
208
|
+
Context Hub isn't the only way this will happen — community registries, marketplace-style discovery, and decentralized skill sharing are all coming. But it's working today, it's open source, and it plugs directly into the same `akm search` / `akm show` workflow you're already using.
|
|
209
|
+
|
|
210
|
+
If you've written skills or knowledge docs worth sharing, consider contributing them to [Context Hub](https://github.com/andrewyng/context-hub). Structure them with frontmatter, put them in a `content/` directory, and they become searchable for every agent running `akm`.
|
|
211
|
+
|
|
212
|
+
The repo is at [github.com/itlackey/akm](https://github.com/itlackey/akm). Context Hub is at [github.com/andrewyng/context-hub](https://github.com/andrewyng/context-hub). If you've got a team knowledge base in a git repo, add it as a git source and let me know how it holds up.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
*__Update (March 2026):__ This post was updated to reflect akm's current CLI. `akm add` replaces the earlier `akm stash add` for adding sources (including git and OpenViking providers), `akm setup` replaces `akm init`, and `akm list` replaces `akm stash list`. Sources (formerly "stash sources") are now managed through a single `akm add` / `akm remove` interface. If you're following along with an older version, `akm upgrade` will get you current.*
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
> **Note (2026-04-23):** This post has been updated to align with akm 0.6.0 terminology. Earlier wording referred to a *kit* and the *Kit Maker's Guide*; those terms have been renamed to *stash* and *Stash Maker's Guide* throughout. The pre-rename text is preserved in this repository's git history.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'From 30 Minutes to 8: How LLM-Mode Reflect Works'
|
|
3
|
+
cover_image: 'https://raw.githubusercontent.com/itlackey/akm/main/docs/posts/akm-logo-sized.webp'
|
|
4
|
+
series: akm-knowledge
|
|
5
|
+
description: 'The reflect pass inside akm improve dropped from ~35 minutes to ~8 minutes per 69-ref run. Here is what changed: direct HTTP calls, multi-turn self-refine, and structured JSON output — with no agent subprocess in sight.'
|
|
6
|
+
tags:
|
|
7
|
+
- ai
|
|
8
|
+
- agents
|
|
9
|
+
- performance
|
|
10
|
+
- localai
|
|
11
|
+
published: true
|
|
12
|
+
id: 3814543
|
|
13
|
+
date: '2026-06-04T00:32:02Z'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
> This is a dated article from AKM's publishing archive. For current product behavior, see the
|
|
17
|
+
> [documentation index](https://github.com/itlackey/akm/blob/main/docs/README.md).
|
|
18
|
+
|
|
19
|
+
This is part thirteen in a series about managing the growing pile of skills, scripts, and context that AI coding agents depend on. [Part ten](https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d) covered the full improve pipeline — all five phases and how they connect. [Part fourteen](https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh) covers what 48 runs per day looks like in practice, including hardware benchmarks and the reliability bugs that surface at that frequency.
|
|
20
|
+
|
|
21
|
+
The reflect pass inside `akm improve` has three execution modes. Most installs are still running the slowest one.
|
|
22
|
+
|
|
23
|
+
Agent mode — the original — spawns an opencode or claude subprocess for each reflect call. The subprocess starts cold, acquires a session, assembles context, makes its LLM call, and exits. That cold-start overhead is real: each call takes approximately 30 seconds on a quiet machine. Run `akm improve` against a 69-ref stash and the reflect phase alone costs about 35 minutes.
|
|
24
|
+
|
|
25
|
+
SDK mode eliminated the subprocess. The reflect call runs in-process, cutting per-call latency to 10–15 seconds. A 69-ref run drops to 12–17 minutes — better, but still bounded by round-trip overhead that the reflect task does not actually need.
|
|
26
|
+
|
|
27
|
+
LLM mode removes the round trip entirely. The context for reflect is statically pre-assembled — no live tool calls, no file reads, no external context needed. A direct HTTP call to the LLM endpoint is sufficient, and it costs 6–10 seconds per call. A 69-ref run completes in 8–10 minutes.
|
|
28
|
+
|
|
29
|
+
| Mode | Per-call latency | 69-ref run |
|
|
30
|
+
|------|-----------------|------------|
|
|
31
|
+
| agent (CLI subprocess) | ~30s | ~35 min |
|
|
32
|
+
| sdk (in-process) | ~10–15s | ~12–17 min |
|
|
33
|
+
| llm (direct HTTP) | ~6–10s | ~8–10 min |
|
|
34
|
+
|
|
35
|
+
The 3–4× end-to-end improvement is from eliminating overhead that was never necessary for what reflect does.
|
|
36
|
+
|
|
37
|
+
## Why Reflect Does Not Need an Agent
|
|
38
|
+
|
|
39
|
+
The reflect pass takes a stash asset, examines its current content, and proposes a refined version. The inputs are fixed before the pass starts: the asset text, its metadata, and the improvement prompt. Nothing changes mid-call. No files need to be opened. No search queries need to fire. No external context needs to be pulled in.
|
|
40
|
+
|
|
41
|
+
Agent mode was useful when akm's improve pipeline was first built — the agent subprocess was already the primary execution model, and reflect rode along. But the properties that make agents valuable (tool use, live context access, multi-step reasoning over changing state) are not exercised by reflect. Spawning a full agent process for a stateless inference call trades 20+ seconds of overhead for no quality benefit.
|
|
42
|
+
|
|
43
|
+
LLM mode makes the execution match the task: assemble the context once, make one HTTP call, get the result.
|
|
44
|
+
|
|
45
|
+
## Multi-Turn Self-Refine
|
|
46
|
+
|
|
47
|
+
LLM mode adds a capability that agent mode does not have: multi-turn self-refine.
|
|
48
|
+
|
|
49
|
+
When reflect runs in LLM mode, it sends the initial draft back as an assistant turn. The model sees its own prior output and the refine prompt together in the same context window. This is a standard multi-turn pattern for iterative generation — the model can catch inconsistencies, tighten reasoning, and improve the draft without requiring a second top-level call.
|
|
50
|
+
|
|
51
|
+
Agent mode, by contrast, passes context forward through prompt text. Each subprocess run starts fresh. There is no conversation history to reason against.
|
|
52
|
+
|
|
53
|
+
The practical difference shows on longer or more complex assets, where a single forward pass produces a draft with inconsistencies the model catches immediately when it sees its own output. Multi-turn self-refine handles this inside the single reflect call.
|
|
54
|
+
|
|
55
|
+
## Structured Output
|
|
56
|
+
|
|
57
|
+
For providers that advertise `supportsJsonSchema: true` in their profile config, LLM mode requests structured JSON output. The response is validated against the reflect output schema before being accepted as a proposal.
|
|
58
|
+
|
|
59
|
+
This eliminates a class of parse failures that occurs when a model returns well-formed prose but with section markers or formatting that does not align with the expected output shape. The model knows the schema before it generates the response, so the output conforms rather than being post-hoc parsed.
|
|
60
|
+
|
|
61
|
+
Agent mode produces unstructured text that the pipeline parses with heuristics. LLM mode with `supportsJsonSchema: true` eliminates the heuristics.
|
|
62
|
+
|
|
63
|
+
## Config to Enable LLM Mode
|
|
64
|
+
|
|
65
|
+
LLM mode requires Config v2 (`configVersion: "0.8.0"`). If you have not migrated yet:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
# Preview the transformation
|
|
69
|
+
akm config migrate --dry-run # doclint:ignore (0.7.x→0.8.0 config-schema migration command, not present in 0.9.0)
|
|
70
|
+
|
|
71
|
+
# Apply (writes a timestamped backup first)
|
|
72
|
+
akm config migrate # doclint:ignore (0.7.x→0.8.0 config-schema migration command, not present in 0.9.0)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
With v2 in place, add a named LLM profile and point the reflect process at it:
|
|
76
|
+
|
|
77
|
+
```jsonc
|
|
78
|
+
{
|
|
79
|
+
"configVersion": "0.8.0",
|
|
80
|
+
"profiles": {
|
|
81
|
+
"llm": {
|
|
82
|
+
"openai-mini": {
|
|
83
|
+
"endpoint": "https://api.openai.com/v1/chat/completions",
|
|
84
|
+
"model": "gpt-4o-mini",
|
|
85
|
+
"apiKey": "${OPENAI_API_KEY}",
|
|
86
|
+
"supportsJsonSchema": true
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"improve": {
|
|
90
|
+
"default": {
|
|
91
|
+
"processes": {
|
|
92
|
+
"reflect": { "mode": "llm", "profile": "openai-mini" }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"defaults": { "llm": "openai-mini" }
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
That is the complete change. On the next `akm improve` run, reflect dispatches HTTP calls to the `openai-mini` profile instead of spawning subprocesses. The proposal queue, review workflow, and everything downstream are unchanged.
|
|
102
|
+
|
|
103
|
+
## Local Models and LM Studio
|
|
104
|
+
|
|
105
|
+
The profile config is an endpoint and a model name. Nothing in the LLM mode path is OpenAI-specific — it issues standard chat completions requests. Any OpenAI-compatible server works, including LM Studio running locally.
|
|
106
|
+
|
|
107
|
+
To point reflect at a local LM Studio instance:
|
|
108
|
+
|
|
109
|
+
```jsonc
|
|
110
|
+
{
|
|
111
|
+
"configVersion": "0.8.0",
|
|
112
|
+
"profiles": {
|
|
113
|
+
"llm": {
|
|
114
|
+
"local-reflect": {
|
|
115
|
+
"endpoint": "http://192.168.1.100:1234/v1/chat/completions",
|
|
116
|
+
"model": "your-local-model-name",
|
|
117
|
+
"supportsJsonSchema": false
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"improve": {
|
|
121
|
+
"default": {
|
|
122
|
+
"processes": {
|
|
123
|
+
"reflect": { "mode": "llm", "profile": "local-reflect" }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Set `supportsJsonSchema: false` unless you have confirmed that the local model and LM Studio version support structured output. Most local models handle the reflect task correctly through standard chat completions without schema enforcement — the output is smaller and more predictable than consolidation plans, so parse failures are rare.
|
|
132
|
+
|
|
133
|
+
For a machine running a 9B model on an RTX 4060 Ti, LLM mode reflect benchmarks in the 8–12 second range per call — comparable to the cloud figures in the table above, with no API costs and no data leaving your network.
|
|
134
|
+
|
|
135
|
+
## When to Stay on Agent Mode
|
|
136
|
+
|
|
137
|
+
LLM mode is appropriate for reflect because reflect has static inputs. Other improve processes do not share that property.
|
|
138
|
+
|
|
139
|
+
Stay on agent mode when the process needs live tool calls. If you have a custom improve workflow that reads files, calls `akm search`, or pulls external context mid-run, that process requires an agent that can execute tools. LLM mode does not have tool dispatch — it is a direct HTTP call to a completions endpoint, nothing more.
|
|
140
|
+
|
|
141
|
+
Stay on agent mode when the reflect task for a specific asset type requires context that is assembled dynamically — search results, graph lookups, or file reads that depend on the asset's content. Those lookups require a running agent.
|
|
142
|
+
|
|
143
|
+
The standard reflect pass — refining an existing asset based on its content and metadata — does not require either of these. LLM mode is the right default for it.
|
|
144
|
+
|
|
145
|
+
## What Changes in Practice
|
|
146
|
+
|
|
147
|
+
A 69-ref `akm improve` run that used to block for 35 minutes now completes in under 10. The reflect proposals are the same quality — in some cases better, because multi-turn self-refine catches first-draft inconsistencies. Structured output for cloud providers eliminates parse failures that previously required manual retries.
|
|
148
|
+
|
|
149
|
+
The change is a config update:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
# Migrate config if still on v1
|
|
153
|
+
akm config migrate # doclint:ignore (0.7.x→0.8.0 config-schema migration command, not present in 0.9.0)
|
|
154
|
+
|
|
155
|
+
# Then add the llm profile + reflect process entry (see snippet above)
|
|
156
|
+
# Preview what the next run would process without writing anything
|
|
157
|
+
akm improve --dry-run
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The next improve run after that shows reflect calls completing in the 6–10 second range instead of 30.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
LLM mode reflect is available in akm 0.8.0. The full configuration reference is in [configuration reference](../reference/configuration.md). The Config v2 key mapping is in the [v0.7 to v0.8 migration guide](../migration/v0.7-to-v0.8.md#config-080-migration-unified-profiles).
|
|
165
|
+
|
|
166
|
+
For a broader view of the improve pipeline — all five phases, scheduling, and how reflect feeds the downstream consolidation and distill passes — see [The Improvement Loop: How akm Keeps Your Agent Sharp](https://dev.to/itlackey/the-improvement-loop-how-akm-keeps-your-agent-sharp-2d4d). For debugging improve runs when something goes wrong (stale DB entries, hallucinated merge plans, pre-flight filters), see [Your Agent Has a Memory That Runs While You Sleep](https://dev.to/itlackey/your-agent-has-a-memory-that-runs-while-you-sleep-20oh).
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "OpenPalm Used to Run a Container for Everything. Now It Runs on AKM."
|
|
3
|
+
cover_image: 'https://raw.githubusercontent.com/itlackey/akm/main/docs/posts/akm-logo-sized.webp'
|
|
4
|
+
series: akm-skills
|
|
5
|
+
description: A self-hosted AI assistant accumulated a container for memory, one for scheduling, one for secrets. The 0.11.0 release deleted most of them by making the agent's knowledge stash the foundation instead.
|
|
6
|
+
tags:
|
|
7
|
+
- ai
|
|
8
|
+
- agents
|
|
9
|
+
- selfhosted
|
|
10
|
+
- akm
|
|
11
|
+
published: false
|
|
12
|
+
date: '2026-06-07T00:00:00Z'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
> This is a dated article from AKM's publishing archive. For current product behavior, see the
|
|
16
|
+
> [documentation index](https://github.com/itlackey/akm/blob/main/docs/README.md).
|
|
17
|
+
|
|
18
|
+
If you've ever stood up a self-hosted AI assistant, you know how the container list grows.
|
|
19
|
+
|
|
20
|
+
You start with the assistant itself. Then it needs memory, so you add a memory service. It should run scheduled tasks, so you add a scheduler. You need a place to put secrets, so you stand up a vault. The web UI gets its own container. A reverse proxy goes out front. A socket proxy guards the Docker socket. Before long `docker ps` is a wall of services, and every one of them is a thing that can break, drift, or need its own upgrade path.
|
|
21
|
+
|
|
22
|
+
OpenPalm — a self-hosted, LAN-first AI assistant platform — grew up exactly like this. By the 0.10 line it was running a dedicated memory container (a Python mem0 service), a scheduler container, an admin-UI container, a Caddy reverse proxy, and a docker-socket-proxy, on top of the assistant, the guardian, and the channel adapters. Each one solved a real problem. Together they were a lot of platform to keep alive just to talk to your own assistant.
|
|
23
|
+
|
|
24
|
+
The 0.11.0 release deleted most of them. Not by cramming the features into fewer images — by noticing they were the same problem wearing different costumes.
|
|
25
|
+
|
|
26
|
+
## The Real Problem Wasn't the Services. It Was the Substrate.
|
|
27
|
+
|
|
28
|
+
Look at what those containers were actually *doing*:
|
|
29
|
+
|
|
30
|
+
- The memory service stored and recalled facts the assistant learned.
|
|
31
|
+
- The scheduler ran recurring jobs the assistant defined.
|
|
32
|
+
- The vault held the secrets and settings the assistant needed.
|
|
33
|
+
- The skills/lessons machinery managed the knowledge the assistant could draw on.
|
|
34
|
+
|
|
35
|
+
That's not five unrelated systems. That's one system — **the agent's knowledge and state** — split across five runtimes because no single thing owned it.
|
|
36
|
+
|
|
37
|
+
This is the same trap the akm series keeps coming back to. Skills scattered across `~/.claude/`, `.cursor/rules/`, and `~/.codex/` aren't a storage problem, they're a discovery problem. Containers scattered across a Compose file aren't a packaging problem, they're a *foundation* problem. When there's no shared substrate for the agent's knowledge, every capability invents its own.
|
|
38
|
+
|
|
39
|
+
So 0.11.0 picked a substrate: the [akm](https://github.com/itlackey/akm) stash. One searchable, versioned, file-based knowledge base — the same one the agent already uses for skills — and moved memory, scheduling, secrets, and knowledge onto it.
|
|
40
|
+
|
|
41
|
+
## Memory: A Whole Service Became a Stash
|
|
42
|
+
|
|
43
|
+
The old way was a mem0 container: a Python service, a vector store, an embedding pipeline, a database to back it up, and a network hop between the assistant and its own memories.
|
|
44
|
+
|
|
45
|
+
The new way is `akm`. The assistant's memory/skills/lessons tools come from the `akm-opencode` plugin, and "remembering" is just writing a memory asset into the stash — the same stash that holds everything else the agent knows. Recall is `akm search` / `akm curate`. There's no separate memory service to run, no second database to back up, no embedding service to keep in sync with the model config.
|
|
46
|
+
|
|
47
|
+
The win isn't only "one less container." It's that memory stops being a black box. A memory is a markdown file with frontmatter. You can read it, grep it, edit it, version it, and — this is the good part — **share it**. Which leads to the part that surprised us.
|
|
48
|
+
|
|
49
|
+
## The Operator and the Assistant Share One Brain
|
|
50
|
+
|
|
51
|
+
Because memory and knowledge now live in a plain akm stash, the host and the assistant can point at the *same* one.
|
|
52
|
+
|
|
53
|
+
The host's stash can be shared, symmetric and writable, with the assistant. Something you teach the assistant shows up in your own `akm curate` on the host. Something you drop into your stash is available to the assistant on its next task. There's no export step, no sync job, no "push my notes to the bot." It's one knowledge base with two readers.
|
|
54
|
+
|
|
55
|
+
You don't get that when memory is trapped inside a service whose only interface is an API the assistant calls.
|
|
56
|
+
|
|
57
|
+
## Scheduling: The Scheduler Container Just… Left
|
|
58
|
+
|
|
59
|
+
OpenPalm used to run a separate scheduler service to fire recurring automations.
|
|
60
|
+
|
|
61
|
+
In 0.11.0, scheduled work is an akm **task asset** — a markdown file describing a job and its cron. The assistant container runs `crond` at boot and `akm tasks sync` to register those tasks with the OS scheduler; `akm tasks run` executes them and writes history. The scheduler container is gone. Automations are now the same kind of file as everything else in the stash: discoverable, versioned, editable, and owned by the knowledge layer instead of a bespoke daemon.
|
|
62
|
+
|
|
63
|
+
## Secrets and Config: Stop Inventing a Vault
|
|
64
|
+
|
|
65
|
+
The old stack had its own vault concept and a pile of `OP_CAP_*` capability variables and a `stack.yml` to wire it all together.
|
|
66
|
+
|
|
67
|
+
akm 0.8.0 grew first-class `env` and `secret` asset types, so OpenPalm stopped inventing its own. User settings live as an `env` asset; service secrets as `secret` files with the right permissions; LLM and embedding configuration moved into akm's own `config.json`. The capability variables and the `stack.yml` block they fed are gone. One fewer dialect to learn, one fewer file format to migrate, one substrate that already knew how to store this stuff.
|
|
68
|
+
|
|
69
|
+
## What's Left (Because Honesty Matters)
|
|
70
|
+
|
|
71
|
+
This isn't a magic-wand story where everything collapses into a single binary. The pieces that earn their isolation kept it:
|
|
72
|
+
|
|
73
|
+
- **The guardian** still fronts all channel traffic — HMAC, replay protection, rate limiting, optional content moderation. Security boundaries should be their own process.
|
|
74
|
+
- **The assistant** still runs the OpenCode runtime with its tools.
|
|
75
|
+
- **Channel adapters** still translate Discord/Slack/API into validated requests.
|
|
76
|
+
- The reverse proxy and socket proxy didn't move to akm — they were *removed*. OpenPalm is LAN-first; services bind localhost, and the web UI became a host process instead of a container, so there was nothing left to proxy.
|
|
77
|
+
|
|
78
|
+
What changed is everything that was really just "the agent's knowledge and state" wearing a container costume. That collapsed onto akm.
|
|
79
|
+
|
|
80
|
+
## The Pattern, One More Time
|
|
81
|
+
|
|
82
|
+
The akm thesis started with skills: don't scatter them across tools, index them in one place and let the agent find what it needs. OpenPalm 0.11.0 is the same idea at the platform level. Don't scatter the agent's memory, schedule, secrets, and knowledge across a fleet of services. Put them on one substrate the agent already speaks, and delete the services that only existed to hold them.
|
|
83
|
+
|
|
84
|
+
Fewer containers is the headline. The real result is a simpler mental model: there's the stack that *runs* the assistant, and there's the stash that *is* its knowledge — and the stash is something you can read, share, and own.
|
|
85
|
+
|
|
86
|
+
If you're building anything with a long-lived agent, it's worth asking which of your services are solving a genuinely separate problem, and which are just holding the agent's knowledge because nothing else would. The second kind are containers you might not need.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Your Agent Loads 47 Skills at Startup. It Needs Three.
|
|
3
|
+
cover_image: 'https://raw.githubusercontent.com/itlackey/akm/main/docs/posts/akm-logo-sized.webp'
|
|
4
|
+
series: akm-skills
|
|
5
|
+
description: 'The napkin math behind progressive disclosure, and how akm makes it work across every platform you use.'
|
|
6
|
+
tags:
|
|
7
|
+
- ai
|
|
8
|
+
- agents
|
|
9
|
+
- cli
|
|
10
|
+
- skills
|
|
11
|
+
published: true
|
|
12
|
+
id: 3426244
|
|
13
|
+
date: '2026-04-21T03:24:25Z'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
> This is a dated article from AKM's publishing archive. For current product behavior, see the
|
|
17
|
+
> [documentation index](https://github.com/itlackey/akm/blob/main/docs/README.md).
|
|
18
|
+
|
|
19
|
+
Quick recap if you're joining mid-series. In [part one](https://dev.to/itlackey/your-ai-agents-skill-list-is-getting-out-of-hand-32ck), I introduced the problem: your agent's skill list is growing faster than you can manage it, and dumping everything into context makes things worse, not better. [Part two](https://dev.to/itlackey/you-already-have-dozens-of-agent-skills-you-just-cant-find-them-bpo) showed how `akm` unifies your existing Claude Code, Cursor, and Codex assets into one searchable stash. [Part three](https://dev.to/itlackey/your-agents-memory-shouldnt-disappear-when-the-session-ends) covered persistent memory across sessions. [Part four](https://dev.to/itlackey/your-agent-doesnt-know-what-the-community-already-figured-out) connected your agent to community knowledge through a shared git stash.
|
|
20
|
+
|
|
21
|
+
This post zooms in on the pattern that makes all of that work: progressive disclosure. I've mentioned it in every post so far, but I haven't really shown the math or walked through what actually happens under the hood. Let's fix that.
|
|
22
|
+
|
|
23
|
+
## You're Paying for Context You Don't Use
|
|
24
|
+
|
|
25
|
+
Say you've got 47 skills across three platforms. That's not a crazy number — if you've been building with agents for a few months, you're probably there already. The average skill file runs about 1,000 tokens.
|
|
26
|
+
|
|
27
|
+
Now do the napkin math.
|
|
28
|
+
|
|
29
|
+
**Load everything at startup:** 47,000 tokens. Your agent sees all of it, whether the current task needs zero skills or five. Those extra 42,000 tokens aren't free. They degrade response quality, increase latency, and cost real money on metered APIs.
|
|
30
|
+
|
|
31
|
+
**Search first, load second:** A search query comes back with 20 results at ~100 tokens each. That's 2,000 tokens. Your agent reads the summaries, decides it needs one skill, and loads it: 1,000 tokens. Total: 3,000 tokens.
|
|
32
|
+
|
|
33
|
+
That's a 94% reduction. Not by being clever with compression or prompt engineering. Just by not loading stuff you don't need.
|
|
34
|
+
|
|
35
|
+
The math alone justifies the pattern. But the implementation is where it gets interesting.
|
|
36
|
+
|
|
37
|
+
## How It Actually Works
|
|
38
|
+
|
|
39
|
+
There are three steps. Search, load, and drill down. Here's what each one looks like.
|
|
40
|
+
|
|
41
|
+
### Search
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
akm search "deploy to staging"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This returns a ranked list of matching assets across all your sources. Each result has the asset type and name (`skill:deploy-staging`), where it came from, a description snippet, and a relevance score.
|
|
48
|
+
|
|
49
|
+
Total cost: ~100 tokens per result. Your agent scans this list and decides what's relevant. Most of the time, it needs one or two assets out of twenty results. The other eighteen never enter the context window.
|
|
50
|
+
|
|
51
|
+
### Load
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
akm show skill:deploy-staging
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Now the agent loads the full content of a single asset. The complete skill definition, instructions, examples — everything it needs to act. This is the only moment the full content enters the context window, and only for the assets the agent specifically chose.
|
|
58
|
+
|
|
59
|
+
Cost: ~500-1,500 tokens per asset, depending on complexity.
|
|
60
|
+
|
|
61
|
+
### Drill Down
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
akm show knowledge:api-guide toc
|
|
65
|
+
akm show knowledge:api-guide section "Authentication"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For knowledge assets — documentation, guides, API references — `akm` supports table-of-contents navigation. The agent can see the structure of a document and request a specific section instead of loading the whole thing.
|
|
69
|
+
|
|
70
|
+
A 10,000-token API guide becomes a 200-token table of contents, then a 1,500-token section load. The agent never sees the eight sections it doesn't need.
|
|
71
|
+
|
|
72
|
+
## It Works Across All Your Tools
|
|
73
|
+
|
|
74
|
+
Here's the part that most implementations miss. Claude Code does progressive disclosure for skills in `~/.claude/skills/`. That's great — for Claude Code. But what about your Cursor rules? Your Codex agents? Your team's shared Git repository of skills?
|
|
75
|
+
|
|
76
|
+
Every platform implements this pattern within its own silo. `akm` implements it *across* silos.
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
# One-time setup: point akm at everything
|
|
80
|
+
akm add ~/.claude/skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
81
|
+
akm add ~/.codex/skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
82
|
+
akm add .cursor/rules # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
83
|
+
akm add github:your-org/team-skills # doclint:ignore (historical — pre-0.9.0 command spelling)
|
|
84
|
+
|
|
85
|
+
# Every search hits all sources
|
|
86
|
+
akm search "database migration"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
That single search query returns ranked results from every source. The scoring pipeline treats local filesystem assets and remote Git-hosted assets fairly — no source gets artificially boosted or suppressed. The best match wins, regardless of where it lives.
|
|
90
|
+
|
|
91
|
+
## What a Real Session Looks Like
|
|
92
|
+
|
|
93
|
+
Your agent gets a task: "Deploy the staging environment with the new database migration."
|
|
94
|
+
|
|
95
|
+
1. **Search.** The agent runs `akm search "deploy staging database migration"`. Gets 15 results across three sources.
|
|
96
|
+
|
|
97
|
+
2. **Evaluate.** The agent reads the result summaries (~1,500 tokens). Identifies two relevant assets: `skill:deploy-staging` and `knowledge:migration-runbook`.
|
|
98
|
+
|
|
99
|
+
3. **Load.** The agent runs `akm show skill:deploy-staging` and `akm show knowledge:migration-runbook`. Loads ~2,500 tokens of directly relevant content.
|
|
100
|
+
|
|
101
|
+
4. **Act.** The agent executes the deployment using the loaded skill and references the runbook for the migration steps.
|
|
102
|
+
|
|
103
|
+
Total context cost: ~4,000 tokens. Without progressive disclosure, the agent would've loaded all 47 skills (47,000 tokens) and still might not have found the migration runbook because it lives in a different source than the deployment skill.
|
|
104
|
+
|
|
105
|
+
## Setting It Up
|
|
106
|
+
|
|
107
|
+
The agent integration is a two-line addition to your `AGENTS.md`:
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
## Agent Stash
|
|
111
|
+
|
|
112
|
+
Search for skills, commands, and knowledge using `akm search <query>`.
|
|
113
|
+
View full details with `akm show <ref>`.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
That's the entire interface. The agent knows how to search, knows how to load, and handles the progressive disclosure pattern on its own. No configuration, no routing rules, no platform-specific adapters.
|
|
117
|
+
|
|
118
|
+
## This Is What Makes Teams Work
|
|
119
|
+
|
|
120
|
+
Progressive disclosure becomes even more valuable at team scale. When your team has hundreds of shared skills plus each developer's personal collection, front-loading is physically impossible. Search-then-load isn't just an optimization — it's the only viable approach.
|
|
121
|
+
|
|
122
|
+
In the [next post](https://dev.to/itlackey), I'll cover how teams can share skills across a group while preserving individual customization. The progressive disclosure pattern is the foundation that makes team-scale skill management work.
|
|
123
|
+
|
|
124
|
+
If you want to see this in action, the repo is at [github.com/itlackey/akm](https://github.com/itlackey/akm). Point it at your skill directories, run a search, and see how much context you've been wasting.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
> **Note (2026-04-23):** This post has been updated to align with akm 0.6.0 terminology. Earlier wording referred to a *kit* and the *Kit Maker's Guide*; those terms have been renamed to *stash* and *Stash Maker's Guide* throughout. The pre-rename text is preserved in this repository's git history.
|