@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,442 @@
|
|
|
1
|
+
# Security Concept
|
|
2
|
+
|
|
3
|
+
The Security concept provides continuous security assurance throughout the workflow, not as an afterthought but as an integral part of every phase.
|
|
4
|
+
|
|
5
|
+
## Model Assignment
|
|
6
|
+
|
|
7
|
+
**Model**: Sonnet 4.5 (pattern-based security analysis)
|
|
8
|
+
**Cost per Action**: ~$0.002
|
|
9
|
+
**Triggers**: After story, architecture, implementation, and before commit
|
|
10
|
+
|
|
11
|
+
## Core Principle: Security by Design
|
|
12
|
+
|
|
13
|
+
Security is not a gate at the end - it's woven into every step:
|
|
14
|
+
- **Story phase**: Threat modeling, security requirements extraction
|
|
15
|
+
- **Architecture phase**: Security pattern validation, risk assessment
|
|
16
|
+
- **Implementation phase**: Vulnerability scanning, secret detection
|
|
17
|
+
- **Pre-commit phase**: Final security gate, integrity verification
|
|
18
|
+
|
|
19
|
+
## Actions
|
|
20
|
+
|
|
21
|
+
### threat_model(story_id)
|
|
22
|
+
|
|
23
|
+
Analyzes story for security implications and generates threat model.
|
|
24
|
+
|
|
25
|
+
**Triggers**: After story.create completes
|
|
26
|
+
|
|
27
|
+
**Process**:
|
|
28
|
+
1. Extract security-relevant requirements
|
|
29
|
+
2. Identify assets, threat actors, attack surfaces
|
|
30
|
+
3. Generate STRIDE analysis
|
|
31
|
+
4. Produce security acceptance criteria
|
|
32
|
+
5. Save to `koan/security/threat-model-{story_id}.yaml`
|
|
33
|
+
|
|
34
|
+
**Output Format**:
|
|
35
|
+
```yaml
|
|
36
|
+
threat_model_id: "tm-story-001"
|
|
37
|
+
story_id: "story-001"
|
|
38
|
+
status: "completed"
|
|
39
|
+
|
|
40
|
+
assets:
|
|
41
|
+
- name: "User credentials"
|
|
42
|
+
sensitivity: "high"
|
|
43
|
+
storage: "database"
|
|
44
|
+
- name: "Session tokens"
|
|
45
|
+
sensitivity: "high"
|
|
46
|
+
storage: "memory/cookie"
|
|
47
|
+
|
|
48
|
+
threat_actors:
|
|
49
|
+
- type: "external_attacker"
|
|
50
|
+
motivation: "data_theft"
|
|
51
|
+
capability: "medium"
|
|
52
|
+
- type: "malicious_insider"
|
|
53
|
+
motivation: "sabotage"
|
|
54
|
+
capability: "high"
|
|
55
|
+
|
|
56
|
+
attack_surfaces:
|
|
57
|
+
- surface: "API endpoints"
|
|
58
|
+
exposure: "public"
|
|
59
|
+
controls_needed: ["authentication", "rate_limiting", "input_validation"]
|
|
60
|
+
- surface: "Database"
|
|
61
|
+
exposure: "internal"
|
|
62
|
+
controls_needed: ["parameterized_queries", "least_privilege"]
|
|
63
|
+
|
|
64
|
+
stride_analysis:
|
|
65
|
+
spoofing:
|
|
66
|
+
risk: "high"
|
|
67
|
+
mitigations: ["Strong authentication", "Session management"]
|
|
68
|
+
tampering:
|
|
69
|
+
risk: "medium"
|
|
70
|
+
mitigations: ["Input validation", "Integrity checks"]
|
|
71
|
+
repudiation:
|
|
72
|
+
risk: "low"
|
|
73
|
+
mitigations: ["Audit logging"]
|
|
74
|
+
information_disclosure:
|
|
75
|
+
risk: "high"
|
|
76
|
+
mitigations: ["Encryption", "Access controls"]
|
|
77
|
+
denial_of_service:
|
|
78
|
+
risk: "medium"
|
|
79
|
+
mitigations: ["Rate limiting", "Resource quotas"]
|
|
80
|
+
elevation_of_privilege:
|
|
81
|
+
risk: "high"
|
|
82
|
+
mitigations: ["RBAC", "Least privilege"]
|
|
83
|
+
|
|
84
|
+
security_requirements:
|
|
85
|
+
- id: "SEC-001"
|
|
86
|
+
description: "All API endpoints must require authentication"
|
|
87
|
+
priority: "P0"
|
|
88
|
+
- id: "SEC-002"
|
|
89
|
+
description: "User passwords must be hashed with bcrypt (cost >= 12)"
|
|
90
|
+
priority: "P0"
|
|
91
|
+
- id: "SEC-003"
|
|
92
|
+
description: "Rate limiting must be applied to login endpoint"
|
|
93
|
+
priority: "P1"
|
|
94
|
+
|
|
95
|
+
metadata:
|
|
96
|
+
created_at: "2025-01-10T12:00:00Z"
|
|
97
|
+
concept: "security"
|
|
98
|
+
action: "threat_model"
|
|
99
|
+
model: "sonnet"
|
|
100
|
+
cost: 0.002
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### validate_architecture(arch_id, threat_model_id)
|
|
104
|
+
|
|
105
|
+
Validates architecture against threat model and security patterns.
|
|
106
|
+
|
|
107
|
+
**Triggers**: After architecture.design completes
|
|
108
|
+
|
|
109
|
+
**Process**:
|
|
110
|
+
1. Load threat model from story phase
|
|
111
|
+
2. Verify each security requirement is addressed
|
|
112
|
+
3. Check for OWASP Top 10 vulnerabilities in design
|
|
113
|
+
4. Validate security patterns (auth, authz, crypto)
|
|
114
|
+
5. Save to `koan/security/arch-review-{arch_id}.yaml`
|
|
115
|
+
|
|
116
|
+
**Security Patterns Checked**:
|
|
117
|
+
- Authentication: OAuth2/OIDC, JWT validation, session management
|
|
118
|
+
- Authorization: RBAC, ABAC, resource-level permissions
|
|
119
|
+
- Cryptography: TLS 1.3, AES-256, secure key management
|
|
120
|
+
- Input validation: Schema validation, sanitization
|
|
121
|
+
- Output encoding: Context-aware encoding
|
|
122
|
+
- Error handling: No sensitive data in errors
|
|
123
|
+
- Logging: Audit trail, PII redaction
|
|
124
|
+
|
|
125
|
+
**Output Format**:
|
|
126
|
+
```yaml
|
|
127
|
+
arch_review_id: "ar-arch-001"
|
|
128
|
+
arch_id: "arch-001"
|
|
129
|
+
threat_model_id: "tm-story-001"
|
|
130
|
+
status: "completed"
|
|
131
|
+
|
|
132
|
+
requirements_coverage:
|
|
133
|
+
- requirement_id: "SEC-001"
|
|
134
|
+
status: "satisfied"
|
|
135
|
+
implementation: "JWT middleware on all routes"
|
|
136
|
+
- requirement_id: "SEC-002"
|
|
137
|
+
status: "satisfied"
|
|
138
|
+
implementation: "bcrypt with cost=12 in UserService"
|
|
139
|
+
- requirement_id: "SEC-003"
|
|
140
|
+
status: "missing"
|
|
141
|
+
recommendation: "Add rate-limiter middleware to /auth/login"
|
|
142
|
+
|
|
143
|
+
owasp_assessment:
|
|
144
|
+
A01_broken_access_control:
|
|
145
|
+
status: "pass"
|
|
146
|
+
notes: "RBAC implemented via middleware"
|
|
147
|
+
A02_cryptographic_failures:
|
|
148
|
+
status: "pass"
|
|
149
|
+
notes: "TLS enforced, passwords hashed"
|
|
150
|
+
A03_injection:
|
|
151
|
+
status: "warning"
|
|
152
|
+
notes: "Using ORM but verify parameterization"
|
|
153
|
+
# ... all 10 categories
|
|
154
|
+
|
|
155
|
+
pattern_compliance:
|
|
156
|
+
authentication:
|
|
157
|
+
pattern: "JWT with refresh tokens"
|
|
158
|
+
compliant: true
|
|
159
|
+
authorization:
|
|
160
|
+
pattern: "RBAC middleware"
|
|
161
|
+
compliant: true
|
|
162
|
+
rate_limiting:
|
|
163
|
+
pattern: "Token bucket"
|
|
164
|
+
compliant: false
|
|
165
|
+
recommendation: "Implement rate-limiter"
|
|
166
|
+
|
|
167
|
+
risk_assessment:
|
|
168
|
+
overall_risk: "medium"
|
|
169
|
+
unmitigated_threats: 1
|
|
170
|
+
recommendations:
|
|
171
|
+
- "Add rate limiting to authentication endpoints"
|
|
172
|
+
- "Implement audit logging for admin actions"
|
|
173
|
+
|
|
174
|
+
decision: "conditional_approve"
|
|
175
|
+
conditions:
|
|
176
|
+
- "Address SEC-003 (rate limiting) before implementation"
|
|
177
|
+
|
|
178
|
+
metadata:
|
|
179
|
+
created_at: "2025-01-10T12:05:00Z"
|
|
180
|
+
concept: "security"
|
|
181
|
+
action: "validate_architecture"
|
|
182
|
+
model: "sonnet"
|
|
183
|
+
cost: 0.002
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### scan_implementation(impl_id)
|
|
187
|
+
|
|
188
|
+
Scans implementation code for vulnerabilities.
|
|
189
|
+
|
|
190
|
+
**Triggers**: After implementation.generate completes (parallel with quality)
|
|
191
|
+
|
|
192
|
+
**Process**:
|
|
193
|
+
1. Load implementation files
|
|
194
|
+
2. Run static analysis for OWASP Top 10
|
|
195
|
+
3. Detect hardcoded secrets
|
|
196
|
+
4. Check dependency vulnerabilities (if manifest available)
|
|
197
|
+
5. Verify security patterns from architecture
|
|
198
|
+
6. Save to `koan/security/scan-{impl_id}.yaml`
|
|
199
|
+
|
|
200
|
+
**Vulnerability Patterns Detected**:
|
|
201
|
+
```yaml
|
|
202
|
+
injection:
|
|
203
|
+
sql_injection:
|
|
204
|
+
- pattern: "execute(.*\\$\\{|\\+.*\\+)"
|
|
205
|
+
- pattern: "query\\(.*\\+.*\\)"
|
|
206
|
+
- safe_pattern: "query\\(.*\\?.*,.*\\[" # Parameterized
|
|
207
|
+
xss:
|
|
208
|
+
- pattern: "innerHTML.*="
|
|
209
|
+
- pattern: "document\\.write\\("
|
|
210
|
+
- pattern: "v-html="
|
|
211
|
+
command_injection:
|
|
212
|
+
- pattern: "exec\\(.*\\$\\{|\\+.*\\+)"
|
|
213
|
+
- pattern: "spawn\\(.*shell:\\s*true"
|
|
214
|
+
- pattern: "child_process.*\\$\\{"
|
|
215
|
+
|
|
216
|
+
secrets:
|
|
217
|
+
api_keys:
|
|
218
|
+
- pattern: "api[_-]?key.*=.*['\"][a-zA-Z0-9]{20,}['\"]"
|
|
219
|
+
passwords:
|
|
220
|
+
- pattern: "password.*=.*['\"][^'\"]+['\"]"
|
|
221
|
+
tokens:
|
|
222
|
+
- pattern: "token.*=.*['\"][a-zA-Z0-9_-]{20,}['\"]"
|
|
223
|
+
private_keys:
|
|
224
|
+
- pattern: "-----BEGIN.*PRIVATE KEY-----"
|
|
225
|
+
|
|
226
|
+
authentication:
|
|
227
|
+
weak_password:
|
|
228
|
+
- pattern: "bcrypt.*cost.*[1-9][^0-9]" # cost < 10
|
|
229
|
+
missing_auth:
|
|
230
|
+
- pattern: "app\\.(get|post|put|delete).*(?!.*auth)" # Route without auth middleware
|
|
231
|
+
|
|
232
|
+
crypto:
|
|
233
|
+
weak_random:
|
|
234
|
+
- pattern: "Math\\.random\\(\\)" # For security purposes
|
|
235
|
+
weak_hash:
|
|
236
|
+
- pattern: "createHash\\(['\"]md5['\"]\\)"
|
|
237
|
+
- pattern: "createHash\\(['\"]sha1['\"]\\)"
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Output Format**:
|
|
241
|
+
```yaml
|
|
242
|
+
scan_id: "scan-impl-001"
|
|
243
|
+
impl_id: "impl-001"
|
|
244
|
+
status: "completed"
|
|
245
|
+
|
|
246
|
+
vulnerabilities:
|
|
247
|
+
- id: "VULN-001"
|
|
248
|
+
severity: "critical"
|
|
249
|
+
category: "injection"
|
|
250
|
+
type: "sql_injection"
|
|
251
|
+
file: "src/services/user.service.ts"
|
|
252
|
+
line: 45
|
|
253
|
+
code_snippet: "db.query(`SELECT * FROM users WHERE id = ${userId}`)"
|
|
254
|
+
recommendation: "Use parameterized query: db.query('SELECT * FROM users WHERE id = ?', [userId])"
|
|
255
|
+
cwe: "CWE-89"
|
|
256
|
+
owasp: "A03:2021"
|
|
257
|
+
|
|
258
|
+
- id: "VULN-002"
|
|
259
|
+
severity: "high"
|
|
260
|
+
category: "secrets"
|
|
261
|
+
type: "hardcoded_api_key"
|
|
262
|
+
file: "src/config/api.ts"
|
|
263
|
+
line: 12
|
|
264
|
+
code_snippet: "const API_KEY = 'sk-live-abc123...'"
|
|
265
|
+
recommendation: "Move to environment variable: process.env.API_KEY"
|
|
266
|
+
cwe: "CWE-798"
|
|
267
|
+
|
|
268
|
+
- id: "VULN-003"
|
|
269
|
+
severity: "medium"
|
|
270
|
+
category: "crypto"
|
|
271
|
+
type: "weak_random"
|
|
272
|
+
file: "src/utils/token.ts"
|
|
273
|
+
line: 8
|
|
274
|
+
code_snippet: "const token = Math.random().toString(36)"
|
|
275
|
+
recommendation: "Use crypto.randomBytes() for security tokens"
|
|
276
|
+
cwe: "CWE-330"
|
|
277
|
+
|
|
278
|
+
secrets_detected:
|
|
279
|
+
count: 1
|
|
280
|
+
files:
|
|
281
|
+
- "src/config/api.ts"
|
|
282
|
+
|
|
283
|
+
dependency_vulnerabilities:
|
|
284
|
+
scanned: true
|
|
285
|
+
count: 2
|
|
286
|
+
critical: 0
|
|
287
|
+
high: 1
|
|
288
|
+
medium: 1
|
|
289
|
+
details:
|
|
290
|
+
- package: "lodash"
|
|
291
|
+
version: "4.17.19"
|
|
292
|
+
vulnerability: "Prototype Pollution"
|
|
293
|
+
severity: "high"
|
|
294
|
+
fixed_in: "4.17.21"
|
|
295
|
+
|
|
296
|
+
summary:
|
|
297
|
+
total_issues: 5
|
|
298
|
+
critical: 1
|
|
299
|
+
high: 2
|
|
300
|
+
medium: 1
|
|
301
|
+
low: 1
|
|
302
|
+
passed_checks: 47
|
|
303
|
+
|
|
304
|
+
decision: "block"
|
|
305
|
+
reason: "Critical SQL injection vulnerability must be fixed"
|
|
306
|
+
required_fixes:
|
|
307
|
+
- "VULN-001"
|
|
308
|
+
- "VULN-002"
|
|
309
|
+
|
|
310
|
+
metadata:
|
|
311
|
+
created_at: "2025-01-10T12:10:00Z"
|
|
312
|
+
concept: "security"
|
|
313
|
+
action: "scan_implementation"
|
|
314
|
+
model: "sonnet"
|
|
315
|
+
cost: 0.002
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### verify_commit(impl_id, scan_id)
|
|
319
|
+
|
|
320
|
+
Final security verification before commit.
|
|
321
|
+
|
|
322
|
+
**Triggers**: Before version.commit (security gate)
|
|
323
|
+
|
|
324
|
+
**Process**:
|
|
325
|
+
1. Verify all critical/high vulnerabilities resolved
|
|
326
|
+
2. Check secrets not in commit
|
|
327
|
+
3. Validate file integrity
|
|
328
|
+
4. Generate security attestation
|
|
329
|
+
5. Save to `koan/security/attestation-{impl_id}.yaml`
|
|
330
|
+
|
|
331
|
+
**Output Format**:
|
|
332
|
+
```yaml
|
|
333
|
+
attestation_id: "att-impl-001"
|
|
334
|
+
impl_id: "impl-001"
|
|
335
|
+
scan_id: "scan-impl-001"
|
|
336
|
+
status: "approved"
|
|
337
|
+
|
|
338
|
+
checks:
|
|
339
|
+
vulnerabilities_resolved:
|
|
340
|
+
status: "pass"
|
|
341
|
+
details: "All critical/high issues fixed"
|
|
342
|
+
|
|
343
|
+
secrets_check:
|
|
344
|
+
status: "pass"
|
|
345
|
+
details: "No secrets in staged files"
|
|
346
|
+
|
|
347
|
+
integrity_check:
|
|
348
|
+
status: "pass"
|
|
349
|
+
details: "All files match expected checksums"
|
|
350
|
+
|
|
351
|
+
dependency_check:
|
|
352
|
+
status: "warning"
|
|
353
|
+
details: "1 medium vulnerability in dependencies"
|
|
354
|
+
|
|
355
|
+
attestation:
|
|
356
|
+
security_reviewed: true
|
|
357
|
+
reviewer: "security-concept"
|
|
358
|
+
timestamp: "2025-01-10T12:15:00Z"
|
|
359
|
+
files_reviewed: 5
|
|
360
|
+
vulnerabilities_found: 3
|
|
361
|
+
vulnerabilities_fixed: 3
|
|
362
|
+
|
|
363
|
+
signature:
|
|
364
|
+
algorithm: "sha256"
|
|
365
|
+
hash: "abc123..."
|
|
366
|
+
|
|
367
|
+
decision: "approve"
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Integration with Workflow
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
Story ──[story.ready]──> Security: threat_model
|
|
374
|
+
│
|
|
375
|
+
├── Generates security requirements
|
|
376
|
+
├── Identifies assets and threats
|
|
377
|
+
└── STRIDE analysis
|
|
378
|
+
|
|
379
|
+
Architecture ──[arch.completed]──> Security: validate_architecture
|
|
380
|
+
│
|
|
381
|
+
├── Checks requirement coverage
|
|
382
|
+
├── OWASP pattern validation
|
|
383
|
+
└── Risk assessment
|
|
384
|
+
|
|
385
|
+
Implementation ──[impl.completed]──> Security: scan_implementation
|
|
386
|
+
│ (parallel with quality)
|
|
387
|
+
├── Vulnerability scanning
|
|
388
|
+
├── Secret detection
|
|
389
|
+
└── Dependency audit
|
|
390
|
+
|
|
391
|
+
Quality.approved ──[before version]──> Security: verify_commit
|
|
392
|
+
│
|
|
393
|
+
├── Final gate
|
|
394
|
+
├── Integrity check
|
|
395
|
+
└── Security attestation
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## State Location
|
|
399
|
+
|
|
400
|
+
Security artifacts: `koan/security/`
|
|
401
|
+
- Threat models: `threat-model-{story_id}.yaml`
|
|
402
|
+
- Architecture reviews: `arch-review-{arch_id}.yaml`
|
|
403
|
+
- Implementation scans: `scan-{impl_id}.yaml`
|
|
404
|
+
- Attestations: `attestation-{impl_id}.yaml`
|
|
405
|
+
|
|
406
|
+
## Cost Optimization
|
|
407
|
+
|
|
408
|
+
**Why Sonnet?**
|
|
409
|
+
- Pattern-based scanning doesn't need deep reasoning
|
|
410
|
+
- Security patterns are well-defined rules
|
|
411
|
+
- Fast execution (2-3 seconds per action)
|
|
412
|
+
- Cost: ~$0.002 per action
|
|
413
|
+
|
|
414
|
+
**Total security cost per feature**: ~$0.008
|
|
415
|
+
- threat_model: $0.002
|
|
416
|
+
- validate_architecture: $0.002
|
|
417
|
+
- scan_implementation: $0.002
|
|
418
|
+
- verify_commit: $0.002
|
|
419
|
+
|
|
420
|
+
## Never Do This
|
|
421
|
+
|
|
422
|
+
- Skip security checks for "small" changes
|
|
423
|
+
- Approve commits with critical vulnerabilities
|
|
424
|
+
- Store secrets in state files
|
|
425
|
+
- Ignore dependency vulnerabilities
|
|
426
|
+
- Bypass security gates
|
|
427
|
+
|
|
428
|
+
## Always Do This
|
|
429
|
+
|
|
430
|
+
- Run threat modeling for every feature
|
|
431
|
+
- Validate architecture against security patterns
|
|
432
|
+
- Scan all implementation code
|
|
433
|
+
- Verify before every commit
|
|
434
|
+
- Track security metrics
|
|
435
|
+
- Generate attestations
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
**Model Assignment**: Sonnet
|
|
440
|
+
**Cost Tier**: Low (~$0.002 per action)
|
|
441
|
+
**Purpose**: Continuous security assurance
|
|
442
|
+
**Integration**: Runs parallel to main workflow, gates commit
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slo
|
|
3
|
+
type: concept
|
|
4
|
+
model: sonnet
|
|
5
|
+
purpose: "Monitor and enforce Service Level Objectives for workflow performance"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# SLO (Service Level Objectives) Concept
|
|
9
|
+
|
|
10
|
+
Declarative performance expectations for LLM workflows with automatic monitoring, alerting, and enforcement.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
SLOs make performance expectations explicit and enforceable:
|
|
15
|
+
- **Duration**: How long actions should take
|
|
16
|
+
- **Cost**: Budget limits per action
|
|
17
|
+
- **Quality**: Success rates and rework limits
|
|
18
|
+
- **Context**: Token usage expectations (Phase 2 compliance)
|
|
19
|
+
|
|
20
|
+
This completes the WYSIWID principle: "See exactly what it does, how well it performs, and when it deviates."
|
|
21
|
+
|
|
22
|
+
## Model Assignment
|
|
23
|
+
|
|
24
|
+
**Model**: Sonnet (fast numeric analysis)
|
|
25
|
+
**Cost per Action**: ~$0.0001
|
|
26
|
+
**Justification**: SLO monitoring is template-based analysis of numeric data (compare actual vs threshold). No complex reasoning required. Sonnet provides <500ms response time, ensuring minimal overhead.
|
|
27
|
+
|
|
28
|
+
## Actions
|
|
29
|
+
|
|
30
|
+
### monitor
|
|
31
|
+
|
|
32
|
+
Validate a single action against SLO expectations after it completes.
|
|
33
|
+
|
|
34
|
+
**Inputs**:
|
|
35
|
+
- `action_id`: The action to monitor
|
|
36
|
+
- `concept`: Concept name (e.g., "architecture")
|
|
37
|
+
- `sync_id`: Synchronization rule ID
|
|
38
|
+
- `slo_config`: SLO expectations from sync rule
|
|
39
|
+
|
|
40
|
+
**Process**:
|
|
41
|
+
1. Read provenance entry: `koan/provenance/actions/{action_id}.yaml`
|
|
42
|
+
2. Extract actual values: duration_ms, cost_usd, context_tokens
|
|
43
|
+
3. Compare against slo_config thresholds
|
|
44
|
+
4. Determine violations (timeout, cost_exceeded, context_exceeded)
|
|
45
|
+
5. Execute handlers in priority order if violations found
|
|
46
|
+
6. Update monthly metrics: `koan/slo/metrics/{concept}/metrics-{YYYY-MM}.yaml`
|
|
47
|
+
7. Record violations: `koan/slo/violations/viol-{id}.yaml`
|
|
48
|
+
|
|
49
|
+
**Output**:
|
|
50
|
+
- Compliance status (pass/fail)
|
|
51
|
+
- Violations list (if any)
|
|
52
|
+
- Updated metrics file
|
|
53
|
+
|
|
54
|
+
**Triggers**: Automatically triggered by post-action-slo-monitor sync rule
|
|
55
|
+
|
|
56
|
+
### report
|
|
57
|
+
|
|
58
|
+
Generate SLO performance dashboard for a time period.
|
|
59
|
+
|
|
60
|
+
**Inputs**:
|
|
61
|
+
- `timeframe`: Period to analyze ("1d", "7d", "30d", "all")
|
|
62
|
+
- `concept_filter`: Optional concept name filter
|
|
63
|
+
|
|
64
|
+
**Process**:
|
|
65
|
+
1. Load monthly metrics for timeframe
|
|
66
|
+
2. Aggregate across concepts
|
|
67
|
+
3. Calculate percentiles (p50, p95, p99)
|
|
68
|
+
4. Compute compliance rates
|
|
69
|
+
5. Load violations for period
|
|
70
|
+
6. Generate recommendations based on trends
|
|
71
|
+
|
|
72
|
+
**Output**: `koan/slo/reports/report-{timestamp}.yaml` with:
|
|
73
|
+
- Executive summary (overall compliance, violations count)
|
|
74
|
+
- Per-concept breakdown (duration, cost, context stats)
|
|
75
|
+
- Violations list
|
|
76
|
+
- Recommendations
|
|
77
|
+
|
|
78
|
+
**Triggers**: `/slo report` command
|
|
79
|
+
|
|
80
|
+
### alert
|
|
81
|
+
|
|
82
|
+
Send notification for SLO violation and execute handler action.
|
|
83
|
+
|
|
84
|
+
**Inputs**:
|
|
85
|
+
- `violation`: Violation record
|
|
86
|
+
- `handler_config`: Handler configuration from slo_expectations
|
|
87
|
+
|
|
88
|
+
**Process**:
|
|
89
|
+
1. Format violation notification
|
|
90
|
+
2. Execute handler action:
|
|
91
|
+
- `retry`: Retry action with backoff
|
|
92
|
+
- `escalate`: Create human task
|
|
93
|
+
- `alert`: Log and notify
|
|
94
|
+
- `block`: Stop workflow
|
|
95
|
+
- `investigate`: Create investigation task
|
|
96
|
+
3. Track handler execution in provenance
|
|
97
|
+
4. Update violation record with resolution status
|
|
98
|
+
|
|
99
|
+
**Output**:
|
|
100
|
+
- Notification sent status
|
|
101
|
+
- Handler execution result
|
|
102
|
+
- Updated violation record
|
|
103
|
+
|
|
104
|
+
**Triggers**: Called by monitor action when violations detected
|
|
105
|
+
|
|
106
|
+
### validate
|
|
107
|
+
|
|
108
|
+
Validate all SLO configurations in sync rules.
|
|
109
|
+
|
|
110
|
+
**Inputs**:
|
|
111
|
+
- `sync_files`: List of sync rule files to validate
|
|
112
|
+
|
|
113
|
+
**Process**:
|
|
114
|
+
1. Parse each sync rule file
|
|
115
|
+
2. Extract slo_expectations blocks
|
|
116
|
+
3. Validate against slo.schema.json
|
|
117
|
+
4. Check realistic values:
|
|
118
|
+
- Duration not < 100ms for Sonnet
|
|
119
|
+
- Cost not < $0.0001
|
|
120
|
+
- Context not > 200000 tokens
|
|
121
|
+
5. Warn on missing SLOs for important rules
|
|
122
|
+
6. Generate validation report
|
|
123
|
+
|
|
124
|
+
**Output**: Validation results with warnings/errors
|
|
125
|
+
|
|
126
|
+
**Triggers**: `/slo validate` command or when sync rules change
|
|
127
|
+
|
|
128
|
+
## SLO Configuration Schema
|
|
129
|
+
|
|
130
|
+
SLOs are defined in synchronization rules:
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
- id: "story-to-arch"
|
|
134
|
+
when:
|
|
135
|
+
concept: "story"
|
|
136
|
+
status: "completed"
|
|
137
|
+
then:
|
|
138
|
+
- concept: "architecture"
|
|
139
|
+
action: "design"
|
|
140
|
+
model: "sonnet"
|
|
141
|
+
|
|
142
|
+
slo:
|
|
143
|
+
duration:
|
|
144
|
+
expected_seconds: 12
|
|
145
|
+
max_seconds: 30
|
|
146
|
+
p95_target_seconds: 15
|
|
147
|
+
|
|
148
|
+
cost:
|
|
149
|
+
expected_usd: 0.003
|
|
150
|
+
max_usd: 0.006
|
|
151
|
+
budget_period: "daily"
|
|
152
|
+
budget_limit_usd: 1.00
|
|
153
|
+
|
|
154
|
+
quality:
|
|
155
|
+
success_rate_target: 0.95
|
|
156
|
+
max_rework_cycles: 1
|
|
157
|
+
schema_compliance_target: 1.0
|
|
158
|
+
|
|
159
|
+
context:
|
|
160
|
+
expected_tokens: 1100
|
|
161
|
+
max_tokens: 2000
|
|
162
|
+
alert_threshold_tokens: 1500
|
|
163
|
+
|
|
164
|
+
on_violation:
|
|
165
|
+
duration_exceeded:
|
|
166
|
+
action: "retry"
|
|
167
|
+
max_retries: 1
|
|
168
|
+
then: "escalate"
|
|
169
|
+
|
|
170
|
+
cost_exceeded:
|
|
171
|
+
action: "alert"
|
|
172
|
+
continue: true
|
|
173
|
+
|
|
174
|
+
context_exceeded:
|
|
175
|
+
action: "alert"
|
|
176
|
+
investigate: true
|
|
177
|
+
|
|
178
|
+
quality_failed:
|
|
179
|
+
action: "escalate"
|
|
180
|
+
notify: "user"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Metrics Storage
|
|
184
|
+
|
|
185
|
+
Metrics are stored in `koan/slo/`:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
koan/slo/
|
|
189
|
+
metrics.yaml # Aggregated metrics
|
|
190
|
+
violations.yaml # Violation log
|
|
191
|
+
thresholds.yaml # Current SLO definitions
|
|
192
|
+
reports/
|
|
193
|
+
report-{date}.yaml # Daily/weekly reports
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### metrics.yaml Format
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
metrics:
|
|
200
|
+
architecture:
|
|
201
|
+
design:
|
|
202
|
+
count: 42
|
|
203
|
+
duration:
|
|
204
|
+
p50_seconds: 11
|
|
205
|
+
p95_seconds: 14
|
|
206
|
+
p99_seconds: 18
|
|
207
|
+
max_seconds: 25
|
|
208
|
+
cost:
|
|
209
|
+
avg_usd: 0.0031
|
|
210
|
+
p95_usd: 0.0038
|
|
211
|
+
total_usd: 0.1302
|
|
212
|
+
context:
|
|
213
|
+
avg_tokens: 1150
|
|
214
|
+
p95_tokens: 1400
|
|
215
|
+
max_tokens: 1850
|
|
216
|
+
quality:
|
|
217
|
+
success_rate: 0.952
|
|
218
|
+
avg_rework_cycles: 0.05
|
|
219
|
+
schema_compliance: 1.0
|
|
220
|
+
slo_compliance:
|
|
221
|
+
duration: 0.98
|
|
222
|
+
cost: 0.95
|
|
223
|
+
context: 1.0
|
|
224
|
+
quality: 0.95
|
|
225
|
+
overall: 0.94
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### violations.yaml Format
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
violations:
|
|
232
|
+
- id: "viol-001"
|
|
233
|
+
timestamp: "2025-12-06T10:30:00Z"
|
|
234
|
+
concept: "architecture"
|
|
235
|
+
action: "design"
|
|
236
|
+
action_id: "act-042"
|
|
237
|
+
type: "duration_exceeded"
|
|
238
|
+
threshold: 30
|
|
239
|
+
actual: 35
|
|
240
|
+
unit: "seconds"
|
|
241
|
+
resolution: "escalated_to_human"
|
|
242
|
+
resolved: true
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Integration with Workflow
|
|
246
|
+
|
|
247
|
+
SLO monitoring integrates automatically:
|
|
248
|
+
|
|
249
|
+
1. **Pre-action**: Load SLO config from sync rule
|
|
250
|
+
2. **During action**: Track timing and tokens
|
|
251
|
+
3. **Post-action**: Validate against SLOs
|
|
252
|
+
4. **On violation**: Execute configured action
|
|
253
|
+
5. **Periodic**: Generate compliance reports
|
|
254
|
+
|
|
255
|
+
## Dashboard Command
|
|
256
|
+
|
|
257
|
+
Use `/slo` to view status:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
/slo # Summary dashboard
|
|
261
|
+
/slo --report # Full compliance report
|
|
262
|
+
/slo --violations # Recent violations
|
|
263
|
+
/slo --concept arch # Filter by concept
|
|
264
|
+
/slo --timeframe 7d # Specific period
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Benefits
|
|
268
|
+
|
|
269
|
+
1. **Declare expectations** - Make performance goals explicit
|
|
270
|
+
2. **Detect anomalies** - Automatic threshold checking
|
|
271
|
+
3. **Alert on violations** - Immediate notification
|
|
272
|
+
4. **Track trends** - Identify degradation over time
|
|
273
|
+
5. **Verify optimizations** - Confirm Phase 2 working
|
|
274
|
+
6. **WYSIWID compliance** - Performance is visible
|