@vpxa/aikit 0.1.1
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/LICENSE +21 -0
- package/README.md +1207 -0
- package/bin/aikit.mjs +10 -0
- package/package.json +92 -0
- package/packages/aikit-client/dist/direct-client.d.ts +37 -0
- package/packages/aikit-client/dist/direct-client.js +1 -0
- package/packages/aikit-client/dist/index.d.ts +5 -0
- package/packages/aikit-client/dist/index.js +1 -0
- package/packages/aikit-client/dist/mcp-client.d.ts +19 -0
- package/packages/aikit-client/dist/mcp-client.js +4 -0
- package/packages/aikit-client/dist/parsers.d.ts +35 -0
- package/packages/aikit-client/dist/parsers.js +2 -0
- package/packages/aikit-client/dist/types.d.ts +62 -0
- package/packages/aikit-client/dist/types.js +1 -0
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/blast-radius-analyzer.js +6 -0
- package/packages/analyzers/dist/dependency-analyzer.d.ts +32 -0
- package/packages/analyzers/dist/dependency-analyzer.js +8 -0
- package/packages/analyzers/dist/diagram-generator.d.ts +16 -0
- package/packages/analyzers/dist/diagram-generator.js +2 -0
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +40 -0
- package/packages/analyzers/dist/entry-point-analyzer.js +4 -0
- package/packages/analyzers/dist/index.d.ts +12 -0
- package/packages/analyzers/dist/index.js +1 -0
- package/packages/analyzers/dist/knowledge-producer.d.ts +40 -0
- package/packages/analyzers/dist/knowledge-producer.js +26 -0
- package/packages/analyzers/dist/pattern-analyzer.d.ts +15 -0
- package/packages/analyzers/dist/pattern-analyzer.js +2 -0
- package/packages/analyzers/dist/regex-call-graph.d.ts +10 -0
- package/packages/analyzers/dist/regex-call-graph.js +1 -0
- package/packages/analyzers/dist/structure-analyzer.d.ts +19 -0
- package/packages/analyzers/dist/structure-analyzer.js +4 -0
- package/packages/analyzers/dist/symbol-analyzer.d.ts +14 -0
- package/packages/analyzers/dist/symbol-analyzer.js +9 -0
- package/packages/analyzers/dist/ts-call-graph.d.ts +29 -0
- package/packages/analyzers/dist/ts-call-graph.js +1 -0
- package/packages/analyzers/dist/types.d.ts +110 -0
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +25 -0
- package/packages/chunker/dist/call-graph-extractor.js +1 -0
- package/packages/chunker/dist/chunker-factory.d.ts +19 -0
- package/packages/chunker/dist/chunker-factory.js +1 -0
- package/packages/chunker/dist/chunker.interface.d.ts +13 -0
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +17 -0
- package/packages/chunker/dist/code-chunker.js +11 -0
- package/packages/chunker/dist/extractors/call-extractor.d.ts +24 -0
- package/packages/chunker/dist/extractors/call-extractor.js +1 -0
- package/packages/chunker/dist/extractors/entry-point-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/entry-point-detector.js +1 -0
- package/packages/chunker/dist/extractors/import-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/import-extractor.js +1 -0
- package/packages/chunker/dist/extractors/pattern-detector.d.ts +14 -0
- package/packages/chunker/dist/extractors/pattern-detector.js +1 -0
- package/packages/chunker/dist/extractors/scope-resolver.d.ts +26 -0
- package/packages/chunker/dist/extractors/scope-resolver.js +1 -0
- package/packages/chunker/dist/extractors/symbol-extractor.d.ts +14 -0
- package/packages/chunker/dist/extractors/symbol-extractor.js +3 -0
- package/packages/chunker/dist/extractors/types.d.ts +44 -0
- package/packages/chunker/dist/extractors/types.js +1 -0
- package/packages/chunker/dist/generic-chunker.d.ts +15 -0
- package/packages/chunker/dist/generic-chunker.js +5 -0
- package/packages/chunker/dist/index.d.ts +19 -0
- package/packages/chunker/dist/index.js +1 -0
- package/packages/chunker/dist/markdown-chunker.d.ts +17 -0
- package/packages/chunker/dist/markdown-chunker.js +3 -0
- package/packages/chunker/dist/wasm/languages.d.ts +18 -0
- package/packages/chunker/dist/wasm/languages.js +1 -0
- package/packages/chunker/dist/wasm/query-executor.d.ts +70 -0
- package/packages/chunker/dist/wasm/query-executor.js +1 -0
- package/packages/chunker/dist/wasm/runtime.d.ts +44 -0
- package/packages/chunker/dist/wasm/runtime.js +1 -0
- package/packages/chunker/dist/wasm/types.d.ts +84 -0
- package/packages/chunker/dist/wasm/types.js +1 -0
- package/packages/chunker/dist/wasm-chunker.d.ts +23 -0
- package/packages/chunker/dist/wasm-chunker.js +6 -0
- package/packages/chunker/src/queries/go/calls.scm +11 -0
- package/packages/chunker/src/queries/go/entry-points.scm +20 -0
- package/packages/chunker/src/queries/go/imports.scm +6 -0
- package/packages/chunker/src/queries/go/patterns.scm +25 -0
- package/packages/chunker/src/queries/go/symbols.scm +26 -0
- package/packages/chunker/src/queries/java/calls.scm +10 -0
- package/packages/chunker/src/queries/java/entry-points.scm +27 -0
- package/packages/chunker/src/queries/java/imports.scm +11 -0
- package/packages/chunker/src/queries/java/patterns.scm +27 -0
- package/packages/chunker/src/queries/java/symbols.scm +28 -0
- package/packages/chunker/src/queries/javascript/calls.scm +21 -0
- package/packages/chunker/src/queries/javascript/entry-points.scm +31 -0
- package/packages/chunker/src/queries/javascript/imports.scm +32 -0
- package/packages/chunker/src/queries/javascript/patterns.scm +28 -0
- package/packages/chunker/src/queries/javascript/symbols.scm +52 -0
- package/packages/chunker/src/queries/python/calls.scm +11 -0
- package/packages/chunker/src/queries/python/entry-points.scm +21 -0
- package/packages/chunker/src/queries/python/imports.scm +14 -0
- package/packages/chunker/src/queries/python/patterns.scm +25 -0
- package/packages/chunker/src/queries/python/symbols.scm +17 -0
- package/packages/chunker/src/queries/rust/calls.scm +20 -0
- package/packages/chunker/src/queries/rust/entry-points.scm +7 -0
- package/packages/chunker/src/queries/rust/imports.scm +26 -0
- package/packages/chunker/src/queries/rust/patterns.scm +18 -0
- package/packages/chunker/src/queries/rust/symbols.scm +73 -0
- package/packages/chunker/src/queries/typescript/calls.scm +21 -0
- package/packages/chunker/src/queries/typescript/entry-points.scm +48 -0
- package/packages/chunker/src/queries/typescript/imports.scm +35 -0
- package/packages/chunker/src/queries/typescript/patterns.scm +47 -0
- package/packages/chunker/src/queries/typescript/symbols.scm +79 -0
- package/packages/chunker/wasm/tree-sitter-c.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-cpp.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-go.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-java.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-javascript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-kotlin.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-php.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-python.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-ruby.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-rust.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-scala.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-swift.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-typescript.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter.wasm +0 -0
- package/packages/cli/dist/aikit-init.d.ts +54 -0
- package/packages/cli/dist/aikit-init.js +1 -0
- package/packages/cli/dist/commands/analyze.d.ts +6 -0
- package/packages/cli/dist/commands/analyze.js +2 -0
- package/packages/cli/dist/commands/context-cmds.d.ts +6 -0
- package/packages/cli/dist/commands/context-cmds.js +1 -0
- package/packages/cli/dist/commands/environment.d.ts +6 -0
- package/packages/cli/dist/commands/environment.js +1 -0
- package/packages/cli/dist/commands/execution.d.ts +6 -0
- package/packages/cli/dist/commands/execution.js +1 -0
- package/packages/cli/dist/commands/flow.d.ts +6 -0
- package/packages/cli/dist/commands/flow.js +1 -0
- package/packages/cli/dist/commands/graph.d.ts +6 -0
- package/packages/cli/dist/commands/graph.js +6 -0
- package/packages/cli/dist/commands/init/adapters.d.ts +28 -0
- package/packages/cli/dist/commands/init/adapters.js +1 -0
- package/packages/cli/dist/commands/init/config.d.ts +10 -0
- package/packages/cli/dist/commands/init/config.js +3 -0
- package/packages/cli/dist/commands/init/constants.d.ts +41 -0
- package/packages/cli/dist/commands/init/constants.js +1 -0
- package/packages/cli/dist/commands/init/curated.d.ts +7 -0
- package/packages/cli/dist/commands/init/curated.js +1 -0
- package/packages/cli/dist/commands/init/frontmatter.d.ts +54 -0
- package/packages/cli/dist/commands/init/frontmatter.js +2 -0
- package/packages/cli/dist/commands/init/index.d.ts +36 -0
- package/packages/cli/dist/commands/init/index.js +5 -0
- package/packages/cli/dist/commands/init/manifest.d.ts +71 -0
- package/packages/cli/dist/commands/init/manifest.js +1 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +46 -0
- package/packages/cli/dist/commands/init/scaffold.js +1 -0
- package/packages/cli/dist/commands/init/templates.d.ts +9 -0
- package/packages/cli/dist/commands/init/templates.js +194 -0
- package/packages/cli/dist/commands/init/user.d.ts +61 -0
- package/packages/cli/dist/commands/init/user.js +5 -0
- package/packages/cli/dist/commands/knowledge.d.ts +6 -0
- package/packages/cli/dist/commands/knowledge.js +1 -0
- package/packages/cli/dist/commands/search.d.ts +6 -0
- package/packages/cli/dist/commands/search.js +1 -0
- package/packages/cli/dist/commands/system.d.ts +6 -0
- package/packages/cli/dist/commands/system.js +4 -0
- package/packages/cli/dist/commands/upgrade.d.ts +6 -0
- package/packages/cli/dist/commands/upgrade.js +1 -0
- package/packages/cli/dist/commands/workspace.d.ts +6 -0
- package/packages/cli/dist/commands/workspace.js +1 -0
- package/packages/cli/dist/context.d.ts +7 -0
- package/packages/cli/dist/context.js +1 -0
- package/packages/cli/dist/helpers.d.ts +55 -0
- package/packages/cli/dist/helpers.js +5 -0
- package/packages/cli/dist/index.d.ts +10 -0
- package/packages/cli/dist/index.js +3 -0
- package/packages/cli/dist/types.d.ts +9 -0
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +74 -0
- package/packages/core/dist/constants.js +1 -0
- package/packages/core/dist/content-detector.d.ts +13 -0
- package/packages/core/dist/content-detector.js +1 -0
- package/packages/core/dist/errors.d.ts +20 -0
- package/packages/core/dist/errors.js +1 -0
- package/packages/core/dist/global-registry.d.ts +63 -0
- package/packages/core/dist/global-registry.js +1 -0
- package/packages/core/dist/index.d.ts +7 -0
- package/packages/core/dist/index.js +1 -0
- package/packages/core/dist/logger.d.ts +32 -0
- package/packages/core/dist/logger.js +1 -0
- package/packages/core/dist/types.d.ts +133 -0
- package/packages/core/dist/types.js +1 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js +21 -0
- package/packages/dashboard/dist/assets/index-BjA4YODs.js.map +1 -0
- package/packages/dashboard/dist/assets/index-CHpVij2M.css +1 -0
- package/packages/dashboard/dist/index.html +18 -0
- package/packages/elicitation/dist/build.d.ts +14 -0
- package/packages/elicitation/dist/build.js +1 -0
- package/packages/elicitation/dist/fields.d.ts +32 -0
- package/packages/elicitation/dist/fields.js +1 -0
- package/packages/elicitation/dist/index.d.ts +5 -0
- package/packages/elicitation/dist/index.js +1 -0
- package/packages/elicitation/dist/normalize.d.ts +15 -0
- package/packages/elicitation/dist/normalize.js +1 -0
- package/packages/elicitation/dist/types.d.ts +88 -0
- package/packages/elicitation/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +26 -0
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -0
- package/packages/embeddings/dist/index.js +1 -0
- package/packages/embeddings/dist/onnx-embedder.d.ts +22 -0
- package/packages/embeddings/dist/onnx-embedder.js +1 -0
- package/packages/enterprise-bridge/dist/cache.d.ts +28 -0
- package/packages/enterprise-bridge/dist/cache.js +1 -0
- package/packages/enterprise-bridge/dist/er-client.d.ts +37 -0
- package/packages/enterprise-bridge/dist/er-client.js +1 -0
- package/packages/enterprise-bridge/dist/evolution-collector.d.ts +62 -0
- package/packages/enterprise-bridge/dist/evolution-collector.js +1 -0
- package/packages/enterprise-bridge/dist/index.d.ts +8 -0
- package/packages/enterprise-bridge/dist/index.js +1 -0
- package/packages/enterprise-bridge/dist/policy-store.d.ts +45 -0
- package/packages/enterprise-bridge/dist/policy-store.js +1 -0
- package/packages/enterprise-bridge/dist/push-adapter.d.ts +23 -0
- package/packages/enterprise-bridge/dist/push-adapter.js +1 -0
- package/packages/enterprise-bridge/dist/result-merger.d.ts +14 -0
- package/packages/enterprise-bridge/dist/result-merger.js +1 -0
- package/packages/enterprise-bridge/dist/types.d.ts +81 -0
- package/packages/enterprise-bridge/dist/types.js +1 -0
- package/packages/flows/dist/adapters/claude-plugin.d.ts +12 -0
- package/packages/flows/dist/adapters/claude-plugin.js +1 -0
- package/packages/flows/dist/adapters/copilot.d.ts +10 -0
- package/packages/flows/dist/adapters/copilot.js +1 -0
- package/packages/flows/dist/adapters/index.d.ts +11 -0
- package/packages/flows/dist/adapters/index.js +1 -0
- package/packages/flows/dist/adapters/native.d.ts +10 -0
- package/packages/flows/dist/adapters/native.js +1 -0
- package/packages/flows/dist/builtins.d.ts +16 -0
- package/packages/flows/dist/builtins.js +1 -0
- package/packages/flows/dist/foundation.d.ts +20 -0
- package/packages/flows/dist/foundation.js +11 -0
- package/packages/flows/dist/git.d.ts +34 -0
- package/packages/flows/dist/git.js +1 -0
- package/packages/flows/dist/index.d.ts +12 -0
- package/packages/flows/dist/index.js +1 -0
- package/packages/flows/dist/loader.d.ts +13 -0
- package/packages/flows/dist/loader.js +2 -0
- package/packages/flows/dist/registry.d.ts +23 -0
- package/packages/flows/dist/registry.js +1 -0
- package/packages/flows/dist/state-machine.d.ts +23 -0
- package/packages/flows/dist/state-machine.js +1 -0
- package/packages/flows/dist/symlinks.d.ts +17 -0
- package/packages/flows/dist/symlinks.js +1 -0
- package/packages/flows/dist/types.d.ts +112 -0
- package/packages/flows/dist/types.js +1 -0
- package/packages/indexer/dist/file-hasher.d.ts +13 -0
- package/packages/indexer/dist/file-hasher.js +1 -0
- package/packages/indexer/dist/filesystem-crawler.d.ts +29 -0
- package/packages/indexer/dist/filesystem-crawler.js +1 -0
- package/packages/indexer/dist/graph-extractor.d.ts +18 -0
- package/packages/indexer/dist/graph-extractor.js +1 -0
- package/packages/indexer/dist/hash-cache.d.ts +24 -0
- package/packages/indexer/dist/hash-cache.js +1 -0
- package/packages/indexer/dist/incremental-indexer.d.ts +56 -0
- package/packages/indexer/dist/incremental-indexer.js +1 -0
- package/packages/indexer/dist/index.d.ts +6 -0
- package/packages/indexer/dist/index.js +1 -0
- package/packages/present/dist/index.html +709 -0
- package/packages/server/dist/api.d.ts +3 -0
- package/packages/server/dist/api.js +1 -0
- package/packages/server/dist/auto-gc.d.ts +30 -0
- package/packages/server/dist/auto-gc.js +1 -0
- package/packages/server/dist/completions.d.ts +14 -0
- package/packages/server/dist/completions.js +1 -0
- package/packages/server/dist/config.d.ts +14 -0
- package/packages/server/dist/config.js +1 -0
- package/packages/server/dist/cross-workspace.d.ts +43 -0
- package/packages/server/dist/cross-workspace.js +1 -0
- package/packages/server/dist/curated-manager.d.ts +92 -0
- package/packages/server/dist/curated-manager.js +5 -0
- package/packages/server/dist/dashboard-static.d.ts +27 -0
- package/packages/server/dist/dashboard-static.js +1 -0
- package/packages/server/dist/elicitor.d.ts +18 -0
- package/packages/server/dist/elicitor.js +1 -0
- package/packages/server/dist/index.d.ts +1 -0
- package/packages/server/dist/index.js +1 -0
- package/packages/server/dist/mcp-logging.d.ts +11 -0
- package/packages/server/dist/mcp-logging.js +1 -0
- package/packages/server/dist/output-schemas.d.ts +242 -0
- package/packages/server/dist/output-schemas.js +1 -0
- package/packages/server/dist/prompts.d.ts +13 -0
- package/packages/server/dist/prompts.js +13 -0
- package/packages/server/dist/replay-interceptor.d.ts +23 -0
- package/packages/server/dist/replay-interceptor.js +1 -0
- package/packages/server/dist/resource-links.d.ts +34 -0
- package/packages/server/dist/resource-links.js +1 -0
- package/packages/server/dist/resources/curated-resources.d.ts +13 -0
- package/packages/server/dist/resources/curated-resources.js +2 -0
- package/packages/server/dist/resources/resource-notifier.d.ts +45 -0
- package/packages/server/dist/resources/resource-notifier.js +1 -0
- package/packages/server/dist/resources/resources.d.ts +8 -0
- package/packages/server/dist/resources/resources.js +2 -0
- package/packages/server/dist/sampling.d.ts +41 -0
- package/packages/server/dist/sampling.js +2 -0
- package/packages/server/dist/server.d.ts +47 -0
- package/packages/server/dist/server.js +3 -0
- package/packages/server/dist/structured-content-guard.d.ts +26 -0
- package/packages/server/dist/structured-content-guard.js +1 -0
- package/packages/server/dist/task-manager.d.ts +40 -0
- package/packages/server/dist/task-manager.js +1 -0
- package/packages/server/dist/tool-metadata.d.ts +38 -0
- package/packages/server/dist/tool-metadata.js +1 -0
- package/packages/server/dist/tool-prefix.d.ts +12 -0
- package/packages/server/dist/tool-prefix.js +1 -0
- package/packages/server/dist/tools/analyze.tools.d.ts +14 -0
- package/packages/server/dist/tools/analyze.tools.js +8 -0
- package/packages/server/dist/tools/audit.tool.d.ts +8 -0
- package/packages/server/dist/tools/audit.tool.js +1 -0
- package/packages/server/dist/tools/brainstorm.tool.d.ts +7 -0
- package/packages/server/dist/tools/brainstorm.tool.js +9 -0
- package/packages/server/dist/tools/bridge.tools.d.ts +34 -0
- package/packages/server/dist/tools/bridge.tools.js +15 -0
- package/packages/server/dist/tools/context.tools.d.ts +15 -0
- package/packages/server/dist/tools/context.tools.js +10 -0
- package/packages/server/dist/tools/evolution.tools.d.ts +7 -0
- package/packages/server/dist/tools/evolution.tools.js +5 -0
- package/packages/server/dist/tools/execution.tools.d.ts +14 -0
- package/packages/server/dist/tools/execution.tools.js +4 -0
- package/packages/server/dist/tools/flow.tools.d.ts +7 -0
- package/packages/server/dist/tools/flow.tools.js +1 -0
- package/packages/server/dist/tools/forge.tools.d.ts +13 -0
- package/packages/server/dist/tools/forge.tools.js +10 -0
- package/packages/server/dist/tools/forget.tool.d.ts +8 -0
- package/packages/server/dist/tools/forget.tool.js +1 -0
- package/packages/server/dist/tools/graph.tool.d.ts +7 -0
- package/packages/server/dist/tools/graph.tool.js +5 -0
- package/packages/server/dist/tools/infra.tools.d.ts +10 -0
- package/packages/server/dist/tools/infra.tools.js +5 -0
- package/packages/server/dist/tools/list.tool.d.ts +7 -0
- package/packages/server/dist/tools/list.tool.js +2 -0
- package/packages/server/dist/tools/lookup.tool.d.ts +7 -0
- package/packages/server/dist/tools/lookup.tool.js +3 -0
- package/packages/server/dist/tools/manipulation.tools.d.ts +10 -0
- package/packages/server/dist/tools/manipulation.tools.js +4 -0
- package/packages/server/dist/tools/onboard.tool.d.ts +9 -0
- package/packages/server/dist/tools/onboard.tool.js +2 -0
- package/packages/server/dist/tools/persistence.tools.d.ts +10 -0
- package/packages/server/dist/tools/persistence.tools.js +5 -0
- package/packages/server/dist/tools/policy.tools.d.ts +7 -0
- package/packages/server/dist/tools/policy.tools.js +3 -0
- package/packages/server/dist/tools/present/browser.d.ts +4 -0
- package/packages/server/dist/tools/present/browser.js +93 -0
- package/packages/server/dist/tools/present/helpers.d.ts +18 -0
- package/packages/server/dist/tools/present/helpers.js +1 -0
- package/packages/server/dist/tools/present/html.d.ts +18 -0
- package/packages/server/dist/tools/present/html.js +5 -0
- package/packages/server/dist/tools/present/index.d.ts +2 -0
- package/packages/server/dist/tools/present/index.js +1 -0
- package/packages/server/dist/tools/present/markdown.d.ts +17 -0
- package/packages/server/dist/tools/present/markdown.js +8 -0
- package/packages/server/dist/tools/present/templates.d.ts +14 -0
- package/packages/server/dist/tools/present/templates.js +472 -0
- package/packages/server/dist/tools/present/tool.d.ts +27 -0
- package/packages/server/dist/tools/present/tool.js +19 -0
- package/packages/server/dist/tools/present-blocks.d.ts +46 -0
- package/packages/server/dist/tools/present-blocks.js +27 -0
- package/packages/server/dist/tools/present-charts.d.ts +31 -0
- package/packages/server/dist/tools/present-charts.js +34 -0
- package/packages/server/dist/tools/present-theme.d.ts +14 -0
- package/packages/server/dist/tools/present-theme.js +395 -0
- package/packages/server/dist/tools/present-utils.d.ts +11 -0
- package/packages/server/dist/tools/present-utils.js +1 -0
- package/packages/server/dist/tools/present.tool.d.ts +2 -0
- package/packages/server/dist/tools/present.tool.js +1 -0
- package/packages/server/dist/tools/produce.tool.d.ts +7 -0
- package/packages/server/dist/tools/produce.tool.js +4 -0
- package/packages/server/dist/tools/read.tool.d.ts +7 -0
- package/packages/server/dist/tools/read.tool.js +2 -0
- package/packages/server/dist/tools/reindex.tool.d.ts +11 -0
- package/packages/server/dist/tools/reindex.tool.js +3 -0
- package/packages/server/dist/tools/remember.tool.d.ts +9 -0
- package/packages/server/dist/tools/remember.tool.js +4 -0
- package/packages/server/dist/tools/replay.tool.d.ts +6 -0
- package/packages/server/dist/tools/replay.tool.js +3 -0
- package/packages/server/dist/tools/restore.tool.d.ts +6 -0
- package/packages/server/dist/tools/restore.tool.js +3 -0
- package/packages/server/dist/tools/search.tool.d.ts +11 -0
- package/packages/server/dist/tools/search.tool.js +10 -0
- package/packages/server/dist/tools/status.tool.d.ts +20 -0
- package/packages/server/dist/tools/status.tool.js +3 -0
- package/packages/server/dist/tools/update.tool.d.ts +8 -0
- package/packages/server/dist/tools/update.tool.js +1 -0
- package/packages/server/dist/tools/utility.tools.d.ts +15 -0
- package/packages/server/dist/tools/utility.tools.js +13 -0
- package/packages/server/dist/version-check.d.ts +32 -0
- package/packages/server/dist/version-check.js +1 -0
- package/packages/store/dist/graph-store.interface.d.ts +118 -0
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -0
- package/packages/store/dist/index.js +1 -0
- package/packages/store/dist/lance-store.d.ts +44 -0
- package/packages/store/dist/lance-store.js +1 -0
- package/packages/store/dist/sqlite-graph-store.d.ts +45 -0
- package/packages/store/dist/sqlite-graph-store.js +58 -0
- package/packages/store/dist/store-factory.d.ts +12 -0
- package/packages/store/dist/store-factory.js +1 -0
- package/packages/store/dist/store.interface.d.ts +54 -0
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/audit.d.ts +65 -0
- package/packages/tools/dist/audit.js +6 -0
- package/packages/tools/dist/batch.d.ts +23 -0
- package/packages/tools/dist/batch.js +1 -0
- package/packages/tools/dist/changelog.d.ts +36 -0
- package/packages/tools/dist/changelog.js +2 -0
- package/packages/tools/dist/check.d.ts +48 -0
- package/packages/tools/dist/check.js +2 -0
- package/packages/tools/dist/checkpoint.d.ts +19 -0
- package/packages/tools/dist/checkpoint.js +1 -0
- package/packages/tools/dist/codemod.d.ts +39 -0
- package/packages/tools/dist/codemod.js +2 -0
- package/packages/tools/dist/compact.d.ts +41 -0
- package/packages/tools/dist/compact.js +3 -0
- package/packages/tools/dist/config-extractor.d.ts +9 -0
- package/packages/tools/dist/config-extractor.js +7 -0
- package/packages/tools/dist/data-transform.d.ts +12 -0
- package/packages/tools/dist/data-transform.js +1 -0
- package/packages/tools/dist/dead-symbols.d.ts +28 -0
- package/packages/tools/dist/dead-symbols.js +2 -0
- package/packages/tools/dist/delegate.d.ts +36 -0
- package/packages/tools/dist/delegate.js +1 -0
- package/packages/tools/dist/diagram-builder.d.ts +9 -0
- package/packages/tools/dist/diagram-builder.js +9 -0
- package/packages/tools/dist/diff-parse.d.ts +28 -0
- package/packages/tools/dist/diff-parse.js +3 -0
- package/packages/tools/dist/digest.d.ts +50 -0
- package/packages/tools/dist/digest.js +6 -0
- package/packages/tools/dist/dogfood-log.d.ts +49 -0
- package/packages/tools/dist/dogfood-log.js +2 -0
- package/packages/tools/dist/encode.d.ts +16 -0
- package/packages/tools/dist/encode.js +1 -0
- package/packages/tools/dist/env-info.d.ts +30 -0
- package/packages/tools/dist/env-info.js +1 -0
- package/packages/tools/dist/eval.d.ts +15 -0
- package/packages/tools/dist/eval.js +2 -0
- package/packages/tools/dist/evidence-map.d.ts +92 -0
- package/packages/tools/dist/evidence-map.js +2 -0
- package/packages/tools/dist/file-cache.d.ts +41 -0
- package/packages/tools/dist/file-cache.js +3 -0
- package/packages/tools/dist/file-summary.d.ts +52 -0
- package/packages/tools/dist/file-summary.js +2 -0
- package/packages/tools/dist/file-walk.d.ts +6 -0
- package/packages/tools/dist/file-walk.js +1 -0
- package/packages/tools/dist/find-examples.d.ts +29 -0
- package/packages/tools/dist/find-examples.js +3 -0
- package/packages/tools/dist/find.d.ts +49 -0
- package/packages/tools/dist/find.js +1 -0
- package/packages/tools/dist/forge-classify.d.ts +44 -0
- package/packages/tools/dist/forge-classify.js +2 -0
- package/packages/tools/dist/forge-ground.d.ts +61 -0
- package/packages/tools/dist/forge-ground.js +1 -0
- package/packages/tools/dist/git-context.d.ts +25 -0
- package/packages/tools/dist/git-context.js +3 -0
- package/packages/tools/dist/graph-query.d.ts +86 -0
- package/packages/tools/dist/graph-query.js +1 -0
- package/packages/tools/dist/guide.d.ts +25 -0
- package/packages/tools/dist/guide.js +1 -0
- package/packages/tools/dist/health.d.ts +16 -0
- package/packages/tools/dist/health.js +2 -0
- package/packages/tools/dist/http-request.d.ts +25 -0
- package/packages/tools/dist/http-request.js +1 -0
- package/packages/tools/dist/index.d.ts +57 -0
- package/packages/tools/dist/index.js +1 -0
- package/packages/tools/dist/lane.d.ts +41 -0
- package/packages/tools/dist/lane.js +6 -0
- package/packages/tools/dist/measure.d.ts +42 -0
- package/packages/tools/dist/measure.js +2 -0
- package/packages/tools/dist/onboard-utils.d.ts +12 -0
- package/packages/tools/dist/onboard-utils.js +1 -0
- package/packages/tools/dist/onboard.d.ts +50 -0
- package/packages/tools/dist/onboard.js +18 -0
- package/packages/tools/dist/parse-output.d.ts +82 -0
- package/packages/tools/dist/parse-output.js +2 -0
- package/packages/tools/dist/path-resolver.d.ts +14 -0
- package/packages/tools/dist/path-resolver.js +1 -0
- package/packages/tools/dist/process-manager.d.ts +20 -0
- package/packages/tools/dist/process-manager.js +1 -0
- package/packages/tools/dist/queue.d.ts +40 -0
- package/packages/tools/dist/queue.js +1 -0
- package/packages/tools/dist/regex-test.d.ts +33 -0
- package/packages/tools/dist/regex-test.js +1 -0
- package/packages/tools/dist/regex-utils.d.ts +8 -0
- package/packages/tools/dist/regex-utils.js +1 -0
- package/packages/tools/dist/rename.d.ts +31 -0
- package/packages/tools/dist/rename.js +2 -0
- package/packages/tools/dist/replay.d.ts +59 -0
- package/packages/tools/dist/replay.js +4 -0
- package/packages/tools/dist/response-envelope.d.ts +43 -0
- package/packages/tools/dist/response-envelope.js +1 -0
- package/packages/tools/dist/restore-points.d.ts +22 -0
- package/packages/tools/dist/restore-points.js +1 -0
- package/packages/tools/dist/schema-validate.d.ts +25 -0
- package/packages/tools/dist/schema-validate.js +1 -0
- package/packages/tools/dist/scope-map.d.ts +51 -0
- package/packages/tools/dist/scope-map.js +1 -0
- package/packages/tools/dist/snippet.d.ts +35 -0
- package/packages/tools/dist/snippet.js +1 -0
- package/packages/tools/dist/stash.d.ts +14 -0
- package/packages/tools/dist/stash.js +1 -0
- package/packages/tools/dist/stratum-card.d.ts +30 -0
- package/packages/tools/dist/stratum-card.js +4 -0
- package/packages/tools/dist/symbol.d.ts +45 -0
- package/packages/tools/dist/symbol.js +3 -0
- package/packages/tools/dist/synthesis-engine.d.ts +13 -0
- package/packages/tools/dist/synthesis-engine.js +6 -0
- package/packages/tools/dist/test-run.d.ts +28 -0
- package/packages/tools/dist/test-run.js +2 -0
- package/packages/tools/dist/text-utils.d.ts +24 -0
- package/packages/tools/dist/text-utils.js +2 -0
- package/packages/tools/dist/time-utils.d.ts +20 -0
- package/packages/tools/dist/time-utils.js +1 -0
- package/packages/tools/dist/trace.d.ts +29 -0
- package/packages/tools/dist/trace.js +2 -0
- package/packages/tools/dist/truncation.d.ts +33 -0
- package/packages/tools/dist/truncation.js +7 -0
- package/packages/tools/dist/watch.d.ts +32 -0
- package/packages/tools/dist/watch.js +1 -0
- package/packages/tools/dist/web-fetch.d.ts +47 -0
- package/packages/tools/dist/web-fetch.js +8 -0
- package/packages/tools/dist/web-search.d.ts +25 -0
- package/packages/tools/dist/web-search.js +1 -0
- package/packages/tools/dist/workset.d.ts +47 -0
- package/packages/tools/dist/workset.js +1 -0
- package/packages/tui/dist/App-DU2KEylW.js +2 -0
- package/packages/tui/dist/App.d.ts +13 -0
- package/packages/tui/dist/App.js +2 -0
- package/packages/tui/dist/CuratedPanel-BIamXLNy.js +2 -0
- package/packages/tui/dist/LogPanel-Bo8a8QXB.js +3 -0
- package/packages/tui/dist/SearchPanel-CpJGczAc.js +2 -0
- package/packages/tui/dist/StatusPanel-BAbUxyqQ.js +2 -0
- package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
- package/packages/tui/dist/devtools-DMOZMn70.js +7 -0
- package/packages/tui/dist/hooks/useKBClient.d.ts +9 -0
- package/packages/tui/dist/hooks/useKBClient.js +2 -0
- package/packages/tui/dist/hooks/usePolling.d.ts +8 -0
- package/packages/tui/dist/hooks/usePolling.js +2 -0
- package/packages/tui/dist/index-BXafekwr.d.ts +64 -0
- package/packages/tui/dist/index.d.ts +7 -0
- package/packages/tui/dist/index.js +2 -0
- package/packages/tui/dist/jsx-runtime-y6Gdq5PZ.js +294 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +7 -0
- package/packages/tui/dist/panels/CuratedPanel.js +2 -0
- package/packages/tui/dist/panels/LogPanel.d.ts +7 -0
- package/packages/tui/dist/panels/LogPanel.js +2 -0
- package/packages/tui/dist/panels/SearchPanel.d.ts +7 -0
- package/packages/tui/dist/panels/SearchPanel.js +2 -0
- package/packages/tui/dist/panels/StatusPanel.d.ts +7 -0
- package/packages/tui/dist/panels/StatusPanel.js +2 -0
- package/packages/tui/dist/react-D__J1GQe.js +24 -0
- package/packages/tui/dist/useKBClient-C35iA4uG.js +2 -0
- package/packages/tui/dist/usePolling-BbjnRWgx.js +2 -0
- package/scaffold/README.md +192 -0
- package/scaffold/adapters/claude-code.mjs +56 -0
- package/scaffold/adapters/copilot.mjs +270 -0
- package/scaffold/definitions/agents.mjs +189 -0
- package/scaffold/definitions/bodies.mjs +487 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +56 -0
- package/scaffold/definitions/plugins.mjs +38 -0
- package/scaffold/definitions/prompts.mjs +145 -0
- package/scaffold/definitions/protocols.mjs +679 -0
- package/scaffold/definitions/tools.mjs +229 -0
- package/scaffold/flows/aikit-advanced/flow.json +60 -0
- package/scaffold/flows/aikit-advanced/skills/execute/SKILL.md +124 -0
- package/scaffold/flows/aikit-advanced/skills/plan/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/spec/SKILL.md +100 -0
- package/scaffold/flows/aikit-advanced/skills/task/SKILL.md +99 -0
- package/scaffold/flows/aikit-advanced/skills/verify/SKILL.md +122 -0
- package/scaffold/flows/aikit-basic/flow.json +36 -0
- package/scaffold/flows/aikit-basic/skills/assess/SKILL.md +82 -0
- package/scaffold/flows/aikit-basic/skills/implement/SKILL.md +105 -0
- package/scaffold/flows/aikit-basic/skills/verify/SKILL.md +96 -0
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +21 -0
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +21 -0
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +12 -0
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +12 -0
- package/scaffold/general/agents/Debugger.agent.md +34 -0
- package/scaffold/general/agents/Documenter.agent.md +53 -0
- package/scaffold/general/agents/Explorer.agent.md +63 -0
- package/scaffold/general/agents/Frontend.agent.md +29 -0
- package/scaffold/general/agents/Implementer.agent.md +33 -0
- package/scaffold/general/agents/Orchestrator.agent.md +149 -0
- package/scaffold/general/agents/Planner.agent.md +79 -0
- package/scaffold/general/agents/README.md +57 -0
- package/scaffold/general/agents/Refactor.agent.md +36 -0
- package/scaffold/general/agents/Researcher-Alpha.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Beta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Delta.agent.md +20 -0
- package/scaffold/general/agents/Researcher-Gamma.agent.md +20 -0
- package/scaffold/general/agents/Security.agent.md +55 -0
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +60 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +262 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +64 -0
- package/scaffold/general/agents/_shared/decision-protocol.md +27 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +90 -0
- package/scaffold/general/agents/_shared/researcher-base.md +101 -0
- package/scaffold/general/agents/templates/adr-template.md +28 -0
- package/scaffold/general/agents/templates/execution-state.md +26 -0
- package/scaffold/general/prompts/ask.prompt.md +21 -0
- package/scaffold/general/prompts/debug.prompt.md +25 -0
- package/scaffold/general/prompts/design.prompt.md +23 -0
- package/scaffold/general/prompts/implement.prompt.md +26 -0
- package/scaffold/general/prompts/plan.prompt.md +25 -0
- package/scaffold/general/prompts/review.prompt.md +32 -0
- package/scaffold/general/skills/adr-skill/SKILL.md +329 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-madr.md +89 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-readme.md +20 -0
- package/scaffold/general/skills/adr-skill/assets/templates/adr-simple.md +46 -0
- package/scaffold/general/skills/adr-skill/references/adr-conventions.md +95 -0
- package/scaffold/general/skills/adr-skill/references/examples.md +193 -0
- package/scaffold/general/skills/adr-skill/references/review-checklist.md +77 -0
- package/scaffold/general/skills/adr-skill/references/template-variants.md +52 -0
- package/scaffold/general/skills/adr-skill/scripts/bootstrap_adr.js +259 -0
- package/scaffold/general/skills/adr-skill/scripts/new_adr.js +391 -0
- package/scaffold/general/skills/adr-skill/scripts/set_adr_status.js +169 -0
- package/scaffold/general/skills/aikit/SKILL.md +521 -0
- package/scaffold/general/skills/brainstorming/SKILL.md +259 -0
- package/scaffold/general/skills/brainstorming/scripts/frame-template.html +365 -0
- package/scaffold/general/skills/brainstorming/scripts/helper.js +216 -0
- package/scaffold/general/skills/brainstorming/scripts/server.cjs +9 -0
- package/scaffold/general/skills/brainstorming/scripts/server.src.cjs +249 -0
- package/scaffold/general/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/scaffold/general/skills/brainstorming/visual-companion.md +430 -0
- package/scaffold/general/skills/c4-architecture/SKILL.md +295 -0
- package/scaffold/general/skills/c4-architecture/references/advanced-patterns.md +552 -0
- package/scaffold/general/skills/c4-architecture/references/c4-syntax.md +492 -0
- package/scaffold/general/skills/c4-architecture/references/common-mistakes.md +437 -0
- package/scaffold/general/skills/lesson-learned/SKILL.md +105 -0
- package/scaffold/general/skills/lesson-learned/references/anti-patterns.md +55 -0
- package/scaffold/general/skills/lesson-learned/references/se-principles.md +109 -0
- package/scaffold/general/skills/multi-agents-development/SKILL.md +435 -0
- package/scaffold/general/skills/multi-agents-development/architecture-review-prompt.md +81 -0
- package/scaffold/general/skills/multi-agents-development/code-quality-review-prompt.md +91 -0
- package/scaffold/general/skills/multi-agents-development/implementer-prompt.md +93 -0
- package/scaffold/general/skills/multi-agents-development/parallel-dispatch-example.md +167 -0
- package/scaffold/general/skills/multi-agents-development/spec-review-prompt.md +81 -0
- package/scaffold/general/skills/present/SKILL.md +424 -0
- package/scaffold/general/skills/requirements-clarity/SKILL.md +324 -0
- package/scaffold/general/skills/session-handoff/SKILL.md +189 -0
- package/scaffold/general/skills/session-handoff/references/handoff-template.md +139 -0
- package/scaffold/general/skills/session-handoff/references/resume-checklist.md +80 -0
- package/scaffold/general/skills/session-handoff/scripts/check_staleness.js +269 -0
- package/scaffold/general/skills/session-handoff/scripts/create_handoff.js +299 -0
- package/scaffold/general/skills/session-handoff/scripts/list_handoffs.js +113 -0
- package/scaffold/general/skills/session-handoff/scripts/validate_handoff.js +241 -0
- package/scaffold/generate.mjs +82 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Update an ADR's status in-place.
|
|
4
|
+
*
|
|
5
|
+
* Supported patterns:
|
|
6
|
+
* - Bullet status: "- Status: proposed" or "* Status: proposed"
|
|
7
|
+
* - Nygard-style section: "## Status" followed by a single-line status value
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const fs = require('node:fs');
|
|
11
|
+
const path = require('node:path');
|
|
12
|
+
|
|
13
|
+
function die(msg) {
|
|
14
|
+
process.stderr.write(`${msg}\n`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function toPosix(p) {
|
|
19
|
+
return p.split(path.sep).join('/');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function parseArgs(argv) {
|
|
23
|
+
if (argv.includes('--help') || argv.includes('-h')) {
|
|
24
|
+
process.stdout.write(
|
|
25
|
+
[
|
|
26
|
+
'Usage: node set_adr_status.js <path> --status <value> [--json]',
|
|
27
|
+
'',
|
|
28
|
+
'Example:',
|
|
29
|
+
' node set_adr_status.js adr/2025-06-15-foo.md --status accepted',
|
|
30
|
+
'',
|
|
31
|
+
].join('\n'),
|
|
32
|
+
);
|
|
33
|
+
process.exit(0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (argv.length < 3) die('Missing <path>');
|
|
37
|
+
const file = argv[2];
|
|
38
|
+
|
|
39
|
+
let status = null;
|
|
40
|
+
let json = false;
|
|
41
|
+
for (let i = 3; i < argv.length; i++) {
|
|
42
|
+
const a = argv[i];
|
|
43
|
+
if (a === '--status') {
|
|
44
|
+
if (i + 1 >= argv.length) die('Missing value for --status');
|
|
45
|
+
status = argv[++i];
|
|
46
|
+
} else if (a === '--json') {
|
|
47
|
+
json = true;
|
|
48
|
+
} else {
|
|
49
|
+
die(`Unknown arg: ${a}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (!status) die('Missing required --status');
|
|
53
|
+
return { file, status: String(status).trim(), json };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function setYamlFrontMatterStatus(lines, newStatus) {
|
|
57
|
+
// YAML front matter: starts with '---', ends with next '---'
|
|
58
|
+
if (lines.length < 2 || lines[0].trim() !== '---') return { lines, changed: false };
|
|
59
|
+
|
|
60
|
+
let changed = false;
|
|
61
|
+
const out = [];
|
|
62
|
+
let inFrontMatter = true;
|
|
63
|
+
let passedOpening = false;
|
|
64
|
+
|
|
65
|
+
for (let i = 0; i < lines.length; i++) {
|
|
66
|
+
const line = lines[i];
|
|
67
|
+
|
|
68
|
+
if (i === 0 && line.trim() === '---') {
|
|
69
|
+
passedOpening = true;
|
|
70
|
+
out.push(line);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (passedOpening && inFrontMatter && line.trim() === '---') {
|
|
75
|
+
inFrontMatter = false;
|
|
76
|
+
out.push(line);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (passedOpening && inFrontMatter && /^status\s*:/.test(line)) {
|
|
81
|
+
out.push(`status: ${newStatus}`);
|
|
82
|
+
changed = true;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
out.push(line);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return { lines: out, changed };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function setBulletStatus(lines, newStatus) {
|
|
93
|
+
let changed = false;
|
|
94
|
+
const out = lines.map((line) => {
|
|
95
|
+
const m = line.match(/^([*-])\s*Status:\s*(.*)$/);
|
|
96
|
+
if (!m) return line;
|
|
97
|
+
changed = true;
|
|
98
|
+
return `${m[1]} Status: ${newStatus}`;
|
|
99
|
+
});
|
|
100
|
+
return { lines: out, changed };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function setSectionStatus(lines, newStatus) {
|
|
104
|
+
let changed = false;
|
|
105
|
+
const out = [];
|
|
106
|
+
|
|
107
|
+
for (let i = 0; i < lines.length; i++) {
|
|
108
|
+
out.push(lines[i]);
|
|
109
|
+
|
|
110
|
+
if (!/^##\s+Status\s*$/.test(lines[i])) continue;
|
|
111
|
+
|
|
112
|
+
// Replace next non-empty, non-heading line. If not found, insert.
|
|
113
|
+
let j = i + 1;
|
|
114
|
+
while (j < lines.length && lines[j].trim() === '') {
|
|
115
|
+
out.push(lines[j]);
|
|
116
|
+
j++;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (j < lines.length && !/^##\s+/.test(lines[j])) {
|
|
120
|
+
out.push(newStatus);
|
|
121
|
+
changed = true;
|
|
122
|
+
i = j; // skip original status line
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
out.push(newStatus);
|
|
127
|
+
changed = true;
|
|
128
|
+
i = j - 1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return { lines: out, changed };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function main() {
|
|
135
|
+
const args = parseArgs(process.argv);
|
|
136
|
+
const filePath = path.resolve(process.cwd(), args.file);
|
|
137
|
+
if (!fs.existsSync(filePath)) die(`File not found: ${filePath}`);
|
|
138
|
+
|
|
139
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
140
|
+
const hadTrailingNewline = content.endsWith('\n');
|
|
141
|
+
const lines = content.replace(/\r\n/g, '\n').split('\n');
|
|
142
|
+
|
|
143
|
+
let r = setYamlFrontMatterStatus(lines, args.status);
|
|
144
|
+
if (!r.changed) r = setBulletStatus(lines, args.status);
|
|
145
|
+
if (!r.changed) r = setSectionStatus(lines, args.status);
|
|
146
|
+
if (!r.changed) {
|
|
147
|
+
die(
|
|
148
|
+
"Could not find a status to update. Expected YAML front matter 'status:', '- Status:'/'* Status:', or a '## Status' section.",
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const newContent = r.lines.join('\n') + (hadTrailingNewline ? '\n' : '');
|
|
153
|
+
fs.writeFileSync(filePath, newContent, 'utf8');
|
|
154
|
+
|
|
155
|
+
if (args.json) {
|
|
156
|
+
process.stdout.write(
|
|
157
|
+
`${JSON.stringify({
|
|
158
|
+
filePath,
|
|
159
|
+
fileRelPath: toPosix(path.relative(process.cwd(), filePath)),
|
|
160
|
+
status: args.status,
|
|
161
|
+
changed: true,
|
|
162
|
+
})}\n`,
|
|
163
|
+
);
|
|
164
|
+
} else {
|
|
165
|
+
process.stdout.write(`${filePath}\n`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
main();
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aikit
|
|
3
|
+
description: "Use the @vpxa/aikit Knowledge Base MCP server for codebase search, analysis, and persistent memory. Load this skill when using aikit_search, aikit_remember, aikit_analyze_*, or any aikit_* tool. Covers all 67 MCP tools: search (hybrid/semantic/keyword), code analysis (structure, dependencies, symbols, patterns, entry points, diagrams, blast radius), knowledge graph (auto-populated module/symbol/import graph with traversal), context management (worksets, stash, checkpoints, restore, lanes), code manipulation (rename, codemod, eval), knowledge management (remember/read/update/forget), web access (fetch, search, http), FORGE protocol (ground, classify, evidence map, stratum cards, digest), brainstorming (interactive ideation sessions), presentation (rich dashboards via present tool), onboarding (full codebase analysis in one call), and developer utilities (regex, encode, measure, changelog, schema-validate, snippet, env, time)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @vpxa/aikit — Knowledge Base Toolkit
|
|
7
|
+
|
|
8
|
+
Local-first AI developer toolkit — 67 MCP tools for search, analysis, context compression, FORGE quality gates, knowledge management, code manipulation, execution, web access, brainstorming, presentation, and developer utilities.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- You need long-term memory across coding sessions
|
|
13
|
+
- You want to search a codebase semantically (by meaning, not just keywords)
|
|
14
|
+
- You need to compress large contexts to focus on what matters
|
|
15
|
+
- You want structured output from build tools (tsc, vitest, biome, git)
|
|
16
|
+
- You need to plan which files to read for a task
|
|
17
|
+
- You want to safely explore refactors in isolated lanes
|
|
18
|
+
- You need to rename symbols, apply codemods, or run code transformations
|
|
19
|
+
- You want to fetch and read web pages or search the web
|
|
20
|
+
- You need to make HTTP requests, test APIs, or debug endpoints
|
|
21
|
+
- You want to test regex patterns, encode/decode data, or validate JSON schemas
|
|
22
|
+
- You need code complexity metrics or a git changelog
|
|
23
|
+
- You want to save and reuse code snippets across sessions
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
10-package monorepo published as a single npm package:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
core → store → embeddings → chunker → indexer → analyzers → tools → server → cli → tui
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **MCP server**: 67 tools + 2 resources (via `@modelcontextprotocol/sdk`)
|
|
34
|
+
- **CLI**: 45 commands (thin dispatcher + 10 command groups)
|
|
35
|
+
- **Search**: Hybrid vector + keyword + RRF fusion
|
|
36
|
+
- **Embeddings**: ONNX local (mxbai-embed-large-v1, 1024 dimensions)
|
|
37
|
+
- **Vector store**: LanceDB (embedded, zero infrastructure)
|
|
38
|
+
- **Chunking**: Tree-sitter AST (TS/JS/Python/Go/Rust/Java) + regex fallback
|
|
39
|
+
- **TUI**: Ink/React dashboard for human monitoring (search, status, curated, activity log)
|
|
40
|
+
|
|
41
|
+
## Session Protocol (MANDATORY)
|
|
42
|
+
|
|
43
|
+
### Start of Session
|
|
44
|
+
```
|
|
45
|
+
status()
|
|
46
|
+
search({ query: "SESSION CHECKPOINT", origin: "curated" })
|
|
47
|
+
list({ category: "conventions" })
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### During Session
|
|
51
|
+
```
|
|
52
|
+
search → scope_map → symbol → trace (orient)
|
|
53
|
+
check → test_run (validate changes)
|
|
54
|
+
remember (capture insights)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### End of Session
|
|
58
|
+
```
|
|
59
|
+
remember({ title: "Session checkpoint: <topic>", content: "<what was done, decisions made, next steps>", category: "conventions" })
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Tool Catalog (67 tools)
|
|
63
|
+
|
|
64
|
+
### Search & Discovery (8)
|
|
65
|
+
| Tool | CLI | Purpose |
|
|
66
|
+
|------|-----|---------|
|
|
67
|
+
| `search` | `aikit search` | Hybrid/semantic/keyword search with `search_mode` param |
|
|
68
|
+
| `find` | `aikit find` | Federated search: vector + FTS + glob + regex in one call. Use `mode: 'examples'` to find usage examples. |
|
|
69
|
+
| `symbol` | `aikit symbol` | Resolve symbol definition, imports, and references |
|
|
70
|
+
| `lookup` | `aikit lookup` | Full-file retrieval by path or record ID |
|
|
71
|
+
| `scope_map` | `aikit scope-map` | Task-scoped reading plan with token estimates |
|
|
72
|
+
| `trace` | `aikit trace` | Forward/backward flow tracing through call chains |
|
|
73
|
+
| `dead_symbols` | `aikit dead-symbols` | Find exported symbols never imported — separates source (actionable) from docs (informational). Accepts `path` to scope the search. |
|
|
74
|
+
| `file_summary` | `aikit summarize` | Structural overview of a file (exports, imports, functions) |
|
|
75
|
+
|
|
76
|
+
### Code Analysis (7)
|
|
77
|
+
| Tool | CLI | Purpose |
|
|
78
|
+
|------|-----|---------|
|
|
79
|
+
| `analyze_structure` | `aikit analyze structure` | Project structure overview |
|
|
80
|
+
| `analyze_dependencies` | `aikit analyze deps` | Dependency graph with confidence |
|
|
81
|
+
| `analyze_symbols` | `aikit analyze symbols` | Symbol extraction and cross-references |
|
|
82
|
+
| `analyze_patterns` | `aikit analyze patterns` | Design pattern detection |
|
|
83
|
+
| `analyze_entry_points` | `aikit analyze entry-points` | Find entry points: handlers, CDK constructs, test suites, package exports (walks workspace packages) |
|
|
84
|
+
| `analyze_diagram` | `aikit analyze diagram` | Generate Mermaid diagrams |
|
|
85
|
+
| `blast_radius` | `aikit analyze blast-radius` | Change impact analysis |
|
|
86
|
+
|
|
87
|
+
### Context Management (6)
|
|
88
|
+
| Tool | CLI | Purpose |
|
|
89
|
+
|------|-----|---------|
|
|
90
|
+
| `compact` | `aikit compact` | Compress text to relevant sections using embeddings (no LLM). Accepts `path` for server-side file read. |
|
|
91
|
+
| `workset` | `aikit workset` | Named file set management (save/load/add/remove) |
|
|
92
|
+
| `stash` | `aikit stash` | Named key-value store for session data |
|
|
93
|
+
| `checkpoint` | `aikit checkpoint` | Save/restore session checkpoints |
|
|
94
|
+
| `restore` | `aikit restore` | Restore a previously saved checkpoint |
|
|
95
|
+
| `parse_output` | `aikit parse-output` | Parse tsc/vitest/biome/git output → structured JSON |
|
|
96
|
+
|
|
97
|
+
### Code Manipulation (4)
|
|
98
|
+
| Tool | CLI | Purpose |
|
|
99
|
+
|------|-----|---------|
|
|
100
|
+
| `rename` | `aikit rename` | Smart whole-word symbol rename across files (dry-run supported) |
|
|
101
|
+
| `codemod` | `aikit codemod` | Regex-based code transformations with rules (dry-run supported) |
|
|
102
|
+
| `diff_parse` | `aikit diff` | Parse unified diff → structured changes |
|
|
103
|
+
| `data_transform` | `aikit transform` | JQ-like JSON transformations |
|
|
104
|
+
|
|
105
|
+
### Execution & Validation (5)
|
|
106
|
+
| Tool | CLI | Purpose |
|
|
107
|
+
|------|-----|---------|
|
|
108
|
+
| `eval` | `aikit eval` | Sandboxed JavaScript/TypeScript execution |
|
|
109
|
+
| `check` | `aikit check` | Incremental typecheck + lint. `detail` param: summary (default, ~300 tokens), errors, full |
|
|
110
|
+
| `test_run` | `aikit test` | Run tests with structured pass/fail results |
|
|
111
|
+
| `batch` | `aikit batch` | Execute multiple operations in parallel |
|
|
112
|
+
| `audit` | `aikit audit` | Unified project audit: structure, deps, patterns, health, dead symbols, check, entry points → synthesized report with score and recommendations. 6 round-trips → 1. |
|
|
113
|
+
|
|
114
|
+
### Knowledge Management (6)
|
|
115
|
+
| Tool | CLI | Purpose |
|
|
116
|
+
|------|-----|---------|
|
|
117
|
+
| `remember` | `aikit remember` | Store a curated knowledge entry |
|
|
118
|
+
| `update` | `aikit update` | Update an existing entry |
|
|
119
|
+
| `forget` | `aikit forget` | Delete an entry (requires reason) |
|
|
120
|
+
| `read` | `aikit read` | Read a curated entry by path |
|
|
121
|
+
| `list` | `aikit list` | List curated entries |
|
|
122
|
+
| `produce_knowledge` | — | Auto-generate knowledge from analysis |
|
|
123
|
+
|
|
124
|
+
### Verified Lanes (1 tool, 6 actions)
|
|
125
|
+
| Tool | CLI | Purpose |
|
|
126
|
+
|------|-----|---------|
|
|
127
|
+
| `lane` | `aikit lane` | Manage isolated file copies for parallel exploration |
|
|
128
|
+
|
|
129
|
+
Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/deleted), `diff` (line-level diff), `merge` (apply back to originals), `discard`.
|
|
130
|
+
|
|
131
|
+
### Git & Environment (4)
|
|
132
|
+
| Tool | CLI | Purpose |
|
|
133
|
+
|------|-----|---------|
|
|
134
|
+
| `git_context` | `aikit git` | Branch, status, recent commits |
|
|
135
|
+
| `process` | `aikit proc` | Process supervisor (start/stop/logs) |
|
|
136
|
+
| `watch` | `aikit watch` | Filesystem watcher |
|
|
137
|
+
| `delegate` | `aikit delegate` | Delegate subtask to local Ollama model |
|
|
138
|
+
|
|
139
|
+
### Web & Network (3)
|
|
140
|
+
| Tool | CLI | Purpose |
|
|
141
|
+
|------|-----|---------|
|
|
142
|
+
| `web_fetch` | — | Fetch web page → markdown/raw/links/outline for LLM consumption |
|
|
143
|
+
| `web_search` | — | Search the web via DuckDuckGo (no API key needed) |
|
|
144
|
+
| `http` | — | Make HTTP requests for API testing/debugging |
|
|
145
|
+
|
|
146
|
+
### Developer Utilities (8)
|
|
147
|
+
| Tool | CLI | Purpose |
|
|
148
|
+
|------|-----|---------|
|
|
149
|
+
| `regex_test` | — | Test regex patterns with match/replace/split modes |
|
|
150
|
+
| `encode` | — | Base64, URL, SHA-256, MD5, hex encode/decode, JWT decode |
|
|
151
|
+
| `measure` | — | Code complexity metrics (cyclomatic, cognitive complexity, lines, functions) |
|
|
152
|
+
| `changelog` | — | Generate changelog from git history (conventional commits) |
|
|
153
|
+
| `schema_validate` | — | Validate JSON data against JSON Schema |
|
|
154
|
+
| `snippet` | — | Save/get/search/delete persistent code snippets |
|
|
155
|
+
| `env` | — | System and runtime environment info (sensitive values redacted) |
|
|
156
|
+
| `time` | — | Date parsing, timezone conversion, duration math |
|
|
157
|
+
|
|
158
|
+
### FORGE Quality Gates (5)
|
|
159
|
+
| Tool | CLI | Purpose |
|
|
160
|
+
|------|-----|---------|
|
|
161
|
+
| `forge_ground` | — | Full Ground phase: classify tier, scope map, unknowns, constraints |
|
|
162
|
+
| `forge_classify` | — | Quick tier classification (Floor/Standard/Critical) |
|
|
163
|
+
| `evidence_map` | — | CRUD + Gate evaluation for verified/assumed/unknown claims. Safety gate tags (`provenance`/`commitment`/`coverage`) enable mandatory pre-YIELD checks |
|
|
164
|
+
| `stratum_card` | — | Generate T1/T2 compressed context cards from files (10-100x token reduction) |
|
|
165
|
+
| `digest` | — | Compress N text sources into token-budgeted summary |
|
|
166
|
+
|
|
167
|
+
### System (8)
|
|
168
|
+
| Tool | CLI | Purpose |
|
|
169
|
+
|------|-----|---------|
|
|
170
|
+
| `status` | `aikit status` | Index statistics |
|
|
171
|
+
| `reindex` | `aikit reindex` | Rebuild index |
|
|
172
|
+
| `health` | `aikit health` | Project health checks (package.json, tsconfig, lockfile, circular deps) |
|
|
173
|
+
| `guide` | `aikit guide` | Tool discovery — given a goal, recommends tools and workflow order |
|
|
174
|
+
| `onboard` | `aikit onboard` | Full codebase onboarding in one call (structure + deps + patterns + knowledge) |
|
|
175
|
+
| `graph` | `aikit graph` | Query the auto-populated knowledge graph (modules, symbols, imports) |
|
|
176
|
+
| `queue` | `aikit queue` | Task queue for sequential agent operations (create/push/next/done/fail) |
|
|
177
|
+
| `replay` | `aikit replay` | View or clear the audit trail of tool invocations (action: list/clear) |
|
|
178
|
+
|
|
179
|
+
### Presentation (1)
|
|
180
|
+
| Tool | CLI | Purpose |
|
|
181
|
+
|------|-----|---------|
|
|
182
|
+
| `present` | — | Rich dashboards, charts, tables, timelines. Use `format: "browser"` then `openBrowserPage` to display |
|
|
183
|
+
|
|
184
|
+
### Brainstorming (1)
|
|
185
|
+
| Tool | CLI | Purpose |
|
|
186
|
+
|------|-----|---------|
|
|
187
|
+
| `brainstorm` | — | Interactive brainstorming and ideation sessions with structured output |
|
|
188
|
+
|
|
189
|
+
## Search Strategy
|
|
190
|
+
|
|
191
|
+
## CRITICAL: Use KB Tools Instead of Native IDE Tools
|
|
192
|
+
|
|
193
|
+
KB tools provide **10x richer output** than native IDE tools — with AST-analyzed call graphs, scope context, import classification, and cognitive complexity. **Always prefer KB tools.**
|
|
194
|
+
|
|
195
|
+
### Tool Replacement Table
|
|
196
|
+
|
|
197
|
+
| Instead of... | Use KB Tool | Why |
|
|
198
|
+
|---------------|-------------|-----|
|
|
199
|
+
| `read_file` (full file) | `file_summary` | Exports, imports, call edges — **10x fewer tokens** |
|
|
200
|
+
| `read_file` (specific section) | `compact({ path, query })` | Server-side read + extract — **5-20x reduction** |
|
|
201
|
+
| `grep_search` / `textSearch` | `search` | Semantic + keyword hybrid across all indexed content |
|
|
202
|
+
| `grep_search` for a symbol | `symbol` | Definition + references **with scope context** |
|
|
203
|
+
| Multiple `read_file` calls | `digest` | Compresses multiple sources into token-budgeted summary |
|
|
204
|
+
| `listDirectory` + `read_file` | `scope_map` | Identifies relevant files for a task automatically |
|
|
205
|
+
| Manual code tracing | `trace` | AST call-graph traversal with scope context |
|
|
206
|
+
| Line counting / `wc` | `measure` | Lines, complexity, **cognitive complexity**, functions |
|
|
207
|
+
| Grep for unused exports | `dead_symbols` | AST-powered export detection with regex fallback |
|
|
208
|
+
| Repeated file reads | `stratum_card` | Reusable compressed context — **10-100x reduction** |
|
|
209
|
+
| `fetch_webpage` | `web_fetch` | Readability extract + token budget — richer output |
|
|
210
|
+
| Web research / browsing | `web_search` | Structured web results without browser — **unique to KB** |
|
|
211
|
+
|
|
212
|
+
### Decision Tree — How to Read Code
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
Need to understand a file?
|
|
216
|
+
├─ Just structure? → file_summary (exports, imports, call edges — ~50 tokens)
|
|
217
|
+
├─ Specific section? → compact({ path: "file.ts", query: "topic" }) — 5-20x reduction
|
|
218
|
+
├─ Multiple files? → digest (multi-source compression — token-budgeted)
|
|
219
|
+
├─ Repeated reference? → stratum_card (T1/T2 card — 10-100x reduction)
|
|
220
|
+
└─ Full file needed? → ONLY as last resort, and compact it after reading
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### What KB Tools Return (AST-Enhanced)
|
|
224
|
+
|
|
225
|
+
These tools use Tree-sitter WASM to analyze source code at the AST level, providing structured data that raw file reads cannot:
|
|
226
|
+
|
|
227
|
+
| Tool | Rich Output |
|
|
228
|
+
|------|-------------|
|
|
229
|
+
| `file_summary` | Imports classified as **external vs internal** (`isExternal` flag). **Call edges** between functions (e.g., `handleRequest() → validateInput() @ line 42`). `exported` flag on interfaces and types. Import count breakdown. |
|
|
230
|
+
| `symbol` | References include **scope** — which function/class/method contains each usage (e.g., `referenced in processOrder() at auth-service.ts:55`). |
|
|
231
|
+
| `trace` | **Call-graph edges** discovered via AST syntax tree, not text matching. Supports forward (who does X call?) and backward (who calls X?) tracing. Scope context on each node. |
|
|
232
|
+
| `measure` | **Cognitive complexity** — weights nesting depth (nested `if` inside `for` inside `try` scores higher). More useful than cyclomatic complexity for understanding code difficulty. |
|
|
233
|
+
| `dead_symbols` | **AST export enumeration** — catches `export default`, barrel re-exports (`export { x } from`), `export =`, and `export type`. Regex fallback for non-AST-supported languages. |
|
|
234
|
+
|
|
235
|
+
### Example: `file_summary` Output
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
src/auth-service.ts
|
|
239
|
+
Language: typescript | Lines: 180 | Estimated tokens: ~1400
|
|
240
|
+
|
|
241
|
+
Imports (6): 3 external, 3 internal
|
|
242
|
+
- import { hash } from 'bcrypt' [external]
|
|
243
|
+
- import { UserRepo } from './user-repo' [internal]
|
|
244
|
+
|
|
245
|
+
Functions (4):
|
|
246
|
+
- authenticate @ line 22 [exported]
|
|
247
|
+
- validateToken @ line 55 [exported]
|
|
248
|
+
- hashPassword @ line 90
|
|
249
|
+
- generateJwt @ line 110
|
|
250
|
+
|
|
251
|
+
Call edges (12 intra-file):
|
|
252
|
+
- authenticate() → hashPassword() @ line 35
|
|
253
|
+
- authenticate() → generateJwt() @ line 42
|
|
254
|
+
- validateToken() → UserRepo.findById() @ line 68
|
|
255
|
+
|
|
256
|
+
Interfaces (2):
|
|
257
|
+
- AuthResult @ line 8 [exported]
|
|
258
|
+
- TokenPayload @ line 14
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Compare: `read_file` would cost ~1400 tokens for raw text. `file_summary` gives structured data in ~120 tokens — **12x reduction** with richer information.
|
|
262
|
+
|
|
263
|
+
## Search Strategy
|
|
264
|
+
|
|
265
|
+
1. **Start broad**: `search({ query: "topic", search_mode: "hybrid" })`
|
|
266
|
+
2. **Narrow**: Add `content_type`, `origin`, or `category` filters
|
|
267
|
+
3. **Exact match**: Use `search_mode: "keyword"` for identifiers
|
|
268
|
+
4. **Federated**: Use `find` to combine vector + glob + regex
|
|
269
|
+
|
|
270
|
+
## Workflow Chains
|
|
271
|
+
|
|
272
|
+
### Codebase Onboarding
|
|
273
|
+
```
|
|
274
|
+
analyze_structure({ path: "src/" })
|
|
275
|
+
→ analyze_dependencies({ path: "src/" })
|
|
276
|
+
→ analyze_entry_points({ path: "src/" })
|
|
277
|
+
→ produce_knowledge({ path: "src/" })
|
|
278
|
+
→ remember({ title: "Codebase onboarding complete", ... })
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Planning a Task
|
|
282
|
+
```
|
|
283
|
+
scope_map({ task: "implement user auth" })
|
|
284
|
+
→ compact({ path: "src/auth.ts", query: "auth flow" })
|
|
285
|
+
→ workset({ action: "save", name: "auth-task", files: [...] })
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Bug Investigation
|
|
289
|
+
```
|
|
290
|
+
parse_output({ output: <error> }) → symbol({ name: "failingFn" })
|
|
291
|
+
→ trace({ symbol: "failingFn", direction: "backward" })
|
|
292
|
+
→ blast_radius({ changed_files: ["suspect.ts"] })
|
|
293
|
+
→ eval({ code: "hypothesis test" }) → check({ files: ["suspect.ts"] })
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Safe Refactor with Lanes
|
|
297
|
+
```
|
|
298
|
+
scope_map({ task: "rename UserService" })
|
|
299
|
+
→ lane({ action: "create", name: "refactor", files: [...] })
|
|
300
|
+
→ [make changes in lane files]
|
|
301
|
+
→ lane({ action: "diff", name: "refactor" })
|
|
302
|
+
→ check({}) → test_run({})
|
|
303
|
+
→ lane({ action: "merge", name: "refactor" })
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### After Making Changes
|
|
307
|
+
```
|
|
308
|
+
blast_radius({ changed_files: ["src/auth.ts"] })
|
|
309
|
+
→ check({}) → test_run({ grep: "auth" })
|
|
310
|
+
→ reindex()
|
|
311
|
+
→ remember({ title: "Implemented auth", content: "..." })
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Pre-Commit Validation
|
|
315
|
+
```
|
|
316
|
+
git_context({ diff: true })
|
|
317
|
+
→ diff_parse({ diff: <staged diff> })
|
|
318
|
+
→ blast_radius({ changed_files: [...] })
|
|
319
|
+
→ check({}) → test_run({})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
## CLI Quick Reference
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
aikit init # Scaffold KB in current directory
|
|
326
|
+
aikit init --force # Overwrite all scaffold/skill files
|
|
327
|
+
aikit init --guide # JSON report of stale files for LLM-driven updates
|
|
328
|
+
aikit serve # Start MCP server (stdio or HTTP)
|
|
329
|
+
aikit search <q> # Hybrid search
|
|
330
|
+
aikit find <q> # Federated search
|
|
331
|
+
aikit symbol <name> # Resolve symbol
|
|
332
|
+
aikit scope-map <t> # Task reading plan
|
|
333
|
+
aikit compact <q> # Context compression (--path file or stdin)
|
|
334
|
+
aikit check # Typecheck + lint (--detail summary|errors|full)
|
|
335
|
+
aikit test # Run tests
|
|
336
|
+
aikit rename <old> <new> <path> # Rename symbol
|
|
337
|
+
aikit lane create <name> --files f1,f2 # Create lane
|
|
338
|
+
aikit lane diff <name> # View lane changes
|
|
339
|
+
aikit lane merge <name> # Merge lane back
|
|
340
|
+
aikit status # Index stats
|
|
341
|
+
aikit reindex # Rebuild index
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
## Configuration
|
|
345
|
+
|
|
346
|
+
`kb.config.json` in project root:
|
|
347
|
+
```json
|
|
348
|
+
{
|
|
349
|
+
"sources": [{ "path": ".", "excludePatterns": ["node_modules/**", "**/node_modules/**", "dist/**", "coverage/**", ".aikit-data/**"] }],
|
|
350
|
+
"indexing": { "chunkSize": 1500, "chunkOverlap": 200, "minChunkSize": 100, "concurrency": 5 },
|
|
351
|
+
"embedding": { "model": "mixedbread-ai/mxbai-embed-large-v1", "dimensions": 1024 },
|
|
352
|
+
"store": { "backend": "lancedb", "path": ".aikit-data" },
|
|
353
|
+
"curated": { "path": "curated" }
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## IDE Integration
|
|
358
|
+
|
|
359
|
+
### VS Code — HTTP mode (recommended for development)
|
|
360
|
+
```json
|
|
361
|
+
// .vscode/mcp.json
|
|
362
|
+
{
|
|
363
|
+
"servers": {
|
|
364
|
+
"kb": {
|
|
365
|
+
"type": "http",
|
|
366
|
+
"url": "http://localhost:3210/mcp"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
Start server: `npx aikit serve --http --port 3210`
|
|
372
|
+
|
|
373
|
+
### VS Code — stdio mode (no separate server)
|
|
374
|
+
```json
|
|
375
|
+
{
|
|
376
|
+
"servers": {
|
|
377
|
+
"kb": {
|
|
378
|
+
"type": "stdio",
|
|
379
|
+
"command": "npx",
|
|
380
|
+
"args": ["@vpxa/aikit", "serve", "--stdio"]
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Claude Code (`.mcp.json`)
|
|
387
|
+
```json
|
|
388
|
+
{
|
|
389
|
+
"mcpServers": {
|
|
390
|
+
"kb": {
|
|
391
|
+
"command": "npx",
|
|
392
|
+
"args": ["@vpxa/aikit", "serve"]
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## Development (Self-Dogfooding)
|
|
399
|
+
|
|
400
|
+
When developing @vpxa/aikit itself, use the tool on its own codebase:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
# Build → Reindex → Use loop
|
|
404
|
+
pnpm build # Build all 10 packages
|
|
405
|
+
node bin/aikit.mjs reindex # Index own source into LanceDB
|
|
406
|
+
node bin/aikit.mjs search "query" # Search own code
|
|
407
|
+
node bin/aikit.mjs symbol "FnName" # Resolve symbols in own code
|
|
408
|
+
node bin/aikit.mjs check # Typecheck + lint
|
|
409
|
+
pnpm test # Run 287+ tests
|
|
410
|
+
|
|
411
|
+
# Start MCP server for agent use during development
|
|
412
|
+
node bin/aikit.mjs serve --http --port 3210
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Rules:**
|
|
416
|
+
- Always `pnpm build` before using CLI/server (runs from `dist/`)
|
|
417
|
+
- Always `reindex` after structural code changes
|
|
418
|
+
- LanceDB is single-process — don't run CLI and HTTP server simultaneously
|
|
419
|
+
- Curated entries in `curated/` survive reindex and are indexed separately
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## Flow System
|
|
424
|
+
|
|
425
|
+
Flows are **pluggable, multi-step development workflows** that orchestrate agents through structured phases. Each flow is a directory containing a manifest (`flow.json`) and step skills (`skills/<step>/SKILL.md`).
|
|
426
|
+
|
|
427
|
+
### Architecture
|
|
428
|
+
|
|
429
|
+
```
|
|
430
|
+
Flow Layer — Pluggable workflows (git repos, local dirs, built-in)
|
|
431
|
+
Foundation Layer — Agents, MCP tools, skills (what you already have)
|
|
432
|
+
Base Layer — aikit MCP server, CLI, index engine
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Flows compose Foundation Layer components (agents + skills + tools) into repeatable processes. They do NOT replace the foundation — they orchestrate it.
|
|
436
|
+
|
|
437
|
+
### Built-in Flows
|
|
438
|
+
|
|
439
|
+
| Flow | Steps | Use When |
|
|
440
|
+
|------|-------|----------|
|
|
441
|
+
| `aikit:basic` | assess → implement → verify | Bug fixes, small features, refactoring |
|
|
442
|
+
| `aikit:advanced` | spec → plan → task → execute → verify | New features, API design, architecture changes |
|
|
443
|
+
|
|
444
|
+
### Flow Manifest (`flow.json`)
|
|
445
|
+
|
|
446
|
+
```json
|
|
447
|
+
{
|
|
448
|
+
"name": "aikit:basic",
|
|
449
|
+
"version": "0.1.0",
|
|
450
|
+
"description": "Quick development flow",
|
|
451
|
+
"steps": [
|
|
452
|
+
{
|
|
453
|
+
"id": "assess",
|
|
454
|
+
"name": "Assessment",
|
|
455
|
+
"skill": "skills/assess/SKILL.md",
|
|
456
|
+
"produces": ["assessment.md"],
|
|
457
|
+
"requires": [],
|
|
458
|
+
"agents": ["Explorer", "Researcher-Alpha"],
|
|
459
|
+
"description": "Understand scope, analyze codebase"
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"artifacts_dir": ".spec",
|
|
463
|
+
"install": []
|
|
464
|
+
}
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Key fields:**
|
|
468
|
+
- `artifacts_dir` — root folder for all flow artifacts (default: `.spec`). Each step writes to a work subfolder: `.spec/<step-slug>/`
|
|
469
|
+
- `install` — external skills needed by this flow. Empty for built-ins. For custom flows: `[{ "name": "my-skill", "repo": "org/repo", "agent": "copilot" }]`
|
|
470
|
+
- `steps[].produces` / `steps[].requires` — declare artifact dependencies between steps. A step can only start when all its `requires` artifacts exist.
|
|
471
|
+
|
|
472
|
+
### CLI Commands
|
|
473
|
+
|
|
474
|
+
| Command | Purpose |
|
|
475
|
+
|---------|---------|
|
|
476
|
+
| `aikit flow add <source>` | Install flow from git URL, local path, or built-in name |
|
|
477
|
+
| `aikit flow remove <name>` | Remove an installed flow |
|
|
478
|
+
| `aikit flow list` | List installed flows |
|
|
479
|
+
| `aikit flow use <name>` | Set active flow for current project |
|
|
480
|
+
| `aikit flow status` | Show current step, artifacts, progress |
|
|
481
|
+
| `aikit flow start [step]` | Begin flow (or resume from step) |
|
|
482
|
+
| `aikit flow reset` | Reset flow state to beginning |
|
|
483
|
+
|
|
484
|
+
### State Machine
|
|
485
|
+
|
|
486
|
+
Flow progress is tracked in `.spec/flow-state.json`:
|
|
487
|
+
|
|
488
|
+
```json
|
|
489
|
+
{
|
|
490
|
+
"flow": "aikit:basic",
|
|
491
|
+
"current_step": "implement",
|
|
492
|
+
"steps": {
|
|
493
|
+
"assess": { "status": "completed", "artifacts": ["assessment.md"] },
|
|
494
|
+
"implement": { "status": "in_progress", "artifacts": [] },
|
|
495
|
+
"verify": { "status": "pending", "artifacts": [] }
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Step transitions: `pending` → `in_progress` → `completed` (or `failed` → retry). A step can only start when all its `requires` artifacts exist.
|
|
501
|
+
|
|
502
|
+
### Flow Sources
|
|
503
|
+
|
|
504
|
+
Flows can be installed from three sources:
|
|
505
|
+
|
|
506
|
+
1. **Built-in** — Ship with aikit (`aikit:basic`, `aikit:advanced`)
|
|
507
|
+
2. **Git** — `aikit flow add https://github.com/org/my-flow.git`
|
|
508
|
+
3. **Local** — `aikit flow add ./my-custom-flow`
|
|
509
|
+
|
|
510
|
+
### Creating Custom Flows
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
my-flow/
|
|
514
|
+
flow.json # Manifest with steps, agents, dependencies
|
|
515
|
+
skills/
|
|
516
|
+
step-one/SKILL.md
|
|
517
|
+
step-two/SKILL.md
|
|
518
|
+
README.md # Optional documentation
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
Each step skill follows standard SKILL.md format with sections: Purpose, Inputs, Process, Outputs, Agents, Completion Criteria. Steps produce artifacts into `.spec/` that downstream steps consume.
|