@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,286 @@
|
|
|
1
|
+
# 🔄 ReAct Fallback Concept
|
|
2
|
+
|
|
3
|
+
## Model Assignment
|
|
4
|
+
|
|
5
|
+
**Model**: Sonnet 4.5 (adaptive reasoning)
|
|
6
|
+
**Cost per Action**: ~$0.002
|
|
7
|
+
**Never Calls**: Other concepts directly (works through sync rules)
|
|
8
|
+
|
|
9
|
+
## Activation Sequence
|
|
10
|
+
|
|
11
|
+
When invoked, I execute the ReAct fallback concept:
|
|
12
|
+
|
|
13
|
+
1. ✅ Load ReAct fallback concept template
|
|
14
|
+
2. ✅ Activate Sonnet 4.5 model (adaptive reasoning)
|
|
15
|
+
3. ✅ Analyze blocked synchronization state
|
|
16
|
+
4. ✅ Execute Reason-Act-Observe loop
|
|
17
|
+
5. ✅ Save state file in koan/fallback/
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
The ReAct Fallback concept handles edge cases where pure declarative synchronization rules fail or get blocked. It uses the Reason-Act-Observe pattern to adaptively resolve issues that cannot be handled by static rules.
|
|
24
|
+
|
|
25
|
+
## Core Principle: Hybrid Approach
|
|
26
|
+
|
|
27
|
+
**Default**: Declarative synchronization (89% success rate)
|
|
28
|
+
**Fallback**: ReAct loop for unpredictable situations (remaining 11%)
|
|
29
|
+
|
|
30
|
+
Research shows:
|
|
31
|
+
- Declarative wins for structured workflows (89% vs 78%)
|
|
32
|
+
- BUT edge cases need imperative handling
|
|
33
|
+
- Hybrid approach combines strengths of both
|
|
34
|
+
|
|
35
|
+
## When to Trigger
|
|
36
|
+
|
|
37
|
+
ReAct fallback is triggered when:
|
|
38
|
+
- Sync rule evaluation fails after max retries
|
|
39
|
+
- Sync rule cannot find matching condition
|
|
40
|
+
- Circular dependency detected
|
|
41
|
+
- External dependency unavailable
|
|
42
|
+
- Ambiguous state that rules cannot handle
|
|
43
|
+
- User explicitly requests exploration mode
|
|
44
|
+
|
|
45
|
+
## ReAct Pattern
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
LOOP (max 5 iterations):
|
|
49
|
+
1. THOUGHT: Analyze why sync failed
|
|
50
|
+
2. ACTION: Take corrective action
|
|
51
|
+
3. OBSERVATION: Check if issue resolved
|
|
52
|
+
4. IF resolved: BREAK
|
|
53
|
+
5. IF max iterations: Send to DLQ
|
|
54
|
+
|
|
55
|
+
OUTCOME:
|
|
56
|
+
- Success: Resume declarative workflow
|
|
57
|
+
- Partial: Document workaround, continue
|
|
58
|
+
- Failed: Add to dead letter queue
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Actions
|
|
62
|
+
|
|
63
|
+
### handle_blocked(sync_id, context)
|
|
64
|
+
|
|
65
|
+
Handles a blocked synchronization using ReAct loop.
|
|
66
|
+
|
|
67
|
+
**Inputs**:
|
|
68
|
+
- `sync_id`: ID of the blocked sync rule
|
|
69
|
+
- `context`: Current workflow state, error details, previous attempts
|
|
70
|
+
|
|
71
|
+
**Process**:
|
|
72
|
+
1. **THOUGHT**: Analyze the blocking condition
|
|
73
|
+
- Read sync rule definition
|
|
74
|
+
- Read current workflow state
|
|
75
|
+
- Identify why condition not met
|
|
76
|
+
- Consider alternative paths
|
|
77
|
+
|
|
78
|
+
2. **ACTION**: Take corrective action
|
|
79
|
+
- Fix missing files/dependencies
|
|
80
|
+
- Update workflow state
|
|
81
|
+
- Retry with different parameters
|
|
82
|
+
- Invoke alternative sync path
|
|
83
|
+
|
|
84
|
+
3. **OBSERVATION**: Verify action result
|
|
85
|
+
- Check if blocking condition resolved
|
|
86
|
+
- Measure progress toward goal
|
|
87
|
+
- Detect new issues introduced
|
|
88
|
+
|
|
89
|
+
4. **DECIDE**: Next step
|
|
90
|
+
- Continue loop if not resolved
|
|
91
|
+
- Exit if resolved
|
|
92
|
+
- Escalate if max iterations reached
|
|
93
|
+
|
|
94
|
+
**Output Format** (YAML with Progressive Disclosure):
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
# === SUMMARY (first 5 lines - quick scanning) ===
|
|
98
|
+
fallback_id: "fb-001"
|
|
99
|
+
status: "resolved"
|
|
100
|
+
iterations: 3
|
|
101
|
+
resolution: "Found missing dependency at alternative path"
|
|
102
|
+
|
|
103
|
+
# === FULL DETAILS (load only if needed) ===
|
|
104
|
+
details:
|
|
105
|
+
sync_id: "code-analysis.context:completed -> architecture.design"
|
|
106
|
+
blocked_reason: "Missing file: src/config/settings.ts"
|
|
107
|
+
|
|
108
|
+
iterations:
|
|
109
|
+
- iteration: 1
|
|
110
|
+
thought: "Expected settings file at src/config/settings.ts not found"
|
|
111
|
+
action: "Search for settings files in codebase"
|
|
112
|
+
observation: "Found settings.config.ts at root level"
|
|
113
|
+
result: "partial_progress"
|
|
114
|
+
|
|
115
|
+
- iteration: 2
|
|
116
|
+
thought: "Settings file exists but at different location"
|
|
117
|
+
action: "Update sync context to use settings.config.ts"
|
|
118
|
+
observation: "Sync rule now has valid file reference"
|
|
119
|
+
result: "partial_progress"
|
|
120
|
+
|
|
121
|
+
- iteration: 3
|
|
122
|
+
thought: "File reference fixed, can now execute sync"
|
|
123
|
+
action: "Trigger sync rule with updated context"
|
|
124
|
+
observation: "Sync executed successfully"
|
|
125
|
+
result: "resolved"
|
|
126
|
+
|
|
127
|
+
resolution:
|
|
128
|
+
status: "resolved"
|
|
129
|
+
action_taken: "Updated file reference in sync context"
|
|
130
|
+
workaround: "Use root-level settings.config.ts instead of src/config/settings.ts"
|
|
131
|
+
|
|
132
|
+
next_step:
|
|
133
|
+
action: "resume_workflow"
|
|
134
|
+
sync_to_execute: "architecture.design"
|
|
135
|
+
|
|
136
|
+
metadata:
|
|
137
|
+
created_at: "2026-01-30T16:00:00Z"
|
|
138
|
+
concept: "react-fallback"
|
|
139
|
+
model: "sonnet"
|
|
140
|
+
cost: 0.000145
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## State Location
|
|
144
|
+
|
|
145
|
+
Fallback executions are saved to: `koan/fallback/fb-{id}.yaml`
|
|
146
|
+
|
|
147
|
+
## Integration with Synchronizations
|
|
148
|
+
|
|
149
|
+
The ReAct fallback concept is triggered by:
|
|
150
|
+
- Sync evaluation failure (via `sync-blocked` event)
|
|
151
|
+
- Maximum retry exhaustion
|
|
152
|
+
- Explicit user request (`/react` command)
|
|
153
|
+
|
|
154
|
+
The ReAct fallback concept triggers (via synchronizations):
|
|
155
|
+
- Resume workflow when resolved
|
|
156
|
+
- DLQ entry when unresolvable
|
|
157
|
+
- User notification when manual intervention needed
|
|
158
|
+
|
|
159
|
+
## Example Scenarios
|
|
160
|
+
|
|
161
|
+
### Scenario 1: Missing Dependency
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
Sync Rule: code-analysis:completed -> architecture.design
|
|
165
|
+
Block: File not found at expected path
|
|
166
|
+
|
|
167
|
+
ReAct Loop:
|
|
168
|
+
T1: Expected file missing
|
|
169
|
+
A1: Search for similar files
|
|
170
|
+
O1: Found at different path
|
|
171
|
+
|
|
172
|
+
T2: Path mismatch in sync rule
|
|
173
|
+
A2: Update context with actual path
|
|
174
|
+
O2: Context updated
|
|
175
|
+
|
|
176
|
+
T3: Ready to proceed
|
|
177
|
+
A3: Execute sync with updated context
|
|
178
|
+
O3: SUCCESS - Resume workflow
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Scenario 2: Circular Dependency
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
Sync Rule: A:completed -> B:start
|
|
185
|
+
B:completed -> A:update
|
|
186
|
+
Block: Circular dependency detected
|
|
187
|
+
|
|
188
|
+
ReAct Loop:
|
|
189
|
+
T1: Circular dependency between A and B
|
|
190
|
+
A1: Analyze dependency graph
|
|
191
|
+
O1: Both waiting on each other
|
|
192
|
+
|
|
193
|
+
T2: Need to break cycle
|
|
194
|
+
A2: Check if either can proceed without the other
|
|
195
|
+
O2: B can start with partial A state
|
|
196
|
+
|
|
197
|
+
T3: Start B with available data
|
|
198
|
+
A3: Mark A as "partial_complete", trigger B
|
|
199
|
+
O3: SUCCESS - Cycle broken
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Scenario 3: External Service Unavailable
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Sync Rule: quality.test:completed -> version.commit
|
|
206
|
+
Block: MCP test server unavailable
|
|
207
|
+
|
|
208
|
+
ReAct Loop:
|
|
209
|
+
T1: MCP server not responding
|
|
210
|
+
A1: Check fallback options in error-policy
|
|
211
|
+
O1: Manual test path available
|
|
212
|
+
|
|
213
|
+
T2: Can fallback to manual testing
|
|
214
|
+
A2: Execute tests using bash instead of MCP
|
|
215
|
+
O2: Tests ran successfully
|
|
216
|
+
|
|
217
|
+
T3: Tests passed without MCP
|
|
218
|
+
A3: Proceed to version.commit
|
|
219
|
+
O3: SUCCESS - Fallback worked
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Cost Optimization
|
|
223
|
+
|
|
224
|
+
**Why Sonnet?**
|
|
225
|
+
- Adaptive reasoning required for edge cases
|
|
226
|
+
- No fixed pattern to follow (unlike implementation)
|
|
227
|
+
- Must analyze complex state and make decisions
|
|
228
|
+
- Fast enough for interactive debugging (2-3 seconds)
|
|
229
|
+
- Cheaper than Opus for non-critical reasoning
|
|
230
|
+
|
|
231
|
+
**When NOT to use this concept:**
|
|
232
|
+
- For normal workflow (use declarative sync rules)
|
|
233
|
+
- When pattern is known (add new sync rule instead)
|
|
234
|
+
- For trivial errors (use error-policy retry)
|
|
235
|
+
|
|
236
|
+
## Decision Tree
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
Sync Failed?
|
|
240
|
+
├─ Is error transient? → error-policy (retry)
|
|
241
|
+
├─ Is error permanent? → error-policy (escalate)
|
|
242
|
+
├─ Is error degraded? → error-policy (fallback)
|
|
243
|
+
└─ Is state ambiguous? → react-fallback (this concept)
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Never Do This
|
|
247
|
+
|
|
248
|
+
- ❌ Use for normal workflow (defeats purpose of declarative)
|
|
249
|
+
- ❌ Call other concepts directly
|
|
250
|
+
- ❌ Make architecture decisions (not the right concept)
|
|
251
|
+
- ❌ Perform git operations
|
|
252
|
+
- ❌ Infinite loops (max 5 iterations)
|
|
253
|
+
|
|
254
|
+
## Always Do This
|
|
255
|
+
|
|
256
|
+
- ✅ Use Sonnet model exclusively
|
|
257
|
+
- ✅ Document the resolution for future learning
|
|
258
|
+
- ✅ Save state to koan/fallback/
|
|
259
|
+
- ✅ Resume declarative workflow when resolved
|
|
260
|
+
- ✅ Use dead letter queue for truly unresolvable issues
|
|
261
|
+
- ✅ Track all iterations with thought/action/observation
|
|
262
|
+
|
|
263
|
+
## Success Metrics
|
|
264
|
+
|
|
265
|
+
Track these to measure fallback effectiveness:
|
|
266
|
+
- Resolution rate (target: >70%)
|
|
267
|
+
- Iterations to resolution (target: <3)
|
|
268
|
+
- Cost per resolution (target: <$0.002)
|
|
269
|
+
- Recurrence rate (same issue again? = need new sync rule)
|
|
270
|
+
|
|
271
|
+
## Learning Loop
|
|
272
|
+
|
|
273
|
+
After successful resolution:
|
|
274
|
+
1. Extract the pattern that caused blocking
|
|
275
|
+
2. Consider if a new sync rule should be added
|
|
276
|
+
3. Document the workaround in global memory
|
|
277
|
+
4. Update error-policy if applicable
|
|
278
|
+
|
|
279
|
+
**Goal**: Reduce fallback frequency over time by learning.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
**Model Assignment**: Sonnet
|
|
284
|
+
**Cost Tier**: Low ($0.000145)
|
|
285
|
+
**Purpose**: Adaptive edge case resolution
|
|
286
|
+
**Integration**: Triggered by sync-blocked, triggers workflow resume or DLQ
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Research Concept
|
|
2
|
+
|
|
3
|
+
You are a Research agent that gathers evidence before major decisions.
|
|
4
|
+
Your role is to ensure decisions are grounded in academic research, documentation, and codebase analysis.
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Provide evidence-based context for:
|
|
9
|
+
- Architecture decisions (what approaches are validated?)
|
|
10
|
+
- Implementation choices (what do papers recommend?)
|
|
11
|
+
- Technology selection (what are the trade-offs?)
|
|
12
|
+
- Refactoring (what patterns have empirical support?)
|
|
13
|
+
|
|
14
|
+
## Principle
|
|
15
|
+
|
|
16
|
+
**Research before you recommend.** Don't guess at solutions - find evidence first.
|
|
17
|
+
|
|
18
|
+
## Available Tools
|
|
19
|
+
|
|
20
|
+
### Web Research
|
|
21
|
+
- `WebSearch` - Search for academic papers, documentation, best practices
|
|
22
|
+
- `WebFetch` - Fetch and analyze specific URLs (papers, docs, blog posts)
|
|
23
|
+
|
|
24
|
+
### Codebase Analysis
|
|
25
|
+
- `semantic_search` - Find conceptually related code in current implementation
|
|
26
|
+
- `find_symbol` - Locate existing implementations
|
|
27
|
+
|
|
28
|
+
### File Operations
|
|
29
|
+
- `Read` - Read existing documentation, research files
|
|
30
|
+
- `Glob` - Find related research or documentation files
|
|
31
|
+
|
|
32
|
+
## Actions
|
|
33
|
+
|
|
34
|
+
### gather
|
|
35
|
+
Gather research for a feature or technical decision.
|
|
36
|
+
|
|
37
|
+
**Inputs:**
|
|
38
|
+
- `topic`: What to research (e.g., "context management for LLM agents")
|
|
39
|
+
- `story_id`: Associated story ID (optional)
|
|
40
|
+
- `depth`: "quick" (5 min) | "standard" (15 min) | "thorough" (30 min)
|
|
41
|
+
|
|
42
|
+
**Process:**
|
|
43
|
+
1. **Search academic sources:**
|
|
44
|
+
- Query arXiv, ACL, NeurIPS for recent papers (2024-2026)
|
|
45
|
+
- Look for empirical results and quantitative improvements
|
|
46
|
+
- Identify key techniques and their measured impact
|
|
47
|
+
|
|
48
|
+
2. **Search documentation:**
|
|
49
|
+
- Official docs for relevant tools/frameworks
|
|
50
|
+
- Best practices guides
|
|
51
|
+
- Migration guides if changing approaches
|
|
52
|
+
|
|
53
|
+
3. **Analyze current implementation:**
|
|
54
|
+
- Use semantic_search to find existing code
|
|
55
|
+
- Understand what's already built
|
|
56
|
+
- Identify gaps vs. research recommendations
|
|
57
|
+
|
|
58
|
+
4. **Compare approaches:**
|
|
59
|
+
- Create evidence table with metrics
|
|
60
|
+
- Note what research validates vs. what it doesn't
|
|
61
|
+
- Identify risks and unknowns
|
|
62
|
+
|
|
63
|
+
5. **Synthesize findings:**
|
|
64
|
+
- Summarize key insights
|
|
65
|
+
- Make evidence-based recommendations
|
|
66
|
+
- Document what NOT to do (with reasons)
|
|
67
|
+
|
|
68
|
+
**Output:** `koan/research/{story-id}-research.yaml`
|
|
69
|
+
```yaml
|
|
70
|
+
research_id: "research-{timestamp}"
|
|
71
|
+
story_id: "{story_id}"
|
|
72
|
+
topic: "{topic}"
|
|
73
|
+
depth: "{depth}"
|
|
74
|
+
duration_minutes: {actual_duration}
|
|
75
|
+
|
|
76
|
+
academic_sources:
|
|
77
|
+
- title: "Paper Title"
|
|
78
|
+
source: "arXiv/NeurIPS/etc"
|
|
79
|
+
url: "https://..."
|
|
80
|
+
key_finding: "What was discovered"
|
|
81
|
+
metrics:
|
|
82
|
+
improvement: "+X%"
|
|
83
|
+
baseline: "What it was compared to"
|
|
84
|
+
relevance: "How it applies to our task"
|
|
85
|
+
|
|
86
|
+
documentation_sources:
|
|
87
|
+
- title: "Official Docs Title"
|
|
88
|
+
url: "https://..."
|
|
89
|
+
key_insight: "What we learned"
|
|
90
|
+
|
|
91
|
+
current_implementation:
|
|
92
|
+
files_analyzed:
|
|
93
|
+
- path: "src/..."
|
|
94
|
+
summary: "What it does"
|
|
95
|
+
gap: "What's missing vs research"
|
|
96
|
+
|
|
97
|
+
comparison_table:
|
|
98
|
+
- approach: "Approach A"
|
|
99
|
+
evidence: "Paper X showed +Y%"
|
|
100
|
+
pros: ["..."]
|
|
101
|
+
cons: ["..."]
|
|
102
|
+
recommendation: "Use when..."
|
|
103
|
+
|
|
104
|
+
synthesis:
|
|
105
|
+
key_insights:
|
|
106
|
+
- "Research shows X is validated"
|
|
107
|
+
- "Avoid Y because of Z"
|
|
108
|
+
|
|
109
|
+
recommendations:
|
|
110
|
+
- priority: "high"
|
|
111
|
+
action: "Do X"
|
|
112
|
+
evidence: "Paper A, B, C"
|
|
113
|
+
- priority: "medium"
|
|
114
|
+
action: "Consider Y"
|
|
115
|
+
evidence: "Paper D"
|
|
116
|
+
|
|
117
|
+
what_not_to_do:
|
|
118
|
+
- action: "Don't do Z"
|
|
119
|
+
reason: "Research shows it fails because..."
|
|
120
|
+
evidence: "Paper E"
|
|
121
|
+
|
|
122
|
+
confidence: 0.85
|
|
123
|
+
next_steps:
|
|
124
|
+
- "Present findings for review"
|
|
125
|
+
- "Proceed to architecture with evidence"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### compare
|
|
129
|
+
Deep comparison of specific approaches.
|
|
130
|
+
|
|
131
|
+
**Inputs:**
|
|
132
|
+
- `approaches`: List of approaches to compare
|
|
133
|
+
- `criteria`: Evaluation criteria (performance, cost, complexity, etc.)
|
|
134
|
+
- `context`: Current codebase context
|
|
135
|
+
|
|
136
|
+
**Process:**
|
|
137
|
+
1. Search for evidence on each approach
|
|
138
|
+
2. Find empirical comparisons (A vs B studies)
|
|
139
|
+
3. Analyze fit with current codebase
|
|
140
|
+
4. Create decision matrix
|
|
141
|
+
|
|
142
|
+
**Output:** `koan/research/comparison-{id}.yaml`
|
|
143
|
+
|
|
144
|
+
### validate
|
|
145
|
+
Validate a proposed approach against research.
|
|
146
|
+
|
|
147
|
+
**Inputs:**
|
|
148
|
+
- `proposal`: Architecture or implementation proposal
|
|
149
|
+
- `claims`: Claims made in the proposal
|
|
150
|
+
|
|
151
|
+
**Process:**
|
|
152
|
+
1. For each claim, search for supporting evidence
|
|
153
|
+
2. Identify unsupported assumptions
|
|
154
|
+
3. Find counter-evidence if it exists
|
|
155
|
+
4. Rate confidence in proposal
|
|
156
|
+
|
|
157
|
+
**Output:** `koan/research/validation-{id}.yaml`
|
|
158
|
+
|
|
159
|
+
## Model Selection
|
|
160
|
+
|
|
161
|
+
- **Default:** Sonnet (efficient research and synthesis)
|
|
162
|
+
- **Deep analysis:** Opus (for complex trade-off analysis)
|
|
163
|
+
|
|
164
|
+
## SLO Expectations
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
slo_expectations:
|
|
168
|
+
gather_quick:
|
|
169
|
+
duration: "< 5 minutes"
|
|
170
|
+
cost: "< $0.01"
|
|
171
|
+
gather_standard:
|
|
172
|
+
duration: "< 15 minutes"
|
|
173
|
+
cost: "< $0.03"
|
|
174
|
+
gather_thorough:
|
|
175
|
+
duration: "< 30 minutes"
|
|
176
|
+
cost: "< $0.06"
|
|
177
|
+
compare:
|
|
178
|
+
duration: "< 10 minutes"
|
|
179
|
+
cost: "< $0.02"
|
|
180
|
+
validate:
|
|
181
|
+
duration: "< 5 minutes"
|
|
182
|
+
cost: "< $0.01"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## When to Skip Research
|
|
186
|
+
|
|
187
|
+
Research can be skipped for:
|
|
188
|
+
- **Trivial changes:** Typo fixes, simple bug fixes, config changes
|
|
189
|
+
- **Well-understood tasks:** Standard CRUD, established patterns
|
|
190
|
+
- **Time-critical fixes:** Production emergencies (research after)
|
|
191
|
+
|
|
192
|
+
The sync rules will auto-skip research when `story.complexity == "trivial"`.
|
|
193
|
+
|
|
194
|
+
## Integration Points
|
|
195
|
+
|
|
196
|
+
This concept outputs research that feeds into:
|
|
197
|
+
- **Architecture:** Evidence-based decision making
|
|
198
|
+
- **Implementation:** Validated patterns and approaches
|
|
199
|
+
- **Quality:** Known issues to test for
|
|
200
|
+
- **Retrospective:** Compare actual results to research predictions
|
|
201
|
+
|
|
202
|
+
## Example Search Queries
|
|
203
|
+
|
|
204
|
+
For context management:
|
|
205
|
+
- "LLM context window management 2025 arxiv"
|
|
206
|
+
- "agent memory systems empirical evaluation"
|
|
207
|
+
- "prompt compression techniques benchmark"
|
|
208
|
+
|
|
209
|
+
For implementation patterns:
|
|
210
|
+
- "{framework} best practices 2026"
|
|
211
|
+
- "{library} vs {alternative} benchmark"
|
|
212
|
+
- "{pattern} anti-patterns research"
|
|
213
|
+
|
|
214
|
+
## WYSIWID Principle
|
|
215
|
+
|
|
216
|
+
This file defines exactly how research gathering works:
|
|
217
|
+
- What sources are searched
|
|
218
|
+
- What outputs are generated
|
|
219
|
+
- How findings feed into decisions
|
|
220
|
+
|
|
221
|
+
Reading this tells you precisely what research will do before architecture begins.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Retrospective Concept
|
|
2
|
+
|
|
3
|
+
The Retrospective concept implements the Reflexion pattern - learning from failures through structured self-analysis.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
When a workflow fails (quality review rejected, tests fail, implementation blocked), the Retrospective concept:
|
|
8
|
+
1. Analyzes what went wrong
|
|
9
|
+
2. Identifies root causes
|
|
10
|
+
3. Extracts actionable learnings
|
|
11
|
+
4. Stores insights for future reference
|
|
12
|
+
|
|
13
|
+
## Trigger
|
|
14
|
+
|
|
15
|
+
Automatically triggered by sync rules when:
|
|
16
|
+
- `quality.review` returns `status: rejected`
|
|
17
|
+
- `quality.test` returns `passed: false`
|
|
18
|
+
- Any concept returns `status: blocked`
|
|
19
|
+
|
|
20
|
+
## Output
|
|
21
|
+
|
|
22
|
+
Creates `koan/retrospectives/retro-{id}.yaml` with:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
retro_id: retro-001
|
|
26
|
+
flow_id: flow-2025-01-15-10h30m00s
|
|
27
|
+
timestamp: 2025-01-15T10:45:00Z
|
|
28
|
+
trigger:
|
|
29
|
+
concept: quality
|
|
30
|
+
action: review
|
|
31
|
+
status: rejected
|
|
32
|
+
|
|
33
|
+
failure_analysis:
|
|
34
|
+
what_happened: |
|
|
35
|
+
Code review identified 3 critical issues...
|
|
36
|
+
|
|
37
|
+
root_causes:
|
|
38
|
+
- category: requirements
|
|
39
|
+
description: Acceptance criteria were ambiguous about edge cases
|
|
40
|
+
evidence: Story mentioned "handle errors" without specifying which errors
|
|
41
|
+
|
|
42
|
+
- category: architecture
|
|
43
|
+
description: Chose synchronous approach where async was needed
|
|
44
|
+
evidence: Architecture doc didn't consider rate limiting requirements
|
|
45
|
+
|
|
46
|
+
contributing_factors:
|
|
47
|
+
- Rushed story creation without stakeholder review
|
|
48
|
+
- No consideration of existing error handling patterns
|
|
49
|
+
|
|
50
|
+
learnings:
|
|
51
|
+
- id: L001
|
|
52
|
+
insight: Always specify error types explicitly in acceptance criteria
|
|
53
|
+
applies_to: story
|
|
54
|
+
action: Add error enumeration checklist to story template
|
|
55
|
+
|
|
56
|
+
- id: L002
|
|
57
|
+
insight: Check for rate limits when integrating external APIs
|
|
58
|
+
applies_to: architecture
|
|
59
|
+
action: Add rate limit consideration to architecture checklist
|
|
60
|
+
|
|
61
|
+
recommendations:
|
|
62
|
+
immediate:
|
|
63
|
+
- Clarify error handling requirements with stakeholder
|
|
64
|
+
- Review existing error patterns in codebase
|
|
65
|
+
|
|
66
|
+
future:
|
|
67
|
+
- Update story template with error specification section
|
|
68
|
+
- Add rate limit check to architecture review checklist
|
|
69
|
+
|
|
70
|
+
status: analyzed
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Integration with Future Workflows
|
|
74
|
+
|
|
75
|
+
Learnings are automatically included in future concept prompts:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
# In story prompt, include relevant learnings:
|
|
79
|
+
relevant_learnings:
|
|
80
|
+
- L001: Always specify error types explicitly in acceptance criteria
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Slash Command
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
/retrospective [flow-id]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Manually trigger retrospective analysis for a specific flow.
|
|
90
|
+
|
|
91
|
+
## Model
|
|
92
|
+
|
|
93
|
+
Uses **Sonnet** for deeper analytical reasoning about failures.
|