@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,449 @@
|
|
|
1
|
+
Replay a failed workflow from provenance to debug issues and understand what went wrong.
|
|
2
|
+
|
|
3
|
+
This command loads the provenance trail for a failed workflow and allows you to:
|
|
4
|
+
- See exactly what happened at each step
|
|
5
|
+
- Replay specific concept invocations
|
|
6
|
+
- Modify inputs and retry
|
|
7
|
+
- Identify where failures occurred
|
|
8
|
+
- Compare expected vs actual outputs
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/replay <flow-id> # Show full workflow replay
|
|
14
|
+
/replay <flow-id> --action <id> # Replay specific action
|
|
15
|
+
/replay <flow-id> --from <id> # Replay from specific action onwards
|
|
16
|
+
/replay <flow-id> --fix # Interactive fix mode
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
When you run this command, you should:
|
|
22
|
+
|
|
23
|
+
1. **Load Provenance**
|
|
24
|
+
- Read `koan/provenance/flows/flow-{id}.yaml`
|
|
25
|
+
- Parse all actions in chronological order
|
|
26
|
+
- Identify failed/blocked actions
|
|
27
|
+
|
|
28
|
+
2. **Display Workflow Timeline**
|
|
29
|
+
```
|
|
30
|
+
Flow: flow-2025-11-10-19h00m00s
|
|
31
|
+
Status: FAILED at action act-003
|
|
32
|
+
Duration: 12 minutes
|
|
33
|
+
Cost: $0.0165
|
|
34
|
+
|
|
35
|
+
Timeline:
|
|
36
|
+
✓ act-001: story.create (Sonnet) - 2min - $0.000175
|
|
37
|
+
✓ act-002: architecture.design (Sonnet) - 8min - $0.015
|
|
38
|
+
✗ act-003: implementation.generate (Sonnet) - FAILED
|
|
39
|
+
Error: Missing required field 'technical_spec' in architecture output
|
|
40
|
+
|
|
41
|
+
Not executed (due to failure):
|
|
42
|
+
⊘ act-004: quality.review (Sonnet)
|
|
43
|
+
⊘ act-005: quality.test (Sonnet)
|
|
44
|
+
⊘ act-006: version.commit (Sonnet)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. **Show Failure Details**
|
|
48
|
+
```
|
|
49
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
50
|
+
Action: act-003 (implementation.generate)
|
|
51
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
52
|
+
|
|
53
|
+
Concept: implementation
|
|
54
|
+
Action: generate
|
|
55
|
+
Model: sonnet
|
|
56
|
+
Status: FAILED
|
|
57
|
+
|
|
58
|
+
Inputs:
|
|
59
|
+
architecture_id: arch-042
|
|
60
|
+
story_id: story-042
|
|
61
|
+
technical_spec: ${architecture.technical_spec} ← UNRESOLVED
|
|
62
|
+
|
|
63
|
+
Error:
|
|
64
|
+
Variable '${architecture.technical_spec}' could not be resolved
|
|
65
|
+
Field 'technical_spec' not found in arch-042.yaml
|
|
66
|
+
|
|
67
|
+
Root Cause:
|
|
68
|
+
Architecture output (act-002) is missing required field 'technical_spec'
|
|
69
|
+
This prevented implementation from receiving necessary specifications
|
|
70
|
+
|
|
71
|
+
Suggested Fix:
|
|
72
|
+
1. Review architecture output: arch-042.yaml
|
|
73
|
+
2. Add missing 'technical_spec' field
|
|
74
|
+
3. Or: Replay act-002 (architecture.design) with corrected output
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
4. **Offer Replay Options**
|
|
78
|
+
```
|
|
79
|
+
What would you like to do?
|
|
80
|
+
|
|
81
|
+
1. Replay failed action (act-003) with fixed inputs
|
|
82
|
+
2. Replay from previous action (act-002) to regenerate architecture
|
|
83
|
+
3. Skip failed action and continue workflow
|
|
84
|
+
4. Examine action details in depth
|
|
85
|
+
5. Exit replay mode
|
|
86
|
+
|
|
87
|
+
Choose option (1-5):
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Example: Replay Failed Workflow
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
User: /replay flow-2025-11-10-19h00m00s
|
|
94
|
+
|
|
95
|
+
You: Loading workflow provenance...
|
|
96
|
+
|
|
97
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
98
|
+
Workflow Replay: flow-2025-11-10-19h00m00s
|
|
99
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
100
|
+
|
|
101
|
+
Status: FAILED
|
|
102
|
+
Started: 2025-11-10 19:00:00
|
|
103
|
+
Failed: 2025-11-10 19:12:34
|
|
104
|
+
Duration: 12m 34s
|
|
105
|
+
Cost: $0.0165
|
|
106
|
+
|
|
107
|
+
Timeline:
|
|
108
|
+
┌─────────────────────────────────────────────────┐
|
|
109
|
+
│ ✓ act-001: story.create 2m 15s │
|
|
110
|
+
│ Model: sonnet $0.0002 │
|
|
111
|
+
│ Output: story-042.yaml │
|
|
112
|
+
│ │
|
|
113
|
+
│ ✓ act-002: architecture.design 8m 20s │
|
|
114
|
+
│ Model: sonnet $0.015 │
|
|
115
|
+
│ Output: arch-042.yaml │
|
|
116
|
+
│ ⚠️ Warning: Schema validation skipped │
|
|
117
|
+
│ │
|
|
118
|
+
│ ✗ act-003: implementation.generate FAILED │
|
|
119
|
+
│ Model: sonnet │
|
|
120
|
+
│ Error: Variable resolution failed │
|
|
121
|
+
│ → architecture.technical_spec not found │
|
|
122
|
+
│ │
|
|
123
|
+
│ ⊘ act-004: quality.review NOT EXECUTED│
|
|
124
|
+
│ ⊘ act-005: quality.test NOT EXECUTED│
|
|
125
|
+
│ ⊘ act-006: version.commit NOT EXECUTED│
|
|
126
|
+
└─────────────────────────────────────────────────┘
|
|
127
|
+
|
|
128
|
+
Root Cause Analysis:
|
|
129
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
130
|
+
|
|
131
|
+
The architecture concept (act-002) completed successfully but
|
|
132
|
+
produced invalid output missing the 'technical_spec' field.
|
|
133
|
+
|
|
134
|
+
This cascaded to implementation (act-003) which failed because
|
|
135
|
+
it couldn't resolve the required ${architecture.technical_spec}
|
|
136
|
+
variable.
|
|
137
|
+
|
|
138
|
+
Key Issue: Schema validation was not run after act-002.
|
|
139
|
+
If validation had been enabled, the missing field would have
|
|
140
|
+
been caught immediately, saving 2 minutes of wasted execution.
|
|
141
|
+
|
|
142
|
+
Suggested Actions:
|
|
143
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
|
+
|
|
145
|
+
Option 1: Fix architecture output manually
|
|
146
|
+
1. Edit arch-042.yaml
|
|
147
|
+
2. Add missing technical_spec field
|
|
148
|
+
3. Run: /replay flow-2025-11-10-19h00m00s --from act-003
|
|
149
|
+
|
|
150
|
+
Option 2: Replay architecture with better prompt
|
|
151
|
+
1. Replay act-002 with explicit technical_spec requirement
|
|
152
|
+
2. Enable schema validation
|
|
153
|
+
3. Continue workflow from there
|
|
154
|
+
|
|
155
|
+
Option 3: Examine architecture output in detail
|
|
156
|
+
1. Run: /replay flow-2025-11-10-19h00m00s --action act-002
|
|
157
|
+
2. Review what was generated
|
|
158
|
+
3. Identify why technical_spec was omitted
|
|
159
|
+
|
|
160
|
+
Which option would you like? (1-3 or 'exit')
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Example: Replay Specific Action
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
User: /replay flow-2025-11-10-19h00m00s --action act-002
|
|
167
|
+
|
|
168
|
+
You: Replaying action act-002...
|
|
169
|
+
|
|
170
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
171
|
+
Action Replay: act-002
|
|
172
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
173
|
+
|
|
174
|
+
Concept: architecture
|
|
175
|
+
Action: design
|
|
176
|
+
Model: sonnet
|
|
177
|
+
Status: completed (but with issues)
|
|
178
|
+
|
|
179
|
+
Inputs:
|
|
180
|
+
story_id: story-042
|
|
181
|
+
requirements: "Add OAuth authentication with Google and GitHub"
|
|
182
|
+
acceptance_criteria: [5 items]
|
|
183
|
+
|
|
184
|
+
Context Loaded:
|
|
185
|
+
Input tokens: 25,432
|
|
186
|
+
Output tokens: 3,847
|
|
187
|
+
Cost: $0.015
|
|
188
|
+
|
|
189
|
+
Generated Output:
|
|
190
|
+
architecture_id: arch-042
|
|
191
|
+
selected_approach: "Passport.js with OAuth2 strategies"
|
|
192
|
+
decisions: [3 documented]
|
|
193
|
+
components: [4 defined]
|
|
194
|
+
risks: [2 identified]
|
|
195
|
+
|
|
196
|
+
Issues Found:
|
|
197
|
+
✗ Missing required field: technical_spec
|
|
198
|
+
✗ Schema validation was not run
|
|
199
|
+
⚠️ Implementation guidance is vague
|
|
200
|
+
|
|
201
|
+
Output File: arch-042.yaml
|
|
202
|
+
Schema: architecture.schema.json
|
|
203
|
+
|
|
204
|
+
Would you like to:
|
|
205
|
+
1. View full architecture output
|
|
206
|
+
2. Regenerate with corrected prompt
|
|
207
|
+
3. Manually fix arch-042.yaml
|
|
208
|
+
4. Run schema validation now
|
|
209
|
+
5. Compare against similar successful architectures
|
|
210
|
+
|
|
211
|
+
Choose (1-5):
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Example: Interactive Fix Mode
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
User: /replay flow-2025-11-10-19h00m00s --fix
|
|
218
|
+
|
|
219
|
+
You: Entering interactive fix mode...
|
|
220
|
+
|
|
221
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
|
+
Interactive Fix: flow-2025-11-10-19h00m00s
|
|
223
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
224
|
+
|
|
225
|
+
I'll guide you through fixing this workflow step by step.
|
|
226
|
+
|
|
227
|
+
Step 1: Understanding the Failure
|
|
228
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
229
|
+
|
|
230
|
+
The workflow failed at implementation.generate (act-003) because
|
|
231
|
+
the architecture output was missing the 'technical_spec' field.
|
|
232
|
+
|
|
233
|
+
This is a common issue when:
|
|
234
|
+
- Architecture prompt didn't explicitly request technical_spec
|
|
235
|
+
- Sonnet summarized instead of providing detailed specs
|
|
236
|
+
- Schema validation was disabled
|
|
237
|
+
|
|
238
|
+
Step 2: Fixing Architecture Output
|
|
239
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
240
|
+
|
|
241
|
+
I can regenerate the architecture with an improved prompt that
|
|
242
|
+
explicitly requires technical_spec, OR we can manually add it.
|
|
243
|
+
|
|
244
|
+
Recommended: Regenerate (ensures consistency and quality)
|
|
245
|
+
|
|
246
|
+
Regenerate architecture? (yes/no): yes
|
|
247
|
+
|
|
248
|
+
Regenerating act-002 with improved prompt...
|
|
249
|
+
|
|
250
|
+
[Invoke architecture concept with enhanced prompt]
|
|
251
|
+
|
|
252
|
+
✓ Architecture regenerated: arch-042.yaml
|
|
253
|
+
✓ Schema validation passed
|
|
254
|
+
✓ Technical spec included (127 lines)
|
|
255
|
+
|
|
256
|
+
Step 3: Resume Workflow
|
|
257
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
258
|
+
|
|
259
|
+
Architecture is now fixed. Resume workflow from implementation?
|
|
260
|
+
|
|
261
|
+
Resume from act-003? (yes/no): yes
|
|
262
|
+
|
|
263
|
+
Resuming workflow...
|
|
264
|
+
|
|
265
|
+
✓ act-003: implementation.generate - COMPLETED
|
|
266
|
+
Files changed: 5
|
|
267
|
+
Tests created: 2
|
|
268
|
+
|
|
269
|
+
✓ act-004: quality.review - COMPLETED
|
|
270
|
+
Status: approved
|
|
271
|
+
Issues: 0
|
|
272
|
+
|
|
273
|
+
✓ act-005: quality.test - COMPLETED
|
|
274
|
+
Passed: 18/18
|
|
275
|
+
Coverage: 94%
|
|
276
|
+
|
|
277
|
+
✓ act-006: version.commit - COMPLETED
|
|
278
|
+
Commit: abc123def
|
|
279
|
+
|
|
280
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
281
|
+
Workflow Fixed and Completed! ✅
|
|
282
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
283
|
+
|
|
284
|
+
Original failure: 12m 34s, $0.0165, FAILED
|
|
285
|
+
After fix: 18m 45s total, $0.0171 total, SUCCESS
|
|
286
|
+
|
|
287
|
+
Time saved vs full restart: 8 minutes (started from act-003)
|
|
288
|
+
Additional cost: $0.0006 (only regenerated architecture)
|
|
289
|
+
|
|
290
|
+
Flow updated: flow-2025-11-10-19h00m00s-fixed
|
|
291
|
+
Original preserved: flow-2025-11-10-19h00m00s
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Provenance Format
|
|
295
|
+
|
|
296
|
+
The replay command reads from:
|
|
297
|
+
|
|
298
|
+
```yaml
|
|
299
|
+
# koan/provenance/flows/flow-2025-11-10-19h00m00s.yaml
|
|
300
|
+
|
|
301
|
+
flow_id: "flow-2025-11-10-19h00m00s"
|
|
302
|
+
started_at: "2025-11-10T19:00:00Z"
|
|
303
|
+
status: "failed"
|
|
304
|
+
failed_at: "2025-11-10T19:12:34Z"
|
|
305
|
+
failure_action: "act-003"
|
|
306
|
+
|
|
307
|
+
actions:
|
|
308
|
+
- action_id: "act-001"
|
|
309
|
+
concept: "story"
|
|
310
|
+
action: "create"
|
|
311
|
+
model: "sonnet"
|
|
312
|
+
status: "completed"
|
|
313
|
+
started_at: "2025-11-10T19:00:00Z"
|
|
314
|
+
completed_at: "2025-11-10T19:02:15Z"
|
|
315
|
+
cost:
|
|
316
|
+
input_tokens: 1200
|
|
317
|
+
output_tokens: 450
|
|
318
|
+
cost_usd: 0.000175
|
|
319
|
+
inputs:
|
|
320
|
+
title: "Add OAuth authentication"
|
|
321
|
+
description: "..."
|
|
322
|
+
outputs:
|
|
323
|
+
story_id: "story-042"
|
|
324
|
+
status: "ready"
|
|
325
|
+
file: "koan/stories/story-042.yaml"
|
|
326
|
+
|
|
327
|
+
- action_id: "act-002"
|
|
328
|
+
concept: "architecture"
|
|
329
|
+
action: "design"
|
|
330
|
+
model: "sonnet"
|
|
331
|
+
status: "completed"
|
|
332
|
+
triggered_by: "act-001"
|
|
333
|
+
sync_id: "story-to-arch"
|
|
334
|
+
started_at: "2025-11-10T19:02:20Z"
|
|
335
|
+
completed_at: "2025-11-10T19:10:40Z"
|
|
336
|
+
cost:
|
|
337
|
+
input_tokens: 25432
|
|
338
|
+
output_tokens: 3847
|
|
339
|
+
cost_usd: 0.015
|
|
340
|
+
inputs:
|
|
341
|
+
story_id: "story-042"
|
|
342
|
+
requirements: "..."
|
|
343
|
+
outputs:
|
|
344
|
+
architecture_id: "arch-042"
|
|
345
|
+
file: "koan/architecture/arch-042.yaml"
|
|
346
|
+
warnings:
|
|
347
|
+
- "Schema validation not run"
|
|
348
|
+
- "technical_spec field missing"
|
|
349
|
+
|
|
350
|
+
- action_id: "act-003"
|
|
351
|
+
concept: "implementation"
|
|
352
|
+
action: "generate"
|
|
353
|
+
model: "sonnet"
|
|
354
|
+
status: "failed"
|
|
355
|
+
triggered_by: "act-002"
|
|
356
|
+
sync_id: "arch-to-impl"
|
|
357
|
+
started_at: "2025-11-10T19:10:45Z"
|
|
358
|
+
failed_at: "2025-11-10T19:12:34Z"
|
|
359
|
+
error:
|
|
360
|
+
type: "VariableResolutionError"
|
|
361
|
+
message: "Cannot resolve ${architecture.technical_spec}"
|
|
362
|
+
details: "Field 'technical_spec' not found in arch-042.yaml"
|
|
363
|
+
resolution: "Add missing field to architecture output or regenerate"
|
|
364
|
+
inputs:
|
|
365
|
+
architecture_id: "arch-042"
|
|
366
|
+
technical_spec: "${architecture.technical_spec}" # FAILED HERE
|
|
367
|
+
|
|
368
|
+
total_cost: 0.0165
|
|
369
|
+
total_duration_seconds: 754
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Debugging Benefits
|
|
373
|
+
|
|
374
|
+
### 5x Faster Debugging
|
|
375
|
+
|
|
376
|
+
**Without /replay** (traditional debugging):
|
|
377
|
+
1. Read logs manually (5 min)
|
|
378
|
+
2. Trace through workflow (10 min)
|
|
379
|
+
3. Find failing point (5 min)
|
|
380
|
+
4. Identify root cause (10 min)
|
|
381
|
+
5. Fix and restart entire workflow (15 min)
|
|
382
|
+
**Total: 45 minutes**
|
|
383
|
+
|
|
384
|
+
**With /replay**:
|
|
385
|
+
1. Run /replay command (30 sec)
|
|
386
|
+
2. See failure point immediately (1 min)
|
|
387
|
+
3. Root cause analysis provided (2 min)
|
|
388
|
+
4. Guided fix options (2 min)
|
|
389
|
+
5. Resume from failure point (10 min)
|
|
390
|
+
**Total: 15 minutes + 30 seconds = ~9 minutes**
|
|
391
|
+
|
|
392
|
+
**Savings: ~36 minutes (80% faster) = 5x speedup**
|
|
393
|
+
|
|
394
|
+
### Cost Savings
|
|
395
|
+
|
|
396
|
+
**Full restart**: Pay for all actions again ($0.016)
|
|
397
|
+
**Replay from failure**: Pay only for failed + remaining actions ($0.006)
|
|
398
|
+
**Savings**: $0.01 per failed workflow
|
|
399
|
+
|
|
400
|
+
## Integration with Other Commands
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
# Start workflow
|
|
404
|
+
/workflow "Add OAuth"
|
|
405
|
+
|
|
406
|
+
# If it fails...
|
|
407
|
+
/trace flow-2025-11-10-19h00m00s # See what happened
|
|
408
|
+
/replay flow-2025-11-10-19h00m00s # Debug and fix
|
|
409
|
+
|
|
410
|
+
# After fixing
|
|
411
|
+
/sync --execute # Continue workflow
|
|
412
|
+
|
|
413
|
+
# Check costs
|
|
414
|
+
/costs --flow flow-2025-11-10-19h00m00s
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
## Use Cases
|
|
418
|
+
|
|
419
|
+
### 1. Debug Variable Resolution Failures
|
|
420
|
+
When ${variables} can't be resolved, replay shows exactly which field is missing from which output.
|
|
421
|
+
|
|
422
|
+
### 2. Investigate Blocked Concepts
|
|
423
|
+
When a concept returns "blocked" status, replay shows the blocker details and suggests resolutions.
|
|
424
|
+
|
|
425
|
+
### 3. Analyze Schema Validation Failures
|
|
426
|
+
When validation fails, replay shows all validation errors and where in the output they occurred.
|
|
427
|
+
|
|
428
|
+
### 4. Compare Successful vs Failed Workflows
|
|
429
|
+
Load two flows side-by-side to see what differed.
|
|
430
|
+
|
|
431
|
+
### 5. Resume Partial Workflows
|
|
432
|
+
Pick up exactly where a workflow stopped without restarting from scratch.
|
|
433
|
+
|
|
434
|
+
## Architecture Note
|
|
435
|
+
|
|
436
|
+
The replay command leverages complete provenance tracking to provide:
|
|
437
|
+
- Full execution history
|
|
438
|
+
- Input/output snapshots
|
|
439
|
+
- Cost tracking
|
|
440
|
+
- Timing information
|
|
441
|
+
- Error details
|
|
442
|
+
- Resolution suggestions
|
|
443
|
+
|
|
444
|
+
This embodies WYSIWID: The provenance file IS the execution record.
|
|
445
|
+
Read it to understand exactly what happened.
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
**Use this command when**: Workflows fail, debugging issues, understanding execution flow, learning from errors, or resuming interrupted work.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: restore
|
|
3
|
+
description: "Restore context from a checkpoint with progressive warm-up"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /restore Command
|
|
7
|
+
|
|
8
|
+
Rebuild Claude's context from a checkpoint after context compression or a new session. Restores not just facts, but intuition — reasoning chains, dead ends, and codebase feel.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
/restore # Restore most recent checkpoint
|
|
14
|
+
/restore <name-or-id> # Restore specific checkpoint
|
|
15
|
+
/restore --list # List available checkpoints
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Implementation Steps
|
|
19
|
+
|
|
20
|
+
### 1. Handle --list flag
|
|
21
|
+
|
|
22
|
+
If the user passed `--list`:
|
|
23
|
+
- Call `zen_checkpoint_list` with limit 20
|
|
24
|
+
- Display checkpoints with name, type, and creation time
|
|
25
|
+
- Stop here
|
|
26
|
+
|
|
27
|
+
### 2. Load the checkpoint
|
|
28
|
+
|
|
29
|
+
Call `zen_checkpoint_restore` with either:
|
|
30
|
+
- `latest: true` (default, no argument)
|
|
31
|
+
- `checkpoint_id: "<id>"` (specific checkpoint)
|
|
32
|
+
|
|
33
|
+
This returns structured layers and instructions.
|
|
34
|
+
|
|
35
|
+
### 3. Follow the progressive restoration
|
|
36
|
+
|
|
37
|
+
Process the response in this order:
|
|
38
|
+
|
|
39
|
+
**Layer 1: Grounding** — Read `layers.grounding` to understand what task was in progress, what phase it was in, and what files were involved.
|
|
40
|
+
|
|
41
|
+
**Layer 2: Decisions** — Read `layers.decisions`. These are settled choices — do NOT re-derive or second-guess them unless the user asks.
|
|
42
|
+
|
|
43
|
+
**Layer 3: Lessons** — Read `layers.lessons`. These are hard-won insights. Internalize them.
|
|
44
|
+
|
|
45
|
+
**Layer 4: Dead ends** — Read `layers.dead_ends`. These are approaches that were tried and failed. Do NOT retry them.
|
|
46
|
+
|
|
47
|
+
**Layer 5: Restoration prompt** — Read `restoration_prompt`. This is a first-person briefing from your past self. Trust it.
|
|
48
|
+
|
|
49
|
+
### 4. Read warm-up files
|
|
50
|
+
|
|
51
|
+
Read each file in `layers.warm_up_files` using the Read tool:
|
|
52
|
+
- Use line ranges from `sections` if specified
|
|
53
|
+
- Do NOT ask permission — read silently
|
|
54
|
+
- These files rebuild your intuition about the codebase
|
|
55
|
+
|
|
56
|
+
### 5. Check relationship memory
|
|
57
|
+
|
|
58
|
+
Read `memory/relationship.md` from your auto-memory directory if it exists. This contains patterns about working with this user — communication style, preferences, habits.
|
|
59
|
+
|
|
60
|
+
### 6. Provide synthesis
|
|
61
|
+
|
|
62
|
+
After reading everything, provide a brief synthesis to the user:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Context restored from: <checkpoint-name> (<time ago>)
|
|
66
|
+
|
|
67
|
+
Task: <one-line summary>
|
|
68
|
+
Phase: <current phase>
|
|
69
|
+
Key insight: <most important lesson>
|
|
70
|
+
Next step: <what to do next>
|
|
71
|
+
|
|
72
|
+
<N> files re-read for context. Ready to continue.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Keep the synthesis concise — 4-6 lines. The goal is to confirm understanding, not repeat everything.
|
|
76
|
+
|
|
77
|
+
## Backward Compatibility
|
|
78
|
+
|
|
79
|
+
Old checkpoints without structured fields (lessons, dead_ends, warm_up_files) will still work:
|
|
80
|
+
- Missing fields default to empty arrays
|
|
81
|
+
- The grounding layer falls back to the full `data` object
|
|
82
|
+
- Restoration still works, just with less structured context
|
|
83
|
+
|
|
84
|
+
## Related Commands
|
|
85
|
+
|
|
86
|
+
- `/checkpoint` — Save a new checkpoint
|
|
87
|
+
- `/health` — Check context health status
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Retrospective Command
|
|
2
|
+
|
|
3
|
+
Manually trigger retrospective analysis for a workflow.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/retrospective [flow-id]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
|
|
13
|
+
- `flow-id` (optional): Specific flow to analyze. If omitted, analyzes most recent failed flow.
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
When you run this command:
|
|
18
|
+
|
|
19
|
+
1. **Find Failed Flow**
|
|
20
|
+
- If flow-id provided, load that flow's provenance
|
|
21
|
+
- Otherwise, find most recent flow with failed/rejected/blocked status
|
|
22
|
+
- Read from `koan/provenance/flows/`
|
|
23
|
+
|
|
24
|
+
2. **Gather Context**
|
|
25
|
+
- Load all concept outputs from the flow
|
|
26
|
+
- Identify the failure point
|
|
27
|
+
- Collect rejection/failure details
|
|
28
|
+
|
|
29
|
+
3. **Run Analysis**
|
|
30
|
+
- Invoke retrospective concept with Sonnet
|
|
31
|
+
- Apply 5 Whys root cause analysis
|
|
32
|
+
- Extract actionable learnings
|
|
33
|
+
|
|
34
|
+
4. **Store Results**
|
|
35
|
+
- Save to `koan/retrospectives/retro-{id}.yaml`
|
|
36
|
+
- Update `koan/learnings/active-learnings.yaml`
|
|
37
|
+
- Link retrospective to original flow
|
|
38
|
+
|
|
39
|
+
5. **Report Findings**
|
|
40
|
+
- Display root causes
|
|
41
|
+
- Show learnings with priorities
|
|
42
|
+
- List immediate recommendations
|
|
43
|
+
|
|
44
|
+
## Example
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
User: /retrospective flow-2025-01-15-10h30m00s
|