@vpxa/kb 0.1.13 → 0.1.16
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/README.md +65 -12
- package/package.json +14 -7
- package/packages/analyzers/dist/blast-radius-analyzer.d.ts +17 -21
- package/packages/analyzers/dist/blast-radius-analyzer.js +5 -12
- package/packages/analyzers/dist/dependency-analyzer.d.ts +31 -28
- package/packages/analyzers/dist/dependency-analyzer.js +6 -9
- package/packages/analyzers/dist/diagram-generator.d.ts +12 -9
- package/packages/analyzers/dist/diagram-generator.js +2 -4
- package/packages/analyzers/dist/entry-point-analyzer.d.ts +39 -36
- package/packages/analyzers/dist/entry-point-analyzer.js +4 -6
- package/packages/analyzers/dist/index.d.ts +12 -14
- package/packages/analyzers/dist/index.js +1 -1
- package/packages/analyzers/dist/knowledge-producer.d.ts +34 -26
- package/packages/analyzers/dist/knowledge-producer.js +17 -15
- package/packages/analyzers/dist/pattern-analyzer.d.ts +14 -11
- package/packages/analyzers/dist/pattern-analyzer.js +2 -5
- package/packages/analyzers/dist/regex-call-graph.d.ts +6 -13
- package/packages/analyzers/dist/regex-call-graph.js +1 -1
- package/packages/analyzers/dist/structure-analyzer.d.ts +13 -10
- package/packages/analyzers/dist/structure-analyzer.js +2 -4
- package/packages/analyzers/dist/symbol-analyzer.d.ts +13 -9
- package/packages/analyzers/dist/symbol-analyzer.js +9 -13
- package/packages/analyzers/dist/ts-call-graph.d.ts +16 -14
- package/packages/analyzers/dist/ts-call-graph.js +1 -1
- package/packages/analyzers/dist/types.d.ts +82 -80
- package/packages/analyzers/dist/types.js +1 -0
- package/packages/chunker/dist/call-graph-extractor.d.ts +15 -12
- package/packages/chunker/dist/call-graph-extractor.js +1 -1
- package/packages/chunker/dist/chunker-factory.d.ts +16 -4
- package/packages/chunker/dist/chunker-factory.js +1 -1
- package/packages/chunker/dist/chunker.interface.d.ts +8 -5
- package/packages/chunker/dist/chunker.interface.js +1 -0
- package/packages/chunker/dist/code-chunker.d.ts +16 -13
- package/packages/chunker/dist/code-chunker.js +11 -14
- 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 +1 -0
- package/packages/chunker/dist/extractors/types.d.ts +36 -0
- package/packages/chunker/dist/extractors/types.js +1 -0
- package/packages/chunker/dist/generic-chunker.d.ts +14 -11
- package/packages/chunker/dist/generic-chunker.js +5 -5
- package/packages/chunker/dist/index.d.ts +19 -8
- package/packages/chunker/dist/index.js +1 -1
- package/packages/chunker/dist/markdown-chunker.d.ts +16 -13
- package/packages/chunker/dist/markdown-chunker.js +3 -10
- 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-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-python.wasm +0 -0
- package/packages/chunker/wasm/tree-sitter-rust.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/commands/analyze.d.ts +6 -3
- package/packages/cli/dist/commands/analyze.js +2 -3
- package/packages/cli/dist/commands/context-cmds.d.ts +6 -3
- package/packages/cli/dist/commands/context-cmds.js +1 -1
- package/packages/cli/dist/commands/environment.d.ts +6 -3
- package/packages/cli/dist/commands/environment.js +1 -2
- package/packages/cli/dist/commands/execution.d.ts +6 -3
- package/packages/cli/dist/commands/execution.js +1 -1
- package/packages/cli/dist/commands/graph.d.ts +6 -3
- package/packages/cli/dist/commands/graph.js +5 -6
- 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 +18 -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/global.d.ts +34 -0
- package/packages/cli/dist/commands/init/global.js +5 -0
- package/packages/cli/dist/commands/init/index.d.ts +28 -0
- package/packages/cli/dist/commands/init/index.js +5 -0
- package/packages/cli/dist/commands/init/scaffold.d.ts +23 -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 +165 -0
- package/packages/cli/dist/commands/knowledge.d.ts +6 -3
- package/packages/cli/dist/commands/knowledge.js +1 -1
- package/packages/cli/dist/commands/search.d.ts +6 -3
- package/packages/cli/dist/commands/search.js +1 -8
- package/packages/cli/dist/commands/system.d.ts +6 -3
- package/packages/cli/dist/commands/system.js +4 -7
- package/packages/cli/dist/commands/workspace.d.ts +6 -3
- package/packages/cli/dist/commands/workspace.js +1 -2
- package/packages/cli/dist/context.d.ts +7 -5
- package/packages/cli/dist/context.js +1 -1
- package/packages/cli/dist/helpers.d.ts +51 -48
- package/packages/cli/dist/helpers.js +5 -5
- package/packages/cli/dist/index.d.ts +4 -2
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/dist/kb-init.d.ts +48 -51
- package/packages/cli/dist/kb-init.js +1 -1
- package/packages/cli/dist/types.d.ts +8 -6
- package/packages/cli/dist/types.js +1 -0
- package/packages/core/dist/constants.d.ts +58 -34
- package/packages/core/dist/constants.js +1 -1
- package/packages/core/dist/content-detector.d.ts +8 -8
- package/packages/core/dist/content-detector.js +1 -1
- package/packages/core/dist/errors.d.ts +15 -13
- package/packages/core/dist/errors.js +1 -1
- package/packages/core/dist/global-registry.d.ts +62 -0
- package/packages/core/dist/global-registry.js +1 -0
- package/packages/core/dist/index.d.ts +7 -6
- package/packages/core/dist/index.js +1 -1
- package/packages/core/dist/logger.d.ts +19 -8
- package/packages/core/dist/logger.js +1 -1
- package/packages/core/dist/types.d.ts +107 -92
- package/packages/core/dist/types.js +1 -0
- package/packages/embeddings/dist/embedder.interface.d.ts +22 -20
- package/packages/embeddings/dist/embedder.interface.js +1 -0
- package/packages/embeddings/dist/index.d.ts +3 -3
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/embeddings/dist/onnx-embedder.d.ts +21 -23
- package/packages/embeddings/dist/onnx-embedder.js +1 -1
- 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/indexer/dist/file-hasher.d.ts +5 -3
- package/packages/indexer/dist/file-hasher.js +1 -1
- package/packages/indexer/dist/filesystem-crawler.d.ts +23 -21
- package/packages/indexer/dist/filesystem-crawler.js +1 -1
- package/packages/indexer/dist/graph-extractor.d.ts +9 -13
- package/packages/indexer/dist/graph-extractor.js +1 -1
- package/packages/indexer/dist/incremental-indexer.d.ts +49 -44
- package/packages/indexer/dist/incremental-indexer.js +1 -1
- package/packages/indexer/dist/index.d.ts +5 -5
- package/packages/indexer/dist/index.js +1 -1
- package/packages/server/dist/api.d.ts +3 -8
- package/packages/server/dist/api.js +1 -1
- package/packages/server/dist/config.d.ts +6 -3
- package/packages/server/dist/config.js +1 -1
- 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 +80 -78
- package/packages/server/dist/curated-manager.js +5 -10
- package/packages/server/dist/index.d.ts +1 -2
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/replay-interceptor.d.ts +6 -7
- package/packages/server/dist/replay-interceptor.js +1 -1
- package/packages/server/dist/resources/resources.d.ts +7 -4
- package/packages/server/dist/resources/resources.js +2 -2
- package/packages/server/dist/server.d.ts +37 -25
- package/packages/server/dist/server.js +1 -1
- package/packages/server/dist/tools/analyze.tools.d.ts +14 -11
- package/packages/server/dist/tools/analyze.tools.js +1 -3
- package/packages/server/dist/tools/audit.tool.d.ts +8 -5
- package/packages/server/dist/tools/audit.tool.js +1 -4
- 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/evolution.tools.d.ts +7 -0
- package/packages/server/dist/tools/evolution.tools.js +5 -0
- package/packages/server/dist/tools/forge.tools.d.ts +13 -12
- package/packages/server/dist/tools/forge.tools.js +10 -13
- package/packages/server/dist/tools/forget.tool.d.ts +7 -4
- package/packages/server/dist/tools/forget.tool.js +1 -7
- package/packages/server/dist/tools/graph.tool.d.ts +7 -4
- package/packages/server/dist/tools/graph.tool.js +4 -5
- package/packages/server/dist/tools/list.tool.d.ts +7 -4
- package/packages/server/dist/tools/list.tool.js +2 -8
- package/packages/server/dist/tools/lookup.tool.d.ts +7 -4
- package/packages/server/dist/tools/lookup.tool.js +2 -9
- package/packages/server/dist/tools/onboard.tool.d.ts +8 -5
- package/packages/server/dist/tools/onboard.tool.js +2 -2
- package/packages/server/dist/tools/policy.tools.d.ts +7 -0
- package/packages/server/dist/tools/policy.tools.js +2 -0
- package/packages/server/dist/tools/produce.tool.d.ts +6 -3
- package/packages/server/dist/tools/produce.tool.js +2 -2
- package/packages/server/dist/tools/read.tool.d.ts +7 -4
- package/packages/server/dist/tools/read.tool.js +2 -6
- package/packages/server/dist/tools/reindex.tool.d.ts +10 -7
- package/packages/server/dist/tools/reindex.tool.js +3 -2
- package/packages/server/dist/tools/remember.tool.d.ts +8 -4
- package/packages/server/dist/tools/remember.tool.js +3 -5
- package/packages/server/dist/tools/replay.tool.d.ts +6 -3
- package/packages/server/dist/tools/replay.tool.js +2 -6
- package/packages/server/dist/tools/search.tool.d.ts +10 -5
- package/packages/server/dist/tools/search.tool.js +6 -22
- package/packages/server/dist/tools/status.tool.d.ts +12 -4
- package/packages/server/dist/tools/status.tool.js +2 -3
- package/packages/server/dist/tools/toolkit.tools.d.ts +36 -35
- package/packages/server/dist/tools/toolkit.tools.js +20 -24
- package/packages/server/dist/tools/update.tool.d.ts +7 -4
- package/packages/server/dist/tools/update.tool.js +1 -6
- package/packages/server/dist/tools/utility.tools.d.ts +15 -15
- package/packages/server/dist/tools/utility.tools.js +10 -23
- package/packages/server/dist/version-check.d.ts +5 -2
- package/packages/server/dist/version-check.js +1 -1
- package/packages/store/dist/graph-store.interface.d.ts +89 -87
- package/packages/store/dist/graph-store.interface.js +1 -0
- package/packages/store/dist/index.d.ts +6 -6
- package/packages/store/dist/index.js +1 -1
- package/packages/store/dist/lance-store.d.ts +37 -31
- package/packages/store/dist/lance-store.js +1 -1
- package/packages/store/dist/sqlite-graph-store.d.ts +43 -47
- package/packages/store/dist/sqlite-graph-store.js +13 -13
- package/packages/store/dist/store-factory.d.ts +11 -8
- package/packages/store/dist/store-factory.js +1 -1
- package/packages/store/dist/store.interface.d.ts +47 -47
- package/packages/store/dist/store.interface.js +1 -0
- package/packages/tools/dist/audit.d.ts +61 -62
- package/packages/tools/dist/audit.js +4 -5
- package/packages/tools/dist/batch.d.ts +20 -18
- package/packages/tools/dist/batch.js +1 -1
- package/packages/tools/dist/changelog.d.ts +29 -27
- package/packages/tools/dist/changelog.js +2 -2
- package/packages/tools/dist/check.d.ts +42 -39
- package/packages/tools/dist/check.js +2 -2
- package/packages/tools/dist/checkpoint.d.ts +17 -15
- package/packages/tools/dist/checkpoint.js +1 -2
- package/packages/tools/dist/codemod.d.ts +35 -33
- package/packages/tools/dist/codemod.js +2 -2
- package/packages/tools/dist/compact.d.ts +34 -38
- package/packages/tools/dist/compact.js +2 -2
- package/packages/tools/dist/data-transform.d.ts +10 -8
- package/packages/tools/dist/data-transform.js +1 -1
- package/packages/tools/dist/dead-symbols.d.ts +29 -26
- package/packages/tools/dist/dead-symbols.js +2 -2
- package/packages/tools/dist/delegate.d.ts +26 -24
- package/packages/tools/dist/delegate.js +1 -5
- package/packages/tools/dist/diff-parse.d.ts +24 -22
- package/packages/tools/dist/diff-parse.js +3 -3
- package/packages/tools/dist/digest.d.ts +43 -46
- package/packages/tools/dist/digest.js +4 -5
- 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 +11 -9
- package/packages/tools/dist/encode.js +1 -1
- package/packages/tools/dist/env-info.d.ts +25 -23
- package/packages/tools/dist/env-info.js +1 -1
- package/packages/tools/dist/eval.d.ts +13 -11
- package/packages/tools/dist/eval.js +2 -3
- package/packages/tools/dist/evidence-map.d.ts +64 -62
- package/packages/tools/dist/evidence-map.js +2 -3
- 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 +50 -30
- package/packages/tools/dist/file-summary.js +2 -2
- package/packages/tools/dist/file-walk.d.ts +6 -4
- package/packages/tools/dist/file-walk.js +1 -1
- package/packages/tools/dist/find-examples.d.ts +26 -22
- package/packages/tools/dist/find-examples.js +3 -3
- package/packages/tools/dist/find.d.ts +39 -41
- package/packages/tools/dist/find.js +1 -1
- package/packages/tools/dist/forge-classify.d.ts +35 -39
- package/packages/tools/dist/forge-classify.js +2 -2
- package/packages/tools/dist/forge-ground.d.ts +58 -61
- package/packages/tools/dist/forge-ground.js +1 -1
- package/packages/tools/dist/git-context.d.ts +22 -20
- package/packages/tools/dist/git-context.js +3 -3
- package/packages/tools/dist/graph-query.d.ts +75 -79
- package/packages/tools/dist/graph-query.js +1 -1
- package/packages/tools/dist/guide.d.ts +14 -12
- package/packages/tools/dist/guide.js +1 -1
- package/packages/tools/dist/health.d.ts +13 -11
- package/packages/tools/dist/health.js +2 -2
- package/packages/tools/dist/http-request.d.ts +20 -18
- package/packages/tools/dist/http-request.js +1 -1
- package/packages/tools/dist/index.d.ts +55 -53
- package/packages/tools/dist/index.js +1 -1
- package/packages/tools/dist/lane.d.ts +28 -26
- package/packages/tools/dist/lane.js +6 -7
- package/packages/tools/dist/measure.d.ts +34 -30
- package/packages/tools/dist/measure.js +2 -2
- package/packages/tools/dist/onboard.d.ts +29 -27
- package/packages/tools/dist/onboard.js +17 -41
- package/packages/tools/dist/parse-output.d.ts +48 -46
- package/packages/tools/dist/parse-output.js +2 -2
- package/packages/tools/dist/path-resolver.d.ts +4 -2
- package/packages/tools/dist/path-resolver.js +1 -1
- package/packages/tools/dist/process-manager.d.ts +18 -16
- package/packages/tools/dist/process-manager.js +1 -1
- package/packages/tools/dist/queue.d.ts +28 -26
- package/packages/tools/dist/queue.js +1 -2
- package/packages/tools/dist/regex-test.d.ts +26 -24
- package/packages/tools/dist/regex-test.js +1 -1
- package/packages/tools/dist/rename.d.ts +28 -26
- package/packages/tools/dist/rename.js +2 -2
- package/packages/tools/dist/replay.d.ts +33 -31
- package/packages/tools/dist/replay.js +4 -6
- package/packages/tools/dist/response-envelope.d.ts +32 -30
- package/packages/tools/dist/response-envelope.js +1 -1
- package/packages/tools/dist/schema-validate.d.ts +15 -13
- package/packages/tools/dist/schema-validate.js +1 -1
- package/packages/tools/dist/scope-map.d.ts +45 -48
- package/packages/tools/dist/scope-map.js +1 -1
- package/packages/tools/dist/snippet.d.ts +26 -25
- package/packages/tools/dist/snippet.js +1 -1
- package/packages/tools/dist/stash.d.ts +13 -11
- package/packages/tools/dist/stash.js +1 -2
- package/packages/tools/dist/stratum-card.d.ts +27 -28
- package/packages/tools/dist/stratum-card.js +3 -5
- package/packages/tools/dist/symbol.d.ts +31 -26
- package/packages/tools/dist/symbol.js +3 -3
- package/packages/tools/dist/test-run.d.ts +19 -16
- package/packages/tools/dist/test-run.js +2 -2
- package/packages/tools/dist/text-utils.d.ts +6 -4
- package/packages/tools/dist/text-utils.js +2 -2
- package/packages/tools/dist/time-utils.d.ts +15 -13
- package/packages/tools/dist/time-utils.js +1 -1
- package/packages/tools/dist/trace.d.ts +26 -21
- package/packages/tools/dist/trace.js +2 -2
- package/packages/tools/dist/truncation.d.ts +6 -4
- package/packages/tools/dist/truncation.js +6 -13
- package/packages/tools/dist/watch.d.ts +28 -26
- package/packages/tools/dist/watch.js +1 -1
- package/packages/tools/dist/web-fetch.d.ts +35 -33
- package/packages/tools/dist/web-fetch.js +6 -12
- package/packages/tools/dist/web-search.d.ts +16 -14
- package/packages/tools/dist/web-search.js +1 -1
- package/packages/tools/dist/workset.d.ts +19 -17
- package/packages/tools/dist/workset.js +1 -2
- package/packages/tui/dist/App-CYLNJLr6.js +2 -0
- package/packages/tui/dist/App.d.ts +11 -6
- package/packages/tui/dist/App.js +1 -450
- package/packages/tui/dist/CuratedPanel-sYdZAICX.js +2 -0
- package/packages/tui/dist/LogPanel-DtMnoyXT.js +3 -0
- package/packages/tui/dist/SearchPanel-DREo6zgt.js +2 -0
- package/packages/tui/dist/StatusPanel-2ex8fLOO.js +2 -0
- package/packages/tui/dist/chunk-D6axbAb-.js +2 -0
- package/packages/tui/dist/devtools-DUyj952l.js +7 -0
- package/packages/tui/dist/embedder.interface-D4ew0HPW.d.ts +28 -0
- package/packages/tui/dist/index-B9VpfVPP.d.ts +13 -0
- package/packages/tui/dist/index.d.ts +3 -19
- package/packages/tui/dist/index.js +1 -476
- package/packages/tui/dist/jsx-runtime-Cof-kwFn.js +316 -0
- package/packages/tui/dist/panels/CuratedPanel.d.ts +11 -6
- package/packages/tui/dist/panels/CuratedPanel.js +1 -371
- package/packages/tui/dist/panels/LogPanel.d.ts +7 -3
- package/packages/tui/dist/panels/LogPanel.js +1 -449
- package/packages/tui/dist/panels/SearchPanel.d.ts +14 -8
- package/packages/tui/dist/panels/SearchPanel.js +1 -372
- package/packages/tui/dist/panels/StatusPanel.d.ts +11 -6
- package/packages/tui/dist/panels/StatusPanel.js +1 -371
- package/packages/tui/dist/store.interface-CnY6SPOH.d.ts +150 -0
- package/scaffold/adapters/claude-code.mjs +20 -0
- package/scaffold/adapters/copilot.mjs +320 -0
- package/scaffold/copilot/agents/Architect-Reviewer-Alpha.agent.md +21 -0
- package/scaffold/copilot/agents/Architect-Reviewer-Beta.agent.md +21 -0
- package/scaffold/copilot/agents/Documenter.agent.md +42 -0
- package/scaffold/copilot/agents/Orchestrator.agent.md +104 -0
- package/scaffold/copilot/agents/Planner.agent.md +54 -0
- package/scaffold/copilot/agents/Refactor.agent.md +36 -0
- package/scaffold/copilot/agents/Researcher-Alpha.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Beta.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Delta.agent.md +20 -0
- package/scaffold/copilot/agents/Researcher-Gamma.agent.md +20 -0
- package/scaffold/definitions/agents.mjs +165 -0
- package/scaffold/definitions/bodies.mjs +292 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +56 -0
- package/scaffold/definitions/plugins.mjs +24 -0
- package/scaffold/definitions/prompts.mjs +145 -0
- package/scaffold/definitions/protocols.mjs +322 -0
- package/scaffold/definitions/tools.mjs +176 -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 +31 -0
- package/scaffold/general/agents/Documenter.agent.md +42 -0
- package/scaffold/general/agents/Explorer.agent.md +50 -0
- package/scaffold/general/agents/Frontend.agent.md +29 -0
- package/scaffold/general/agents/Implementer.agent.md +31 -0
- package/scaffold/general/agents/Orchestrator.agent.md +104 -0
- package/scaffold/general/agents/Planner.agent.md +55 -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 +42 -0
- package/scaffold/general/agents/_shared/adr-protocol.md +91 -0
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +50 -0
- package/scaffold/general/agents/_shared/code-agent-base.md +88 -0
- package/scaffold/general/agents/_shared/code-reviewer-base.md +54 -0
- package/scaffold/general/agents/_shared/decision-protocol.md +27 -0
- package/scaffold/general/agents/_shared/forge-protocol.md +46 -0
- package/scaffold/general/agents/_shared/researcher-base.md +61 -0
- package/scaffold/general/agents/templates/adr-template.md +27 -0
- package/scaffold/general/agents/templates/execution-state.md +25 -0
- package/scaffold/general/prompts/ask.prompt.md +20 -0
- package/scaffold/general/prompts/debug.prompt.md +25 -0
- package/scaffold/general/prompts/design.prompt.md +22 -0
- package/scaffold/general/prompts/implement.prompt.md +26 -0
- package/scaffold/general/prompts/plan.prompt.md +24 -0
- package/scaffold/general/prompts/review.prompt.md +31 -0
- package/scaffold/generate.mjs +74 -0
- package/skills/adr-skill/SKILL.md +329 -0
- package/skills/adr-skill/assets/templates/adr-madr.md +89 -0
- package/skills/adr-skill/assets/templates/adr-readme.md +20 -0
- package/skills/adr-skill/assets/templates/adr-simple.md +46 -0
- package/skills/adr-skill/references/adr-conventions.md +95 -0
- package/skills/adr-skill/references/examples.md +193 -0
- package/skills/adr-skill/references/review-checklist.md +77 -0
- package/skills/adr-skill/references/template-variants.md +52 -0
- package/skills/adr-skill/scripts/bootstrap_adr.js +259 -0
- package/skills/adr-skill/scripts/new_adr.js +391 -0
- package/skills/adr-skill/scripts/set_adr_status.js +169 -0
- package/skills/brainstorming/SKILL.md +259 -0
- package/skills/brainstorming/scripts/frame-template.html +365 -0
- package/skills/brainstorming/scripts/helper.js +216 -0
- package/skills/brainstorming/scripts/server.cjs +9 -0
- package/skills/brainstorming/scripts/server.src.cjs +249 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +430 -0
- package/skills/c4-architecture/SKILL.md +295 -0
- package/skills/c4-architecture/references/advanced-patterns.md +552 -0
- package/skills/c4-architecture/references/c4-syntax.md +492 -0
- package/skills/c4-architecture/references/common-mistakes.md +437 -0
- package/skills/knowledge-base/SKILL.md +100 -10
- package/skills/lesson-learned/SKILL.md +105 -0
- package/skills/lesson-learned/references/anti-patterns.md +55 -0
- package/skills/lesson-learned/references/se-principles.md +109 -0
- package/skills/requirements-clarity/SKILL.md +324 -0
- package/skills/session-handoff/SKILL.md +189 -0
- package/skills/session-handoff/references/handoff-template.md +139 -0
- package/skills/session-handoff/references/resume-checklist.md +80 -0
- package/skills/session-handoff/scripts/check_staleness.js +269 -0
- package/skills/session-handoff/scripts/create_handoff.js +299 -0
- package/skills/session-handoff/scripts/list_handoffs.js +113 -0
- package/skills/session-handoff/scripts/validate_handoff.js +241 -0
- package/packages/chunker/dist/treesitter-chunker.d.ts +0 -47
- package/packages/chunker/dist/treesitter-chunker.js +0 -8
- package/packages/cli/dist/commands/init.d.ts +0 -10
- package/packages/cli/dist/commands/init.js +0 -308
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Architect-Reviewer — Shared Base Instructions
|
|
2
|
+
|
|
3
|
+
> Shared methodology for all Architect-Reviewer variants. Each variant's definition contains only identity and model. **Do not duplicate.**
|
|
4
|
+
|
|
5
|
+
## Review Workflow
|
|
6
|
+
|
|
7
|
+
1. **KB Recall** — Search for architecture decisions, boundary conventions
|
|
8
|
+
2. **Analyze** — `analyze_structure`, `analyze_dependencies`, `blast_radius`
|
|
9
|
+
3. **Evaluate** — Check all dimensions below
|
|
10
|
+
4. **Report** — Structured findings with verdict
|
|
11
|
+
5. **Persist** — `remember` findings
|
|
12
|
+
|
|
13
|
+
## Review Dimensions
|
|
14
|
+
|
|
15
|
+
| Dimension | What to Check |
|
|
16
|
+
|-----------|---------------|
|
|
17
|
+
| **Dependency Direction** | Dependencies flow inward (domain ← services ← infra) |
|
|
18
|
+
| **Boundary Respect** | No cross-cutting between unrelated packages |
|
|
19
|
+
| **SOLID Compliance** | Single responsibility, dependency inversion |
|
|
20
|
+
| **Pattern Adherence** | Consistent with established patterns in codebase |
|
|
21
|
+
| **Interface Stability** | Public APIs don't break existing consumers |
|
|
22
|
+
| **Scalability** | Design handles growth (more data, more users, more features) |
|
|
23
|
+
| **Testability** | Dependencies injectable, side effects isolated |
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
## Architecture Review: {scope}
|
|
29
|
+
**Verdict: APPROVED | NEEDS_CHANGES | BLOCKED**
|
|
30
|
+
|
|
31
|
+
### Boundary Analysis
|
|
32
|
+
{dependency direction, package boundaries}
|
|
33
|
+
|
|
34
|
+
### Pattern Compliance
|
|
35
|
+
{consistency with existing patterns}
|
|
36
|
+
|
|
37
|
+
### Findings
|
|
38
|
+
1. **[SEVERITY]** {description} — Impact and recommendation
|
|
39
|
+
|
|
40
|
+
### Summary
|
|
41
|
+
{Overall structural assessment}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- **APPROVED** — No structural issues
|
|
47
|
+
- **NEEDS_CHANGES** — Fixable structural issues
|
|
48
|
+
- **BLOCKED** — Fundamental design flaw requiring rethink
|
|
49
|
+
- Always validate **dependency direction** — inner layers must not depend on outer
|
|
50
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Code Agent — Shared Base Instructions
|
|
2
|
+
|
|
3
|
+
> This file contains shared protocols for all code-modifying agents (Implementer, Frontend, Refactor, Debugger). Each agent's definition file contains only its unique identity, constraints, and workflow. **Do not duplicate this content in agent files.**
|
|
4
|
+
|
|
5
|
+
## Invocation Mode Detection
|
|
6
|
+
|
|
7
|
+
You may be invoked in two modes:
|
|
8
|
+
1. **Direct** — you have full KB tool access. Execute KB Recall normally.
|
|
9
|
+
2. **Sub-agent** (via Orchestrator) — you may have limited MCP tool access.
|
|
10
|
+
The Orchestrator provides context under "## Prior KB Context" in your prompt.
|
|
11
|
+
If present, skip KB Recall and use the provided context instead.
|
|
12
|
+
|
|
13
|
+
**Detection:** If your prompt contains "## Prior KB Context", you are in sub-agent mode.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## FORGE Protocol (Quality Gate)
|
|
18
|
+
|
|
19
|
+
**Quick reference:**
|
|
20
|
+
1. If the Orchestrator provided FORGE tier in your prompt, use it. Otherwise, run `forge_classify` to determine tier.
|
|
21
|
+
2. **Floor tier** → implement directly, no evidence map needed.
|
|
22
|
+
3. **Standard/Critical tier** → Use `evidence_map` to track each critical-path claim as V/A/U during your work.
|
|
23
|
+
4. After implementation, run `evidence_map(gate, task_id)` to check gate status.
|
|
24
|
+
5. Use `stratum_card` for quick file context instead of reading full files. Use `digest` to compress accumulated context.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## KB Recall (BLOCKING — Before ANY Code Change)
|
|
29
|
+
|
|
30
|
+
1. **Search for relevant context:**
|
|
31
|
+
```
|
|
32
|
+
search("feature/area keywords")
|
|
33
|
+
scope_map("what you are doing")
|
|
34
|
+
```
|
|
35
|
+
2. **Check for existing patterns** — reuse established conventions
|
|
36
|
+
3. **Read design decisions** that constrain your implementation
|
|
37
|
+
4. **If KB has no hits**, proceed but **remember your findings at the end**
|
|
38
|
+
|
|
39
|
+
**Proceed only after KB search is complete.**
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Tool Preference (BLOCKING — Use KB Tools Over Native Tools)
|
|
44
|
+
|
|
45
|
+
KB tools return **AST-analyzed structured data** — 10x fewer tokens than raw file reads. **Always prefer KB tools:**
|
|
46
|
+
|
|
47
|
+
| Instead of... | Use KB Tool |
|
|
48
|
+
|---------------|-------------|
|
|
49
|
+
| `read_file` (full file) | `file_summary` — exports, imports, call edges, 10x fewer tokens |
|
|
50
|
+
| `read_file` (section) | `compact({ path, query })` — server-side extract, 5-20x reduction |
|
|
51
|
+
| `grep_search` / `textSearch` | `search` — semantic + keyword hybrid |
|
|
52
|
+
| `grep_search` for symbol | `symbol` — definition + references with scope context |
|
|
53
|
+
| Multiple `read_file` | `digest` — compressed multi-source summary |
|
|
54
|
+
| Manual code tracing | `trace` — AST call-graph traversal |
|
|
55
|
+
| Line counting | `measure` — lines, complexity, cognitive complexity |
|
|
56
|
+
|
|
57
|
+
**Only use `read_file` as a last resort** when you need exact line content for editing.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## KB Learn (After Completing Work)
|
|
62
|
+
|
|
63
|
+
Before returning your handoff, persist discoveries to KB:
|
|
64
|
+
- Architecture insights → `remember({ title, content, category: "patterns" })`
|
|
65
|
+
- Non-obvious solutions → `remember({ title, content, category: "troubleshooting" })`
|
|
66
|
+
- Key decisions made → `remember({ title, content, category: "decisions" })`
|
|
67
|
+
- Outdated KB entries → `update(path, content, reason)`
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Handoff Format
|
|
72
|
+
|
|
73
|
+
Always return this structure when invoked as a sub-agent:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
<handoff>
|
|
77
|
+
<status>SUCCESS | PARTIAL | FAILED | ESCALATE</status>
|
|
78
|
+
<summary>{1 sentence summary}</summary>
|
|
79
|
+
<artifacts>
|
|
80
|
+
- Created: {files}
|
|
81
|
+
- Modified: {files}
|
|
82
|
+
- Deleted: {files}
|
|
83
|
+
</artifacts>
|
|
84
|
+
<context>{what the next agent needs to know}</context>
|
|
85
|
+
<blockers>{any blocking issues}</blockers>
|
|
86
|
+
</handoff>
|
|
87
|
+
```
|
|
88
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Code-Reviewer — Shared Base Instructions
|
|
2
|
+
|
|
3
|
+
> Shared methodology for all Code-Reviewer variants. Each variant's definition contains only identity and model. **Do not duplicate.**
|
|
4
|
+
|
|
5
|
+
## Review Workflow
|
|
6
|
+
|
|
7
|
+
1. **KB Recall** — Search for relevant conventions, past review findings
|
|
8
|
+
2. **Blast Radius** — `blast_radius` on changed files to understand impact
|
|
9
|
+
3. **FORGE Classify** — `forge_classify` to determine review depth
|
|
10
|
+
4. **Review** — Evaluate against all dimensions below
|
|
11
|
+
5. **Validate** — Run `check` (typecheck + lint) and `test_run`
|
|
12
|
+
6. **Report** — Structured findings with verdict
|
|
13
|
+
7. **Persist** — `remember` any new patterns or issues
|
|
14
|
+
|
|
15
|
+
## Review Dimensions
|
|
16
|
+
|
|
17
|
+
| Dimension | What to Check |
|
|
18
|
+
|-----------|---------------|
|
|
19
|
+
| **Correctness** | Logic errors, off-by-one, null handling, async/await |
|
|
20
|
+
| **Security** | OWASP Top 10, input validation, secrets exposure |
|
|
21
|
+
| **Performance** | N+1 queries, unnecessary allocations, missing caching |
|
|
22
|
+
| **Maintainability** | Naming, complexity, DRY, single responsibility |
|
|
23
|
+
| **Testing** | Coverage for new/changed logic, edge cases |
|
|
24
|
+
| **Patterns** | Consistency with existing codebase conventions |
|
|
25
|
+
| **Types** | Proper typing, no `any`, generics where useful |
|
|
26
|
+
|
|
27
|
+
## Output Format
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
## Code Review: {scope}
|
|
31
|
+
**Verdict: APPROVED | NEEDS_REVISION | FAILED**
|
|
32
|
+
**Severity: {count by level}**
|
|
33
|
+
|
|
34
|
+
### Findings
|
|
35
|
+
1. **[SEVERITY]** {file}:{line} — Description and fix
|
|
36
|
+
|
|
37
|
+
### Summary
|
|
38
|
+
{Overall assessment, key concerns}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Severity Levels
|
|
42
|
+
|
|
43
|
+
- **CRITICAL** — Correctness bug that will cause runtime failure
|
|
44
|
+
- **HIGH** — Security issue or major design flaw
|
|
45
|
+
- **MEDIUM** — Code quality concern that should be fixed
|
|
46
|
+
- **LOW** — Style/naming suggestion
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- **APPROVED** requires zero CRITICAL/HIGH findings
|
|
51
|
+
- **NEEDS_REVISION** for any HIGH finding
|
|
52
|
+
- **FAILED** for any CRITICAL finding
|
|
53
|
+
- Always check for **test coverage** on new/changed code
|
|
54
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Multi-Model Decision Protocol
|
|
2
|
+
|
|
3
|
+
The Orchestrator uses **multi-model decision analysis** to resolve non-trivial technical choices. This is the autonomous decision-making process — distinct from the interactive brainstorming skill.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
The Orchestrator launches ALL available Researcher variants **in parallel** with the same question. Each returns an independent recommendation. The Orchestrator synthesizes results and presents the agreement/disagreement breakdown to the user.
|
|
8
|
+
|
|
9
|
+
## When to Use (Auto-Trigger Rules)
|
|
10
|
+
|
|
11
|
+
Trigger the decision protocol when there is an **unresolved non-trivial technical decision** after requirements are understood:
|
|
12
|
+
- Architecture or infrastructure decisions with multiple viable approaches
|
|
13
|
+
- Data model, schema, or storage strategy choices
|
|
14
|
+
- Technology or library selection
|
|
15
|
+
- Trade-offs where the "right" answer isn't obvious
|
|
16
|
+
- When a sub-agent returns a recommendation that has alternatives
|
|
17
|
+
|
|
18
|
+
**Do NOT use for:** Requirements discovery, user intent clarification, or feature scoping — those belong to the brainstorming skill.
|
|
19
|
+
|
|
20
|
+
## Key Rules
|
|
21
|
+
|
|
22
|
+
- Always launch in **parallel**, minimum 4 variants
|
|
23
|
+
- Use exact case-sensitive agent names — never rename or alias
|
|
24
|
+
- Never make a non-trivial technical decision without multi-model analysis
|
|
25
|
+
- **Produce an ADR** after every decision resolution
|
|
26
|
+
- `remember` the decision for future recall
|
|
27
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# FORGE Protocol — Quality Overlay
|
|
2
|
+
|
|
3
|
+
> Follow the FORGE (Fact-Oriented Reasoning with Graduated Evidence) protocol for all code generation and modification tasks.
|
|
4
|
+
|
|
5
|
+
## KB Tools for FORGE
|
|
6
|
+
|
|
7
|
+
| Tool | Purpose | When |
|
|
8
|
+
|------|---------|------|
|
|
9
|
+
| `forge_ground` | Execute entire Ground phase — classify tier, scope map, unknowns, constraints | Start of every Standard/Critical task |
|
|
10
|
+
| `forge_classify` | Classify tier only (Floor/Standard/Critical) | Quick classification |
|
|
11
|
+
| `evidence_map` | CRUD + Gate evaluation for Evidence Map | Track claims during Build |
|
|
12
|
+
| `stratum_card` | Generate T1/T2 context cards from files | Replace full file reads |
|
|
13
|
+
| `digest` | Compress N text sources into budget | Compress accumulated context |
|
|
14
|
+
|
|
15
|
+
## Tier Classification
|
|
16
|
+
|
|
17
|
+
- **Floor**: Single file, no unknowns, no schema change, blast_radius ≤ 2. → Skip Phase 3.
|
|
18
|
+
- **Standard**: Default for multi-file or non-trivial tasks.
|
|
19
|
+
- **Critical**: blast_radius > 5, cross-service boundary, schema change, or security code.
|
|
20
|
+
|
|
21
|
+
When uncertain, round up.
|
|
22
|
+
|
|
23
|
+
## 4-Phase Flow
|
|
24
|
+
|
|
25
|
+
### Phase 1 — Ground
|
|
26
|
+
Read files, blast radius, classify tier, build Typed Unknown Queue, load constraints.
|
|
27
|
+
|
|
28
|
+
### Phase 2 — Build
|
|
29
|
+
Generate with evidence anchoring. Route typed unknowns mid-generation.
|
|
30
|
+
|
|
31
|
+
### Phase 3 — Break (Standard+ only, skip for Floor)
|
|
32
|
+
One adversarial round. Check error paths, edge cases, blast radius, convention violations.
|
|
33
|
+
|
|
34
|
+
### Phase 4 — Gate
|
|
35
|
+
Binary YIELD/HOLD. Contract-type unknowns → **HARD BLOCK**. Non-contract → 1 retry, then FORCED DELIVERY with annotation.
|
|
36
|
+
|
|
37
|
+
## Evidence Map
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
evidence_map({ action: "create", task_id: "my-task", tier: "standard" })
|
|
41
|
+
evidence_map({ action: "add", task_id: "my-task", claim: "API contract unchanged", status: "V", receipt: "search → types.ts#L42" })
|
|
42
|
+
evidence_map({ action: "gate", task_id: "my-task" }) → YIELD / HOLD / HARD_BLOCK
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Status values: **V** (Verified + receipt), **A** (Assumed + reasoning), **U** (Unresolved).
|
|
46
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Researcher — Shared Base Instructions
|
|
2
|
+
|
|
3
|
+
> Shared methodology for all Researcher variants. Each variant's definition contains only its unique identity and model assignment. **Do not duplicate.**
|
|
4
|
+
|
|
5
|
+
## Research Methodology
|
|
6
|
+
|
|
7
|
+
### Phase 1: KB Recall (BLOCKING)
|
|
8
|
+
```
|
|
9
|
+
search("task keywords")
|
|
10
|
+
scope_map("what you need to investigate")
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Phase 2: Exploration
|
|
14
|
+
- Use `find`, `symbol`, `trace` for code exploration
|
|
15
|
+
- Use `file_summary`, `compact` for efficient file reading
|
|
16
|
+
- Use `analyze_structure`, `analyze_dependencies` for package-level understanding
|
|
17
|
+
- Use `web_search`, `web_fetch` for external documentation
|
|
18
|
+
|
|
19
|
+
### Phase 3: Synthesis
|
|
20
|
+
- Combine findings from multiple sources using `digest`
|
|
21
|
+
- Create `stratum_card` for key files that will be referenced later
|
|
22
|
+
- Build a coherent picture of the subsystem
|
|
23
|
+
|
|
24
|
+
### Phase 4: Report
|
|
25
|
+
Return structured findings. Always include:
|
|
26
|
+
1. **Summary** — 1-3 sentence overview
|
|
27
|
+
2. **Key Findings** — Bullet list of important discoveries
|
|
28
|
+
3. **Files Examined** — Paths with brief purpose notes
|
|
29
|
+
4. **Recommendation** — Your suggested approach with reasoning
|
|
30
|
+
5. **Trade-offs** — Pros and cons of alternatives
|
|
31
|
+
6. **Risks** — What could go wrong
|
|
32
|
+
|
|
33
|
+
### Phase 5: Persist
|
|
34
|
+
`remember` key findings for future recall.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Multi-Model Decision Context
|
|
39
|
+
|
|
40
|
+
When invoked for a decision analysis, you receive a specific question. You MUST:
|
|
41
|
+
1. **Commit to a recommendation** — do not hedge with "it depends"
|
|
42
|
+
2. **Provide concrete reasoning** — cite specific files, patterns, or constraints
|
|
43
|
+
3. **Acknowledge trade-offs** — show you considered alternatives
|
|
44
|
+
4. **State your confidence level** — high/medium/low with reasoning
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Invocation Mode Detection
|
|
49
|
+
|
|
50
|
+
- **Direct** (has KB tools) → Execute KB Recall normally
|
|
51
|
+
- **Sub-agent** (prompt has "## Prior KB Context") → Skip KB Recall, use provided context
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Context Efficiency
|
|
56
|
+
|
|
57
|
+
- **Prefer `file_summary` over `read_file`** for understanding structure
|
|
58
|
+
- **Prefer `compact` over full reads** when you need specific sections
|
|
59
|
+
- **Use `digest`** when synthesizing from 3+ sources
|
|
60
|
+
- **Use `stratum_card`** for files you'll reference repeatedly
|
|
61
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DR-NNN: {Short Title}
|
|
2
|
+
|
|
3
|
+
**Status:** Proposed | Accepted | Rejected | Deprecated | Superseded
|
|
4
|
+
**Date:** YYYY-MM-DD
|
|
5
|
+
**Participants:** {which Researcher variants participated}
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
{What is the issue? Why are we making this decision?}
|
|
9
|
+
{If superseding, link: "Supersedes DR-NNN."}
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
{What was decided and why — 2-5 sentences max}
|
|
13
|
+
|
|
14
|
+
## Decision Analysis Summary
|
|
15
|
+
| Model | Recommendation | Key Reasoning |
|
|
16
|
+
|-------|---------------|---------------|
|
|
17
|
+
|
|
18
|
+
**Agreements:** {what 3+ models agreed on}
|
|
19
|
+
**Disagreements:** {where they diverged}
|
|
20
|
+
|
|
21
|
+
## Consequences
|
|
22
|
+
**Positive:** {benefits}
|
|
23
|
+
**Negative:** {trade-offs accepted}
|
|
24
|
+
**Risks:** {what could go wrong, and any mitigations}
|
|
25
|
+
|
|
26
|
+
## Alternatives Considered
|
|
27
|
+
{Other approaches evaluated and why they were rejected — keeps the "why not" alongside the "why"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Execution State: {Task Title}
|
|
2
|
+
|
|
3
|
+
**Status:** PLANNING | IN_PROGRESS | REVIEW | COMPLETED | BLOCKED
|
|
4
|
+
**Started:** {timestamp}
|
|
5
|
+
**Plan:** {link to plan file}
|
|
6
|
+
|
|
7
|
+
## Phases
|
|
8
|
+
|
|
9
|
+
| # | Title | Agent | Status | Batch |
|
|
10
|
+
|---|-------|-------|--------|-------|
|
|
11
|
+
|
|
12
|
+
## Current Batch
|
|
13
|
+
|
|
14
|
+
**Batch {N}:** {phases in this batch}
|
|
15
|
+
**Status:** IMPLEMENTING | REVIEWING | APPROVED
|
|
16
|
+
|
|
17
|
+
## Decisions Log
|
|
18
|
+
|
|
19
|
+
| Decision | Rationale | ADR |
|
|
20
|
+
|----------|-----------|-----|
|
|
21
|
+
|
|
22
|
+
## Blockers
|
|
23
|
+
|
|
24
|
+
| Issue | Severity | Assigned |
|
|
25
|
+
|-------|----------|----------|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Quick research question — find answer using KB + web search"
|
|
3
|
+
agent: "Researcher-Alpha"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/web_search
|
|
7
|
+
- knowledge-base/web_fetch
|
|
8
|
+
- knowledge-base/compact
|
|
9
|
+
- knowledge-base/file_summary
|
|
10
|
+
- knowledge-base/remember
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quick Research
|
|
14
|
+
|
|
15
|
+
1. **KB Recall** — Search knowledge base for existing answers
|
|
16
|
+
2. **Web Search** — If KB has no relevant results, search the web
|
|
17
|
+
3. **Synthesize** — Combine findings into a clear, concise answer
|
|
18
|
+
4. **Remember** — If the answer is broadly useful, persist it to KB
|
|
19
|
+
|
|
20
|
+
**Always cite sources** — KB entries, file paths, or URLs.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Systematic error diagnosis: reproduce → trace → diagnose → fix → verify"
|
|
3
|
+
agent: "Debugger"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/symbol
|
|
7
|
+
- knowledge-base/trace
|
|
8
|
+
- knowledge-base/blast_radius
|
|
9
|
+
- knowledge-base/check
|
|
10
|
+
- knowledge-base/test_run
|
|
11
|
+
- knowledge-base/parse_output
|
|
12
|
+
- knowledge-base/compact
|
|
13
|
+
- knowledge-base/remember
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Debug Workflow
|
|
17
|
+
|
|
18
|
+
1. **Parse Error** — Use `parse_output` on the error message/stack trace
|
|
19
|
+
2. **KB Recall** — Search for known issues matching this pattern
|
|
20
|
+
3. **Reproduce** — Run the failing command/test to confirm
|
|
21
|
+
4. **Trace** — Use `symbol` and `trace` to follow the call chain
|
|
22
|
+
5. **Diagnose** — Form hypothesis, gather evidence
|
|
23
|
+
6. **Fix** — Implement minimal fix
|
|
24
|
+
7. **Verify** — `check` + `test_run` to confirm fix and no regressions
|
|
25
|
+
8. **Remember** — Persist the fix with category `troubleshooting`
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Collaborative design session — explore ideas, refine requirements, produce a design spec"
|
|
3
|
+
agent: "Orchestrator"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/scope_map
|
|
7
|
+
- knowledge-base/file_summary
|
|
8
|
+
- knowledge-base/compact
|
|
9
|
+
- knowledge-base/remember
|
|
10
|
+
- knowledge-base/forge_classify
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Design Session
|
|
14
|
+
|
|
15
|
+
Enter Phase 0 (Design Gate) directly — the user is requesting a design session.
|
|
16
|
+
|
|
17
|
+
1. **Invoke the brainstorming skill** — interactive design dialogue with user
|
|
18
|
+
2. Follow the skill's full process (auto-selects Simple or Advanced mode)
|
|
19
|
+
3. If Advanced Mode, use Decision Protocol for unresolved technical choices
|
|
20
|
+
4. Terminal state: brainstorming skill invokes writing-plans skill
|
|
21
|
+
|
|
22
|
+
**🛑 HARD GATE** — Do NOT skip brainstorming. Do NOT write code. Design first.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Full lifecycle implementation: plan → build → review → commit"
|
|
3
|
+
agent: "Orchestrator"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/scope_map
|
|
7
|
+
- knowledge-base/forge_ground
|
|
8
|
+
- knowledge-base/check
|
|
9
|
+
- knowledge-base/test_run
|
|
10
|
+
- knowledge-base/blast_radius
|
|
11
|
+
- knowledge-base/remember
|
|
12
|
+
- knowledge-base/audit
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Implementation Pipeline
|
|
16
|
+
|
|
17
|
+
Follow the Orchestrator's full workflow:
|
|
18
|
+
|
|
19
|
+
1. **Phase 0: Design Gate** — Orchestrator checks if design is needed. Creative/additive work triggers brainstorming first. Use `/design` if you want to start with design explicitly.
|
|
20
|
+
2. **Phase 1: Planning** — Research, draft plan, present to user for approval
|
|
21
|
+
3. **Phase 2: Implementation** — Execute phases in parallel batches
|
|
22
|
+
4. **Phase 3: Completion** — Final review, docs, persist learnings
|
|
23
|
+
|
|
24
|
+
**🛑 MANDATORY STOPS** — After plan, after each batch, after completion.
|
|
25
|
+
|
|
26
|
+
Refer to the Orchestrator agent's full instructions for the detailed workflow.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create a detailed TDD implementation plan without executing it"
|
|
3
|
+
agent: "Planner"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/scope_map
|
|
7
|
+
- knowledge-base/forge_ground
|
|
8
|
+
- knowledge-base/forge_classify
|
|
9
|
+
- knowledge-base/file_summary
|
|
10
|
+
- knowledge-base/analyze_structure
|
|
11
|
+
- knowledge-base/analyze_dependencies
|
|
12
|
+
- knowledge-base/remember
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Planning Workflow
|
|
16
|
+
|
|
17
|
+
1. **KB Recall** — Search for past plans, architecture decisions
|
|
18
|
+
2. **FORGE Ground** — Classify tier, scope map, seed unknowns
|
|
19
|
+
3. **Research** — Explore codebase, understand subsystems
|
|
20
|
+
4. **Draft Plan** — 3-10 phases with agent assignments, TDD steps
|
|
21
|
+
5. **Dependency Graph** — Group into parallel batches
|
|
22
|
+
6. **Present** — Show plan with open questions
|
|
23
|
+
|
|
24
|
+
**🛑 MANDATORY STOP** — Wait for user approval. Do NOT implement.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Dual-model code + architecture review pipeline"
|
|
3
|
+
agent: "Orchestrator"
|
|
4
|
+
tools:
|
|
5
|
+
- knowledge-base/search
|
|
6
|
+
- knowledge-base/blast_radius
|
|
7
|
+
- knowledge-base/check
|
|
8
|
+
- knowledge-base/test_run
|
|
9
|
+
- knowledge-base/analyze_dependencies
|
|
10
|
+
- knowledge-base/remember
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Review Pipeline
|
|
14
|
+
|
|
15
|
+
### Step 1: Scope
|
|
16
|
+
Identify changed files and their blast radius.
|
|
17
|
+
|
|
18
|
+
### Step 2: Code Review (parallel)
|
|
19
|
+
Launch Code-Reviewer-Alpha and Code-Reviewer-Beta on the same changeset.
|
|
20
|
+
|
|
21
|
+
### Step 3: Architecture Review (if needed)
|
|
22
|
+
If changes cross service boundaries or modify interfaces, launch Architect-Reviewer-Alpha and Architect-Reviewer-Beta.
|
|
23
|
+
|
|
24
|
+
### Step 4: Synthesis
|
|
25
|
+
Merge findings from both reviewers:
|
|
26
|
+
- **Agreements**: Both found same issue → HIGH confidence
|
|
27
|
+
- **Unique findings**: One found, other didn't → verify
|
|
28
|
+
- **Disagreements**: Contradicting verdicts → present both to user
|
|
29
|
+
|
|
30
|
+
### Step 5: Report
|
|
31
|
+
Present unified review with: verdict, findings by severity, recommended actions.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Scaffold generator — reads definitions, picks adapter, writes files.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node scaffold/generate.mjs # Default: all adapters
|
|
7
|
+
* node scaffold/generate.mjs --ide copilot # Copilot only
|
|
8
|
+
* node scaffold/generate.mjs --ide claude-code # Claude Code only [stub]
|
|
9
|
+
*
|
|
10
|
+
* Architecture:
|
|
11
|
+
* definitions/ — IDE-agnostic data (agents, models, tools, prompts, hooks, plugins)
|
|
12
|
+
* adapters/ — IDE-specific generators (copilot, claude-code)
|
|
13
|
+
* {ide}/ — Generated output (what `kb init` copies into workspaces)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
17
|
+
import { dirname, resolve } from 'node:path';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import { generateClaudeCode } from './adapters/claude-code.mjs';
|
|
20
|
+
import { generateCopilot } from './adapters/copilot.mjs';
|
|
21
|
+
|
|
22
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
|
|
24
|
+
const ADAPTERS = {
|
|
25
|
+
copilot: { generate: generateCopilot, outDir: 'copilot' },
|
|
26
|
+
'claude-code': { generate: generateClaudeCode, outDir: 'claude-code' },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// ─── Parse args ───────────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
const ideIdx = args.indexOf('--ide');
|
|
33
|
+
const targetIde = ideIdx >= 0 ? args[ideIdx + 1] : null;
|
|
34
|
+
|
|
35
|
+
const idesToRun = targetIde ? [targetIde] : Object.keys(ADAPTERS);
|
|
36
|
+
|
|
37
|
+
// ─── Generate ─────────────────────────────────────────────────────────────
|
|
38
|
+
|
|
39
|
+
for (const ide of idesToRun) {
|
|
40
|
+
const adapter = ADAPTERS[ide];
|
|
41
|
+
if (!adapter) {
|
|
42
|
+
console.error(`Unknown IDE: ${ide}. Available: ${Object.keys(ADAPTERS).join(', ')}`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const outDir = resolve(__dirname, adapter.outDir);
|
|
47
|
+
|
|
48
|
+
// Clean output directory for a fresh generation
|
|
49
|
+
if (existsSync(outDir)) {
|
|
50
|
+
rmSync(outDir, { recursive: true });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
console.log(`\n─── Generating ${ide} scaffold ───`);
|
|
54
|
+
|
|
55
|
+
const files = adapter.generate();
|
|
56
|
+
|
|
57
|
+
if (files.length === 0) {
|
|
58
|
+
console.log(` (stub — no files generated)`);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let count = 0;
|
|
63
|
+
for (const { path, content } of files) {
|
|
64
|
+
const fullPath = resolve(outDir, path);
|
|
65
|
+
mkdirSync(dirname(fullPath), { recursive: true });
|
|
66
|
+
writeFileSync(fullPath, content, 'utf-8');
|
|
67
|
+
console.log(` ${path}`);
|
|
68
|
+
count++;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
console.log(` → ${count} files written to scaffold/${adapter.outDir}/`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log('\nDone!');
|