@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,533 @@
|
|
|
1
|
+
# Code Understanding Workflow Synchronizations (Phase 3)
|
|
2
|
+
# Integrates AST-index and semantic-rag MCP servers into the feature development workflow
|
|
3
|
+
#
|
|
4
|
+
# WYSIWID Principle: This YAML defines when MCP servers are invoked for code understanding
|
|
5
|
+
# Read this file to see exactly when indexing, searching, and reference checking happens
|
|
6
|
+
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
|
|
9
|
+
# Global SLO defaults for code understanding (all MCP operations are local/free)
|
|
10
|
+
slo_defaults:
|
|
11
|
+
expected_duration_ms: 2000
|
|
12
|
+
max_duration_ms: 30000
|
|
13
|
+
expected_cost_usd: 0.0
|
|
14
|
+
max_cost_usd: 0.0
|
|
15
|
+
expected_context_tokens: 1000
|
|
16
|
+
success_rate_target: 0.95
|
|
17
|
+
on_timeout:
|
|
18
|
+
action: "continue"
|
|
19
|
+
message: "MCP operation timed out - proceeding without context"
|
|
20
|
+
on_cost_exceeded:
|
|
21
|
+
action: "alert"
|
|
22
|
+
continue: true
|
|
23
|
+
|
|
24
|
+
synchronizations:
|
|
25
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
26
|
+
# Phase 1: Project Initialization (Sequential)
|
|
27
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
28
|
+
# When first story is created, build code understanding indexes
|
|
29
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
30
|
+
|
|
31
|
+
- id: "project-init-ast-index"
|
|
32
|
+
description: "Build AST index when project is first used"
|
|
33
|
+
when:
|
|
34
|
+
concept: "story"
|
|
35
|
+
action: "create"
|
|
36
|
+
status: "completed"
|
|
37
|
+
where:
|
|
38
|
+
query: "project.ast_indexed != true"
|
|
39
|
+
then:
|
|
40
|
+
- action: "mcp_call"
|
|
41
|
+
server: "ast-index"
|
|
42
|
+
tool: "index_project"
|
|
43
|
+
inputs:
|
|
44
|
+
paths: ["${project.source_paths}"]
|
|
45
|
+
languages: ["${project.languages}"]
|
|
46
|
+
on_success:
|
|
47
|
+
- action: "set_flag"
|
|
48
|
+
flag: "project.ast_indexed"
|
|
49
|
+
value: true
|
|
50
|
+
- action: "set_metadata"
|
|
51
|
+
key: "project.ast_index_updated"
|
|
52
|
+
value: "${timestamp}"
|
|
53
|
+
|
|
54
|
+
# SLO Expectations for AST indexing
|
|
55
|
+
slo_expectations:
|
|
56
|
+
expected_duration_ms: 5000 # 5 seconds for typical project
|
|
57
|
+
max_duration_ms: 60000 # 1 minute timeout
|
|
58
|
+
expected_cost_usd: 0.0 # MCP server is local, no API costs
|
|
59
|
+
max_cost_usd: 0.0
|
|
60
|
+
expected_context_tokens: 100 # Minimal context (just index stats)
|
|
61
|
+
max_context_tokens: 500
|
|
62
|
+
success_rate_target: 0.95 # 95% of indexing succeeds
|
|
63
|
+
|
|
64
|
+
on_timeout:
|
|
65
|
+
action: "alert"
|
|
66
|
+
message: "AST indexing taking too long - check project size"
|
|
67
|
+
continue: true # Don't block workflow
|
|
68
|
+
|
|
69
|
+
on_context_exceeded:
|
|
70
|
+
action: "alert"
|
|
71
|
+
investigate: false
|
|
72
|
+
|
|
73
|
+
provenance:
|
|
74
|
+
flow_id: "${flow.id}"
|
|
75
|
+
reason: "First story created - building AST index for code navigation"
|
|
76
|
+
phase: 3
|
|
77
|
+
mcp_server: "ast-index"
|
|
78
|
+
category: "initialization"
|
|
79
|
+
|
|
80
|
+
- id: "project-init-semantic-embeddings"
|
|
81
|
+
description: "Create semantic embeddings after AST index completes"
|
|
82
|
+
when:
|
|
83
|
+
concept: "story"
|
|
84
|
+
action: "create"
|
|
85
|
+
status: "completed"
|
|
86
|
+
where:
|
|
87
|
+
query: "project.ast_indexed == true AND project.semantic_embedded != true"
|
|
88
|
+
then:
|
|
89
|
+
- action: "mcp_call"
|
|
90
|
+
server: "semantic-rag"
|
|
91
|
+
tool: "embed_project"
|
|
92
|
+
inputs:
|
|
93
|
+
paths: ["${project.source_paths}"]
|
|
94
|
+
incremental: false
|
|
95
|
+
on_success:
|
|
96
|
+
- action: "set_flag"
|
|
97
|
+
flag: "project.semantic_embedded"
|
|
98
|
+
value: true
|
|
99
|
+
- action: "set_metadata"
|
|
100
|
+
key: "project.embeddings_updated"
|
|
101
|
+
value: "${timestamp}"
|
|
102
|
+
|
|
103
|
+
# SLO Expectations for semantic embedding
|
|
104
|
+
slo_expectations:
|
|
105
|
+
expected_duration_ms: 15000 # 15 seconds for typical project
|
|
106
|
+
max_duration_ms: 120000 # 2 minute timeout (embedding is slower)
|
|
107
|
+
expected_cost_usd: 0.0 # Local embeddings, no API cost
|
|
108
|
+
max_cost_usd: 0.0
|
|
109
|
+
expected_context_tokens: 100 # Minimal context
|
|
110
|
+
max_context_tokens: 500
|
|
111
|
+
success_rate_target: 0.90 # 90% success (embedding can be finicky)
|
|
112
|
+
|
|
113
|
+
on_timeout:
|
|
114
|
+
action: "alert"
|
|
115
|
+
message: "Semantic embedding taking too long - check project size"
|
|
116
|
+
continue: true
|
|
117
|
+
|
|
118
|
+
on_context_exceeded:
|
|
119
|
+
action: "alert"
|
|
120
|
+
investigate: false
|
|
121
|
+
|
|
122
|
+
provenance:
|
|
123
|
+
flow_id: "${flow.id}"
|
|
124
|
+
reason: "AST index complete - building semantic embeddings for context retrieval"
|
|
125
|
+
phase: 3
|
|
126
|
+
mcp_server: "semantic-rag"
|
|
127
|
+
category: "initialization"
|
|
128
|
+
|
|
129
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
130
|
+
# Phase 2: Architecture Design Context Loading (Sequential)
|
|
131
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
132
|
+
# Before architecture design, load relevant code context
|
|
133
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
134
|
+
|
|
135
|
+
- id: "arch-semantic-context"
|
|
136
|
+
description: "Load semantic context before architecture design"
|
|
137
|
+
when:
|
|
138
|
+
concept: "architecture"
|
|
139
|
+
action: "design"
|
|
140
|
+
status: "in_progress"
|
|
141
|
+
where:
|
|
142
|
+
query: "project.semantic_embedded == true"
|
|
143
|
+
then:
|
|
144
|
+
- action: "mcp_call"
|
|
145
|
+
server: "semantic-rag"
|
|
146
|
+
tool: "get_context_for_task"
|
|
147
|
+
inputs:
|
|
148
|
+
task: "${story.description}"
|
|
149
|
+
maxTokens: 4000 # Limit context to 4K tokens
|
|
150
|
+
on_success:
|
|
151
|
+
- action: "inject_context"
|
|
152
|
+
target: "architecture.design"
|
|
153
|
+
context_type: "semantic_code_context"
|
|
154
|
+
content: "${mcp_result.context}"
|
|
155
|
+
|
|
156
|
+
# SLO Expectations for semantic context loading
|
|
157
|
+
slo_expectations:
|
|
158
|
+
expected_duration_ms: 1000 # 1 second for semantic search
|
|
159
|
+
max_duration_ms: 10000 # 10 seconds timeout
|
|
160
|
+
expected_cost_usd: 0.0 # Local embeddings
|
|
161
|
+
max_cost_usd: 0.0
|
|
162
|
+
expected_context_tokens: 4100 # 4K context + 100 overhead
|
|
163
|
+
max_context_tokens: 5000
|
|
164
|
+
success_rate_target: 0.95 # 95% success
|
|
165
|
+
|
|
166
|
+
on_timeout:
|
|
167
|
+
action: "retry"
|
|
168
|
+
max_retries: 1
|
|
169
|
+
backoff_ms: 1000
|
|
170
|
+
on_exhausted: "continue" # Don't block architecture if context fails
|
|
171
|
+
|
|
172
|
+
on_context_exceeded:
|
|
173
|
+
action: "alert"
|
|
174
|
+
message: "Semantic context exceeded token limit - reducing maxTokens"
|
|
175
|
+
continue: true
|
|
176
|
+
|
|
177
|
+
provenance:
|
|
178
|
+
flow_id: "${flow.id}"
|
|
179
|
+
reason: "Architecture design starting - loading relevant code context"
|
|
180
|
+
phase: 3
|
|
181
|
+
mcp_server: "semantic-rag"
|
|
182
|
+
optimization: "Reduces architecture design context from 15K to 4K tokens (73% reduction)"
|
|
183
|
+
category: "context-loading"
|
|
184
|
+
|
|
185
|
+
- id: "arch-symbol-lookup"
|
|
186
|
+
description: "Find related symbols for architecture context"
|
|
187
|
+
when:
|
|
188
|
+
concept: "architecture"
|
|
189
|
+
action: "design"
|
|
190
|
+
status: "in_progress"
|
|
191
|
+
where:
|
|
192
|
+
query: "project.ast_indexed == true AND story.mentions_symbols == true"
|
|
193
|
+
then:
|
|
194
|
+
- action: "mcp_call"
|
|
195
|
+
server: "ast-index"
|
|
196
|
+
tool: "find_symbol"
|
|
197
|
+
inputs:
|
|
198
|
+
query: "${story.symbol_names}"
|
|
199
|
+
limit: 10
|
|
200
|
+
on_success:
|
|
201
|
+
- action: "inject_context"
|
|
202
|
+
target: "architecture.design"
|
|
203
|
+
context_type: "symbol_definitions"
|
|
204
|
+
content: "${mcp_result.symbols}"
|
|
205
|
+
|
|
206
|
+
# SLO Expectations for symbol lookup
|
|
207
|
+
slo_expectations:
|
|
208
|
+
expected_duration_ms: 500 # 500ms for symbol lookup
|
|
209
|
+
max_duration_ms: 5000 # 5 seconds timeout
|
|
210
|
+
expected_cost_usd: 0.0
|
|
211
|
+
max_cost_usd: 0.0
|
|
212
|
+
expected_context_tokens: 1000 # Symbol definitions
|
|
213
|
+
max_context_tokens: 2000
|
|
214
|
+
success_rate_target: 0.95
|
|
215
|
+
|
|
216
|
+
on_timeout:
|
|
217
|
+
action: "continue" # Symbol lookup is optional
|
|
218
|
+
message: "Symbol lookup timed out - proceeding without symbol context"
|
|
219
|
+
|
|
220
|
+
on_context_exceeded:
|
|
221
|
+
action: "alert"
|
|
222
|
+
continue: true
|
|
223
|
+
|
|
224
|
+
provenance:
|
|
225
|
+
flow_id: "${flow.id}"
|
|
226
|
+
reason: "Story mentions specific symbols - loading definitions for context"
|
|
227
|
+
phase: 3
|
|
228
|
+
mcp_server: "ast-index"
|
|
229
|
+
category: "context-loading"
|
|
230
|
+
|
|
231
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
232
|
+
# Phase 3: Implementation Reference Checking (Sequential)
|
|
233
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
234
|
+
# During implementation, find similar code patterns
|
|
235
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
236
|
+
|
|
237
|
+
- id: "impl-find-similar-patterns"
|
|
238
|
+
description: "Find similar code patterns before implementation"
|
|
239
|
+
when:
|
|
240
|
+
concept: "implementation"
|
|
241
|
+
action: "generate"
|
|
242
|
+
status: "in_progress"
|
|
243
|
+
where:
|
|
244
|
+
query: "project.semantic_embedded == true AND architecture.patterns.length > 0"
|
|
245
|
+
then:
|
|
246
|
+
- action: "mcp_call"
|
|
247
|
+
server: "semantic-rag"
|
|
248
|
+
tool: "semantic_search"
|
|
249
|
+
inputs:
|
|
250
|
+
query: "${architecture.patterns[0].description}"
|
|
251
|
+
limit: 3
|
|
252
|
+
threshold: 0.7
|
|
253
|
+
on_success:
|
|
254
|
+
- action: "inject_context"
|
|
255
|
+
target: "implementation.generate"
|
|
256
|
+
context_type: "similar_patterns"
|
|
257
|
+
content: "${mcp_result.results}"
|
|
258
|
+
|
|
259
|
+
# SLO Expectations for pattern search
|
|
260
|
+
slo_expectations:
|
|
261
|
+
expected_duration_ms: 800 # 800ms for pattern search
|
|
262
|
+
max_duration_ms: 8000 # 8 seconds timeout
|
|
263
|
+
expected_cost_usd: 0.0
|
|
264
|
+
max_cost_usd: 0.0
|
|
265
|
+
expected_context_tokens: 2000 # Pattern examples
|
|
266
|
+
max_context_tokens: 3000
|
|
267
|
+
success_rate_target: 0.90
|
|
268
|
+
|
|
269
|
+
on_timeout:
|
|
270
|
+
action: "continue"
|
|
271
|
+
message: "Pattern search timed out - proceeding with architecture patterns only"
|
|
272
|
+
|
|
273
|
+
on_context_exceeded:
|
|
274
|
+
action: "alert"
|
|
275
|
+
continue: true
|
|
276
|
+
|
|
277
|
+
provenance:
|
|
278
|
+
flow_id: "${flow.id}"
|
|
279
|
+
reason: "Architecture specifies patterns - finding existing examples"
|
|
280
|
+
phase: 3
|
|
281
|
+
mcp_server: "semantic-rag"
|
|
282
|
+
optimization: "Helps implementation follow existing code patterns"
|
|
283
|
+
category: "intelligence"
|
|
284
|
+
|
|
285
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
286
|
+
# Phase 4: Quality Review with Reference Analysis (Sequential)
|
|
287
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
288
|
+
# During quality review, check symbol references for breaking changes
|
|
289
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
290
|
+
|
|
291
|
+
- id: "quality-check-references"
|
|
292
|
+
description: "Check references when implementation modifies public symbols"
|
|
293
|
+
when:
|
|
294
|
+
concept: "quality"
|
|
295
|
+
action: "review"
|
|
296
|
+
status: "in_progress"
|
|
297
|
+
where:
|
|
298
|
+
query: "project.ast_indexed == true AND implementation.modified_public_symbols.length > 0"
|
|
299
|
+
then:
|
|
300
|
+
- action: "mcp_call"
|
|
301
|
+
server: "ast-index"
|
|
302
|
+
tool: "find_references"
|
|
303
|
+
inputs:
|
|
304
|
+
file: "${implementation.modified_public_symbols[0].file}"
|
|
305
|
+
symbol: "${implementation.modified_public_symbols[0].name}"
|
|
306
|
+
on_success:
|
|
307
|
+
- action: "inject_context"
|
|
308
|
+
target: "quality.review"
|
|
309
|
+
context_type: "symbol_references"
|
|
310
|
+
content: "${mcp_result.references}"
|
|
311
|
+
- action: "set_flag"
|
|
312
|
+
flag: "quality.breaking_change_risk"
|
|
313
|
+
value: "${mcp_result.references.length > 0}"
|
|
314
|
+
|
|
315
|
+
# SLO Expectations for reference checking
|
|
316
|
+
slo_expectations:
|
|
317
|
+
expected_duration_ms: 300 # 300ms for reference lookup
|
|
318
|
+
max_duration_ms: 5000 # 5 seconds timeout
|
|
319
|
+
expected_cost_usd: 0.0
|
|
320
|
+
max_cost_usd: 0.0
|
|
321
|
+
expected_context_tokens: 1500 # Reference locations
|
|
322
|
+
max_context_tokens: 2500
|
|
323
|
+
success_rate_target: 0.95
|
|
324
|
+
|
|
325
|
+
on_timeout:
|
|
326
|
+
action: "alert"
|
|
327
|
+
message: "Reference check timed out - manual review recommended"
|
|
328
|
+
continue: true
|
|
329
|
+
|
|
330
|
+
on_context_exceeded:
|
|
331
|
+
action: "alert"
|
|
332
|
+
continue: true
|
|
333
|
+
|
|
334
|
+
provenance:
|
|
335
|
+
flow_id: "${flow.id}"
|
|
336
|
+
reason: "Implementation modifies public symbols - checking for breaking changes"
|
|
337
|
+
phase: 3
|
|
338
|
+
mcp_server: "ast-index"
|
|
339
|
+
safety: "Prevents accidental breaking changes to public APIs"
|
|
340
|
+
category: "validation"
|
|
341
|
+
|
|
342
|
+
- id: "quality-check-call-graph"
|
|
343
|
+
description: "Analyze call graph for modified functions"
|
|
344
|
+
when:
|
|
345
|
+
concept: "quality"
|
|
346
|
+
action: "review"
|
|
347
|
+
status: "in_progress"
|
|
348
|
+
where:
|
|
349
|
+
query: "project.ast_indexed == true AND implementation.modified_functions.length > 0"
|
|
350
|
+
then:
|
|
351
|
+
- action: "mcp_call"
|
|
352
|
+
server: "ast-index"
|
|
353
|
+
tool: "get_call_graph"
|
|
354
|
+
inputs:
|
|
355
|
+
file: "${implementation.modified_functions[0].file}"
|
|
356
|
+
symbol: "${implementation.modified_functions[0].name}"
|
|
357
|
+
depth: 2
|
|
358
|
+
on_success:
|
|
359
|
+
- action: "inject_context"
|
|
360
|
+
target: "quality.review"
|
|
361
|
+
context_type: "call_graph"
|
|
362
|
+
content: "${mcp_result.graph}"
|
|
363
|
+
|
|
364
|
+
# SLO Expectations for call graph analysis
|
|
365
|
+
slo_expectations:
|
|
366
|
+
expected_duration_ms: 500 # 500ms for call graph
|
|
367
|
+
max_duration_ms: 10000 # 10 seconds timeout
|
|
368
|
+
expected_cost_usd: 0.0
|
|
369
|
+
max_cost_usd: 0.0
|
|
370
|
+
expected_context_tokens: 2000 # Call graph structure
|
|
371
|
+
max_context_tokens: 3000
|
|
372
|
+
success_rate_target: 0.90
|
|
373
|
+
|
|
374
|
+
on_timeout:
|
|
375
|
+
action: "continue"
|
|
376
|
+
message: "Call graph analysis timed out - skipping dependency analysis"
|
|
377
|
+
|
|
378
|
+
on_context_exceeded:
|
|
379
|
+
action: "alert"
|
|
380
|
+
continue: true
|
|
381
|
+
|
|
382
|
+
provenance:
|
|
383
|
+
flow_id: "${flow.id}"
|
|
384
|
+
reason: "Implementation modifies functions - analyzing dependencies"
|
|
385
|
+
phase: 3
|
|
386
|
+
mcp_server: "ast-index"
|
|
387
|
+
safety: "Identifies potential side effects of function changes"
|
|
388
|
+
category: "validation"
|
|
389
|
+
|
|
390
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
391
|
+
# Incremental Index Updates (Automatic)
|
|
392
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
393
|
+
# Keep indexes fresh after implementation changes
|
|
394
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
395
|
+
|
|
396
|
+
- id: "impl-update-ast-index"
|
|
397
|
+
description: "Update AST index after implementation completes"
|
|
398
|
+
when:
|
|
399
|
+
concept: "implementation"
|
|
400
|
+
action: "generate"
|
|
401
|
+
status: "completed"
|
|
402
|
+
where:
|
|
403
|
+
query: "project.ast_indexed == true AND implementation.files_changed.length > 0"
|
|
404
|
+
then:
|
|
405
|
+
- action: "mcp_call"
|
|
406
|
+
server: "ast-index"
|
|
407
|
+
tool: "index_project"
|
|
408
|
+
inputs:
|
|
409
|
+
paths: "${implementation.files_changed.map(f => f.path)}"
|
|
410
|
+
incremental: true
|
|
411
|
+
on_success:
|
|
412
|
+
- action: "set_metadata"
|
|
413
|
+
key: "project.ast_index_updated"
|
|
414
|
+
value: "${timestamp}"
|
|
415
|
+
|
|
416
|
+
# SLO Expectations for incremental indexing
|
|
417
|
+
slo_expectations:
|
|
418
|
+
expected_duration_ms: 1000 # 1 second for incremental update
|
|
419
|
+
max_duration_ms: 15000 # 15 seconds timeout
|
|
420
|
+
expected_cost_usd: 0.0
|
|
421
|
+
max_cost_usd: 0.0
|
|
422
|
+
expected_context_tokens: 100
|
|
423
|
+
max_context_tokens: 500
|
|
424
|
+
success_rate_target: 0.95
|
|
425
|
+
|
|
426
|
+
on_timeout:
|
|
427
|
+
action: "alert"
|
|
428
|
+
message: "Incremental AST indexing slow - may need full rebuild"
|
|
429
|
+
continue: true
|
|
430
|
+
|
|
431
|
+
on_context_exceeded:
|
|
432
|
+
action: "alert"
|
|
433
|
+
continue: true
|
|
434
|
+
|
|
435
|
+
provenance:
|
|
436
|
+
flow_id: "${flow.id}"
|
|
437
|
+
reason: "Implementation complete - updating AST index with new/changed files"
|
|
438
|
+
phase: 3
|
|
439
|
+
mcp_server: "ast-index"
|
|
440
|
+
category: "maintenance"
|
|
441
|
+
|
|
442
|
+
- id: "impl-update-embeddings"
|
|
443
|
+
description: "Update semantic embeddings after implementation completes"
|
|
444
|
+
when:
|
|
445
|
+
concept: "implementation"
|
|
446
|
+
action: "generate"
|
|
447
|
+
status: "completed"
|
|
448
|
+
where:
|
|
449
|
+
query: "project.semantic_embedded == true AND implementation.files_changed.length > 0"
|
|
450
|
+
then:
|
|
451
|
+
- action: "mcp_call"
|
|
452
|
+
server: "semantic-rag"
|
|
453
|
+
tool: "embed_project"
|
|
454
|
+
inputs:
|
|
455
|
+
paths: "${implementation.files_changed.map(f => f.path)}"
|
|
456
|
+
incremental: true
|
|
457
|
+
on_success:
|
|
458
|
+
- action: "set_metadata"
|
|
459
|
+
key: "project.embeddings_updated"
|
|
460
|
+
value: "${timestamp}"
|
|
461
|
+
|
|
462
|
+
# SLO Expectations for incremental embedding
|
|
463
|
+
slo_expectations:
|
|
464
|
+
expected_duration_ms: 3000 # 3 seconds for incremental embedding
|
|
465
|
+
max_duration_ms: 30000 # 30 seconds timeout
|
|
466
|
+
expected_cost_usd: 0.0
|
|
467
|
+
max_cost_usd: 0.0
|
|
468
|
+
expected_context_tokens: 100
|
|
469
|
+
max_context_tokens: 500
|
|
470
|
+
success_rate_target: 0.90
|
|
471
|
+
|
|
472
|
+
on_timeout:
|
|
473
|
+
action: "alert"
|
|
474
|
+
message: "Incremental embedding slow - may need full rebuild"
|
|
475
|
+
continue: true
|
|
476
|
+
|
|
477
|
+
on_context_exceeded:
|
|
478
|
+
action: "alert"
|
|
479
|
+
continue: true
|
|
480
|
+
|
|
481
|
+
provenance:
|
|
482
|
+
flow_id: "${flow.id}"
|
|
483
|
+
reason: "Implementation complete - updating semantic embeddings with new/changed code"
|
|
484
|
+
phase: 3
|
|
485
|
+
mcp_server: "semantic-rag"
|
|
486
|
+
category: "maintenance"
|
|
487
|
+
|
|
488
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
489
|
+
# Code Understanding Workflow Summary
|
|
490
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
491
|
+
#
|
|
492
|
+
# Initialization (First Story):
|
|
493
|
+
# Story.create → ast-index.index_project → semantic-rag.embed_project
|
|
494
|
+
#
|
|
495
|
+
# Architecture Design:
|
|
496
|
+
# Architecture.design (in_progress) → semantic-rag.get_context_for_task
|
|
497
|
+
# → ast-index.find_symbol (if symbols mentioned)
|
|
498
|
+
#
|
|
499
|
+
# Implementation:
|
|
500
|
+
# Implementation.generate (in_progress) → semantic-rag.semantic_search (find patterns)
|
|
501
|
+
#
|
|
502
|
+
# Quality Review:
|
|
503
|
+
# Quality.review (in_progress) → ast-index.find_references (check breaking changes)
|
|
504
|
+
# → ast-index.get_call_graph (analyze dependencies)
|
|
505
|
+
#
|
|
506
|
+
# Index Maintenance:
|
|
507
|
+
# Implementation.generate (completed) → ast-index.index_project (incremental)
|
|
508
|
+
# → semantic-rag.embed_project (incremental)
|
|
509
|
+
#
|
|
510
|
+
# Performance Impact:
|
|
511
|
+
# - Initial indexing: ~20 seconds (one-time cost)
|
|
512
|
+
# - Architecture context: 73% token reduction (15K → 4K)
|
|
513
|
+
# - Incremental updates: ~4 seconds per implementation
|
|
514
|
+
# - Quality checks: Identifies breaking changes automatically
|
|
515
|
+
#
|
|
516
|
+
# Cost Impact:
|
|
517
|
+
# - All MCP servers use local processing (no API costs)
|
|
518
|
+
# - Storage: ~10MB for typical project (index + embeddings)
|
|
519
|
+
# - No ongoing operational costs
|
|
520
|
+
#
|
|
521
|
+
# WYSIWID Compliance:
|
|
522
|
+
# - All MCP server invocations visible in sync rules
|
|
523
|
+
# - When/where MCP tools are used is declaratively defined
|
|
524
|
+
# - SLO expectations make performance targets explicit
|
|
525
|
+
# - Provenance tracks which MCP server provided context
|
|
526
|
+
#
|
|
527
|
+
# Integration with Phases:
|
|
528
|
+
# - Phase 1 (Core): MCP servers provide context to reduce token usage
|
|
529
|
+
# - Phase 2 (Intelligence): Planning/verification can use code context
|
|
530
|
+
# - Phase 3 (Code Understanding): This file defines the integration
|
|
531
|
+
# - Phase 4 (Advanced): Tree-of-Thoughts can explore indexed code paths
|
|
532
|
+
# - Phase 5 (SLOs): All MCP operations monitored for performance
|
|
533
|
+
#
|