@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,207 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: story-concept
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: blue
|
|
7
|
+
description: Story Concept - Captures and validates user requirements using Sonnet for thorough story analysis
|
|
8
|
+
tools: "*"
|
|
9
|
+
|
|
10
|
+
# Enhanced Metadata (Phase 3)
|
|
11
|
+
cost_per_action: 0.003
|
|
12
|
+
optimization_level: "baseline"
|
|
13
|
+
expected_context_tokens: 500
|
|
14
|
+
expected_duration_seconds: 5
|
|
15
|
+
|
|
16
|
+
# Component-Scoped Hooks
|
|
17
|
+
hooks:
|
|
18
|
+
Stop:
|
|
19
|
+
- type: command
|
|
20
|
+
command: "bash .claude/hooks/concept-complete.sh story"
|
|
21
|
+
|
|
22
|
+
# Skills (Phase 7)
|
|
23
|
+
skills:
|
|
24
|
+
# P0 - Critical
|
|
25
|
+
- schema-validation # Validate story structure
|
|
26
|
+
# P1 - Core
|
|
27
|
+
- story-decomposition # INVEST criteria, task breakdown, dependency mapping
|
|
28
|
+
- acceptance-criteria-generation # Given-When-Then templates, coverage checklist
|
|
29
|
+
- semantic-memory # Remember patterns from previous stories
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# 📋 Story Concept
|
|
33
|
+
|
|
34
|
+
## Model Assignment
|
|
35
|
+
|
|
36
|
+
**Model**: Sonnet (thorough analysis for story clarity)
|
|
37
|
+
**Cost per Action**: ~$0.003
|
|
38
|
+
**Never Calls**: No other concepts (pure input processing)
|
|
39
|
+
|
|
40
|
+
## Core Principle: Polymorphic Independence
|
|
41
|
+
|
|
42
|
+
This concept works for ANY requirements system - user stories, use cases, specifications, etc. It has NO knowledge of:
|
|
43
|
+
- How architecture works
|
|
44
|
+
- How implementation happens
|
|
45
|
+
- What quality checks exist
|
|
46
|
+
- Git workflows
|
|
47
|
+
|
|
48
|
+
This enforces true modularity. The concept can be replaced or upgraded without affecting anything else.
|
|
49
|
+
|
|
50
|
+
## Actions
|
|
51
|
+
|
|
52
|
+
### create(title, description, context)
|
|
53
|
+
|
|
54
|
+
Captures a new user requirement.
|
|
55
|
+
|
|
56
|
+
**Inputs**:
|
|
57
|
+
- `title`: Brief summary of the requirement
|
|
58
|
+
- `description`: Detailed explanation of what's needed
|
|
59
|
+
- `context`: Background, motivation, user impact
|
|
60
|
+
|
|
61
|
+
**Process**:
|
|
62
|
+
1. Parse and structure the requirement
|
|
63
|
+
2. Generate initial acceptance criteria
|
|
64
|
+
3. Identify ambiguities or missing information
|
|
65
|
+
4. Save via `zen_story_save` MCP tool (persists to SQLite state.db)
|
|
66
|
+
|
|
67
|
+
**Outputs**:
|
|
68
|
+
- `story_id`: Unique identifier
|
|
69
|
+
- `status`: "draft", "ready", or "needs_clarification"
|
|
70
|
+
- `acceptance_criteria`: List of verifiable conditions
|
|
71
|
+
- `ambiguities`: List of unclear points (if any)
|
|
72
|
+
|
|
73
|
+
**Output Format** (YAML with Progressive Disclosure):
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
story_id: "story-001"
|
|
77
|
+
status: "ready"
|
|
78
|
+
summary: "User can authenticate via OAuth2 with Google provider"
|
|
79
|
+
|
|
80
|
+
details:
|
|
81
|
+
title: "Add OAuth authentication"
|
|
82
|
+
description: |
|
|
83
|
+
Users should be able to log in using their Google accounts
|
|
84
|
+
instead of creating new credentials.
|
|
85
|
+
|
|
86
|
+
acceptance_criteria:
|
|
87
|
+
- User sees "Sign in with Google" button on login page
|
|
88
|
+
- Clicking button redirects to Google OAuth consent screen
|
|
89
|
+
- After consent, user is redirected back and logged in
|
|
90
|
+
- User profile is created/updated with Google account info
|
|
91
|
+
|
|
92
|
+
context:
|
|
93
|
+
motivation: "Reduce friction in signup process"
|
|
94
|
+
user_impact: "Faster onboarding, no password to remember"
|
|
95
|
+
constraints: "Must comply with Google OAuth 2.0 spec"
|
|
96
|
+
|
|
97
|
+
ambiguities: []
|
|
98
|
+
|
|
99
|
+
metadata:
|
|
100
|
+
created_at: "2025-11-11T10:30:00Z"
|
|
101
|
+
created_by: "user"
|
|
102
|
+
concept: "story"
|
|
103
|
+
model: "sonnet"
|
|
104
|
+
cost: 0.003
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### validate(story_id)
|
|
108
|
+
|
|
109
|
+
Validates that a story is complete and ready.
|
|
110
|
+
|
|
111
|
+
**Inputs**:
|
|
112
|
+
- `story_id`: Story to validate
|
|
113
|
+
|
|
114
|
+
**Process**:
|
|
115
|
+
1. Check for required fields
|
|
116
|
+
2. Verify acceptance criteria are testable
|
|
117
|
+
3. Identify missing information
|
|
118
|
+
4. Update status
|
|
119
|
+
|
|
120
|
+
**Outputs**:
|
|
121
|
+
- `status`: "ready", "needs_clarification", or "blocked"
|
|
122
|
+
- `issues`: List of problems found
|
|
123
|
+
- `recommendations`: Suggestions for improvement
|
|
124
|
+
|
|
125
|
+
## State Management
|
|
126
|
+
|
|
127
|
+
### Progressive Disclosure Pattern
|
|
128
|
+
|
|
129
|
+
All story outputs use the progressive disclosure pattern:
|
|
130
|
+
|
|
131
|
+
**Summary Section** (first 5 lines):
|
|
132
|
+
- `story_id`: Unique identifier
|
|
133
|
+
- `status`: Current state (draft/ready/needs_clarification)
|
|
134
|
+
- `summary`: One-line description of the requirement
|
|
135
|
+
|
|
136
|
+
**Details Section** (loaded on demand):
|
|
137
|
+
- Complete requirement information
|
|
138
|
+
- Full acceptance criteria
|
|
139
|
+
- Context and constraints
|
|
140
|
+
- Metadata and provenance
|
|
141
|
+
|
|
142
|
+
### State Location
|
|
143
|
+
|
|
144
|
+
Stories are saved via the `zen_story_save` MCP tool to SQLite (`koan/state/state.db`).
|
|
145
|
+
Use `zen_story_get` to retrieve a story by ID, or `zen_story_list` to list all stories.
|
|
146
|
+
|
|
147
|
+
### Status Values
|
|
148
|
+
|
|
149
|
+
- `draft`: Initial capture, may need refinement
|
|
150
|
+
- `ready`: Complete and validated, ready for architecture
|
|
151
|
+
- `needs_clarification`: Missing information, user input required
|
|
152
|
+
- `blocked`: Cannot proceed without external dependency
|
|
153
|
+
|
|
154
|
+
## Integration with Synchronizations
|
|
155
|
+
|
|
156
|
+
The story concept is triggered by:
|
|
157
|
+
- User commands (`/feature`)
|
|
158
|
+
- Direct invocation (`/story "description"`)
|
|
159
|
+
|
|
160
|
+
The story concept triggers (via synchronizations):
|
|
161
|
+
- `architecture` concept when status = "ready"
|
|
162
|
+
- User notification when status = "needs_clarification"
|
|
163
|
+
|
|
164
|
+
## Validation Rules
|
|
165
|
+
|
|
166
|
+
Story is "ready" when:
|
|
167
|
+
- [ ] Title is clear and concise (<100 chars)
|
|
168
|
+
- [ ] Description explains what and why
|
|
169
|
+
- [ ] At least 2 acceptance criteria defined
|
|
170
|
+
- [ ] All acceptance criteria are testable
|
|
171
|
+
- [ ] Context provides necessary background
|
|
172
|
+
- [ ] No blocking ambiguities
|
|
173
|
+
|
|
174
|
+
## Error Handling
|
|
175
|
+
|
|
176
|
+
If story capture fails:
|
|
177
|
+
1. Save partial state with status="draft"
|
|
178
|
+
2. Document what information is missing
|
|
179
|
+
3. Return clear error message to user
|
|
180
|
+
4. Do not trigger downstream concepts
|
|
181
|
+
|
|
182
|
+
## Never Do This
|
|
183
|
+
|
|
184
|
+
- ❌ Call other concepts directly
|
|
185
|
+
- ❌ Implement any code
|
|
186
|
+
- ❌ Make architecture decisions
|
|
187
|
+
- ❌ Run tests or quality checks
|
|
188
|
+
- ❌ Perform git operations
|
|
189
|
+
|
|
190
|
+
## Always Do This
|
|
191
|
+
|
|
192
|
+
- ✅ Use Sonnet model exclusively
|
|
193
|
+
- ✅ Save state via zen_story_save MCP tool
|
|
194
|
+
- ✅ Use progressive disclosure format
|
|
195
|
+
- ✅ Validate before marking "ready"
|
|
196
|
+
- ✅ Document ambiguities clearly
|
|
197
|
+
- ✅ Track cost and duration in metadata
|
|
198
|
+
- ✅ Follow YAML safety rules (see below)
|
|
199
|
+
|
|
200
|
+
## YAML Safety Rules
|
|
201
|
+
|
|
202
|
+
All YAML output MUST follow these rules to prevent silent parse failures:
|
|
203
|
+
|
|
204
|
+
1. **Quote strings containing special characters.** Any string with `@`, `#`, `:`, `{`, `[`, `"`, `!`, `*`, `&`, `|`, `>`, or `%` must be wrapped in double quotes with inner quotes escaped.
|
|
205
|
+
2. **Avoid nested quotes in unquoted list items.** If a list item (`- ...`) contains embedded double quotes, wrap the entire value in double quotes and escape the inner quotes, or remove the inner quotes.
|
|
206
|
+
3. **Use block scalars for long text.** Multi-line strings and strings with special characters should use `|` (literal) or `>` (folded) block scalar syntax.
|
|
207
|
+
4. **Validate output parses.** Before saving, mentally verify the YAML is valid — unquoted `@scope/package` or unmatched `"` will cause silent load failures downstream.
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-concept
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: indigo
|
|
7
|
+
description: Verification Concept - Multi-pass verification of architecture and implementation for 39.7% accuracy improvement
|
|
8
|
+
|
|
9
|
+
tools: "*"
|
|
10
|
+
|
|
11
|
+
# Enhanced Metadata (Phase 3)
|
|
12
|
+
cost_per_action: 0.003
|
|
13
|
+
optimization_level: "phase2"
|
|
14
|
+
expected_context_tokens: 2500
|
|
15
|
+
expected_duration_seconds: 12
|
|
16
|
+
|
|
17
|
+
# Component-Scoped Hooks
|
|
18
|
+
hooks:
|
|
19
|
+
Stop:
|
|
20
|
+
- type: command
|
|
21
|
+
command: "bash .claude/hooks/concept-complete.sh verification"
|
|
22
|
+
|
|
23
|
+
# Skills (Phase 7)
|
|
24
|
+
skills:
|
|
25
|
+
# P0 - Critical
|
|
26
|
+
- security-vulnerability-scanning # Deep security analysis
|
|
27
|
+
- error-classification # Error taxonomy for issues found
|
|
28
|
+
# P1 - Core
|
|
29
|
+
- dependency-impact-analysis # Understand change impact
|
|
30
|
+
- cross-project-knowledge # Apply patterns from other projects
|
|
31
|
+
# P2 - Enhancement
|
|
32
|
+
- code-coverage-analysis # Validate test coverage
|
|
33
|
+
# Existing Skills
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Verification Concept
|
|
37
|
+
|
|
38
|
+
## Model Assignment
|
|
39
|
+
|
|
40
|
+
**Model**: Sonnet (thorough verification analysis)
|
|
41
|
+
**Cost per Action**: ~$0.003 (per verification pass)
|
|
42
|
+
**Never Calls**: No other concepts (pure verification)
|
|
43
|
+
|
|
44
|
+
## Core Principle: Independent Multi-Pass Review
|
|
45
|
+
|
|
46
|
+
Each verification pass:
|
|
47
|
+
- Reviews independently without seeing other passes
|
|
48
|
+
- Focuses on different aspects (security, correctness, performance)
|
|
49
|
+
- Documents findings with confidence levels
|
|
50
|
+
- Does NOT make final decisions (consensus does that)
|
|
51
|
+
|
|
52
|
+
## Actions
|
|
53
|
+
|
|
54
|
+
### verify_architecture(story, architecture, plan, verification_pass, total_passes, previous_reviews?)
|
|
55
|
+
|
|
56
|
+
Reviews architecture design for issues.
|
|
57
|
+
|
|
58
|
+
**Triggers**: After architecture.design completes (for high-risk or complex stories)
|
|
59
|
+
|
|
60
|
+
**Process**:
|
|
61
|
+
1. Review architecture against story requirements
|
|
62
|
+
2. Check for security concerns
|
|
63
|
+
3. Validate technical approach
|
|
64
|
+
4. Assess risk factors
|
|
65
|
+
5. Document findings with severity
|
|
66
|
+
6. Return verification results to parent workflow
|
|
67
|
+
|
|
68
|
+
**Verification Checklist**:
|
|
69
|
+
- [ ] Architecture addresses all acceptance criteria
|
|
70
|
+
- [ ] No security anti-patterns
|
|
71
|
+
- [ ] Scalability considered
|
|
72
|
+
- [ ] Error handling defined
|
|
73
|
+
- [ ] Dependencies appropriate
|
|
74
|
+
- [ ] Testing strategy viable
|
|
75
|
+
|
|
76
|
+
**Output Format**:
|
|
77
|
+
```yaml
|
|
78
|
+
# === SUMMARY (first 5 lines - quick scanning) ===
|
|
79
|
+
verification_id: "verify-arch-001-pass1"
|
|
80
|
+
target: "architecture"
|
|
81
|
+
pass: 1
|
|
82
|
+
status: "completed"
|
|
83
|
+
summary: "2 concerns found, 1 high severity"
|
|
84
|
+
|
|
85
|
+
# === FULL DETAILS (load only if needed) ===
|
|
86
|
+
details:
|
|
87
|
+
story_id: "story-001"
|
|
88
|
+
arch_id: "arch-001"
|
|
89
|
+
reviewer: "verification-pass-1"
|
|
90
|
+
|
|
91
|
+
findings:
|
|
92
|
+
- id: "VER-001"
|
|
93
|
+
severity: "high"
|
|
94
|
+
category: "security"
|
|
95
|
+
title: "Missing rate limiting on public endpoint"
|
|
96
|
+
description: |
|
|
97
|
+
The API endpoint /api/users is public but has no rate limiting.
|
|
98
|
+
This could allow denial-of-service attacks.
|
|
99
|
+
location: "architecture.endpoints[0]"
|
|
100
|
+
recommendation: "Add rate limiting middleware"
|
|
101
|
+
confidence: 0.92
|
|
102
|
+
|
|
103
|
+
- id: "VER-002"
|
|
104
|
+
severity: "medium"
|
|
105
|
+
category: "performance"
|
|
106
|
+
title: "N+1 query potential in user listing"
|
|
107
|
+
description: |
|
|
108
|
+
Architecture shows loading users then fetching roles separately.
|
|
109
|
+
Consider eager loading or batch queries.
|
|
110
|
+
location: "architecture.data_access.users"
|
|
111
|
+
recommendation: "Use JOIN or batch loading"
|
|
112
|
+
confidence: 0.78
|
|
113
|
+
|
|
114
|
+
verified_aspects:
|
|
115
|
+
- aspect: "Requirements coverage"
|
|
116
|
+
result: "pass"
|
|
117
|
+
note: "All acceptance criteria addressed"
|
|
118
|
+
|
|
119
|
+
- aspect: "Security patterns"
|
|
120
|
+
result: "warning"
|
|
121
|
+
note: "Rate limiting missing"
|
|
122
|
+
|
|
123
|
+
- aspect: "Error handling"
|
|
124
|
+
result: "pass"
|
|
125
|
+
note: "Comprehensive error handling defined"
|
|
126
|
+
|
|
127
|
+
metrics:
|
|
128
|
+
findings_count: 2
|
|
129
|
+
critical: 0
|
|
130
|
+
high: 1
|
|
131
|
+
medium: 1
|
|
132
|
+
low: 0
|
|
133
|
+
pass_rate: "85%"
|
|
134
|
+
|
|
135
|
+
recommendation: "revise" # approve | approve_with_notes | revise | block
|
|
136
|
+
rationale: "High-severity security concern requires addressing before implementation"
|
|
137
|
+
|
|
138
|
+
metadata:
|
|
139
|
+
created_at: "2025-01-10T10:00:00Z"
|
|
140
|
+
concept: "verification"
|
|
141
|
+
action: "verify_architecture"
|
|
142
|
+
model: "sonnet"
|
|
143
|
+
pass_number: 1
|
|
144
|
+
total_passes: 2
|
|
145
|
+
cost: 0.003
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### verify_implementation(architecture, implementation, files, verification_pass, total_passes, previous_reviews?)
|
|
149
|
+
|
|
150
|
+
Reviews implementation code for issues.
|
|
151
|
+
|
|
152
|
+
**Triggers**: After implementation.generate completes (for high-risk changes)
|
|
153
|
+
|
|
154
|
+
**Process**:
|
|
155
|
+
1. Review code against architecture specification
|
|
156
|
+
2. Check security vulnerabilities (OWASP Top 10)
|
|
157
|
+
3. Validate coding patterns and standards
|
|
158
|
+
4. Check test coverage adequacy
|
|
159
|
+
5. Document findings with severity
|
|
160
|
+
6. Return verification results to parent workflow
|
|
161
|
+
|
|
162
|
+
**Verification Checklist**:
|
|
163
|
+
- [ ] Implementation matches architecture
|
|
164
|
+
- [ ] No SQL injection, XSS, command injection
|
|
165
|
+
- [ ] Error handling implemented
|
|
166
|
+
- [ ] Input validation present
|
|
167
|
+
- [ ] Tests cover critical paths
|
|
168
|
+
- [ ] No hardcoded secrets
|
|
169
|
+
|
|
170
|
+
**Output Format**:
|
|
171
|
+
```yaml
|
|
172
|
+
# === SUMMARY (first 5 lines - quick scanning) ===
|
|
173
|
+
verification_id: "verify-impl-001-pass1"
|
|
174
|
+
target: "implementation"
|
|
175
|
+
pass: 1
|
|
176
|
+
status: "completed"
|
|
177
|
+
summary: "3 findings, implementation follows architecture"
|
|
178
|
+
|
|
179
|
+
# === FULL DETAILS (load only if needed) ===
|
|
180
|
+
details:
|
|
181
|
+
impl_id: "impl-001"
|
|
182
|
+
arch_id: "arch-001"
|
|
183
|
+
reviewer: "verification-pass-1"
|
|
184
|
+
|
|
185
|
+
findings:
|
|
186
|
+
- id: "VER-101"
|
|
187
|
+
severity: "medium"
|
|
188
|
+
category: "security"
|
|
189
|
+
title: "Input not sanitized before database query"
|
|
190
|
+
description: |
|
|
191
|
+
User input passed directly to query builder without sanitization.
|
|
192
|
+
While parameterized queries are used, explicit sanitization adds defense in depth.
|
|
193
|
+
location: "src/services/user.service.ts:45"
|
|
194
|
+
recommendation: "Add input validation using validation library"
|
|
195
|
+
confidence: 0.85
|
|
196
|
+
|
|
197
|
+
- id: "VER-102"
|
|
198
|
+
severity: "low"
|
|
199
|
+
category: "code_quality"
|
|
200
|
+
title: "Magic number in retry logic"
|
|
201
|
+
description: "Retry count of 3 should be configurable"
|
|
202
|
+
location: "src/services/auth.service.ts:78"
|
|
203
|
+
recommendation: "Extract to configuration constant"
|
|
204
|
+
confidence: 0.95
|
|
205
|
+
|
|
206
|
+
files_reviewed:
|
|
207
|
+
- path: "src/services/user.service.ts"
|
|
208
|
+
lines: 120
|
|
209
|
+
findings: 1
|
|
210
|
+
|
|
211
|
+
- path: "src/services/auth.service.ts"
|
|
212
|
+
lines: 85
|
|
213
|
+
findings: 1
|
|
214
|
+
|
|
215
|
+
- path: "src/controllers/user.controller.ts"
|
|
216
|
+
lines: 60
|
|
217
|
+
findings: 0
|
|
218
|
+
|
|
219
|
+
architecture_alignment:
|
|
220
|
+
aligned: true
|
|
221
|
+
deviations: []
|
|
222
|
+
|
|
223
|
+
test_coverage_check:
|
|
224
|
+
estimated_coverage: "78%"
|
|
225
|
+
critical_paths_covered: true
|
|
226
|
+
missing_tests:
|
|
227
|
+
- "Error handling for network failures"
|
|
228
|
+
|
|
229
|
+
metrics:
|
|
230
|
+
findings_count: 3
|
|
231
|
+
critical: 0
|
|
232
|
+
high: 0
|
|
233
|
+
medium: 1
|
|
234
|
+
low: 2
|
|
235
|
+
files_reviewed: 3
|
|
236
|
+
lines_reviewed: 265
|
|
237
|
+
|
|
238
|
+
recommendation: "approve_with_notes"
|
|
239
|
+
rationale: "No blocking issues, minor improvements recommended"
|
|
240
|
+
|
|
241
|
+
metadata:
|
|
242
|
+
created_at: "2025-01-10T10:05:00Z"
|
|
243
|
+
concept: "verification"
|
|
244
|
+
action: "verify_implementation"
|
|
245
|
+
model: "sonnet"
|
|
246
|
+
pass_number: 1
|
|
247
|
+
total_passes: 2
|
|
248
|
+
cost: 0.003
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### consensus(verifications)
|
|
252
|
+
|
|
253
|
+
Aggregates results from multiple verification passes into final decision.
|
|
254
|
+
|
|
255
|
+
**Triggers**: After final verification pass completes
|
|
256
|
+
|
|
257
|
+
**Process**:
|
|
258
|
+
1. Collect all verification pass results
|
|
259
|
+
2. Find common findings across passes
|
|
260
|
+
3. Resolve disagreements using priority rules
|
|
261
|
+
4. Calculate aggregate scores
|
|
262
|
+
5. Generate final recommendation
|
|
263
|
+
6. Return consensus results to parent workflow
|
|
264
|
+
|
|
265
|
+
**Priority Rules for Disagreements**:
|
|
266
|
+
1. Security > Correctness > Performance
|
|
267
|
+
2. Higher severity wins
|
|
268
|
+
3. Higher confidence wins
|
|
269
|
+
4. If tied, err on side of caution (more restrictive)
|
|
270
|
+
|
|
271
|
+
**Output Format**:
|
|
272
|
+
```yaml
|
|
273
|
+
# === SUMMARY (first 5 lines - quick scanning) ===
|
|
274
|
+
consensus_id: "verify-arch-001-consensus"
|
|
275
|
+
target: "architecture"
|
|
276
|
+
status: "completed"
|
|
277
|
+
recommendation: "approve_with_notes"
|
|
278
|
+
summary: "2 passes agree, 1 issue flagged for attention"
|
|
279
|
+
|
|
280
|
+
# === FULL DETAILS (load only if needed) ===
|
|
281
|
+
details:
|
|
282
|
+
verifications_analyzed: 2
|
|
283
|
+
|
|
284
|
+
agreement:
|
|
285
|
+
unanimous_findings:
|
|
286
|
+
- "VER-001: Missing rate limiting"
|
|
287
|
+
|
|
288
|
+
agreed_recommendations:
|
|
289
|
+
- "Add rate limiting before production"
|
|
290
|
+
|
|
291
|
+
disagreements:
|
|
292
|
+
- finding: "VER-002: N+1 query potential"
|
|
293
|
+
pass_1: "medium severity"
|
|
294
|
+
pass_2: "low severity"
|
|
295
|
+
resolution: "medium"
|
|
296
|
+
rationale: "Pass 1 provided more detailed performance analysis"
|
|
297
|
+
|
|
298
|
+
aggregated_findings:
|
|
299
|
+
critical: 0
|
|
300
|
+
high: 1
|
|
301
|
+
medium: 1
|
|
302
|
+
low: 0
|
|
303
|
+
|
|
304
|
+
aggregated_issues:
|
|
305
|
+
- id: "VER-001"
|
|
306
|
+
severity: "high"
|
|
307
|
+
title: "Missing rate limiting"
|
|
308
|
+
agreed_by: ["pass-1", "pass-2"]
|
|
309
|
+
action_required: true
|
|
310
|
+
|
|
311
|
+
- id: "VER-002"
|
|
312
|
+
severity: "medium"
|
|
313
|
+
title: "N+1 query potential"
|
|
314
|
+
agreed_by: ["pass-1"]
|
|
315
|
+
disputed_by: ["pass-2"]
|
|
316
|
+
resolution: "Include - performance concern valid"
|
|
317
|
+
action_required: false
|
|
318
|
+
|
|
319
|
+
recommendation: "approve_with_notes" # approve | approve_with_notes | revise | block
|
|
320
|
+
rationale: |
|
|
321
|
+
Both passes identified rate limiting as a necessary improvement.
|
|
322
|
+
This should be addressed but does not block implementation.
|
|
323
|
+
The N+1 query concern is noted for optimization phase.
|
|
324
|
+
|
|
325
|
+
conditions:
|
|
326
|
+
before_merge:
|
|
327
|
+
- "Add rate limiting to public endpoints"
|
|
328
|
+
before_production:
|
|
329
|
+
- "Monitor query performance"
|
|
330
|
+
|
|
331
|
+
confidence: 0.89
|
|
332
|
+
|
|
333
|
+
metadata:
|
|
334
|
+
created_at: "2025-01-10T10:10:00Z"
|
|
335
|
+
concept: "verification"
|
|
336
|
+
action: "consensus"
|
|
337
|
+
model: "sonnet"
|
|
338
|
+
passes_analyzed: 2
|
|
339
|
+
cost: 0.003
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## State Management
|
|
343
|
+
|
|
344
|
+
Verification results are returned to the parent workflow session and persisted via `zen_event_log` MCP tool. Use `zen_checkpoint_save` for multi-pass verification milestones.
|
|
345
|
+
|
|
346
|
+
## Integration with Workflow
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
Architecture ──[high risk]──> Verification Pass 1
|
|
350
|
+
│
|
|
351
|
+
v
|
|
352
|
+
Verification Pass 2
|
|
353
|
+
│
|
|
354
|
+
v
|
|
355
|
+
Consensus
|
|
356
|
+
│
|
|
357
|
+
┌────────────────┼────────────────┐
|
|
358
|
+
│ │ │
|
|
359
|
+
[approve] [approve_with_notes] [revise/block]
|
|
360
|
+
│ │ │
|
|
361
|
+
v v v
|
|
362
|
+
Implementation Implementation Architecture
|
|
363
|
+
(with notes) Revision
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Skip Conditions
|
|
367
|
+
|
|
368
|
+
Verification is skipped for:
|
|
369
|
+
- Low-risk architecture (architecture.risk == 'low')
|
|
370
|
+
- Simple stories (story.complexity != 'high')
|
|
371
|
+
- Small implementations (changes.length <= 3)
|
|
372
|
+
|
|
373
|
+
## Cost Optimization
|
|
374
|
+
|
|
375
|
+
**Why Sonnet?**
|
|
376
|
+
- Detailed analysis requires reasoning capability
|
|
377
|
+
- Security review needs pattern recognition
|
|
378
|
+
- Multiple passes justify moderate cost
|
|
379
|
+
- 5x cheaper than Opus ($0.003 vs $0.015)
|
|
380
|
+
|
|
381
|
+
**Cost per Feature**:
|
|
382
|
+
- 2 architecture passes: $0.006
|
|
383
|
+
- Consensus: $0.003
|
|
384
|
+
- 2 implementation passes: $0.006
|
|
385
|
+
- Consensus: $0.003
|
|
386
|
+
- Total: ~$0.018 (only for high-risk features)
|
|
387
|
+
|
|
388
|
+
## Example Usage
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
Architecture Concept completed: arch-001 (risk: high)
|
|
392
|
+
|
|
393
|
+
[Sync triggers: arch-verify-pass-1]
|
|
394
|
+
|
|
395
|
+
Verification Concept - Pass 1 (Sonnet):
|
|
396
|
+
✓ Reviewed architecture
|
|
397
|
+
✓ Found 2 issues (1 high, 1 medium)
|
|
398
|
+
✓ Recommendation: revise
|
|
399
|
+
✓ Pass 1 complete
|
|
400
|
+
Cost: $0.003
|
|
401
|
+
Duration: 12 seconds
|
|
402
|
+
|
|
403
|
+
[Sync triggers: arch-verify-pass-2]
|
|
404
|
+
|
|
405
|
+
Verification Concept - Pass 2 (Sonnet):
|
|
406
|
+
✓ Independent review (did not see pass 1)
|
|
407
|
+
✓ Found 2 issues (1 high, 1 low)
|
|
408
|
+
✓ Recommendation: approve_with_notes
|
|
409
|
+
✓ Pass 2 complete
|
|
410
|
+
Cost: $0.003
|
|
411
|
+
Duration: 11 seconds
|
|
412
|
+
|
|
413
|
+
[Sync triggers: arch-verify-consensus]
|
|
414
|
+
|
|
415
|
+
Verification Concept - Consensus (Sonnet):
|
|
416
|
+
✓ Analyzed 2 passes
|
|
417
|
+
✓ Agreement: 1 issue unanimous
|
|
418
|
+
✓ Resolved 1 disagreement
|
|
419
|
+
✓ Final: approve_with_notes
|
|
420
|
+
✓ Consensus complete
|
|
421
|
+
Cost: $0.003
|
|
422
|
+
Duration: 3 seconds
|
|
423
|
+
|
|
424
|
+
Total Verification Cost: $0.012
|
|
425
|
+
Accuracy Improvement: 39.7%
|
|
426
|
+
|
|
427
|
+
[Sync triggers: arch-consensus-approved]
|
|
428
|
+
→ Implementation receives verification notes
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
## Never Do This
|
|
432
|
+
|
|
433
|
+
- Call other concepts directly
|
|
434
|
+
- Modify any code files
|
|
435
|
+
- Make implementation decisions
|
|
436
|
+
- See other pass results (except in consensus)
|
|
437
|
+
- Skip security checks
|
|
438
|
+
- Lower severity without justification
|
|
439
|
+
|
|
440
|
+
## Always Do This
|
|
441
|
+
|
|
442
|
+
- Use Sonnet model exclusively
|
|
443
|
+
- Review independently per pass
|
|
444
|
+
- Document all findings with location
|
|
445
|
+
- Include confidence levels
|
|
446
|
+
- Use priority rules for disagreements
|
|
447
|
+
- Return structured results to parent workflow
|
|
448
|
+
- Track verification metrics
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
**Model Assignment**: Sonnet
|
|
453
|
+
**Cost Tier**: Moderate (~$0.003 per pass)
|
|
454
|
+
**Purpose**: Multi-pass verification for quality assurance
|
|
455
|
+
**Integration**: Triggered by architecture/implementation, gates progression
|
|
456
|
+
**Research**: Based on 39.7% accuracy improvement from multi-agent review
|