@dragonflymcp/plugin 1.0.0
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/.claude-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/core/annotations.d.ts +71 -0
- package/dist/core/annotations.d.ts.map +1 -0
- package/dist/core/annotations.js +61 -0
- package/dist/core/annotations.js.map +1 -0
- package/dist/core/config.d.ts +66 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +131 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/dispatcher.d.ts +77 -0
- package/dist/core/dispatcher.d.ts.map +1 -0
- package/dist/core/dispatcher.js +132 -0
- package/dist/core/dispatcher.js.map +1 -0
- package/dist/core/server.d.ts +24 -0
- package/dist/core/server.d.ts.map +1 -0
- package/dist/core/server.js +41 -0
- package/dist/core/server.js.map +1 -0
- package/dist/core/store.d.ts +91 -0
- package/dist/core/store.d.ts.map +1 -0
- package/dist/core/store.js +157 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/types.d.ts +128 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/test-utils/store-harness.d.ts +41 -0
- package/dist/test-utils/store-harness.d.ts.map +1 -0
- package/dist/test-utils/store-harness.js +61 -0
- package/dist/test-utils/store-harness.js.map +1 -0
- package/dist/tools/analytics/aggregators.d.ts +18 -0
- package/dist/tools/analytics/aggregators.d.ts.map +1 -0
- package/dist/tools/analytics/aggregators.js +260 -0
- package/dist/tools/analytics/aggregators.js.map +1 -0
- package/dist/tools/analytics/aggregators.test.d.ts +2 -0
- package/dist/tools/analytics/aggregators.test.d.ts.map +1 -0
- package/dist/tools/analytics/aggregators.test.js +177 -0
- package/dist/tools/analytics/aggregators.test.js.map +1 -0
- package/dist/tools/analytics/drift.d.ts +15 -0
- package/dist/tools/analytics/drift.d.ts.map +1 -0
- package/dist/tools/analytics/drift.js +135 -0
- package/dist/tools/analytics/drift.js.map +1 -0
- package/dist/tools/analytics/drift.test.d.ts +2 -0
- package/dist/tools/analytics/drift.test.d.ts.map +1 -0
- package/dist/tools/analytics/drift.test.js +99 -0
- package/dist/tools/analytics/drift.test.js.map +1 -0
- package/dist/tools/analytics/index.d.ts +10 -0
- package/dist/tools/analytics/index.d.ts.map +1 -0
- package/dist/tools/analytics/index.js +192 -0
- package/dist/tools/analytics/index.js.map +1 -0
- package/dist/tools/analytics/learner.d.ts +29 -0
- package/dist/tools/analytics/learner.d.ts.map +1 -0
- package/dist/tools/analytics/learner.js +135 -0
- package/dist/tools/analytics/learner.js.map +1 -0
- package/dist/tools/analytics/learner.test.d.ts +2 -0
- package/dist/tools/analytics/learner.test.d.ts.map +1 -0
- package/dist/tools/analytics/learner.test.js +118 -0
- package/dist/tools/analytics/learner.test.js.map +1 -0
- package/dist/tools/analytics/observe.d.ts +22 -0
- package/dist/tools/analytics/observe.d.ts.map +1 -0
- package/dist/tools/analytics/observe.js +143 -0
- package/dist/tools/analytics/observe.js.map +1 -0
- package/dist/tools/analytics/observe.test.d.ts +2 -0
- package/dist/tools/analytics/observe.test.d.ts.map +1 -0
- package/dist/tools/analytics/observe.test.js +95 -0
- package/dist/tools/analytics/observe.test.js.map +1 -0
- package/dist/tools/analytics/store.d.ts +29 -0
- package/dist/tools/analytics/store.d.ts.map +1 -0
- package/dist/tools/analytics/store.js +192 -0
- package/dist/tools/analytics/store.js.map +1 -0
- package/dist/tools/analytics/types.d.ts +290 -0
- package/dist/tools/analytics/types.d.ts.map +1 -0
- package/dist/tools/analytics/types.js +7 -0
- package/dist/tools/analytics/types.js.map +1 -0
- package/dist/tools/ast/index.d.ts +8 -0
- package/dist/tools/ast/index.d.ts.map +1 -0
- package/dist/tools/ast/index.js +242 -0
- package/dist/tools/ast/index.js.map +1 -0
- package/dist/tools/ast/indexer.d.ts +41 -0
- package/dist/tools/ast/indexer.d.ts.map +1 -0
- package/dist/tools/ast/indexer.js +617 -0
- package/dist/tools/ast/indexer.js.map +1 -0
- package/dist/tools/ast/store.d.ts +87 -0
- package/dist/tools/ast/store.d.ts.map +1 -0
- package/dist/tools/ast/store.js +280 -0
- package/dist/tools/ast/store.js.map +1 -0
- package/dist/tools/ast/store.test.d.ts +6 -0
- package/dist/tools/ast/store.test.d.ts.map +1 -0
- package/dist/tools/ast/store.test.js +257 -0
- package/dist/tools/ast/store.test.js.map +1 -0
- package/dist/tools/bridge/bridge.d.ts +37 -0
- package/dist/tools/bridge/bridge.d.ts.map +1 -0
- package/dist/tools/bridge/bridge.js +82 -0
- package/dist/tools/bridge/bridge.js.map +1 -0
- package/dist/tools/bridge/bridge.test.d.ts +2 -0
- package/dist/tools/bridge/bridge.test.d.ts.map +1 -0
- package/dist/tools/bridge/bridge.test.js +119 -0
- package/dist/tools/bridge/bridge.test.js.map +1 -0
- package/dist/tools/bridge/index.d.ts +8 -0
- package/dist/tools/bridge/index.d.ts.map +1 -0
- package/dist/tools/bridge/index.js +153 -0
- package/dist/tools/bridge/index.js.map +1 -0
- package/dist/tools/bridge/store.d.ts +45 -0
- package/dist/tools/bridge/store.d.ts.map +1 -0
- package/dist/tools/bridge/store.js +307 -0
- package/dist/tools/bridge/store.js.map +1 -0
- package/dist/tools/bridge/store.test.d.ts +2 -0
- package/dist/tools/bridge/store.test.d.ts.map +1 -0
- package/dist/tools/bridge/store.test.js +180 -0
- package/dist/tools/bridge/store.test.js.map +1 -0
- package/dist/tools/bridge/types.d.ts +44 -0
- package/dist/tools/bridge/types.d.ts.map +1 -0
- package/dist/tools/bridge/types.js +6 -0
- package/dist/tools/bridge/types.js.map +1 -0
- package/dist/tools/evolve/algorithm.d.ts +33 -0
- package/dist/tools/evolve/algorithm.d.ts.map +1 -0
- package/dist/tools/evolve/algorithm.js +64 -0
- package/dist/tools/evolve/algorithm.js.map +1 -0
- package/dist/tools/evolve/algorithm.test.d.ts +6 -0
- package/dist/tools/evolve/algorithm.test.d.ts.map +1 -0
- package/dist/tools/evolve/algorithm.test.js +138 -0
- package/dist/tools/evolve/algorithm.test.js.map +1 -0
- package/dist/tools/evolve/index.d.ts +11 -0
- package/dist/tools/evolve/index.d.ts.map +1 -0
- package/dist/tools/evolve/index.js +300 -0
- package/dist/tools/evolve/index.js.map +1 -0
- package/dist/tools/evolve/store.d.ts +27 -0
- package/dist/tools/evolve/store.d.ts.map +1 -0
- package/dist/tools/evolve/store.js +147 -0
- package/dist/tools/evolve/store.js.map +1 -0
- package/dist/tools/evolve/store.test.d.ts +6 -0
- package/dist/tools/evolve/store.test.d.ts.map +1 -0
- package/dist/tools/evolve/store.test.js +162 -0
- package/dist/tools/evolve/store.test.js.map +1 -0
- package/dist/tools/evolve/types.d.ts +38 -0
- package/dist/tools/evolve/types.d.ts.map +1 -0
- package/dist/tools/evolve/types.js +6 -0
- package/dist/tools/evolve/types.js.map +1 -0
- package/dist/tools/framework/content-loader.d.ts +45 -0
- package/dist/tools/framework/content-loader.d.ts.map +1 -0
- package/dist/tools/framework/content-loader.js +258 -0
- package/dist/tools/framework/content-loader.js.map +1 -0
- package/dist/tools/framework/content-loader.test.d.ts +5 -0
- package/dist/tools/framework/content-loader.test.d.ts.map +1 -0
- package/dist/tools/framework/content-loader.test.js +262 -0
- package/dist/tools/framework/content-loader.test.js.map +1 -0
- package/dist/tools/framework/index.d.ts +30 -0
- package/dist/tools/framework/index.d.ts.map +1 -0
- package/dist/tools/framework/index.js +517 -0
- package/dist/tools/framework/index.js.map +1 -0
- package/dist/tools/framework/session.d.ts +85 -0
- package/dist/tools/framework/session.d.ts.map +1 -0
- package/dist/tools/framework/session.js +311 -0
- package/dist/tools/framework/session.js.map +1 -0
- package/dist/tools/framework/session.test.d.ts +5 -0
- package/dist/tools/framework/session.test.d.ts.map +1 -0
- package/dist/tools/framework/session.test.js +291 -0
- package/dist/tools/framework/session.test.js.map +1 -0
- package/dist/tools/framework/sync-evaluator.d.ts +41 -0
- package/dist/tools/framework/sync-evaluator.d.ts.map +1 -0
- package/dist/tools/framework/sync-evaluator.js +298 -0
- package/dist/tools/framework/sync-evaluator.js.map +1 -0
- package/dist/tools/framework/sync-evaluator.test.d.ts +5 -0
- package/dist/tools/framework/sync-evaluator.test.d.ts.map +1 -0
- package/dist/tools/framework/sync-evaluator.test.js +288 -0
- package/dist/tools/framework/sync-evaluator.test.js.map +1 -0
- package/dist/tools/framework/types.d.ts +279 -0
- package/dist/tools/framework/types.d.ts.map +1 -0
- package/dist/tools/framework/types.js +6 -0
- package/dist/tools/framework/types.js.map +1 -0
- package/dist/tools/framework/workflow-intelligence.d.ts +55 -0
- package/dist/tools/framework/workflow-intelligence.d.ts.map +1 -0
- package/dist/tools/framework/workflow-intelligence.js +199 -0
- package/dist/tools/framework/workflow-intelligence.js.map +1 -0
- package/dist/tools/framework/workflow-intelligence.test.d.ts +6 -0
- package/dist/tools/framework/workflow-intelligence.test.d.ts.map +1 -0
- package/dist/tools/framework/workflow-intelligence.test.js +257 -0
- package/dist/tools/framework/workflow-intelligence.test.js.map +1 -0
- package/dist/tools/framework/workflow-planner.d.ts +10 -0
- package/dist/tools/framework/workflow-planner.d.ts.map +1 -0
- package/dist/tools/framework/workflow-planner.js +214 -0
- package/dist/tools/framework/workflow-planner.js.map +1 -0
- package/dist/tools/framework/workflow-planner.test.d.ts +5 -0
- package/dist/tools/framework/workflow-planner.test.d.ts.map +1 -0
- package/dist/tools/framework/workflow-planner.test.js +137 -0
- package/dist/tools/framework/workflow-planner.test.js.map +1 -0
- package/dist/tools/knowledge/bridge.d.ts +34 -0
- package/dist/tools/knowledge/bridge.d.ts.map +1 -0
- package/dist/tools/knowledge/bridge.js +249 -0
- package/dist/tools/knowledge/bridge.js.map +1 -0
- package/dist/tools/knowledge/bridge.test.d.ts +5 -0
- package/dist/tools/knowledge/bridge.test.d.ts.map +1 -0
- package/dist/tools/knowledge/bridge.test.js +221 -0
- package/dist/tools/knowledge/bridge.test.js.map +1 -0
- package/dist/tools/knowledge/extractor.d.ts +22 -0
- package/dist/tools/knowledge/extractor.d.ts.map +1 -0
- package/dist/tools/knowledge/extractor.js +154 -0
- package/dist/tools/knowledge/extractor.js.map +1 -0
- package/dist/tools/knowledge/index.d.ts +12 -0
- package/dist/tools/knowledge/index.d.ts.map +1 -0
- package/dist/tools/knowledge/index.js +505 -0
- package/dist/tools/knowledge/index.js.map +1 -0
- package/dist/tools/knowledge/retrieval.d.ts +28 -0
- package/dist/tools/knowledge/retrieval.d.ts.map +1 -0
- package/dist/tools/knowledge/retrieval.js +164 -0
- package/dist/tools/knowledge/retrieval.js.map +1 -0
- package/dist/tools/knowledge/store.d.ts +96 -0
- package/dist/tools/knowledge/store.d.ts.map +1 -0
- package/dist/tools/knowledge/store.js +562 -0
- package/dist/tools/knowledge/store.js.map +1 -0
- package/dist/tools/knowledge/store.test.d.ts +6 -0
- package/dist/tools/knowledge/store.test.d.ts.map +1 -0
- package/dist/tools/knowledge/store.test.js +385 -0
- package/dist/tools/knowledge/store.test.js.map +1 -0
- package/dist/tools/knowledge/types.d.ts +168 -0
- package/dist/tools/knowledge/types.d.ts.map +1 -0
- package/dist/tools/knowledge/types.js +6 -0
- package/dist/tools/knowledge/types.js.map +1 -0
- package/dist/tools/memory/evolution.d.ts +31 -0
- package/dist/tools/memory/evolution.d.ts.map +1 -0
- package/dist/tools/memory/evolution.js +130 -0
- package/dist/tools/memory/evolution.js.map +1 -0
- package/dist/tools/memory/index.d.ts +11 -0
- package/dist/tools/memory/index.d.ts.map +1 -0
- package/dist/tools/memory/index.js +239 -0
- package/dist/tools/memory/index.js.map +1 -0
- package/dist/tools/memory/store.d.ts +75 -0
- package/dist/tools/memory/store.d.ts.map +1 -0
- package/dist/tools/memory/store.js +398 -0
- package/dist/tools/memory/store.js.map +1 -0
- package/dist/tools/memory/store.test.d.ts +6 -0
- package/dist/tools/memory/store.test.d.ts.map +1 -0
- package/dist/tools/memory/store.test.js +429 -0
- package/dist/tools/memory/store.test.js.map +1 -0
- package/dist/tools/memory/types.d.ts +171 -0
- package/dist/tools/memory/types.d.ts.map +1 -0
- package/dist/tools/memory/types.js +6 -0
- package/dist/tools/memory/types.js.map +1 -0
- package/dist/tools/pipeline/composer.d.ts +29 -0
- package/dist/tools/pipeline/composer.d.ts.map +1 -0
- package/dist/tools/pipeline/composer.js +225 -0
- package/dist/tools/pipeline/composer.js.map +1 -0
- package/dist/tools/pipeline/composer.test.d.ts +2 -0
- package/dist/tools/pipeline/composer.test.d.ts.map +1 -0
- package/dist/tools/pipeline/composer.test.js +162 -0
- package/dist/tools/pipeline/composer.test.js.map +1 -0
- package/dist/tools/pipeline/index.d.ts +8 -0
- package/dist/tools/pipeline/index.d.ts.map +1 -0
- package/dist/tools/pipeline/index.js +102 -0
- package/dist/tools/pipeline/index.js.map +1 -0
- package/dist/tools/pipeline/planner.d.ts +10 -0
- package/dist/tools/pipeline/planner.d.ts.map +1 -0
- package/dist/tools/pipeline/planner.js +147 -0
- package/dist/tools/pipeline/planner.js.map +1 -0
- package/dist/tools/pipeline/planner.test.d.ts +2 -0
- package/dist/tools/pipeline/planner.test.d.ts.map +1 -0
- package/dist/tools/pipeline/planner.test.js +96 -0
- package/dist/tools/pipeline/planner.test.js.map +1 -0
- package/dist/tools/pipeline/preconditions.d.ts +14 -0
- package/dist/tools/pipeline/preconditions.d.ts.map +1 -0
- package/dist/tools/pipeline/preconditions.js +65 -0
- package/dist/tools/pipeline/preconditions.js.map +1 -0
- package/dist/tools/pipeline/preconditions.test.d.ts +2 -0
- package/dist/tools/pipeline/preconditions.test.d.ts.map +1 -0
- package/dist/tools/pipeline/preconditions.test.js +74 -0
- package/dist/tools/pipeline/preconditions.test.js.map +1 -0
- package/dist/tools/pipeline/types.d.ts +105 -0
- package/dist/tools/pipeline/types.d.ts.map +1 -0
- package/dist/tools/pipeline/types.js +6 -0
- package/dist/tools/pipeline/types.js.map +1 -0
- package/dist/tools/repair/index.d.ts +8 -0
- package/dist/tools/repair/index.d.ts.map +1 -0
- package/dist/tools/repair/index.js +384 -0
- package/dist/tools/repair/index.js.map +1 -0
- package/dist/tools/repair/repairer.d.ts +67 -0
- package/dist/tools/repair/repairer.d.ts.map +1 -0
- package/dist/tools/repair/repairer.js +257 -0
- package/dist/tools/repair/repairer.js.map +1 -0
- package/dist/tools/repair/repairer.test.d.ts +6 -0
- package/dist/tools/repair/repairer.test.d.ts.map +1 -0
- package/dist/tools/repair/repairer.test.js +159 -0
- package/dist/tools/repair/repairer.test.js.map +1 -0
- package/dist/tools/semantic/chunker.d.ts +23 -0
- package/dist/tools/semantic/chunker.d.ts.map +1 -0
- package/dist/tools/semantic/chunker.js +244 -0
- package/dist/tools/semantic/chunker.js.map +1 -0
- package/dist/tools/semantic/embedder.d.ts +16 -0
- package/dist/tools/semantic/embedder.d.ts.map +1 -0
- package/dist/tools/semantic/embedder.js +88 -0
- package/dist/tools/semantic/embedder.js.map +1 -0
- package/dist/tools/semantic/index.d.ts +8 -0
- package/dist/tools/semantic/index.d.ts.map +1 -0
- package/dist/tools/semantic/index.js +144 -0
- package/dist/tools/semantic/index.js.map +1 -0
- package/dist/tools/semantic/store.d.ts +31 -0
- package/dist/tools/semantic/store.d.ts.map +1 -0
- package/dist/tools/semantic/store.js +168 -0
- package/dist/tools/semantic/store.js.map +1 -0
- package/dist/tools/semantic/store.test.d.ts +6 -0
- package/dist/tools/semantic/store.test.d.ts.map +1 -0
- package/dist/tools/semantic/store.test.js +240 -0
- package/dist/tools/semantic/store.test.js.map +1 -0
- package/dist/tools/spec/generator.d.ts +32 -0
- package/dist/tools/spec/generator.d.ts.map +1 -0
- package/dist/tools/spec/generator.js +278 -0
- package/dist/tools/spec/generator.js.map +1 -0
- package/dist/tools/spec/generator.test.d.ts +6 -0
- package/dist/tools/spec/generator.test.d.ts.map +1 -0
- package/dist/tools/spec/generator.test.js +208 -0
- package/dist/tools/spec/generator.test.js.map +1 -0
- package/dist/tools/spec/index.d.ts +11 -0
- package/dist/tools/spec/index.d.ts.map +1 -0
- package/dist/tools/spec/index.js +426 -0
- package/dist/tools/spec/index.js.map +1 -0
- package/dist/tools/spec/store.d.ts +24 -0
- package/dist/tools/spec/store.d.ts.map +1 -0
- package/dist/tools/spec/store.js +104 -0
- package/dist/tools/spec/store.js.map +1 -0
- package/dist/tools/spec/store.test.d.ts +6 -0
- package/dist/tools/spec/store.test.d.ts.map +1 -0
- package/dist/tools/spec/store.test.js +173 -0
- package/dist/tools/spec/store.test.js.map +1 -0
- package/dist/tools/spec/types.d.ts +61 -0
- package/dist/tools/spec/types.d.ts.map +1 -0
- package/dist/tools/spec/types.js +6 -0
- package/dist/tools/spec/types.js.map +1 -0
- package/dist/tools/state/index.d.ts +11 -0
- package/dist/tools/state/index.d.ts.map +1 -0
- package/dist/tools/state/index.js +386 -0
- package/dist/tools/state/index.js.map +1 -0
- package/dist/tools/state/migrate.d.ts +39 -0
- package/dist/tools/state/migrate.d.ts.map +1 -0
- package/dist/tools/state/migrate.js +242 -0
- package/dist/tools/state/migrate.js.map +1 -0
- package/dist/tools/state/migrate.test.d.ts +2 -0
- package/dist/tools/state/migrate.test.d.ts.map +1 -0
- package/dist/tools/state/migrate.test.js +265 -0
- package/dist/tools/state/migrate.test.js.map +1 -0
- package/dist/tools/state/store.d.ts +107 -0
- package/dist/tools/state/store.d.ts.map +1 -0
- package/dist/tools/state/store.js +365 -0
- package/dist/tools/state/store.js.map +1 -0
- package/dist/tools/state/store.test.d.ts +5 -0
- package/dist/tools/state/store.test.d.ts.map +1 -0
- package/dist/tools/state/store.test.js +293 -0
- package/dist/tools/state/store.test.js.map +1 -0
- package/dist/tools/state/types.d.ts +90 -0
- package/dist/tools/state/types.d.ts.map +1 -0
- package/dist/tools/state/types.js +6 -0
- package/dist/tools/state/types.js.map +1 -0
- package/dist/tools/testing/analyzer.d.ts +44 -0
- package/dist/tools/testing/analyzer.d.ts.map +1 -0
- package/dist/tools/testing/analyzer.js +280 -0
- package/dist/tools/testing/analyzer.js.map +1 -0
- package/dist/tools/testing/generator.d.ts +57 -0
- package/dist/tools/testing/generator.d.ts.map +1 -0
- package/dist/tools/testing/generator.js +478 -0
- package/dist/tools/testing/generator.js.map +1 -0
- package/dist/tools/testing/generator.test.d.ts +6 -0
- package/dist/tools/testing/generator.test.d.ts.map +1 -0
- package/dist/tools/testing/generator.test.js +285 -0
- package/dist/tools/testing/generator.test.js.map +1 -0
- package/dist/tools/testing/index.d.ts +8 -0
- package/dist/tools/testing/index.d.ts.map +1 -0
- package/dist/tools/testing/index.js +373 -0
- package/dist/tools/testing/index.js.map +1 -0
- package/dist/utils/embedder.d.ts +7 -0
- package/dist/utils/embedder.d.ts.map +1 -0
- package/dist/utils/embedder.js +13 -0
- package/dist/utils/embedder.js.map +1 -0
- package/dist/utils/execution.d.ts +68 -0
- package/dist/utils/execution.d.ts.map +1 -0
- package/dist/utils/execution.js +467 -0
- package/dist/utils/execution.js.map +1 -0
- package/dist/utils/graph.d.ts +26 -0
- package/dist/utils/graph.d.ts.map +1 -0
- package/dist/utils/graph.js +32 -0
- package/dist/utils/graph.js.map +1 -0
- package/dist/utils/guards.d.ts +32 -0
- package/dist/utils/guards.d.ts.map +1 -0
- package/dist/utils/guards.js +40 -0
- package/dist/utils/guards.js.map +1 -0
- package/dist/utils/ids.d.ts +5 -0
- package/dist/utils/ids.d.ts.map +1 -0
- package/dist/utils/ids.js +7 -0
- package/dist/utils/ids.js.map +1 -0
- package/dist/utils/languages.d.ts +34 -0
- package/dist/utils/languages.d.ts.map +1 -0
- package/dist/utils/languages.js +153 -0
- package/dist/utils/languages.js.map +1 -0
- package/dist/utils/lazy.d.ts +17 -0
- package/dist/utils/lazy.d.ts.map +1 -0
- package/dist/utils/lazy.js +35 -0
- package/dist/utils/lazy.js.map +1 -0
- package/dist/utils/project.d.ts +41 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +82 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/responses.d.ts +27 -0
- package/dist/utils/responses.d.ts.map +1 -0
- package/dist/utils/responses.js +72 -0
- package/dist/utils/responses.js.map +1 -0
- package/dist/utils/vectors.d.ts +33 -0
- package/dist/utils/vectors.d.ts.map +1 -0
- package/dist/utils/vectors.js +80 -0
- package/dist/utils/vectors.js.map +1 -0
- package/dist/utils/vectors.test.d.ts +6 -0
- package/dist/utils/vectors.test.d.ts.map +1 -0
- package/dist/utils/vectors.test.js +96 -0
- package/dist/utils/vectors.test.js.map +1 -0
- package/package.json +69 -0
- package/scripts/init.js +142 -0
- package/templates/CLAUDE.md.template +96 -0
- package/templates/agents/architecture-concept.md +237 -0
- package/templates/agents/checkpoint-concept.md +218 -0
- package/templates/agents/code-analysis-concept.md +171 -0
- package/templates/agents/compete-control.md +44 -0
- package/templates/agents/compete-evaluator.md +87 -0
- package/templates/agents/compete-treatment.md +55 -0
- package/templates/agents/context-concept.md +254 -0
- package/templates/agents/debate-advocate.md +127 -0
- package/templates/agents/debate-critic.md +119 -0
- package/templates/agents/debate-synthesis.md +160 -0
- package/templates/agents/documentation-concept.md +294 -0
- package/templates/agents/implementation-concept.md +165 -0
- package/templates/agents/quality-concept.md +299 -0
- package/templates/agents/research-concept.md +169 -0
- package/templates/agents/security-concept.md +255 -0
- package/templates/agents/story-concept.md +207 -0
- package/templates/agents/verification-concept.md +456 -0
- package/templates/agents/version-concept.md +163 -0
- package/templates/anchors/directory.anchor.yaml.template +53 -0
- package/templates/anchors/rules.anchor.yaml.template +70 -0
- package/templates/anchors/safety.anchor.yaml.template +96 -0
- package/templates/claude-md-managed.template +105 -0
- package/templates/commands/cache.md.template +439 -0
- package/templates/commands/checkpoint.md.template +121 -0
- package/templates/commands/classify.md.template +138 -0
- package/templates/commands/compete.md.template +90 -0
- package/templates/commands/costs.md.template +111 -0
- package/templates/commands/estimate.md.template +196 -0
- package/templates/commands/explore.md.template +186 -0
- package/templates/commands/feature.md.template +216 -0
- package/templates/commands/forget.md.template +104 -0
- package/templates/commands/global-recall.md.template +250 -0
- package/templates/commands/global-remember.md.template +187 -0
- package/templates/commands/health.md.template +107 -0
- package/templates/commands/help.md.template +253 -0
- package/templates/commands/observe.md.template +211 -0
- package/templates/commands/pr-review.md.template +164 -0
- package/templates/commands/predict-cost.md.template +251 -0
- package/templates/commands/profile.md.template +142 -0
- package/templates/commands/reasoning.md.template +228 -0
- package/templates/commands/recall.md.template +197 -0
- package/templates/commands/remember.md.template +148 -0
- package/templates/commands/replay.md.template +449 -0
- package/templates/commands/restore.md.template +87 -0
- package/templates/commands/retrospective.md.template +47 -0
- package/templates/commands/slo.md.template +286 -0
- package/templates/commands/spec.md.template +164 -0
- package/templates/commands/status.md.template +53 -0
- package/templates/commands/sync.md.template +321 -0
- package/templates/commands/task.md.template +86 -0
- package/templates/commands/trace.md.template +86 -0
- package/templates/commands/visualize.md.template +216 -0
- package/templates/commands/workflow.md.template +375 -0
- package/templates/concepts/README.md +329 -0
- package/templates/concepts/architecture.md.template +74 -0
- package/templates/concepts/code-analysis.md.template +186 -0
- package/templates/concepts/context-compactor.md.template +393 -0
- package/templates/concepts/context.md.template +62 -0
- package/templates/concepts/documentation.md.template +452 -0
- package/templates/concepts/estimator.md.template +214 -0
- package/templates/concepts/exploration.md.template +257 -0
- package/templates/concepts/global-memory.md.template +222 -0
- package/templates/concepts/implementation.md.template +62 -0
- package/templates/concepts/pr-review.md.template +277 -0
- package/templates/concepts/project-profile.md.template +358 -0
- package/templates/concepts/quality.md.template +63 -0
- package/templates/concepts/react-fallback.md.template +286 -0
- package/templates/concepts/research.md.template +221 -0
- package/templates/concepts/retrospective.md.template +93 -0
- package/templates/concepts/security.md.template +442 -0
- package/templates/concepts/slo.md.template +274 -0
- package/templates/concepts/spec.md.template +71 -0
- package/templates/concepts/story.md.template +50 -0
- package/templates/concepts/tool-router.md.template +289 -0
- package/templates/concepts/verification-synthesizer.md.template +279 -0
- package/templates/concepts/version.md.template +61 -0
- package/templates/config.yaml.template +347 -0
- package/templates/examples/README.md +77 -0
- package/templates/examples/architecture/api-design.yaml.template +286 -0
- package/templates/examples/architecture/oauth-authentication.yaml.template +305 -0
- package/templates/health/status.yaml.template +120 -0
- package/templates/hooks/concept-complete.sh.template +45 -0
- package/templates/hooks/lib/common.sh.template +160 -0
- package/templates/hooks/post-commit.sh.template +37 -0
- package/templates/hooks/post-concept-action.template +39 -0
- package/templates/hooks/post-tool-structure-check.sh.template +138 -0
- package/templates/hooks/post-tool-use.sh.template +51 -0
- package/templates/hooks/pre-compact.sh.template +48 -0
- package/templates/hooks/pre-tool-grounding.template +148 -0
- package/templates/hooks/session-exit-checkpoint.sh.template +35 -0
- package/templates/hooks/session-start.sh.template +67 -0
- package/templates/hooks/statusline.sh.template +148 -0
- package/templates/hooks/stop.sh.template +45 -0
- package/templates/hooks/subagent-stop.sh.template +40 -0
- package/templates/hooks/sync-blocked.sh.template +45 -0
- package/templates/hooks/timeout.sh.template +48 -0
- package/templates/hooks/user-prompt-submit.sh.template +68 -0
- package/templates/koan/README.md +58 -0
- package/templates/memory/index.yaml.template +48 -0
- package/templates/memory/procedural/debugging.yaml.template +24 -0
- package/templates/memory/procedural/workflows.yaml.template +22 -0
- package/templates/memory/semantic/architecture.yaml.template +21 -0
- package/templates/memory/semantic/conventions.yaml.template +18 -0
- package/templates/memory/semantic/patterns.yaml.template +21 -0
- package/templates/memory/semantic/preferences.yaml.template +18 -0
- package/templates/prompts/architecture.yaml.template +349 -0
- package/templates/prompts/context.yaml.template +384 -0
- package/templates/prompts/implementation.yaml.template +365 -0
- package/templates/prompts/planning.yaml.template +303 -0
- package/templates/prompts/quality.yaml.template +345 -0
- package/templates/prompts/retrospective.yaml.template +231 -0
- package/templates/prompts/slo.yaml.template +360 -0
- package/templates/prompts/story.yaml.template +236 -0
- package/templates/prompts/tree-of-thoughts.yaml.template +299 -0
- package/templates/prompts/verification.yaml.template +286 -0
- package/templates/prompts/version.yaml.template +279 -0
- package/templates/schemas/agent-schema.json +98 -0
- package/templates/schemas/architecture.schema.json +69 -0
- package/templates/schemas/config-schema.json +165 -0
- package/templates/schemas/implementation.schema.json +75 -0
- package/templates/schemas/planning.schema.json +243 -0
- package/templates/schemas/provenance.schema.json +111 -0
- package/templates/schemas/retrospective.schema.json +174 -0
- package/templates/schemas/review.schema.json +284 -0
- package/templates/schemas/slo.schema.json +443 -0
- package/templates/schemas/story.schema.json +68 -0
- package/templates/schemas/sync-schema.json +196 -0
- package/templates/schemas/task.schema.json +127 -0
- package/templates/schemas/tree-of-thoughts.schema.json +175 -0
- package/templates/schemas/verification.schema.json +106 -0
- package/templates/settings.full.json.template +135 -0
- package/templates/settings.minimal.json.template +68 -0
- package/templates/settings.standard.json.template +135 -0
- package/templates/skills/acceptance-criteria-generation.md.template +330 -0
- package/templates/skills/accessibility-checking.md.template +341 -0
- package/templates/skills/api-design-patterns.md.template +395 -0
- package/templates/skills/batch-processing.md.template +605 -0
- package/templates/skills/branch-strategy.md.template +362 -0
- package/templates/skills/changelog-generation.md.template +403 -0
- package/templates/skills/code-coverage-analysis.md.template +362 -0
- package/templates/skills/code-style-enforcement.md.template +294 -0
- package/templates/skills/code-template-patterns.md.template +419 -0
- package/templates/skills/concept-development.md.template +159 -0
- package/templates/skills/context-prioritization.md.template +306 -0
- package/templates/skills/cost-optimization.md.template +482 -0
- package/templates/skills/cross-project-knowledge.md.template +316 -0
- package/templates/skills/dependency-impact-analysis.md.template +263 -0
- package/templates/skills/documentation-generation.md.template +409 -0
- package/templates/skills/effort-estimation.md.template +350 -0
- package/templates/skills/error-classification.md.template +709 -0
- package/templates/skills/error-messages.md.template +339 -0
- package/templates/skills/ide-diagnostics.md.template +480 -0
- package/templates/skills/incremental-loading.md.template +574 -0
- package/templates/skills/output-caching.md.template +524 -0
- package/templates/skills/performance-estimation.md.template +325 -0
- package/templates/skills/performance-testing-patterns.md.template +341 -0
- package/templates/skills/phase2-optimizations-summary.md.template +458 -0
- package/templates/skills/progressive-disclosure-pattern.md.template +190 -0
- package/templates/skills/project-structure.md.template +372 -0
- package/templates/skills/provenance-analysis.md.template +609 -0
- package/templates/skills/react-executor.md.template +366 -0
- package/templates/skills/refactoring-patterns.md.template +422 -0
- package/templates/skills/release-management.md.template +373 -0
- package/templates/skills/requirement-prioritization.md.template +357 -0
- package/templates/skills/schema-validation.md.template +321 -0
- package/templates/skills/security-design-patterns.md.template +692 -0
- package/templates/skills/security-vulnerability-scanning.md.template +663 -0
- package/templates/skills/semantic-memory.md.template +266 -0
- package/templates/skills/semantic-versioning.md.template +371 -0
- package/templates/skills/smart-retry.md.template +676 -0
- package/templates/skills/smart-summarization.md.template +358 -0
- package/templates/skills/story-decomposition.md.template +278 -0
- package/templates/skills/synchronization-patterns.md.template +303 -0
- package/templates/skills/test-generation-strategy.md.template +247 -0
- package/templates/skills/workflow-replay.md.template +478 -0
- package/templates/skills/wysiwid-principles.md.template +364 -0
- package/templates/skills-manifest.yaml.template +526 -0
- package/templates/stubs/agents/architecture-concept.md +20 -0
- package/templates/stubs/agents/checkpoint-concept.md +19 -0
- package/templates/stubs/agents/code-analysis-concept.md +36 -0
- package/templates/stubs/agents/context-concept.md +37 -0
- package/templates/stubs/agents/debate-advocate.md +12 -0
- package/templates/stubs/agents/debate-critic.md +12 -0
- package/templates/stubs/agents/debate-synthesis.md +12 -0
- package/templates/stubs/agents/documentation-concept.md +39 -0
- package/templates/stubs/agents/implementation-concept.md +41 -0
- package/templates/stubs/agents/quality-concept.md +41 -0
- package/templates/stubs/agents/research-concept.md +35 -0
- package/templates/stubs/agents/security-concept.md +40 -0
- package/templates/stubs/agents/spec-concept.md +35 -0
- package/templates/stubs/agents/story-concept.md +36 -0
- package/templates/stubs/agents/verification-concept.md +39 -0
- package/templates/stubs/agents/version-concept.md +37 -0
- package/templates/stubs/commands/cache.md.template +2 -0
- package/templates/stubs/commands/checkpoint.md.template +2 -0
- package/templates/stubs/commands/classify.md.template +2 -0
- package/templates/stubs/commands/compete.md.template +2 -0
- package/templates/stubs/commands/costs.md.template +2 -0
- package/templates/stubs/commands/estimate.md.template +2 -0
- package/templates/stubs/commands/explore.md.template +2 -0
- package/templates/stubs/commands/feature.md.template +2 -0
- package/templates/stubs/commands/forget.md.template +2 -0
- package/templates/stubs/commands/global-recall.md.template +2 -0
- package/templates/stubs/commands/global-remember.md.template +2 -0
- package/templates/stubs/commands/health.md.template +2 -0
- package/templates/stubs/commands/help.md.template +2 -0
- package/templates/stubs/commands/observe.md.template +2 -0
- package/templates/stubs/commands/pr-review.md.template +2 -0
- package/templates/stubs/commands/predict-cost.md.template +2 -0
- package/templates/stubs/commands/profile.md.template +2 -0
- package/templates/stubs/commands/reasoning.md.template +2 -0
- package/templates/stubs/commands/recall.md.template +2 -0
- package/templates/stubs/commands/remember.md.template +2 -0
- package/templates/stubs/commands/replay.md.template +2 -0
- package/templates/stubs/commands/restore.md.template +2 -0
- package/templates/stubs/commands/retrospective.md.template +2 -0
- package/templates/stubs/commands/slo.md.template +2 -0
- package/templates/stubs/commands/spec.md.template +2 -0
- package/templates/stubs/commands/sync.md.template +2 -0
- package/templates/stubs/commands/task.md.template +2 -0
- package/templates/stubs/commands/trace.md.template +2 -0
- package/templates/stubs/commands/visualize.md.template +2 -0
- package/templates/stubs/commands/workflow.md.template +2 -0
- package/templates/synchronizations/archive/adaptive-learning.yaml.template +595 -0
- package/templates/synchronizations/archive/code-understanding-flow.yaml.template +533 -0
- package/templates/synchronizations/archive/collaboration-flow.yaml.template +521 -0
- package/templates/synchronizations/archive/context-folding.yaml.template +353 -0
- package/templates/synchronizations/archive/dead-letter-queue.yaml.template +530 -0
- package/templates/synchronizations/archive/documentation-flow.yaml.template +560 -0
- package/templates/synchronizations/archive/error-recovery-flow.yaml.template +1031 -0
- package/templates/synchronizations/archive/execution-loop.yaml.template +336 -0
- package/templates/synchronizations/archive/exploration-flow.yaml.template +369 -0
- package/templates/synchronizations/archive/feature-development.yaml.template +2145 -0
- package/templates/synchronizations/archive/learning-loop.yaml.template +657 -0
- package/templates/synchronizations/archive/multi-verify.yaml.template +346 -0
- package/templates/synchronizations/archive/planning-flow.yaml.template +312 -0
- package/templates/synchronizations/archive/retrospective-flow.yaml.template +277 -0
- package/templates/synchronizations/archive/security-flow.yaml.template +477 -0
- package/templates/synchronizations/archive/slo-monitoring.yaml.template +209 -0
- package/templates/synchronizations/archive/task-routing.yaml.template +489 -0
- package/templates/synchronizations/archive/test-driven.yaml.template +291 -0
- package/templates/synchronizations/archive/tool-routing.yaml.template +326 -0
- package/templates/synchronizations/archive/verification-flow.yaml.template +407 -0
- package/templates/synchronizations/error-policy.yaml.template +188 -0
- package/templates/synchronizations/main.sync.template +319 -0
- package/templates/synchronizations/slo-registry.yaml.template +229 -0
- package/templates/tasks/task.yaml.template +67 -0
- package/templates/zen-profile.yaml.template +14 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec
|
|
3
|
+
type: concept
|
|
4
|
+
model: sonnet
|
|
5
|
+
state_location: "koan/state/state.db (specs table)"
|
|
6
|
+
execution: task-tool
|
|
7
|
+
cost_tier: low
|
|
8
|
+
purpose: "Define structured specifications and generate type-safe code generation prompts"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Spec Concept
|
|
12
|
+
|
|
13
|
+
> **Note**: This is a reference file. The authoritative documentation is in `.claude/agents/spec-concept.md`.
|
|
14
|
+
|
|
15
|
+
**Model Assignment**: Sonnet 4.5 (specification analysis and prompt generation)
|
|
16
|
+
**Cost per Action**: ~$0.005
|
|
17
|
+
**State Location**: `koan/state/state.db` (specs table)
|
|
18
|
+
**Never Calls**: No other concepts (pure spec→prompt transformation)
|
|
19
|
+
|
|
20
|
+
## Quick Reference
|
|
21
|
+
|
|
22
|
+
### Actions
|
|
23
|
+
- `save(name, data)` - Save or update a specification
|
|
24
|
+
- `get(id)` - Retrieve a spec by ID, name, or latest
|
|
25
|
+
- `list(filters)` - List specs with status/language filters
|
|
26
|
+
- `generate(id)` - Transform spec into a code generation prompt
|
|
27
|
+
|
|
28
|
+
### State Format
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"id": "spec-...",
|
|
32
|
+
"name": "string-utils",
|
|
33
|
+
"data": {
|
|
34
|
+
"name": "string-utils",
|
|
35
|
+
"description": "String utility functions",
|
|
36
|
+
"target_language": "go",
|
|
37
|
+
"types": [...],
|
|
38
|
+
"functions": [...],
|
|
39
|
+
"properties": [...]
|
|
40
|
+
},
|
|
41
|
+
"status": "draft",
|
|
42
|
+
"generatedCode": null,
|
|
43
|
+
"createdAt": "ISO-8601",
|
|
44
|
+
"updatedAt": "ISO-8601"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Spec Status Flow
|
|
49
|
+
```
|
|
50
|
+
draft → ready → generating → generated → verified
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Supported Languages
|
|
54
|
+
- Go, Swift, Rust, TypeScript, Python
|
|
55
|
+
|
|
56
|
+
### Integration
|
|
57
|
+
- **Triggered by**: User via `/spec` command
|
|
58
|
+
- **Produces**: Structured prompts for code generation
|
|
59
|
+
- **Can feed into**: Implementation concept for code generation
|
|
60
|
+
|
|
61
|
+
## Full Documentation
|
|
62
|
+
|
|
63
|
+
See `.claude/agents/spec-concept.md` for:
|
|
64
|
+
- Specification authoring guidelines
|
|
65
|
+
- Contract definition patterns (pre/post conditions)
|
|
66
|
+
- Property-based testing integration
|
|
67
|
+
- Multi-language type mapping
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
**See also**: [Agent Definition](.claude/agents/spec-concept.md)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: story
|
|
3
|
+
type: concept
|
|
4
|
+
model: sonnet
|
|
5
|
+
state_location: "state.db (stories table)"
|
|
6
|
+
execution: task-tool
|
|
7
|
+
cost_tier: low
|
|
8
|
+
purpose: "Capture and validate user requirements"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Story Concept
|
|
12
|
+
|
|
13
|
+
> **Note**: This is a reference file. The authoritative documentation is in `.claude/agents/story-concept.md`.
|
|
14
|
+
|
|
15
|
+
**Model Assignment**: Sonnet 4.5 (fast, efficient for structured data capture)
|
|
16
|
+
**Cost per Action**: ~$0.003
|
|
17
|
+
**State Location**: SQLite `state.db` (via `zen_story_save`/`zen_story_get`/`zen_story_list`)
|
|
18
|
+
**Never Calls**: No other concepts (pure input processing)
|
|
19
|
+
|
|
20
|
+
## Quick Reference
|
|
21
|
+
|
|
22
|
+
### Actions
|
|
23
|
+
- `create(title, description, context)` - Captures a new user requirement
|
|
24
|
+
- `validate(story_id)` - Checks if a story is ready for architecture
|
|
25
|
+
- `query(filter)` - Search stories by status, date, keywords
|
|
26
|
+
|
|
27
|
+
### State Format
|
|
28
|
+
Stories are stored in SQLite via MCP tools. Use:
|
|
29
|
+
- `zen_story_save` — save or update a story
|
|
30
|
+
- `zen_story_get` — retrieve by ID or latest
|
|
31
|
+
- `zen_story_list` — list stories with optional status filter
|
|
32
|
+
|
|
33
|
+
The `data` field contains the full story content (summary, acceptance_criteria, context, metadata).
|
|
34
|
+
|
|
35
|
+
### Integration
|
|
36
|
+
- **Triggered by**: `/feature` command, direct invocation
|
|
37
|
+
- **Triggers**: Architecture concept via `story-to-arch` sync when status="ready"
|
|
38
|
+
|
|
39
|
+
## Full Documentation
|
|
40
|
+
|
|
41
|
+
See `.claude/agents/story-concept.md` for:
|
|
42
|
+
- Complete action documentation
|
|
43
|
+
- Output format examples
|
|
44
|
+
- Validation rules
|
|
45
|
+
- Error handling
|
|
46
|
+
- Never/Always Do This guidelines
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
**See also**: [Agent Definition](.claude/agents/story-concept.md)
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tool-router
|
|
3
|
+
type: concept
|
|
4
|
+
model: sonnet
|
|
5
|
+
purpose: "Dynamically select optimal tools based on task context and learn from outcomes"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Tool Router Concept
|
|
9
|
+
|
|
10
|
+
The Tool Router provides intelligent, dynamic tool selection based on task context, available tools, and learned patterns from past tool usage.
|
|
11
|
+
|
|
12
|
+
## Research Foundation
|
|
13
|
+
|
|
14
|
+
Based on:
|
|
15
|
+
- **DyLAN (2025)**: Dynamic agent networks with 25% accuracy improvement
|
|
16
|
+
- **Natural Language Tools**: 18.4 percentage point improvement in tool calling
|
|
17
|
+
- **MetaTools**: Meta-execution layer for dynamic tool reasoning
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
- Select optimal tools for each task type
|
|
22
|
+
- Suggest tool sequences for multi-step operations
|
|
23
|
+
- Learn from outcomes to improve future selections
|
|
24
|
+
- Reduce tool misuse and improve efficiency
|
|
25
|
+
|
|
26
|
+
## Actions
|
|
27
|
+
|
|
28
|
+
### select_tools
|
|
29
|
+
|
|
30
|
+
Given a task, recommend the best tools and order to use them.
|
|
31
|
+
|
|
32
|
+
**Inputs:**
|
|
33
|
+
- `task_description`: Natural language description of the task
|
|
34
|
+
- `available_tools`: List of available tools with descriptions
|
|
35
|
+
- `context`: Current context (files open, recent actions, etc.)
|
|
36
|
+
- `constraints`: Time, cost, or other constraints
|
|
37
|
+
|
|
38
|
+
**Process:**
|
|
39
|
+
|
|
40
|
+
1. **Task Classification**
|
|
41
|
+
- Categorize task type (search, edit, analyze, debug, etc.)
|
|
42
|
+
- Identify sub-tasks that require different tools
|
|
43
|
+
- Determine task complexity
|
|
44
|
+
|
|
45
|
+
2. **Tool Matching**
|
|
46
|
+
- Match task type to tool capabilities
|
|
47
|
+
- Consider tool strengths and weaknesses
|
|
48
|
+
- Factor in current context
|
|
49
|
+
|
|
50
|
+
3. **Sequence Planning**
|
|
51
|
+
- Determine optimal tool order
|
|
52
|
+
- Identify parallel vs sequential operations
|
|
53
|
+
- Plan fallback tools if primary fails
|
|
54
|
+
|
|
55
|
+
4. **Outcome Prediction**
|
|
56
|
+
- Estimate likelihood of success for each tool
|
|
57
|
+
- Consider past performance for similar tasks
|
|
58
|
+
|
|
59
|
+
**Output Format:**
|
|
60
|
+
```yaml
|
|
61
|
+
routing:
|
|
62
|
+
task_type: "code_search"
|
|
63
|
+
complexity: "medium"
|
|
64
|
+
|
|
65
|
+
recommended_tools:
|
|
66
|
+
- tool: "ast-index.find_symbol"
|
|
67
|
+
purpose: "Find symbol definition"
|
|
68
|
+
confidence: 0.9
|
|
69
|
+
priority: 1
|
|
70
|
+
|
|
71
|
+
- tool: "semantic-rag.semantic_search"
|
|
72
|
+
purpose: "Find semantically related code"
|
|
73
|
+
confidence: 0.85
|
|
74
|
+
priority: 2
|
|
75
|
+
|
|
76
|
+
- tool: "grep"
|
|
77
|
+
purpose: "Fallback text search"
|
|
78
|
+
confidence: 0.7
|
|
79
|
+
priority: 3
|
|
80
|
+
fallback_for: "ast-index.find_symbol"
|
|
81
|
+
|
|
82
|
+
sequence:
|
|
83
|
+
- step: 1
|
|
84
|
+
tool: "ast-index.find_symbol"
|
|
85
|
+
on_failure: "semantic-rag.semantic_search"
|
|
86
|
+
- step: 2
|
|
87
|
+
tool: "Read"
|
|
88
|
+
condition: "if symbol found"
|
|
89
|
+
|
|
90
|
+
parallel_opportunities:
|
|
91
|
+
- ["ast-index.find_symbol", "semantic-rag.semantic_search"]
|
|
92
|
+
|
|
93
|
+
rationale: |
|
|
94
|
+
AST index is best for precise symbol lookup.
|
|
95
|
+
Semantic search provides broader context if exact match fails.
|
|
96
|
+
Grep as final fallback for unusual naming patterns.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### learn_from_outcome
|
|
100
|
+
|
|
101
|
+
Update routing knowledge based on tool usage results.
|
|
102
|
+
|
|
103
|
+
**Inputs:**
|
|
104
|
+
- `task_id`: ID of the completed task
|
|
105
|
+
- `task_type`: Type of task
|
|
106
|
+
- `tools_used`: List of tools actually used
|
|
107
|
+
- `tools_suggested`: List of tools that were suggested
|
|
108
|
+
- `outcome`: "success" | "failure" | "partial"
|
|
109
|
+
- `metrics`: Time, token usage, etc.
|
|
110
|
+
|
|
111
|
+
**Process:**
|
|
112
|
+
|
|
113
|
+
1. **Compare Suggestion vs Reality**
|
|
114
|
+
- Which suggested tools were used?
|
|
115
|
+
- Were additional tools needed?
|
|
116
|
+
- Which tools failed?
|
|
117
|
+
|
|
118
|
+
2. **Extract Patterns**
|
|
119
|
+
- Task characteristics that led to success/failure
|
|
120
|
+
- Tool combinations that work well together
|
|
121
|
+
- Warning signs for tool mismatches
|
|
122
|
+
|
|
123
|
+
3. **Update Routing Rules**
|
|
124
|
+
- Adjust confidence scores
|
|
125
|
+
- Add new tool associations
|
|
126
|
+
- Record failure patterns
|
|
127
|
+
|
|
128
|
+
**Output Format:**
|
|
129
|
+
```yaml
|
|
130
|
+
learning:
|
|
131
|
+
task_id: "task-042"
|
|
132
|
+
task_type: "code_search"
|
|
133
|
+
outcome: "success"
|
|
134
|
+
|
|
135
|
+
observations:
|
|
136
|
+
- "AST index succeeded on first try"
|
|
137
|
+
- "Semantic search not needed"
|
|
138
|
+
|
|
139
|
+
adjustments:
|
|
140
|
+
- tool: "ast-index.find_symbol"
|
|
141
|
+
task_type: "code_search"
|
|
142
|
+
confidence_delta: +0.02
|
|
143
|
+
new_confidence: 0.92
|
|
144
|
+
|
|
145
|
+
- tool: "semantic-rag.semantic_search"
|
|
146
|
+
task_type: "code_search"
|
|
147
|
+
note: "Not needed when symbol name is known"
|
|
148
|
+
|
|
149
|
+
patterns_learned:
|
|
150
|
+
- pattern: "known_symbol_name"
|
|
151
|
+
best_tool: "ast-index.find_symbol"
|
|
152
|
+
confidence: 0.95
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### get_tool_stats
|
|
156
|
+
|
|
157
|
+
Get statistics about tool usage and effectiveness.
|
|
158
|
+
|
|
159
|
+
**Inputs:**
|
|
160
|
+
- `tool_name`: Specific tool (optional, all if not specified)
|
|
161
|
+
- `task_type`: Filter by task type (optional)
|
|
162
|
+
- `timeframe`: Time range (default: last 7 days)
|
|
163
|
+
|
|
164
|
+
**Output Format:**
|
|
165
|
+
```yaml
|
|
166
|
+
stats:
|
|
167
|
+
timeframe: "7d"
|
|
168
|
+
tools:
|
|
169
|
+
- name: "ast-index.find_symbol"
|
|
170
|
+
uses: 45
|
|
171
|
+
success_rate: 0.91
|
|
172
|
+
avg_time_ms: 120
|
|
173
|
+
best_for: ["code_search", "symbol_lookup"]
|
|
174
|
+
|
|
175
|
+
- name: "semantic-rag.semantic_search"
|
|
176
|
+
uses: 32
|
|
177
|
+
success_rate: 0.84
|
|
178
|
+
avg_time_ms: 450
|
|
179
|
+
best_for: ["concept_search", "related_code"]
|
|
180
|
+
|
|
181
|
+
- name: "grep"
|
|
182
|
+
uses: 18
|
|
183
|
+
success_rate: 0.72
|
|
184
|
+
avg_time_ms: 80
|
|
185
|
+
best_for: ["text_search", "regex_patterns"]
|
|
186
|
+
often_fallback_for: ["ast-index.find_symbol"]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### suggest_tool_for_error
|
|
190
|
+
|
|
191
|
+
When an error occurs, suggest better tool options.
|
|
192
|
+
|
|
193
|
+
**Inputs:**
|
|
194
|
+
- `failed_tool`: Tool that failed
|
|
195
|
+
- `error_message`: Error that occurred
|
|
196
|
+
- `task_context`: What was being attempted
|
|
197
|
+
|
|
198
|
+
**Output Format:**
|
|
199
|
+
```yaml
|
|
200
|
+
suggestion:
|
|
201
|
+
failed_tool: "ast-index.find_symbol"
|
|
202
|
+
error: "Symbol not found in index"
|
|
203
|
+
|
|
204
|
+
alternatives:
|
|
205
|
+
- tool: "semantic-rag.semantic_search"
|
|
206
|
+
rationale: "May find symbol by semantic meaning"
|
|
207
|
+
confidence: 0.7
|
|
208
|
+
|
|
209
|
+
- tool: "grep"
|
|
210
|
+
rationale: "Text search might find non-indexed files"
|
|
211
|
+
confidence: 0.6
|
|
212
|
+
|
|
213
|
+
root_cause_hypothesis:
|
|
214
|
+
- "Symbol might be in unindexed file"
|
|
215
|
+
- "Symbol name might be dynamically generated"
|
|
216
|
+
|
|
217
|
+
recommended_action: "Try semantic search with function description"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Routing Rules Database
|
|
221
|
+
|
|
222
|
+
Tool routing is learned and stored:
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
# koan/routing/rules.yaml
|
|
226
|
+
routing_rules:
|
|
227
|
+
- task_pattern: "find.*function|method|class"
|
|
228
|
+
tools:
|
|
229
|
+
- name: "ast-index.find_symbol"
|
|
230
|
+
confidence: 0.92
|
|
231
|
+
- name: "semantic-rag.semantic_search"
|
|
232
|
+
confidence: 0.80
|
|
233
|
+
learned_at: "2025-12-07"
|
|
234
|
+
success_count: 45
|
|
235
|
+
failure_count: 4
|
|
236
|
+
|
|
237
|
+
- task_pattern: "search.*similar|related"
|
|
238
|
+
tools:
|
|
239
|
+
- name: "semantic-rag.semantic_search"
|
|
240
|
+
confidence: 0.88
|
|
241
|
+
- name: "semantic-rag.find_similar_code"
|
|
242
|
+
confidence: 0.85
|
|
243
|
+
learned_at: "2025-12-07"
|
|
244
|
+
success_count: 32
|
|
245
|
+
failure_count: 5
|
|
246
|
+
|
|
247
|
+
- task_pattern: "debug|error|exception"
|
|
248
|
+
tools:
|
|
249
|
+
- name: "exploration.branch_explore"
|
|
250
|
+
confidence: 0.75
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Integration
|
|
254
|
+
|
|
255
|
+
### With Workflow System
|
|
256
|
+
- Routes tools before each concept action
|
|
257
|
+
- Tracks tool usage across workflow phases
|
|
258
|
+
- Optimizes tool sequences over time
|
|
259
|
+
|
|
260
|
+
### With Execution Loop
|
|
261
|
+
- Suggests repair tools when execution fails
|
|
262
|
+
- Learns which tools work for specific error types
|
|
263
|
+
|
|
264
|
+
### With Learning System
|
|
265
|
+
- Stores routing patterns in memory
|
|
266
|
+
- Retrieves relevant patterns for new tasks
|
|
267
|
+
- Continuous improvement from outcomes
|
|
268
|
+
|
|
269
|
+
## Configuration
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
# .claude/config.yaml
|
|
273
|
+
tool_routing:
|
|
274
|
+
enabled: true
|
|
275
|
+
min_confidence: 0.6 # Don't suggest below this
|
|
276
|
+
learn_from_outcomes: true # Update rules based on results
|
|
277
|
+
parallel_threshold: 0.8 # Suggest parallel if both above this
|
|
278
|
+
fallback_depth: 2 # How many fallback tools to suggest
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Metrics
|
|
282
|
+
|
|
283
|
+
Track routing effectiveness:
|
|
284
|
+
- Suggestion accuracy (suggested tool was used and succeeded)
|
|
285
|
+
- First-try success rate (primary suggestion worked)
|
|
286
|
+
- Fallback frequency (how often fallbacks needed)
|
|
287
|
+
- Learning velocity (improvement over time)
|
|
288
|
+
|
|
289
|
+
Stored in: `koan/metrics/tool-routing.yaml`
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-synthesizer
|
|
3
|
+
type: concept
|
|
4
|
+
model: sonnet
|
|
5
|
+
purpose: "Synthesize results from multiple verification agents into unified decision"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Verification Synthesizer Concept
|
|
9
|
+
|
|
10
|
+
The Verification Synthesizer combines results from multiple parallel verification agents into a coherent, unified assessment and decision.
|
|
11
|
+
|
|
12
|
+
## Research Foundation
|
|
13
|
+
|
|
14
|
+
Based on:
|
|
15
|
+
- **Anthropic Multi-Agent Research (2025)**: Orchestrator-worker pattern for improved accuracy
|
|
16
|
+
- **Multi-agent consensus**: Catches errors single agents miss
|
|
17
|
+
- **Ensemble methods**: Multiple perspectives reduce individual biases
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
- Combine parallel review results
|
|
22
|
+
- Detect and resolve disagreements
|
|
23
|
+
- Make final approval/rejection decision
|
|
24
|
+
- Identify issues requiring human attention
|
|
25
|
+
|
|
26
|
+
## Actions
|
|
27
|
+
|
|
28
|
+
### synthesize
|
|
29
|
+
|
|
30
|
+
Combine results from multiple verification agents.
|
|
31
|
+
|
|
32
|
+
**Inputs:**
|
|
33
|
+
- `reviews`: Array of review results from parallel agents
|
|
34
|
+
- `require_consensus`: Whether all agents must agree (default: true)
|
|
35
|
+
- `threshold`: Minimum agreement ratio (default: 0.8)
|
|
36
|
+
- `priority_weights`: Weight for each review type
|
|
37
|
+
|
|
38
|
+
**Process:**
|
|
39
|
+
|
|
40
|
+
1. **Collect Results**
|
|
41
|
+
- Gather all parallel review outputs
|
|
42
|
+
- Extract findings, scores, and recommendations
|
|
43
|
+
- Normalize scoring scales
|
|
44
|
+
|
|
45
|
+
2. **Find Agreement**
|
|
46
|
+
- Identify findings that appear in multiple reviews
|
|
47
|
+
- Calculate consensus score for each issue
|
|
48
|
+
- Flag disagreements for analysis
|
|
49
|
+
|
|
50
|
+
3. **Resolve Conflicts**
|
|
51
|
+
- For disagreements, analyze reasoning from each side
|
|
52
|
+
- Apply priority rules (security > correctness > performance)
|
|
53
|
+
- Defer to higher-confidence review when unclear
|
|
54
|
+
|
|
55
|
+
4. **Generate Decision**
|
|
56
|
+
- Aggregate scores with weights
|
|
57
|
+
- Apply threshold for approval
|
|
58
|
+
- List all issues requiring attention
|
|
59
|
+
|
|
60
|
+
**Output Format:**
|
|
61
|
+
```yaml
|
|
62
|
+
synthesis:
|
|
63
|
+
synthesis_id: "syn-001"
|
|
64
|
+
reviews_analyzed: 3
|
|
65
|
+
|
|
66
|
+
consensus:
|
|
67
|
+
reached: true
|
|
68
|
+
agreement_ratio: 0.92
|
|
69
|
+
unanimous_on:
|
|
70
|
+
- "No SQL injection vulnerabilities"
|
|
71
|
+
- "Error handling is adequate"
|
|
72
|
+
|
|
73
|
+
disagreements:
|
|
74
|
+
- issue: "Potential memory leak in loop"
|
|
75
|
+
positions:
|
|
76
|
+
review_security: "Not a concern"
|
|
77
|
+
review_correctness: "Minor concern"
|
|
78
|
+
review_performance: "Should be fixed"
|
|
79
|
+
resolution: "Flag for review - performance agent concern valid"
|
|
80
|
+
resolved_by: "priority_performance"
|
|
81
|
+
|
|
82
|
+
combined_findings:
|
|
83
|
+
critical: []
|
|
84
|
+
high:
|
|
85
|
+
- finding: "Missing rate limiting on endpoint"
|
|
86
|
+
from: ["review_security"]
|
|
87
|
+
action_required: true
|
|
88
|
+
medium:
|
|
89
|
+
- finding: "Could use connection pooling"
|
|
90
|
+
from: ["review_performance"]
|
|
91
|
+
action_required: false
|
|
92
|
+
low:
|
|
93
|
+
- finding: "Magic number could be constant"
|
|
94
|
+
from: ["review_correctness"]
|
|
95
|
+
action_required: false
|
|
96
|
+
|
|
97
|
+
scores:
|
|
98
|
+
security: 8.5
|
|
99
|
+
correctness: 9.0
|
|
100
|
+
performance: 7.5
|
|
101
|
+
overall: 8.3
|
|
102
|
+
|
|
103
|
+
decision: "approved_with_conditions"
|
|
104
|
+
conditions:
|
|
105
|
+
- "Add rate limiting before production"
|
|
106
|
+
- "Review potential memory leak"
|
|
107
|
+
|
|
108
|
+
confidence: 0.88
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### resolve_disagreement
|
|
112
|
+
|
|
113
|
+
Deeply analyze a specific disagreement between agents.
|
|
114
|
+
|
|
115
|
+
**Inputs:**
|
|
116
|
+
- `issue`: The disagreed-upon issue
|
|
117
|
+
- `positions`: Each agent's position and reasoning
|
|
118
|
+
- `context`: Additional context about the code
|
|
119
|
+
|
|
120
|
+
**Output Format:**
|
|
121
|
+
```yaml
|
|
122
|
+
resolution:
|
|
123
|
+
issue: "Potential memory leak in loop"
|
|
124
|
+
|
|
125
|
+
analysis:
|
|
126
|
+
security_perspective: |
|
|
127
|
+
Loop allocations are bounded by input size.
|
|
128
|
+
Input is validated, so no security concern.
|
|
129
|
+
|
|
130
|
+
correctness_perspective: |
|
|
131
|
+
Objects should be reused but behavior is correct.
|
|
132
|
+
Minor optimization opportunity.
|
|
133
|
+
|
|
134
|
+
performance_perspective: |
|
|
135
|
+
Each iteration allocates new objects.
|
|
136
|
+
For large inputs, GC pressure could cause latency spikes.
|
|
137
|
+
|
|
138
|
+
verdict: "performance_agent_correct"
|
|
139
|
+
rationale: |
|
|
140
|
+
While not a security or correctness issue, the performance
|
|
141
|
+
concern is valid for production workloads. The loop should
|
|
142
|
+
use object pooling or pre-allocation.
|
|
143
|
+
|
|
144
|
+
severity: "medium"
|
|
145
|
+
action: "recommend_fix"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### check_unanimous
|
|
149
|
+
|
|
150
|
+
Check if all reviews unanimously agree on a verdict.
|
|
151
|
+
|
|
152
|
+
**Inputs:**
|
|
153
|
+
- `reviews`: All reviews to check
|
|
154
|
+
- `require`: What must be unanimous ("all_approved" | "no_critical")
|
|
155
|
+
- `on_failure`: Action if not unanimous ("block" | "escalate" | "warn")
|
|
156
|
+
|
|
157
|
+
**Output Format:**
|
|
158
|
+
```yaml
|
|
159
|
+
unanimous_check:
|
|
160
|
+
requirement: "all_approved"
|
|
161
|
+
result: false
|
|
162
|
+
|
|
163
|
+
votes:
|
|
164
|
+
review_security: "approved"
|
|
165
|
+
review_correctness: "approved"
|
|
166
|
+
review_performance: "changes_requested"
|
|
167
|
+
|
|
168
|
+
blocking_reviews:
|
|
169
|
+
- review: "review_performance"
|
|
170
|
+
reason: "Memory allocation in hot path"
|
|
171
|
+
severity: "medium"
|
|
172
|
+
|
|
173
|
+
action_taken: "block"
|
|
174
|
+
message: |
|
|
175
|
+
Unanimous approval not achieved.
|
|
176
|
+
review_performance requested changes.
|
|
177
|
+
Please address before proceeding.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### generate_report
|
|
181
|
+
|
|
182
|
+
Generate comprehensive verification report.
|
|
183
|
+
|
|
184
|
+
**Inputs:**
|
|
185
|
+
- `synthesis`: Synthesis results
|
|
186
|
+
- `format`: Report format ("summary" | "detailed" | "executive")
|
|
187
|
+
|
|
188
|
+
**Output Format:**
|
|
189
|
+
```yaml
|
|
190
|
+
report:
|
|
191
|
+
format: "detailed"
|
|
192
|
+
generated_at: "2025-12-07T23:45:00Z"
|
|
193
|
+
|
|
194
|
+
executive_summary: |
|
|
195
|
+
Implementation reviewed by 3 specialized agents.
|
|
196
|
+
Overall score: 8.3/10. Approved with conditions.
|
|
197
|
+
1 high-priority issue requires attention before production.
|
|
198
|
+
|
|
199
|
+
detailed_findings:
|
|
200
|
+
security:
|
|
201
|
+
score: 8.5
|
|
202
|
+
findings: [...]
|
|
203
|
+
recommendations: [...]
|
|
204
|
+
|
|
205
|
+
correctness:
|
|
206
|
+
score: 9.0
|
|
207
|
+
findings: [...]
|
|
208
|
+
recommendations: [...]
|
|
209
|
+
|
|
210
|
+
performance:
|
|
211
|
+
score: 7.5
|
|
212
|
+
findings: [...]
|
|
213
|
+
recommendations: [...]
|
|
214
|
+
|
|
215
|
+
action_items:
|
|
216
|
+
before_merge:
|
|
217
|
+
- "Add rate limiting"
|
|
218
|
+
before_production:
|
|
219
|
+
- "Review memory usage under load"
|
|
220
|
+
|
|
221
|
+
reviewer_notes:
|
|
222
|
+
- from: "review_security"
|
|
223
|
+
note: "Consider adding audit logging for sensitive operations"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Priority Rules
|
|
227
|
+
|
|
228
|
+
When agents disagree, apply these priority rules:
|
|
229
|
+
|
|
230
|
+
1. **Security over everything** - Security concerns always take priority
|
|
231
|
+
2. **Correctness over performance** - Correct code beats fast incorrect code
|
|
232
|
+
3. **Higher severity wins** - Critical issues override minor ones
|
|
233
|
+
4. **Higher confidence wins** - More confident agents trusted more
|
|
234
|
+
|
|
235
|
+
## Integration
|
|
236
|
+
|
|
237
|
+
### With Quality Concept
|
|
238
|
+
- Extends quality review with multi-agent verification
|
|
239
|
+
- Results feed into quality reports
|
|
240
|
+
- Findings tracked in quality metrics
|
|
241
|
+
|
|
242
|
+
### With Workflow
|
|
243
|
+
- Gates implementation completion
|
|
244
|
+
- Can block or allow progression
|
|
245
|
+
- Conditions carried forward
|
|
246
|
+
|
|
247
|
+
### With Learning System
|
|
248
|
+
- Disagreement patterns stored for learning
|
|
249
|
+
- Resolution effectiveness tracked
|
|
250
|
+
- Agent accuracy monitored
|
|
251
|
+
|
|
252
|
+
## Configuration
|
|
253
|
+
|
|
254
|
+
```yaml
|
|
255
|
+
# .claude/config.yaml
|
|
256
|
+
verification:
|
|
257
|
+
parallel_agents:
|
|
258
|
+
- "security"
|
|
259
|
+
- "correctness"
|
|
260
|
+
- "performance"
|
|
261
|
+
consensus_threshold: 0.8
|
|
262
|
+
require_unanimous_for:
|
|
263
|
+
- "security_critical"
|
|
264
|
+
- "production_deployment"
|
|
265
|
+
priority_order:
|
|
266
|
+
- "security"
|
|
267
|
+
- "correctness"
|
|
268
|
+
- "performance"
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Metrics
|
|
272
|
+
|
|
273
|
+
Track verification effectiveness:
|
|
274
|
+
- Consensus rate
|
|
275
|
+
- Disagreement frequency by type
|
|
276
|
+
- Post-synthesis issue discovery rate
|
|
277
|
+
- Agent accuracy over time
|
|
278
|
+
|
|
279
|
+
Stored in: `koan/metrics/verification.yaml`
|