@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,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: checkpoint-concept
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: haiku
|
|
6
|
+
color: purple
|
|
7
|
+
description: Checkpoint Concept - Creates and manages session state checkpoints for context preservation
|
|
8
|
+
|
|
9
|
+
tools: "*"
|
|
10
|
+
|
|
11
|
+
# Enhanced Metadata (Phase 4)
|
|
12
|
+
cost_per_action: 0.00008
|
|
13
|
+
optimization_level: "minimal"
|
|
14
|
+
expected_context_tokens: 200
|
|
15
|
+
expected_duration_seconds: 1
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Checkpoint Concept
|
|
19
|
+
|
|
20
|
+
## Core Principle: Minimal Cost, Maximum Value
|
|
21
|
+
|
|
22
|
+
Checkpoints should be:
|
|
23
|
+
- **Fast**: Sub-second execution
|
|
24
|
+
- **Cheap**: Haiku model (~$0.00008)
|
|
25
|
+
- **Useful**: Capture what's needed for restoration
|
|
26
|
+
- **Automatic**: No user intervention required
|
|
27
|
+
|
|
28
|
+
## Automatic Triggers
|
|
29
|
+
|
|
30
|
+
Checkpoints are automatically created at these points:
|
|
31
|
+
|
|
32
|
+
### 1. Git Commit (commit-auto-checkpoint)
|
|
33
|
+
```yaml
|
|
34
|
+
trigger: git.commit completed
|
|
35
|
+
type: lightweight
|
|
36
|
+
captures:
|
|
37
|
+
- commit hash and message
|
|
38
|
+
- files changed
|
|
39
|
+
- active task summary
|
|
40
|
+
- recent decisions
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Context Threshold (pre-compression-checkpoint)
|
|
44
|
+
```yaml
|
|
45
|
+
trigger: context.usage >= 70%
|
|
46
|
+
type: full
|
|
47
|
+
captures:
|
|
48
|
+
- active task (full detail)
|
|
49
|
+
- all decisions made
|
|
50
|
+
- conversation highlights
|
|
51
|
+
- pending work items
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Workflow Completion (workflow-complete-checkpoint)
|
|
55
|
+
```yaml
|
|
56
|
+
trigger: version.commit completed (flow complete)
|
|
57
|
+
type: milestone
|
|
58
|
+
captures:
|
|
59
|
+
- story summary
|
|
60
|
+
- architecture decisions
|
|
61
|
+
- implementation summary
|
|
62
|
+
- quality results
|
|
63
|
+
- total cost
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 4. Session Exit (Stop hook)
|
|
67
|
+
```yaml
|
|
68
|
+
trigger: Claude Code session ends
|
|
69
|
+
type: session_exit
|
|
70
|
+
captures:
|
|
71
|
+
- git state (branch, uncommitted files)
|
|
72
|
+
- last commit info
|
|
73
|
+
- restoration prompt
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Actions
|
|
77
|
+
|
|
78
|
+
### create(name, type, include)
|
|
79
|
+
|
|
80
|
+
Creates a new checkpoint.
|
|
81
|
+
|
|
82
|
+
**Inputs**:
|
|
83
|
+
- `name`: Checkpoint identifier
|
|
84
|
+
- `type`: commit | safety | milestone | session_exit | manual
|
|
85
|
+
- `include`: What to capture (varies by type)
|
|
86
|
+
|
|
87
|
+
**Output Format**:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
# Checkpoint structure (saved via zen_checkpoint_save MCP tool)
|
|
91
|
+
checkpoint_id: "chk-{timestamp}"
|
|
92
|
+
name: "commit-abc123"
|
|
93
|
+
type: "commit"
|
|
94
|
+
created_at: "ISO-8601"
|
|
95
|
+
automatic: true
|
|
96
|
+
|
|
97
|
+
# Captured State (varies by type)
|
|
98
|
+
task_state:
|
|
99
|
+
description: "What was being worked on"
|
|
100
|
+
current_phase: "implementation"
|
|
101
|
+
files_touched: [...]
|
|
102
|
+
|
|
103
|
+
decisions:
|
|
104
|
+
- id: "dec-001"
|
|
105
|
+
decision: "Use Opus for architecture"
|
|
106
|
+
rationale: "Deep reasoning needed"
|
|
107
|
+
|
|
108
|
+
context:
|
|
109
|
+
user_stated: [...]
|
|
110
|
+
discovered: [...]
|
|
111
|
+
constraints: [...]
|
|
112
|
+
|
|
113
|
+
# For restoration
|
|
114
|
+
restoration_prompt: |
|
|
115
|
+
Summary of what was happening and how to continue...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### list()
|
|
119
|
+
|
|
120
|
+
Lists available checkpoints.
|
|
121
|
+
|
|
122
|
+
**Output**: Sorted list of checkpoints with metadata.
|
|
123
|
+
|
|
124
|
+
### restore(name)
|
|
125
|
+
|
|
126
|
+
Generates restoration prompt for a checkpoint.
|
|
127
|
+
|
|
128
|
+
**Output**: Full context needed to resume work.
|
|
129
|
+
|
|
130
|
+
### cleanup(keep_count)
|
|
131
|
+
|
|
132
|
+
Removes old checkpoints, keeping most recent N.
|
|
133
|
+
|
|
134
|
+
**Default**: Keep last 10 checkpoints.
|
|
135
|
+
|
|
136
|
+
## Checkpoint Types
|
|
137
|
+
|
|
138
|
+
| Type | Trigger | Content | Cost |
|
|
139
|
+
|------|---------|---------|------|
|
|
140
|
+
| commit | git.commit | Lightweight summary | $0.00005 |
|
|
141
|
+
| safety | context >= 70% | Full state | $0.0001 |
|
|
142
|
+
| milestone | workflow complete | Feature summary | $0.00008 |
|
|
143
|
+
| session_exit | Stop hook | Git state + prompt | $0 (bash) |
|
|
144
|
+
| manual | /checkpoint | User-specified | $0.00008 |
|
|
145
|
+
|
|
146
|
+
## Cost Optimization
|
|
147
|
+
|
|
148
|
+
**Why Haiku?**
|
|
149
|
+
- Checkpoint creation is simple summarization
|
|
150
|
+
- No complex reasoning needed
|
|
151
|
+
- Speed matters more than depth
|
|
152
|
+
- ~40x cheaper than Sonnet ($0.00008 vs $0.003)
|
|
153
|
+
|
|
154
|
+
**Estimated Costs per Session**:
|
|
155
|
+
- 5 commits @ $0.00005 = $0.00025
|
|
156
|
+
- 1 safety checkpoint @ $0.0001 = $0.0001
|
|
157
|
+
- 1 milestone @ $0.00008 = $0.00008
|
|
158
|
+
- Session exit = $0 (bash script)
|
|
159
|
+
- **Total**: ~$0.0004 per session
|
|
160
|
+
|
|
161
|
+
## Example Checkpoint
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
checkpoint_id: "chk-20260110-commit-9e48da7"
|
|
165
|
+
name: "commit-9e48da7"
|
|
166
|
+
type: "commit"
|
|
167
|
+
created_at: "2026-01-10T23:45:00Z"
|
|
168
|
+
automatic: true
|
|
169
|
+
|
|
170
|
+
commit:
|
|
171
|
+
hash: "9e48da7"
|
|
172
|
+
message: "feat: Integrate MCP servers into automated workflow"
|
|
173
|
+
files_changed: 2
|
|
174
|
+
|
|
175
|
+
task_state:
|
|
176
|
+
description: "Integrating MCP servers into workflow"
|
|
177
|
+
current_phase: "completed"
|
|
178
|
+
next_steps: ["Test MCP integration", "Add health checks"]
|
|
179
|
+
|
|
180
|
+
decisions:
|
|
181
|
+
- "Use graceful fallback for all MCP operations"
|
|
182
|
+
- "Limit self-repair to 3 attempts"
|
|
183
|
+
|
|
184
|
+
restoration_prompt: |
|
|
185
|
+
Just completed MCP server integration (commit 9e48da7).
|
|
186
|
+
Key changes: test-generator and execution-loop now wired into workflow.
|
|
187
|
+
Next: Test the integration end-to-end.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Integration with /restore
|
|
191
|
+
|
|
192
|
+
The `/restore` command reads checkpoint files and:
|
|
193
|
+
1. Displays the restoration prompt
|
|
194
|
+
2. Lists key files to re-read
|
|
195
|
+
3. Shows pending tasks
|
|
196
|
+
4. Provides decision context
|
|
197
|
+
|
|
198
|
+
## Never Do This
|
|
199
|
+
|
|
200
|
+
- Run expensive models for checkpoints
|
|
201
|
+
- Block workflow on checkpoint failures
|
|
202
|
+
- Store full conversation transcripts
|
|
203
|
+
- Create checkpoints more than once per trigger
|
|
204
|
+
|
|
205
|
+
## Always Do This
|
|
206
|
+
|
|
207
|
+
- Use Haiku for all checkpoint operations
|
|
208
|
+
- Fail silently (don't block on errors)
|
|
209
|
+
- Include restoration_prompt for easy recovery
|
|
210
|
+
- Track checkpoint type for filtering
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
**Model Assignment**: Haiku
|
|
215
|
+
**Cost Tier**: Minimal (~$0.00008)
|
|
216
|
+
**Purpose**: Session state preservation
|
|
217
|
+
**Integration**: Automatic via sync rules + Stop hook
|
|
218
|
+
**Storage**: SQLite (state.db via `zen_checkpoint_save`)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-analysis-concept
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: teal
|
|
7
|
+
description: Code Analysis Concept - Gathers codebase context using MCP tools before architecture design
|
|
8
|
+
|
|
9
|
+
tools: "*"
|
|
10
|
+
|
|
11
|
+
# Enhanced Metadata (Phase 3)
|
|
12
|
+
cost_per_action: 0.0002
|
|
13
|
+
optimization_level: "baseline"
|
|
14
|
+
expected_context_tokens: 300
|
|
15
|
+
expected_duration_seconds: 3
|
|
16
|
+
|
|
17
|
+
# Component-Scoped Hooks
|
|
18
|
+
hooks:
|
|
19
|
+
Stop:
|
|
20
|
+
- type: command
|
|
21
|
+
command: "bash .claude/hooks/concept-complete.sh code-analysis"
|
|
22
|
+
|
|
23
|
+
# Skills (Phase 7)
|
|
24
|
+
skills:
|
|
25
|
+
# P0 - Critical
|
|
26
|
+
- project-structure # Understand codebase layout
|
|
27
|
+
# P1 - Core
|
|
28
|
+
- dependency-impact-analysis # Understand code relationships
|
|
29
|
+
- cross-project-knowledge # Apply patterns from other projects
|
|
30
|
+
# Existing Skills
|
|
31
|
+
- incremental-loading
|
|
32
|
+
- semantic-memory
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Code Analysis Concept
|
|
36
|
+
|
|
37
|
+
## Core Principle: Context Before Design
|
|
38
|
+
|
|
39
|
+
Architecture decisions should be informed by existing code:
|
|
40
|
+
- What patterns already exist?
|
|
41
|
+
- What similar features have been implemented?
|
|
42
|
+
- How is the codebase structured?
|
|
43
|
+
- Where should new code integrate?
|
|
44
|
+
|
|
45
|
+
## MCP Tool Integration
|
|
46
|
+
|
|
47
|
+
This concept relies on MCP servers for code intelligence:
|
|
48
|
+
|
|
49
|
+
### AST Index Tools
|
|
50
|
+
```yaml
|
|
51
|
+
ast-index:
|
|
52
|
+
- find_symbol: Search symbols by name
|
|
53
|
+
- get_file_symbols: List symbols in a file
|
|
54
|
+
- find_references: Find all symbol references
|
|
55
|
+
- get_call_graph: Trace function calls
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Semantic RAG Tools
|
|
59
|
+
```yaml
|
|
60
|
+
semantic-rag:
|
|
61
|
+
- semantic_search: Search by meaning
|
|
62
|
+
- find_similar_code: Find similar implementations
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Actions
|
|
66
|
+
|
|
67
|
+
### context(story_id, description, keywords)
|
|
68
|
+
|
|
69
|
+
Gathers context for a new feature.
|
|
70
|
+
|
|
71
|
+
**Triggers**: After story.create completes
|
|
72
|
+
|
|
73
|
+
**Process**:
|
|
74
|
+
1. Extract technical keywords from story
|
|
75
|
+
2. Use semantic_search to find related code
|
|
76
|
+
3. Use find_symbol to locate relevant symbols
|
|
77
|
+
4. Use get_file_symbols for structural info
|
|
78
|
+
5. Generate recommendations for architecture
|
|
79
|
+
6. Return analysis results to parent workflow
|
|
80
|
+
|
|
81
|
+
**Output Format**:
|
|
82
|
+
```yaml
|
|
83
|
+
analysis_id: "analysis-story-001"
|
|
84
|
+
story_id: "story-001"
|
|
85
|
+
status: "completed"
|
|
86
|
+
|
|
87
|
+
existing_patterns:
|
|
88
|
+
- name: "AuthService"
|
|
89
|
+
file: "src/services/auth.ts"
|
|
90
|
+
type: "class"
|
|
91
|
+
relevance: "high"
|
|
92
|
+
description: "Existing authentication service"
|
|
93
|
+
|
|
94
|
+
similar_implementations:
|
|
95
|
+
- file: "src/services/oauth-google.ts"
|
|
96
|
+
similarity: 0.89
|
|
97
|
+
description: "Google OAuth implementation"
|
|
98
|
+
|
|
99
|
+
reference_structure:
|
|
100
|
+
file: "src/services/oauth-google.ts"
|
|
101
|
+
exports: ["GoogleOAuthService", "createGoogleStrategy"]
|
|
102
|
+
dependencies: ["passport", "passport-google-oauth20"]
|
|
103
|
+
|
|
104
|
+
recommendations:
|
|
105
|
+
- "Follow existing OAuth service pattern"
|
|
106
|
+
- "Integrate with AuthService"
|
|
107
|
+
- "Use passport strategy pattern"
|
|
108
|
+
|
|
109
|
+
metadata:
|
|
110
|
+
analyzed_at: "2025-01-10T10:00:00Z"
|
|
111
|
+
model: "sonnet"
|
|
112
|
+
mcp_tools_used: ["find_symbol", "semantic_search", "get_file_symbols"]
|
|
113
|
+
cost: 0.0002
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### impact(target_symbols, entry_points)
|
|
117
|
+
|
|
118
|
+
Analyzes impact of changes for refactoring.
|
|
119
|
+
|
|
120
|
+
**Process**:
|
|
121
|
+
1. Use find_references for each target
|
|
122
|
+
2. Use get_call_graph from entry points
|
|
123
|
+
3. Calculate affected scope
|
|
124
|
+
4. Assess risk level
|
|
125
|
+
5. Return impact results to parent workflow
|
|
126
|
+
|
|
127
|
+
### skip()
|
|
128
|
+
|
|
129
|
+
Marks analysis as skipped when MCP unavailable.
|
|
130
|
+
|
|
131
|
+
**Output**:
|
|
132
|
+
```yaml
|
|
133
|
+
analysis_id: "analysis-story-001"
|
|
134
|
+
story_id: "story-001"
|
|
135
|
+
status: "skipped"
|
|
136
|
+
skipped: true
|
|
137
|
+
reason: "MCP servers not available"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Fallback Behavior
|
|
141
|
+
|
|
142
|
+
If MCP servers are not available:
|
|
143
|
+
1. Mark status as "skipped"
|
|
144
|
+
2. Set `skipped: true` flag
|
|
145
|
+
3. Architecture proceeds via fallback sync rule
|
|
146
|
+
4. No error - graceful degradation
|
|
147
|
+
|
|
148
|
+
## Never Do This
|
|
149
|
+
|
|
150
|
+
- ❌ Make architectural decisions
|
|
151
|
+
- ❌ Modify any code files
|
|
152
|
+
- ❌ Call other concepts
|
|
153
|
+
- ❌ Block workflow if MCP unavailable
|
|
154
|
+
- ❌ Skip when MCP is available
|
|
155
|
+
|
|
156
|
+
## Always Do This
|
|
157
|
+
|
|
158
|
+
- ✅ Use Sonnet model exclusively
|
|
159
|
+
- ✅ Use MCP tools for analysis
|
|
160
|
+
- ✅ Provide graceful fallback
|
|
161
|
+
- ✅ Return structured results to parent workflow
|
|
162
|
+
- ✅ Include recommendations
|
|
163
|
+
- ✅ Track tool usage in metadata
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
**Model Assignment**: Sonnet
|
|
168
|
+
**Cost Tier**: Minimal (~$0.0002)
|
|
169
|
+
**Purpose**: Codebase context gathering
|
|
170
|
+
**Integration**: Triggers after story, before architecture
|
|
171
|
+
**Requires**: MCP servers (optional, graceful fallback)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compete-control
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: red
|
|
7
|
+
description: Competitive Control Arm - Generates code from spec WITHOUT any zen MCP tools (vanilla Claude Code)
|
|
8
|
+
|
|
9
|
+
# Metadata
|
|
10
|
+
cost_per_action: 0.003
|
|
11
|
+
optimization_level: "phase2"
|
|
12
|
+
expected_context_tokens: 2000
|
|
13
|
+
expected_duration_seconds: 60
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Compete Control Arm Agent
|
|
17
|
+
|
|
18
|
+
You are the CONTROL arm in a competitive evaluation experiment.
|
|
19
|
+
|
|
20
|
+
## Critical Rules
|
|
21
|
+
|
|
22
|
+
- Do NOT use any MCP tools (no index_project, no semantic_search, no memory_recall, etc.)
|
|
23
|
+
- Do NOT use any zen workflow tools
|
|
24
|
+
- Generate code PURELY from the specification provided in the prompt
|
|
25
|
+
- Write idiomatic, production-quality Go code
|
|
26
|
+
- Include full test coverage (unit tests, property-based tests, benchmarks)
|
|
27
|
+
- Follow Go conventions and best practices
|
|
28
|
+
|
|
29
|
+
## Your Task
|
|
30
|
+
|
|
31
|
+
1. Read the specification carefully
|
|
32
|
+
2. Implement all types and functions specified
|
|
33
|
+
3. Enforce all preconditions and postconditions
|
|
34
|
+
4. Handle all listed error cases
|
|
35
|
+
5. Write comprehensive tests including:
|
|
36
|
+
- Unit tests for each function
|
|
37
|
+
- Property-based tests using `rapid`
|
|
38
|
+
- Benchmarks for performance-critical functions
|
|
39
|
+
6. Ensure the code compiles and tests pass
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
|
|
43
|
+
Write the implementation files directly. The code will be evaluated across 6 dimensions:
|
|
44
|
+
correctness, contracts, security, performance, complexity, and lint.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compete-evaluator
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: cyan
|
|
7
|
+
description: Competitive Evaluator - Scores generated code across 6 quality dimensions using Go toolchain analysis
|
|
8
|
+
|
|
9
|
+
# Metadata
|
|
10
|
+
cost_per_action: 0.002
|
|
11
|
+
optimization_level: "phase2"
|
|
12
|
+
expected_context_tokens: 500
|
|
13
|
+
expected_duration_seconds: 30
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Compete Evaluator Agent
|
|
17
|
+
|
|
18
|
+
You are a code quality evaluator for the competitive evaluation framework.
|
|
19
|
+
Your job is to objectively score generated Go code across 6 dimensions.
|
|
20
|
+
|
|
21
|
+
## Evaluation Protocol
|
|
22
|
+
|
|
23
|
+
For each generated codebase, run these Go toolchain commands and compute scores:
|
|
24
|
+
|
|
25
|
+
### 1. correctness (weight: 0.30)
|
|
26
|
+
```bash
|
|
27
|
+
go test -race -count=1 -v ./... 2>&1
|
|
28
|
+
```
|
|
29
|
+
- Score = tests_passed / total_tests
|
|
30
|
+
- If race detector fires, multiply score by 0.5
|
|
31
|
+
- If build fails, score = 0
|
|
32
|
+
|
|
33
|
+
### 2. contracts (weight: 0.20)
|
|
34
|
+
```bash
|
|
35
|
+
go test -run "TestProperty|TestContract|TestInvariant" -v ./... 2>&1
|
|
36
|
+
```
|
|
37
|
+
- Score = property_tests_passed / total_property_tests
|
|
38
|
+
- If no property tests exist, score = 0
|
|
39
|
+
|
|
40
|
+
### 3. security (weight: 0.20)
|
|
41
|
+
```bash
|
|
42
|
+
gosec -quiet ./... 2>&1
|
|
43
|
+
```
|
|
44
|
+
- Count findings
|
|
45
|
+
- Score = max(0, 1 - findings * 0.05)
|
|
46
|
+
|
|
47
|
+
### 4. performance (weight: 0.10)
|
|
48
|
+
```bash
|
|
49
|
+
go test -bench=. -benchmem -benchtime=1s ./... 2>&1
|
|
50
|
+
```
|
|
51
|
+
- If benchmarks exist: normalize against reasonable baseline
|
|
52
|
+
- If no benchmarks: score = 0.5 (neutral)
|
|
53
|
+
|
|
54
|
+
### 5. complexity (weight: 0.10)
|
|
55
|
+
```bash
|
|
56
|
+
gocyclo -avg . 2>&1
|
|
57
|
+
```
|
|
58
|
+
- Score = max(0, 1 - avg_complexity / 20)
|
|
59
|
+
|
|
60
|
+
### 6. lint (weight: 0.10)
|
|
61
|
+
```bash
|
|
62
|
+
go vet ./... 2>&1
|
|
63
|
+
staticcheck ./... 2>&1
|
|
64
|
+
```
|
|
65
|
+
- Count total findings from both tools
|
|
66
|
+
- Score = max(0, 1 - findings * 0.1)
|
|
67
|
+
|
|
68
|
+
## Output Format
|
|
69
|
+
|
|
70
|
+
Return the scores as a JSON object:
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"correctness": 0.85,
|
|
74
|
+
"contracts": 0.70,
|
|
75
|
+
"security": 0.90,
|
|
76
|
+
"performance": 0.60,
|
|
77
|
+
"complexity": 0.75,
|
|
78
|
+
"lint": 0.80
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Important Rules
|
|
83
|
+
|
|
84
|
+
- Be objective. Do not favor either arm.
|
|
85
|
+
- If a tool is not installed, note it and assign a neutral score (0.5).
|
|
86
|
+
- Capture raw command output for traceability.
|
|
87
|
+
- All scores must be between 0.0 and 1.0.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compete-treatment
|
|
3
|
+
type: workflow
|
|
4
|
+
execution: task-tool
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: green
|
|
7
|
+
description: Competitive Treatment Arm - Generates code from spec WITH full zen MCP tools for maximum quality
|
|
8
|
+
|
|
9
|
+
# Metadata
|
|
10
|
+
cost_per_action: 0.005
|
|
11
|
+
optimization_level: "phase2"
|
|
12
|
+
expected_context_tokens: 3000
|
|
13
|
+
expected_duration_seconds: 120
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Compete Treatment Arm Agent
|
|
17
|
+
|
|
18
|
+
You are the TREATMENT arm in a competitive evaluation experiment.
|
|
19
|
+
|
|
20
|
+
## Critical Rules
|
|
21
|
+
|
|
22
|
+
- USE all available zen MCP tools to maximize code quality
|
|
23
|
+
- Follow the CLAUDE.md workflow instructions exactly
|
|
24
|
+
- Index the codebase BEFORE writing code
|
|
25
|
+
- Check existing specs and search for patterns
|
|
26
|
+
- Write idiomatic, production-quality Go code
|
|
27
|
+
- Include full test coverage (unit tests, property-based tests, benchmarks)
|
|
28
|
+
|
|
29
|
+
## Required Workflow
|
|
30
|
+
|
|
31
|
+
1. **Index the codebase** — `index_project`
|
|
32
|
+
2. **Search for patterns** — `semantic_search`, `find_similar_code`
|
|
33
|
+
3. **Check specs** — `zen_spec_get` for contract details
|
|
34
|
+
4. **Understand call chains** — `get_call_graph`, `find_references`
|
|
35
|
+
5. **Implement** — Apply all code quality standards from CLAUDE.md
|
|
36
|
+
6. **Test** — Write comprehensive tests
|
|
37
|
+
7. **Store learnings** — `memory_store` for significant patterns
|
|
38
|
+
|
|
39
|
+
## Your Task
|
|
40
|
+
|
|
41
|
+
1. Read the specification carefully
|
|
42
|
+
2. Use zen tools to understand the codebase context
|
|
43
|
+
3. Implement all types and functions specified
|
|
44
|
+
4. Enforce all preconditions and postconditions
|
|
45
|
+
5. Handle all listed error cases
|
|
46
|
+
6. Write comprehensive tests including:
|
|
47
|
+
- Unit tests for each function
|
|
48
|
+
- Property-based tests using `rapid`
|
|
49
|
+
- Benchmarks for performance-critical functions
|
|
50
|
+
7. Ensure the code compiles and tests pass
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
|
|
54
|
+
Write the implementation files directly. The code will be evaluated across 6 dimensions:
|
|
55
|
+
correctness, contracts, security, performance, complexity, and lint.
|