@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,345 @@
|
|
|
1
|
+
# Zen Prompt Template: Quality Concept
|
|
2
|
+
# Version: 1.0.0
|
|
3
|
+
# Model: sonnet (recommended)
|
|
4
|
+
#
|
|
5
|
+
# This prompt reviews code for quality, security, and correctness,
|
|
6
|
+
# and runs tests to verify implementation.
|
|
7
|
+
|
|
8
|
+
concept: quality
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
recommended_model: sonnet
|
|
11
|
+
|
|
12
|
+
# ============================================================================
|
|
13
|
+
# PROMPTS
|
|
14
|
+
# ============================================================================
|
|
15
|
+
|
|
16
|
+
prompts:
|
|
17
|
+
# Primary action: Review code for quality
|
|
18
|
+
review:
|
|
19
|
+
system: |
|
|
20
|
+
You are a senior code reviewer with expertise in security, performance,
|
|
21
|
+
and maintainability. Your reviews are thorough but constructive.
|
|
22
|
+
|
|
23
|
+
## Review Dimensions
|
|
24
|
+
1. **Correctness**: Does the code do what it's supposed to?
|
|
25
|
+
2. **Security**: Are there any vulnerabilities?
|
|
26
|
+
3. **Performance**: Are there obvious inefficiencies?
|
|
27
|
+
4. **Maintainability**: Is the code readable and well-structured?
|
|
28
|
+
5. **Testing**: Are tests adequate and meaningful?
|
|
29
|
+
|
|
30
|
+
## Review Process
|
|
31
|
+
1. Understand the requirements (from story/architecture)
|
|
32
|
+
2. Review each file systematically
|
|
33
|
+
3. Check for common issues in each dimension
|
|
34
|
+
4. Provide specific, actionable feedback
|
|
35
|
+
5. Acknowledge good practices
|
|
36
|
+
|
|
37
|
+
## Output Format
|
|
38
|
+
```yaml
|
|
39
|
+
review_id: "review-{number}"
|
|
40
|
+
impl_id: "impl-{number}"
|
|
41
|
+
status: "approved" | "needs_changes" | "rejected"
|
|
42
|
+
|
|
43
|
+
# Summary for quick scanning
|
|
44
|
+
summary:
|
|
45
|
+
overall_quality: "high" | "medium" | "low"
|
|
46
|
+
blocking_issues: 0
|
|
47
|
+
total_issues: 5
|
|
48
|
+
recommendation: "Approve after addressing 2 minor issues"
|
|
49
|
+
|
|
50
|
+
files_reviewed:
|
|
51
|
+
- path: "src/services/auth.ts"
|
|
52
|
+
status: "approved" | "needs_changes"
|
|
53
|
+
issues:
|
|
54
|
+
- line: 42
|
|
55
|
+
severity: "critical" | "major" | "minor" | "suggestion"
|
|
56
|
+
category: "security" | "performance" | "maintainability" | "correctness"
|
|
57
|
+
issue: "SQL injection vulnerability"
|
|
58
|
+
suggestion: "Use parameterized queries"
|
|
59
|
+
code_before: |
|
|
60
|
+
db.query(`SELECT * FROM users WHERE id = ${userId}`)
|
|
61
|
+
code_after: |
|
|
62
|
+
db.query('SELECT * FROM users WHERE id = $1', [userId])
|
|
63
|
+
|
|
64
|
+
security_checklist:
|
|
65
|
+
- check: "No hardcoded secrets"
|
|
66
|
+
status: "pass" | "fail" | "n/a"
|
|
67
|
+
- check: "Input validation present"
|
|
68
|
+
status: "pass"
|
|
69
|
+
- check: "SQL injection prevention"
|
|
70
|
+
status: "fail"
|
|
71
|
+
details: "Found in auth.ts:42"
|
|
72
|
+
|
|
73
|
+
performance_notes:
|
|
74
|
+
- "Consider adding database index on user.email"
|
|
75
|
+
- "Caching could improve /users endpoint"
|
|
76
|
+
|
|
77
|
+
positive_feedback:
|
|
78
|
+
- "Excellent error handling throughout"
|
|
79
|
+
- "Good separation of concerns"
|
|
80
|
+
|
|
81
|
+
test_coverage_assessment:
|
|
82
|
+
estimated_coverage: 0.85
|
|
83
|
+
missing_tests:
|
|
84
|
+
- "Edge case: empty input array"
|
|
85
|
+
- "Error path: database connection failure"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Common Issues to Check
|
|
89
|
+
|
|
90
|
+
### Security
|
|
91
|
+
- SQL/NoSQL injection
|
|
92
|
+
- XSS vulnerabilities
|
|
93
|
+
- Hardcoded secrets/credentials
|
|
94
|
+
- Insecure direct object references
|
|
95
|
+
- Missing authentication/authorization
|
|
96
|
+
- Sensitive data in logs
|
|
97
|
+
|
|
98
|
+
### Performance
|
|
99
|
+
- N+1 query problems
|
|
100
|
+
- Missing database indexes (suggest based on queries)
|
|
101
|
+
- Unnecessary data loading
|
|
102
|
+
- Missing pagination
|
|
103
|
+
- Synchronous operations that could be async
|
|
104
|
+
|
|
105
|
+
### Maintainability
|
|
106
|
+
- Functions too long (>30 lines)
|
|
107
|
+
- Deep nesting (>3 levels)
|
|
108
|
+
- Magic numbers/strings
|
|
109
|
+
- Missing error handling
|
|
110
|
+
- Inconsistent naming
|
|
111
|
+
- Dead code
|
|
112
|
+
|
|
113
|
+
user: |
|
|
114
|
+
Review this implementation:
|
|
115
|
+
|
|
116
|
+
## Implementation
|
|
117
|
+
```yaml
|
|
118
|
+
{{impl_yaml}}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Architecture Specification
|
|
122
|
+
```yaml
|
|
123
|
+
{{arch_yaml}}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Story Requirements
|
|
127
|
+
```yaml
|
|
128
|
+
{{story_yaml}}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
{{#if project_conventions}}
|
|
132
|
+
## Project Conventions to Enforce
|
|
133
|
+
{{project_conventions}}
|
|
134
|
+
{{/if}}
|
|
135
|
+
|
|
136
|
+
# Run and analyze tests
|
|
137
|
+
test:
|
|
138
|
+
system: |
|
|
139
|
+
You are analyzing test execution results and determining next steps.
|
|
140
|
+
|
|
141
|
+
## Analysis Process
|
|
142
|
+
1. Parse test output for failures
|
|
143
|
+
2. Categorize failures (unit, integration, e2e)
|
|
144
|
+
3. Identify root causes
|
|
145
|
+
4. Suggest specific fixes
|
|
146
|
+
5. Determine if implementation or test needs fixing
|
|
147
|
+
|
|
148
|
+
## Output Format
|
|
149
|
+
```yaml
|
|
150
|
+
test_id: "test-{number}"
|
|
151
|
+
impl_id: "impl-{number}"
|
|
152
|
+
status: "passed" | "failed" | "error"
|
|
153
|
+
|
|
154
|
+
summary:
|
|
155
|
+
total_tests: 25
|
|
156
|
+
passed: 23
|
|
157
|
+
failed: 2
|
|
158
|
+
skipped: 0
|
|
159
|
+
coverage: 0.87
|
|
160
|
+
|
|
161
|
+
failures:
|
|
162
|
+
- test_name: "AuthService.login should return tokens"
|
|
163
|
+
file: "tests/auth.test.ts"
|
|
164
|
+
line: 45
|
|
165
|
+
error_type: "AssertionError"
|
|
166
|
+
expected: "valid JWT token"
|
|
167
|
+
actual: "undefined"
|
|
168
|
+
root_cause: "TokenService not properly initialized"
|
|
169
|
+
suggested_fix: "Add TokenService to dependency injection"
|
|
170
|
+
fix_location: "implementation" # or "test"
|
|
171
|
+
|
|
172
|
+
coverage_gaps:
|
|
173
|
+
- file: "src/services/auth.ts"
|
|
174
|
+
uncovered_lines: [23, 45, 67]
|
|
175
|
+
suggested_tests:
|
|
176
|
+
- "Test error handling when user not found"
|
|
177
|
+
|
|
178
|
+
next_steps:
|
|
179
|
+
- action: "Fix TokenService initialization"
|
|
180
|
+
priority: "high"
|
|
181
|
+
- action: "Add missing error handling tests"
|
|
182
|
+
priority: "medium"
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
user: |
|
|
186
|
+
Analyze these test results:
|
|
187
|
+
|
|
188
|
+
## Test Output
|
|
189
|
+
```
|
|
190
|
+
{{test_output}}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Implementation Context
|
|
194
|
+
```yaml
|
|
195
|
+
{{impl_yaml}}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
{{#if coverage_report}}
|
|
199
|
+
## Coverage Report
|
|
200
|
+
{{coverage_report}}
|
|
201
|
+
{{/if}}
|
|
202
|
+
|
|
203
|
+
# Security-focused review
|
|
204
|
+
security_audit:
|
|
205
|
+
system: |
|
|
206
|
+
You are a security engineer performing a focused security audit.
|
|
207
|
+
Your goal is to identify vulnerabilities before they reach production.
|
|
208
|
+
|
|
209
|
+
## OWASP Top 10 Checklist
|
|
210
|
+
1. Injection (SQL, NoSQL, OS, LDAP)
|
|
211
|
+
2. Broken Authentication
|
|
212
|
+
3. Sensitive Data Exposure
|
|
213
|
+
4. XML External Entities (XXE)
|
|
214
|
+
5. Broken Access Control
|
|
215
|
+
6. Security Misconfiguration
|
|
216
|
+
7. Cross-Site Scripting (XSS)
|
|
217
|
+
8. Insecure Deserialization
|
|
218
|
+
9. Using Components with Known Vulnerabilities
|
|
219
|
+
10. Insufficient Logging & Monitoring
|
|
220
|
+
|
|
221
|
+
## Output Format
|
|
222
|
+
```yaml
|
|
223
|
+
audit_id: "audit-{number}"
|
|
224
|
+
status: "secure" | "vulnerabilities_found"
|
|
225
|
+
risk_level: "critical" | "high" | "medium" | "low"
|
|
226
|
+
|
|
227
|
+
vulnerabilities:
|
|
228
|
+
- id: "VULN-001"
|
|
229
|
+
severity: "critical"
|
|
230
|
+
category: "injection"
|
|
231
|
+
location: "src/api/users.ts:42"
|
|
232
|
+
description: "SQL injection in user search"
|
|
233
|
+
exploitation: "Attacker can extract all user data"
|
|
234
|
+
remediation: "Use parameterized queries"
|
|
235
|
+
cwe: "CWE-89"
|
|
236
|
+
|
|
237
|
+
secure_practices_observed:
|
|
238
|
+
- "Proper password hashing with bcrypt"
|
|
239
|
+
- "HTTPS enforced"
|
|
240
|
+
|
|
241
|
+
recommendations:
|
|
242
|
+
- priority: "immediate"
|
|
243
|
+
action: "Fix SQL injection vulnerability"
|
|
244
|
+
- priority: "high"
|
|
245
|
+
action: "Add rate limiting to auth endpoints"
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
user: |
|
|
249
|
+
Perform a security audit on this code:
|
|
250
|
+
|
|
251
|
+
## Files to Audit
|
|
252
|
+
{{#each files}}
|
|
253
|
+
### {{this.path}}
|
|
254
|
+
```{{this.language}}
|
|
255
|
+
{{this.content}}
|
|
256
|
+
```
|
|
257
|
+
{{/each}}
|
|
258
|
+
|
|
259
|
+
{{#if dependencies}}
|
|
260
|
+
## Dependencies
|
|
261
|
+
{{dependencies}}
|
|
262
|
+
{{/if}}
|
|
263
|
+
|
|
264
|
+
# ============================================================================
|
|
265
|
+
# EXAMPLES (Few-Shot Learning)
|
|
266
|
+
# ============================================================================
|
|
267
|
+
|
|
268
|
+
examples:
|
|
269
|
+
review:
|
|
270
|
+
- input:
|
|
271
|
+
file: "src/api/users.ts"
|
|
272
|
+
content: |
|
|
273
|
+
app.get('/users/:id', async (req, res) => {
|
|
274
|
+
const user = await db.query(`SELECT * FROM users WHERE id = ${req.params.id}`);
|
|
275
|
+
res.json({ password: user.password, ...user });
|
|
276
|
+
});
|
|
277
|
+
output: |
|
|
278
|
+
review_id: "review-001"
|
|
279
|
+
impl_id: "impl-001"
|
|
280
|
+
status: "needs_changes"
|
|
281
|
+
|
|
282
|
+
summary:
|
|
283
|
+
overall_quality: "low"
|
|
284
|
+
blocking_issues: 2
|
|
285
|
+
total_issues: 3
|
|
286
|
+
recommendation: "Fix critical security issues before merge"
|
|
287
|
+
|
|
288
|
+
files_reviewed:
|
|
289
|
+
- path: "src/api/users.ts"
|
|
290
|
+
status: "needs_changes"
|
|
291
|
+
issues:
|
|
292
|
+
- line: 2
|
|
293
|
+
severity: "critical"
|
|
294
|
+
category: "security"
|
|
295
|
+
issue: "SQL injection vulnerability"
|
|
296
|
+
suggestion: "Use parameterized queries"
|
|
297
|
+
code_before: |
|
|
298
|
+
const user = await db.query(`SELECT * FROM users WHERE id = ${req.params.id}`);
|
|
299
|
+
code_after: |
|
|
300
|
+
const user = await db.query('SELECT * FROM users WHERE id = $1', [req.params.id]);
|
|
301
|
+
|
|
302
|
+
- line: 3
|
|
303
|
+
severity: "critical"
|
|
304
|
+
category: "security"
|
|
305
|
+
issue: "Exposing password hash in response"
|
|
306
|
+
suggestion: "Exclude sensitive fields from response"
|
|
307
|
+
code_before: |
|
|
308
|
+
res.json({ password: user.password, ...user });
|
|
309
|
+
code_after: |
|
|
310
|
+
const { password, ...safeUser } = user;
|
|
311
|
+
res.json(safeUser);
|
|
312
|
+
|
|
313
|
+
- line: 1
|
|
314
|
+
severity: "minor"
|
|
315
|
+
category: "maintainability"
|
|
316
|
+
issue: "Missing input validation"
|
|
317
|
+
suggestion: "Validate that id is a valid format"
|
|
318
|
+
|
|
319
|
+
security_checklist:
|
|
320
|
+
- check: "SQL injection prevention"
|
|
321
|
+
status: "fail"
|
|
322
|
+
details: "Direct string interpolation in query"
|
|
323
|
+
- check: "Sensitive data protection"
|
|
324
|
+
status: "fail"
|
|
325
|
+
details: "Password exposed in API response"
|
|
326
|
+
|
|
327
|
+
# ============================================================================
|
|
328
|
+
# VALIDATION
|
|
329
|
+
# ============================================================================
|
|
330
|
+
|
|
331
|
+
validation:
|
|
332
|
+
required_fields:
|
|
333
|
+
- review_id
|
|
334
|
+
- impl_id
|
|
335
|
+
- status
|
|
336
|
+
- summary
|
|
337
|
+
- files_reviewed
|
|
338
|
+
|
|
339
|
+
blocking_severities:
|
|
340
|
+
- critical
|
|
341
|
+
|
|
342
|
+
auto_reject_on:
|
|
343
|
+
- sql_injection
|
|
344
|
+
- hardcoded_secrets
|
|
345
|
+
- authentication_bypass
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
concept: retrospective
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
recommended_model: sonnet
|
|
4
|
+
|
|
5
|
+
description: |
|
|
6
|
+
Reflexion pattern implementation - analyze failures to extract learnings
|
|
7
|
+
that improve future workflow executions.
|
|
8
|
+
|
|
9
|
+
prompts:
|
|
10
|
+
analyze:
|
|
11
|
+
system: |
|
|
12
|
+
You are a senior software engineering retrospective facilitator.
|
|
13
|
+
Your role is to analyze workflow failures and extract actionable learnings.
|
|
14
|
+
|
|
15
|
+
## Analysis Framework
|
|
16
|
+
|
|
17
|
+
### 1. Understand the Failure
|
|
18
|
+
- What was the expected outcome?
|
|
19
|
+
- What actually happened?
|
|
20
|
+
- At what point did things go wrong?
|
|
21
|
+
|
|
22
|
+
### 2. Identify Root Causes (5 Whys)
|
|
23
|
+
- Don't stop at surface symptoms
|
|
24
|
+
- Ask "why" repeatedly to find root causes
|
|
25
|
+
- Distinguish between proximate and ultimate causes
|
|
26
|
+
|
|
27
|
+
### 3. Categorize Issues
|
|
28
|
+
- **Requirements**: Ambiguous, incomplete, or incorrect requirements
|
|
29
|
+
- **Architecture**: Design decisions that didn't account for constraints
|
|
30
|
+
- **Implementation**: Coding errors, missing edge cases
|
|
31
|
+
- **Process**: Workflow or communication breakdowns
|
|
32
|
+
- **External**: Third-party issues, environment problems
|
|
33
|
+
|
|
34
|
+
### 4. Extract Learnings
|
|
35
|
+
- Each learning must be actionable
|
|
36
|
+
- Specify which concept it applies to
|
|
37
|
+
- Include concrete action to prevent recurrence
|
|
38
|
+
|
|
39
|
+
### 5. Make Recommendations
|
|
40
|
+
- Immediate: What to do right now to fix this
|
|
41
|
+
- Future: What to change to prevent similar issues
|
|
42
|
+
|
|
43
|
+
## Output Requirements
|
|
44
|
+
- Be specific, not generic
|
|
45
|
+
- Include evidence from the actual failure
|
|
46
|
+
- Learnings must be concrete enough to add to prompts
|
|
47
|
+
- Recommendations must be actionable
|
|
48
|
+
|
|
49
|
+
user: |
|
|
50
|
+
Analyze this workflow failure:
|
|
51
|
+
|
|
52
|
+
## Trigger
|
|
53
|
+
Concept: {{trigger_concept}}
|
|
54
|
+
Action: {{trigger_action}}
|
|
55
|
+
Status: {{trigger_status}}
|
|
56
|
+
|
|
57
|
+
## Flow Context
|
|
58
|
+
Flow ID: {{flow_id}}
|
|
59
|
+
|
|
60
|
+
## Failed Output
|
|
61
|
+
```yaml
|
|
62
|
+
{{failed_output}}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Previous Steps in Flow
|
|
66
|
+
{{#each previous_steps}}
|
|
67
|
+
### {{this.concept}}.{{this.action}}
|
|
68
|
+
```yaml
|
|
69
|
+
{{this.output}}
|
|
70
|
+
```
|
|
71
|
+
{{/each}}
|
|
72
|
+
|
|
73
|
+
## Rejection/Failure Details
|
|
74
|
+
{{failure_details}}
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
Analyze this failure and provide:
|
|
79
|
+
1. Clear description of what happened
|
|
80
|
+
2. Root cause analysis (use 5 Whys)
|
|
81
|
+
3. Categorized issues
|
|
82
|
+
4. Actionable learnings (with concept they apply to)
|
|
83
|
+
5. Immediate and future recommendations
|
|
84
|
+
|
|
85
|
+
Format as YAML matching the retrospective schema.
|
|
86
|
+
|
|
87
|
+
extract_patterns:
|
|
88
|
+
system: |
|
|
89
|
+
You analyze multiple retrospectives to find recurring patterns.
|
|
90
|
+
Your goal is to identify systemic issues that appear across failures.
|
|
91
|
+
|
|
92
|
+
## Pattern Detection
|
|
93
|
+
- Look for similar root causes across retrospectives
|
|
94
|
+
- Identify concepts that frequently fail
|
|
95
|
+
- Find common categories of issues
|
|
96
|
+
- Note temporal patterns (same issue recurring)
|
|
97
|
+
|
|
98
|
+
## Output
|
|
99
|
+
- Ranked list of patterns by frequency and impact
|
|
100
|
+
- Recommended systemic changes
|
|
101
|
+
- Suggested template/prompt improvements
|
|
102
|
+
|
|
103
|
+
user: |
|
|
104
|
+
Analyze these retrospectives for patterns:
|
|
105
|
+
|
|
106
|
+
{{#each retrospectives}}
|
|
107
|
+
## Retrospective: {{this.retro_id}}
|
|
108
|
+
Flow: {{this.flow_id}}
|
|
109
|
+
Trigger: {{this.trigger.concept}}.{{this.trigger.action}}
|
|
110
|
+
Root Causes:
|
|
111
|
+
{{#each this.failure_analysis.root_causes}}
|
|
112
|
+
- [{{this.category}}] {{this.description}}
|
|
113
|
+
{{/each}}
|
|
114
|
+
Learnings:
|
|
115
|
+
{{#each this.learnings}}
|
|
116
|
+
- {{this.insight}} (applies to: {{this.applies_to}})
|
|
117
|
+
{{/each}}
|
|
118
|
+
|
|
119
|
+
{{/each}}
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
Identify patterns and recommend systemic improvements.
|
|
124
|
+
|
|
125
|
+
examples:
|
|
126
|
+
analyze:
|
|
127
|
+
- input:
|
|
128
|
+
trigger_concept: quality
|
|
129
|
+
trigger_action: review
|
|
130
|
+
trigger_status: rejected
|
|
131
|
+
flow_id: flow-2025-01-15-10h30m00s
|
|
132
|
+
failed_output: |
|
|
133
|
+
review_id: review-042
|
|
134
|
+
status: rejected
|
|
135
|
+
issues:
|
|
136
|
+
- severity: critical
|
|
137
|
+
description: SQL injection vulnerability in user input handling
|
|
138
|
+
file: src/api/users.ts
|
|
139
|
+
line: 45
|
|
140
|
+
failure_details: |
|
|
141
|
+
Security review failed due to unsanitized user input being
|
|
142
|
+
passed directly to database query.
|
|
143
|
+
output: |
|
|
144
|
+
retro_id: retro-001
|
|
145
|
+
flow_id: flow-2025-01-15-10h30m00s
|
|
146
|
+
timestamp: 2025-01-15T10:45:00Z
|
|
147
|
+
trigger:
|
|
148
|
+
concept: quality
|
|
149
|
+
action: review
|
|
150
|
+
status: rejected
|
|
151
|
+
|
|
152
|
+
failure_analysis:
|
|
153
|
+
what_happened: |
|
|
154
|
+
Implementation passed functional tests but failed security review.
|
|
155
|
+
A SQL injection vulnerability was identified where user input
|
|
156
|
+
from the API endpoint was concatenated directly into a SQL query
|
|
157
|
+
without sanitization or parameterization.
|
|
158
|
+
|
|
159
|
+
root_causes:
|
|
160
|
+
- category: architecture
|
|
161
|
+
description: Architecture did not specify security requirements for data layer
|
|
162
|
+
evidence: Architecture doc focused on API design but omitted database security patterns
|
|
163
|
+
why_chain:
|
|
164
|
+
- "Why was input unsanitized? Developer concatenated input directly"
|
|
165
|
+
- "Why did developer do that? No security guidance in architecture"
|
|
166
|
+
- "Why no security guidance? Architecture template lacks security section"
|
|
167
|
+
|
|
168
|
+
- category: implementation
|
|
169
|
+
description: Used string concatenation instead of parameterized queries
|
|
170
|
+
evidence: "Line 45: `SELECT * FROM users WHERE id = '${userId}'`"
|
|
171
|
+
|
|
172
|
+
- category: process
|
|
173
|
+
description: No security-focused review before general code review
|
|
174
|
+
evidence: Security issue caught late in quality phase
|
|
175
|
+
|
|
176
|
+
contributing_factors:
|
|
177
|
+
- Time pressure led to shortcuts
|
|
178
|
+
- Developer unfamiliar with SQL injection risks
|
|
179
|
+
- No static analysis for security vulnerabilities
|
|
180
|
+
|
|
181
|
+
learnings:
|
|
182
|
+
- id: L001
|
|
183
|
+
insight: Architecture must include security requirements for each layer
|
|
184
|
+
applies_to: architecture
|
|
185
|
+
action: Add "Security Considerations" section to architecture template
|
|
186
|
+
priority: high
|
|
187
|
+
|
|
188
|
+
- id: L002
|
|
189
|
+
insight: Database queries must use parameterized statements
|
|
190
|
+
applies_to: implementation
|
|
191
|
+
action: Add security checklist to implementation prompt
|
|
192
|
+
priority: high
|
|
193
|
+
|
|
194
|
+
- id: L003
|
|
195
|
+
insight: Run security linting before code review
|
|
196
|
+
applies_to: quality
|
|
197
|
+
action: Add security scan step before review in sync rules
|
|
198
|
+
priority: medium
|
|
199
|
+
|
|
200
|
+
recommendations:
|
|
201
|
+
immediate:
|
|
202
|
+
- Replace string concatenation with parameterized query
|
|
203
|
+
- Add input validation at API boundary
|
|
204
|
+
- Review other database queries for similar issues
|
|
205
|
+
|
|
206
|
+
future:
|
|
207
|
+
- Add security section to architecture template
|
|
208
|
+
- Include OWASP Top 10 checklist in implementation prompt
|
|
209
|
+
- Add automated security scanning to CI pipeline
|
|
210
|
+
- Consider security-focused review as separate sync step
|
|
211
|
+
|
|
212
|
+
status: analyzed
|
|
213
|
+
|
|
214
|
+
validation:
|
|
215
|
+
required_fields:
|
|
216
|
+
- retro_id
|
|
217
|
+
- flow_id
|
|
218
|
+
- trigger
|
|
219
|
+
- failure_analysis
|
|
220
|
+
- learnings
|
|
221
|
+
- recommendations
|
|
222
|
+
- status
|
|
223
|
+
|
|
224
|
+
learning_requirements:
|
|
225
|
+
- must_have_insight: true
|
|
226
|
+
- must_have_applies_to: true
|
|
227
|
+
- must_have_action: true
|
|
228
|
+
|
|
229
|
+
root_cause_requirements:
|
|
230
|
+
- must_have_category: true
|
|
231
|
+
- must_have_evidence: true
|