opencode-telos 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/README.md +927 -0
- package/dist/code-intelligence/analyzer.d.ts +9 -0
- package/dist/code-intelligence/analyzer.d.ts.map +1 -0
- package/dist/code-intelligence/analyzer.js +321 -0
- package/dist/code-intelligence/analyzer.js.map +1 -0
- package/dist/code-intelligence/ast/cache.d.ts +16 -0
- package/dist/code-intelligence/ast/cache.d.ts.map +1 -0
- package/dist/code-intelligence/ast/cache.js +44 -0
- package/dist/code-intelligence/ast/cache.js.map +1 -0
- package/dist/code-intelligence/ast/common.d.ts +8 -0
- package/dist/code-intelligence/ast/common.d.ts.map +1 -0
- package/dist/code-intelligence/ast/common.js +42 -0
- package/dist/code-intelligence/ast/common.js.map +1 -0
- package/dist/code-intelligence/ast/component.d.ts +10 -0
- package/dist/code-intelligence/ast/component.d.ts.map +1 -0
- package/dist/code-intelligence/ast/component.js +38 -0
- package/dist/code-intelligence/ast/component.js.map +1 -0
- package/dist/code-intelligence/ast/fallback.d.ts +9 -0
- package/dist/code-intelligence/ast/fallback.d.ts.map +1 -0
- package/dist/code-intelligence/ast/fallback.js +38 -0
- package/dist/code-intelligence/ast/fallback.js.map +1 -0
- package/dist/code-intelligence/ast/index.d.ts +5 -0
- package/dist/code-intelligence/ast/index.d.ts.map +1 -0
- package/dist/code-intelligence/ast/index.js +5 -0
- package/dist/code-intelligence/ast/index.js.map +1 -0
- package/dist/code-intelligence/ast/ir.d.ts +72 -0
- package/dist/code-intelligence/ast/ir.d.ts.map +1 -0
- package/dist/code-intelligence/ast/ir.js +2 -0
- package/dist/code-intelligence/ast/ir.js.map +1 -0
- package/dist/code-intelligence/ast/metrics.d.ts +25 -0
- package/dist/code-intelligence/ast/metrics.d.ts.map +1 -0
- package/dist/code-intelligence/ast/metrics.js +38 -0
- package/dist/code-intelligence/ast/metrics.js.map +1 -0
- package/dist/code-intelligence/ast/registry.d.ts +5 -0
- package/dist/code-intelligence/ast/registry.d.ts.map +1 -0
- package/dist/code-intelligence/ast/registry.js +22 -0
- package/dist/code-intelligence/ast/registry.js.map +1 -0
- package/dist/code-intelligence/ast/tree-sitter.d.ts +8 -0
- package/dist/code-intelligence/ast/tree-sitter.d.ts.map +1 -0
- package/dist/code-intelligence/ast/tree-sitter.js +247 -0
- package/dist/code-intelligence/ast/tree-sitter.js.map +1 -0
- package/dist/code-intelligence/ast/typescript.d.ts +8 -0
- package/dist/code-intelligence/ast/typescript.d.ts.map +1 -0
- package/dist/code-intelligence/ast/typescript.js +147 -0
- package/dist/code-intelligence/ast/typescript.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/server.d.ts +27 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +67 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/opencode/hooks.d.ts +9 -0
- package/dist/opencode/hooks.d.ts.map +1 -0
- package/dist/opencode/hooks.js +583 -0
- package/dist/opencode/hooks.js.map +1 -0
- package/dist/opencode/router/categories.d.ts +31 -0
- package/dist/opencode/router/categories.d.ts.map +1 -0
- package/dist/opencode/router/categories.js +165 -0
- package/dist/opencode/router/categories.js.map +1 -0
- package/dist/opencode/router/embeddings.d.ts +41 -0
- package/dist/opencode/router/embeddings.d.ts.map +1 -0
- package/dist/opencode/router/embeddings.js +136 -0
- package/dist/opencode/router/embeddings.js.map +1 -0
- package/dist/opencode/router/graph-state-snapshot.d.ts +35 -0
- package/dist/opencode/router/graph-state-snapshot.d.ts.map +1 -0
- package/dist/opencode/router/graph-state-snapshot.js +129 -0
- package/dist/opencode/router/graph-state-snapshot.js.map +1 -0
- package/dist/opencode/router/index.d.ts +21 -0
- package/dist/opencode/router/index.d.ts.map +1 -0
- package/dist/opencode/router/index.js +23 -0
- package/dist/opencode/router/index.js.map +1 -0
- package/dist/opencode/router/intent-classifier.d.ts +35 -0
- package/dist/opencode/router/intent-classifier.d.ts.map +1 -0
- package/dist/opencode/router/intent-classifier.js +108 -0
- package/dist/opencode/router/intent-classifier.js.map +1 -0
- package/dist/opencode/router/semantic-nudge.d.ts +42 -0
- package/dist/opencode/router/semantic-nudge.d.ts.map +1 -0
- package/dist/opencode/router/semantic-nudge.js +73 -0
- package/dist/opencode/router/semantic-nudge.js.map +1 -0
- package/dist/opencode/router/state-gate.d.ts +25 -0
- package/dist/opencode/router/state-gate.d.ts.map +1 -0
- package/dist/opencode/router/state-gate.js +178 -0
- package/dist/opencode/router/state-gate.js.map +1 -0
- package/dist/opencode/router/tool-embeddings.d.ts +36 -0
- package/dist/opencode/router/tool-embeddings.d.ts.map +1 -0
- package/dist/opencode/router/tool-embeddings.js +140 -0
- package/dist/opencode/router/tool-embeddings.js.map +1 -0
- package/dist/opencode/router/tool-registry.d.ts +45 -0
- package/dist/opencode/router/tool-registry.d.ts.map +1 -0
- package/dist/opencode/router/tool-registry.js +103 -0
- package/dist/opencode/router/tool-registry.js.map +1 -0
- package/dist/opencode/router/tool-taxonomy.d.ts +51 -0
- package/dist/opencode/router/tool-taxonomy.d.ts.map +1 -0
- package/dist/opencode/router/tool-taxonomy.js +250 -0
- package/dist/opencode/router/tool-taxonomy.js.map +1 -0
- package/dist/opencode/router/tools-composite.d.ts +21 -0
- package/dist/opencode/router/tools-composite.d.ts.map +1 -0
- package/dist/opencode/router/tools-composite.js +684 -0
- package/dist/opencode/router/tools-composite.js.map +1 -0
- package/dist/opencode/shell-hooks.d.ts +7 -0
- package/dist/opencode/shell-hooks.d.ts.map +1 -0
- package/dist/opencode/shell-hooks.js +96 -0
- package/dist/opencode/shell-hooks.js.map +1 -0
- package/dist/opencode/system-prompt.d.ts +10 -0
- package/dist/opencode/system-prompt.d.ts.map +1 -0
- package/dist/opencode/system-prompt.js +600 -0
- package/dist/opencode/system-prompt.js.map +1 -0
- package/dist/opencode/tools.d.ts +8 -0
- package/dist/opencode/tools.d.ts.map +1 -0
- package/dist/opencode/tools.js +3731 -0
- package/dist/opencode/tools.js.map +1 -0
- package/dist/opencode/workflows/chains.d.ts +52 -0
- package/dist/opencode/workflows/chains.d.ts.map +1 -0
- package/dist/opencode/workflows/chains.js +170 -0
- package/dist/opencode/workflows/chains.js.map +1 -0
- package/dist/opencode/workflows/executor.d.ts +52 -0
- package/dist/opencode/workflows/executor.d.ts.map +1 -0
- package/dist/opencode/workflows/executor.js +130 -0
- package/dist/opencode/workflows/executor.js.map +1 -0
- package/dist/opencode/workflows/index.d.ts +14 -0
- package/dist/opencode/workflows/index.d.ts.map +1 -0
- package/dist/opencode/workflows/index.js +15 -0
- package/dist/opencode/workflows/index.js.map +1 -0
- package/dist/opencode/workflows/tools-workflow.d.ts +24 -0
- package/dist/opencode/workflows/tools-workflow.d.ts.map +1 -0
- package/dist/opencode/workflows/tools-workflow.js +85 -0
- package/dist/opencode/workflows/tools-workflow.js.map +1 -0
- package/dist/opencode/workflows/types.d.ts +32 -0
- package/dist/opencode/workflows/types.d.ts.map +1 -0
- package/dist/opencode/workflows/types.js +13 -0
- package/dist/opencode/workflows/types.js.map +1 -0
- package/dist/sdd/analysis/compliance.d.ts +30 -0
- package/dist/sdd/analysis/compliance.d.ts.map +1 -0
- package/dist/sdd/analysis/compliance.js +251 -0
- package/dist/sdd/analysis/compliance.js.map +1 -0
- package/dist/sdd/analysis/scalability.d.ts +15 -0
- package/dist/sdd/analysis/scalability.d.ts.map +1 -0
- package/dist/sdd/analysis/scalability.js +72 -0
- package/dist/sdd/analysis/scalability.js.map +1 -0
- package/dist/sdd/analysis/security.d.ts +25 -0
- package/dist/sdd/analysis/security.d.ts.map +1 -0
- package/dist/sdd/analysis/security.js +94 -0
- package/dist/sdd/analysis/security.js.map +1 -0
- package/dist/sdd/brownfield/scanner.d.ts +31 -0
- package/dist/sdd/brownfield/scanner.d.ts.map +1 -0
- package/dist/sdd/brownfield/scanner.js +228 -0
- package/dist/sdd/brownfield/scanner.js.map +1 -0
- package/dist/sdd/cache/manager.d.ts +237 -0
- package/dist/sdd/cache/manager.d.ts.map +1 -0
- package/dist/sdd/cache/manager.js +770 -0
- package/dist/sdd/cache/manager.js.map +1 -0
- package/dist/sdd/cache/snapshot-store.d.ts +39 -0
- package/dist/sdd/cache/snapshot-store.d.ts.map +1 -0
- package/dist/sdd/cache/snapshot-store.js +156 -0
- package/dist/sdd/cache/snapshot-store.js.map +1 -0
- package/dist/sdd/changes/manager.d.ts +58 -0
- package/dist/sdd/changes/manager.d.ts.map +1 -0
- package/dist/sdd/changes/manager.js +235 -0
- package/dist/sdd/changes/manager.js.map +1 -0
- package/dist/sdd/cicd/generators.d.ts +16 -0
- package/dist/sdd/cicd/generators.d.ts.map +1 -0
- package/dist/sdd/cicd/generators.js +1042 -0
- package/dist/sdd/cicd/generators.js.map +1 -0
- package/dist/sdd/code-quality/complexity.d.ts +38 -0
- package/dist/sdd/code-quality/complexity.d.ts.map +1 -0
- package/dist/sdd/code-quality/complexity.js +161 -0
- package/dist/sdd/code-quality/complexity.js.map +1 -0
- package/dist/sdd/code-quality/conventions.d.ts +33 -0
- package/dist/sdd/code-quality/conventions.d.ts.map +1 -0
- package/dist/sdd/code-quality/conventions.js +193 -0
- package/dist/sdd/code-quality/conventions.js.map +1 -0
- package/dist/sdd/code-quality/dependencies.d.ts +27 -0
- package/dist/sdd/code-quality/dependencies.d.ts.map +1 -0
- package/dist/sdd/code-quality/dependencies.js +142 -0
- package/dist/sdd/code-quality/dependencies.js.map +1 -0
- package/dist/sdd/code-quality/import-analyzer.d.ts +49 -0
- package/dist/sdd/code-quality/import-analyzer.d.ts.map +1 -0
- package/dist/sdd/code-quality/import-analyzer.js +213 -0
- package/dist/sdd/code-quality/import-analyzer.js.map +1 -0
- package/dist/sdd/code-quality/metrics.d.ts +35 -0
- package/dist/sdd/code-quality/metrics.d.ts.map +1 -0
- package/dist/sdd/code-quality/metrics.js +172 -0
- package/dist/sdd/code-quality/metrics.js.map +1 -0
- package/dist/sdd/code-quality/smells.d.ts +38 -0
- package/dist/sdd/code-quality/smells.d.ts.map +1 -0
- package/dist/sdd/code-quality/smells.js +319 -0
- package/dist/sdd/code-quality/smells.js.map +1 -0
- package/dist/sdd/code-quality/symbol-parser.d.ts +28 -0
- package/dist/sdd/code-quality/symbol-parser.d.ts.map +1 -0
- package/dist/sdd/code-quality/symbol-parser.js +230 -0
- package/dist/sdd/code-quality/symbol-parser.js.map +1 -0
- package/dist/sdd/code-quality/usage-tracker.d.ts +59 -0
- package/dist/sdd/code-quality/usage-tracker.d.ts.map +1 -0
- package/dist/sdd/code-quality/usage-tracker.js +402 -0
- package/dist/sdd/code-quality/usage-tracker.js.map +1 -0
- package/dist/sdd/code-quality/utils.d.ts +6 -0
- package/dist/sdd/code-quality/utils.d.ts.map +1 -0
- package/dist/sdd/code-quality/utils.js +14 -0
- package/dist/sdd/code-quality/utils.js.map +1 -0
- package/dist/sdd/codegen/generator.d.ts +42 -0
- package/dist/sdd/codegen/generator.d.ts.map +1 -0
- package/dist/sdd/codegen/generator.js +1023 -0
- package/dist/sdd/codegen/generator.js.map +1 -0
- package/dist/sdd/constitution/validator.d.ts +37 -0
- package/dist/sdd/constitution/validator.d.ts.map +1 -0
- package/dist/sdd/constitution/validator.js +192 -0
- package/dist/sdd/constitution/validator.js.map +1 -0
- package/dist/sdd/cost/estimator.d.ts +31 -0
- package/dist/sdd/cost/estimator.d.ts.map +1 -0
- package/dist/sdd/cost/estimator.js +92 -0
- package/dist/sdd/cost/estimator.js.map +1 -0
- package/dist/sdd/coverage/tracker.d.ts +47 -0
- package/dist/sdd/coverage/tracker.d.ts.map +1 -0
- package/dist/sdd/coverage/tracker.js +251 -0
- package/dist/sdd/coverage/tracker.js.map +1 -0
- package/dist/sdd/disaster/recovery.d.ts +11 -0
- package/dist/sdd/disaster/recovery.d.ts.map +1 -0
- package/dist/sdd/disaster/recovery.js +55 -0
- package/dist/sdd/disaster/recovery.js.map +1 -0
- package/dist/sdd/discovery/adaptive.d.ts +14 -0
- package/dist/sdd/discovery/adaptive.d.ts.map +1 -0
- package/dist/sdd/discovery/adaptive.js +145 -0
- package/dist/sdd/discovery/adaptive.js.map +1 -0
- package/dist/sdd/discovery/briefing-analyzer.d.ts +66 -0
- package/dist/sdd/discovery/briefing-analyzer.d.ts.map +1 -0
- package/dist/sdd/discovery/briefing-analyzer.js +672 -0
- package/dist/sdd/discovery/briefing-analyzer.js.map +1 -0
- package/dist/sdd/discovery/briefing.d.ts +109 -0
- package/dist/sdd/discovery/briefing.d.ts.map +1 -0
- package/dist/sdd/discovery/briefing.js +617 -0
- package/dist/sdd/discovery/briefing.js.map +1 -0
- package/dist/sdd/discovery/graph-builder.d.ts +10 -0
- package/dist/sdd/discovery/graph-builder.d.ts.map +1 -0
- package/dist/sdd/discovery/graph-builder.js +510 -0
- package/dist/sdd/discovery/graph-builder.js.map +1 -0
- package/dist/sdd/documentation/generator.d.ts +7 -0
- package/dist/sdd/documentation/generator.d.ts.map +1 -0
- package/dist/sdd/documentation/generator.js +119 -0
- package/dist/sdd/documentation/generator.js.map +1 -0
- package/dist/sdd/domain/types.d.ts +460 -0
- package/dist/sdd/domain/types.d.ts.map +1 -0
- package/dist/sdd/domain/types.js +25 -0
- package/dist/sdd/domain/types.js.map +1 -0
- package/dist/sdd/drift/detector.d.ts +28 -0
- package/dist/sdd/drift/detector.d.ts.map +1 -0
- package/dist/sdd/drift/detector.js +379 -0
- package/dist/sdd/drift/detector.js.map +1 -0
- package/dist/sdd/drift/exclusion.d.ts +54 -0
- package/dist/sdd/drift/exclusion.d.ts.map +1 -0
- package/dist/sdd/drift/exclusion.js +179 -0
- package/dist/sdd/drift/exclusion.js.map +1 -0
- package/dist/sdd/drift/signals.d.ts +52 -0
- package/dist/sdd/drift/signals.d.ts.map +1 -0
- package/dist/sdd/drift/signals.js +470 -0
- package/dist/sdd/drift/signals.js.map +1 -0
- package/dist/sdd/enforcement/interceptor.d.ts +47 -0
- package/dist/sdd/enforcement/interceptor.d.ts.map +1 -0
- package/dist/sdd/enforcement/interceptor.js +365 -0
- package/dist/sdd/enforcement/interceptor.js.map +1 -0
- package/dist/sdd/enforcement/workflow-tracker.d.ts +66 -0
- package/dist/sdd/enforcement/workflow-tracker.d.ts.map +1 -0
- package/dist/sdd/enforcement/workflow-tracker.js +229 -0
- package/dist/sdd/enforcement/workflow-tracker.js.map +1 -0
- package/dist/sdd/graph/engine.d.ts +44 -0
- package/dist/sdd/graph/engine.d.ts.map +1 -0
- package/dist/sdd/graph/engine.js +203 -0
- package/dist/sdd/graph/engine.js.map +1 -0
- package/dist/sdd/graph/index.d.ts +160 -0
- package/dist/sdd/graph/index.d.ts.map +1 -0
- package/dist/sdd/graph/index.js +624 -0
- package/dist/sdd/graph/index.js.map +1 -0
- package/dist/sdd/graph/integrity-guard.d.ts +129 -0
- package/dist/sdd/graph/integrity-guard.d.ts.map +1 -0
- package/dist/sdd/graph/integrity-guard.js +263 -0
- package/dist/sdd/graph/integrity-guard.js.map +1 -0
- package/dist/sdd/graph/integrity.d.ts +79 -0
- package/dist/sdd/graph/integrity.d.ts.map +1 -0
- package/dist/sdd/graph/integrity.js +462 -0
- package/dist/sdd/graph/integrity.js.map +1 -0
- package/dist/sdd/graph/pruner.d.ts +27 -0
- package/dist/sdd/graph/pruner.d.ts.map +1 -0
- package/dist/sdd/graph/pruner.js +203 -0
- package/dist/sdd/graph/pruner.js.map +1 -0
- package/dist/sdd/graph/traverse.d.ts +43 -0
- package/dist/sdd/graph/traverse.d.ts.map +1 -0
- package/dist/sdd/graph/traverse.js +265 -0
- package/dist/sdd/graph/traverse.js.map +1 -0
- package/dist/sdd/incidents/manager.d.ts +10 -0
- package/dist/sdd/incidents/manager.d.ts.map +1 -0
- package/dist/sdd/incidents/manager.js +63 -0
- package/dist/sdd/incidents/manager.js.map +1 -0
- package/dist/sdd/knowledge/transfer.d.ts +24 -0
- package/dist/sdd/knowledge/transfer.d.ts.map +1 -0
- package/dist/sdd/knowledge/transfer.js +94 -0
- package/dist/sdd/knowledge/transfer.js.map +1 -0
- package/dist/sdd/migrations/fixes.d.ts +2 -0
- package/dist/sdd/migrations/fixes.d.ts.map +1 -0
- package/dist/sdd/migrations/fixes.js +159 -0
- package/dist/sdd/migrations/fixes.js.map +1 -0
- package/dist/sdd/migrations/index.d.ts +2 -0
- package/dist/sdd/migrations/index.d.ts.map +1 -0
- package/dist/sdd/migrations/index.js +5 -0
- package/dist/sdd/migrations/index.js.map +1 -0
- package/dist/sdd/migrations/migration-runner.d.ts +41 -0
- package/dist/sdd/migrations/migration-runner.d.ts.map +1 -0
- package/dist/sdd/migrations/migration-runner.js +91 -0
- package/dist/sdd/migrations/migration-runner.js.map +1 -0
- package/dist/sdd/monitoring/setup.d.ts +40 -0
- package/dist/sdd/monitoring/setup.d.ts.map +1 -0
- package/dist/sdd/monitoring/setup.js +177 -0
- package/dist/sdd/monitoring/setup.js.map +1 -0
- package/dist/sdd/monitoring/telemetry.d.ts +18 -0
- package/dist/sdd/monitoring/telemetry.d.ts.map +1 -0
- package/dist/sdd/monitoring/telemetry.js +37 -0
- package/dist/sdd/monitoring/telemetry.js.map +1 -0
- package/dist/sdd/patterns/anti-patterns.d.ts +21 -0
- package/dist/sdd/patterns/anti-patterns.d.ts.map +1 -0
- package/dist/sdd/patterns/anti-patterns.js +286 -0
- package/dist/sdd/patterns/anti-patterns.js.map +1 -0
- package/dist/sdd/patterns/ast-clones.d.ts +23 -0
- package/dist/sdd/patterns/ast-clones.d.ts.map +1 -0
- package/dist/sdd/patterns/ast-clones.js +171 -0
- package/dist/sdd/patterns/ast-clones.js.map +1 -0
- package/dist/sdd/patterns/config-drift.d.ts +16 -0
- package/dist/sdd/patterns/config-drift.d.ts.map +1 -0
- package/dist/sdd/patterns/config-drift.js +322 -0
- package/dist/sdd/patterns/config-drift.js.map +1 -0
- package/dist/sdd/patterns/contradictions.d.ts +38 -0
- package/dist/sdd/patterns/contradictions.d.ts.map +1 -0
- package/dist/sdd/patterns/contradictions.js +237 -0
- package/dist/sdd/patterns/contradictions.js.map +1 -0
- package/dist/sdd/patterns/learner.d.ts +49 -0
- package/dist/sdd/patterns/learner.d.ts.map +1 -0
- package/dist/sdd/patterns/learner.js +226 -0
- package/dist/sdd/patterns/learner.js.map +1 -0
- package/dist/sdd/permissions/access.d.ts +69 -0
- package/dist/sdd/permissions/access.d.ts.map +1 -0
- package/dist/sdd/permissions/access.js +333 -0
- package/dist/sdd/permissions/access.js.map +1 -0
- package/dist/sdd/persistence/repository.d.ts +60 -0
- package/dist/sdd/persistence/repository.d.ts.map +1 -0
- package/dist/sdd/persistence/repository.js +96 -0
- package/dist/sdd/persistence/repository.js.map +1 -0
- package/dist/sdd/persistence/sqlite.d.ts +122 -0
- package/dist/sdd/persistence/sqlite.d.ts.map +1 -0
- package/dist/sdd/persistence/sqlite.js +602 -0
- package/dist/sdd/persistence/sqlite.js.map +1 -0
- package/dist/sdd/persistence/yaml.d.ts +41 -0
- package/dist/sdd/persistence/yaml.d.ts.map +1 -0
- package/dist/sdd/persistence/yaml.js +382 -0
- package/dist/sdd/persistence/yaml.js.map +1 -0
- package/dist/sdd/promises/classifier.d.ts +48 -0
- package/dist/sdd/promises/classifier.d.ts.map +1 -0
- package/dist/sdd/promises/classifier.js +215 -0
- package/dist/sdd/promises/classifier.js.map +1 -0
- package/dist/sdd/promises/tracker.d.ts +20 -0
- package/dist/sdd/promises/tracker.d.ts.map +1 -0
- package/dist/sdd/promises/tracker.js +204 -0
- package/dist/sdd/promises/tracker.js.map +1 -0
- package/dist/sdd/quality/scorer.d.ts +44 -0
- package/dist/sdd/quality/scorer.d.ts.map +1 -0
- package/dist/sdd/quality/scorer.js +216 -0
- package/dist/sdd/quality/scorer.js.map +1 -0
- package/dist/sdd/rollback/manager.d.ts +45 -0
- package/dist/sdd/rollback/manager.d.ts.map +1 -0
- package/dist/sdd/rollback/manager.js +266 -0
- package/dist/sdd/rollback/manager.js.map +1 -0
- package/dist/sdd/session/handoff.d.ts +52 -0
- package/dist/sdd/session/handoff.d.ts.map +1 -0
- package/dist/sdd/session/handoff.js +264 -0
- package/dist/sdd/session/handoff.js.map +1 -0
- package/dist/sdd/sla/tracker.d.ts +11 -0
- package/dist/sdd/sla/tracker.d.ts.map +1 -0
- package/dist/sdd/sla/tracker.js +52 -0
- package/dist/sdd/sla/tracker.js.map +1 -0
- package/dist/sdd/sync/git-sync.d.ts +61 -0
- package/dist/sdd/sync/git-sync.d.ts.map +1 -0
- package/dist/sdd/sync/git-sync.js +297 -0
- package/dist/sdd/sync/git-sync.js.map +1 -0
- package/dist/sdd/toggle/state.d.ts +8 -0
- package/dist/sdd/toggle/state.d.ts.map +1 -0
- package/dist/sdd/toggle/state.js +32 -0
- package/dist/sdd/toggle/state.js.map +1 -0
- package/dist/sdd/transactions/manager.d.ts +12 -0
- package/dist/sdd/transactions/manager.d.ts.map +1 -0
- package/dist/sdd/transactions/manager.js +80 -0
- package/dist/sdd/transactions/manager.js.map +1 -0
- package/dist/sdd/validation/coverage-index.d.ts +117 -0
- package/dist/sdd/validation/coverage-index.d.ts.map +1 -0
- package/dist/sdd/validation/coverage-index.js +251 -0
- package/dist/sdd/validation/coverage-index.js.map +1 -0
- package/dist/sdd/validation/executable.d.ts +26 -0
- package/dist/sdd/validation/executable.d.ts.map +1 -0
- package/dist/sdd/validation/executable.js +122 -0
- package/dist/sdd/validation/executable.js.map +1 -0
- package/dist/sdd/validation/smart-validator.d.ts +53 -0
- package/dist/sdd/validation/smart-validator.d.ts.map +1 -0
- package/dist/sdd/validation/smart-validator.js +347 -0
- package/dist/sdd/validation/smart-validator.js.map +1 -0
- package/dist/sdd/validation/validator.d.ts +39 -0
- package/dist/sdd/validation/validator.d.ts.map +1 -0
- package/dist/sdd/validation/validator.js +512 -0
- package/dist/sdd/validation/validator.js.map +1 -0
- package/dist/sdd/workflow/exporter.d.ts +36 -0
- package/dist/sdd/workflow/exporter.d.ts.map +1 -0
- package/dist/sdd/workflow/exporter.js +112 -0
- package/dist/sdd/workflow/exporter.js.map +1 -0
- package/dist/sdd/workflows/ab-testing.d.ts +18 -0
- package/dist/sdd/workflows/ab-testing.d.ts.map +1 -0
- package/dist/sdd/workflows/ab-testing.js +67 -0
- package/dist/sdd/workflows/ab-testing.js.map +1 -0
- package/dist/sdd/workflows/bug-fix.d.ts +13 -0
- package/dist/sdd/workflows/bug-fix.d.ts.map +1 -0
- package/dist/sdd/workflows/bug-fix.js +65 -0
- package/dist/sdd/workflows/bug-fix.js.map +1 -0
- package/dist/sdd/workflows/data-migration.d.ts +14 -0
- package/dist/sdd/workflows/data-migration.d.ts.map +1 -0
- package/dist/sdd/workflows/data-migration.js +68 -0
- package/dist/sdd/workflows/data-migration.js.map +1 -0
- package/dist/sdd/workflows/deprecation.d.ts +15 -0
- package/dist/sdd/workflows/deprecation.d.ts.map +1 -0
- package/dist/sdd/workflows/deprecation.js +68 -0
- package/dist/sdd/workflows/deprecation.js.map +1 -0
- package/dist/sdd/workflows/feature-flags.d.ts +14 -0
- package/dist/sdd/workflows/feature-flags.d.ts.map +1 -0
- package/dist/sdd/workflows/feature-flags.js +73 -0
- package/dist/sdd/workflows/feature-flags.js.map +1 -0
- package/dist/sdd/workflows/hotfix.d.ts +13 -0
- package/dist/sdd/workflows/hotfix.d.ts.map +1 -0
- package/dist/sdd/workflows/hotfix.js +67 -0
- package/dist/sdd/workflows/hotfix.js.map +1 -0
- package/dist/sdd/workflows/multi-tenancy.d.ts +13 -0
- package/dist/sdd/workflows/multi-tenancy.d.ts.map +1 -0
- package/dist/sdd/workflows/multi-tenancy.js +68 -0
- package/dist/sdd/workflows/multi-tenancy.js.map +1 -0
- package/dist/sdd/workflows/onboarding.d.ts +7 -0
- package/dist/sdd/workflows/onboarding.d.ts.map +1 -0
- package/dist/sdd/workflows/onboarding.js +43 -0
- package/dist/sdd/workflows/onboarding.js.map +1 -0
- package/dist/sdd/workflows/refactoring.d.ts +14 -0
- package/dist/sdd/workflows/refactoring.d.ts.map +1 -0
- package/dist/sdd/workflows/refactoring.js +73 -0
- package/dist/sdd/workflows/refactoring.js.map +1 -0
- package/dist/server/events.d.ts +64 -0
- package/dist/server/events.d.ts.map +1 -0
- package/dist/server/events.js +149 -0
- package/dist/server/events.js.map +1 -0
- package/dist/server/server.d.ts +33 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +1019 -0
- package/dist/server/server.js.map +1 -0
- package/marketplace.json +39 -0
- package/package.json +65 -0
- package/src/code-intelligence/analyzer.ts +350 -0
- package/src/code-intelligence/ast/cache.ts +61 -0
- package/src/code-intelligence/ast/common.ts +62 -0
- package/src/code-intelligence/ast/component.ts +39 -0
- package/src/code-intelligence/ast/fallback.ts +44 -0
- package/src/code-intelligence/ast/index.ts +4 -0
- package/src/code-intelligence/ast/ir.ts +91 -0
- package/src/code-intelligence/ast/metrics.ts +65 -0
- package/src/code-intelligence/ast/registry.ts +28 -0
- package/src/code-intelligence/ast/tree-sitter.ts +226 -0
- package/src/code-intelligence/ast/typescript.ts +140 -0
- package/src/index.ts +22 -0
- package/src/mcp/server.ts +77 -0
- package/src/opencode/hooks.ts +728 -0
- package/src/opencode/router/categories.ts +192 -0
- package/src/opencode/router/embeddings.ts +149 -0
- package/src/opencode/router/graph-state-snapshot.ts +163 -0
- package/src/opencode/router/index.ts +44 -0
- package/src/opencode/router/intent-classifier.ts +140 -0
- package/src/opencode/router/semantic-nudge.ts +89 -0
- package/src/opencode/router/state-gate.ts +192 -0
- package/src/opencode/router/tool-embeddings.ts +162 -0
- package/src/opencode/router/tool-registry.ts +135 -0
- package/src/opencode/router/tool-taxonomy.ts +284 -0
- package/src/opencode/router/tools-composite.ts +685 -0
- package/src/opencode/shell-hooks.ts +115 -0
- package/src/opencode/system-prompt.ts +617 -0
- package/src/opencode/tools.ts +4102 -0
- package/src/opencode/workflows/chains.ts +205 -0
- package/src/opencode/workflows/executor.ts +172 -0
- package/src/opencode/workflows/index.ts +21 -0
- package/src/opencode/workflows/tools-workflow.ts +91 -0
- package/src/opencode/workflows/types.ts +42 -0
- package/src/sdd/analysis/compliance.ts +279 -0
- package/src/sdd/analysis/scalability.ts +97 -0
- package/src/sdd/analysis/security.ts +135 -0
- package/src/sdd/brownfield/scanner.ts +276 -0
- package/src/sdd/cache/manager.ts +899 -0
- package/src/sdd/cache/snapshot-store.ts +185 -0
- package/src/sdd/changes/manager.ts +326 -0
- package/src/sdd/cicd/generators.ts +1095 -0
- package/src/sdd/code-quality/complexity.ts +235 -0
- package/src/sdd/code-quality/conventions.ts +220 -0
- package/src/sdd/code-quality/dependencies.ts +203 -0
- package/src/sdd/code-quality/import-analyzer.ts +294 -0
- package/src/sdd/code-quality/metrics.ts +232 -0
- package/src/sdd/code-quality/smells.ts +415 -0
- package/src/sdd/code-quality/symbol-parser.ts +335 -0
- package/src/sdd/code-quality/usage-tracker.ts +527 -0
- package/src/sdd/code-quality/utils.ts +13 -0
- package/src/sdd/codegen/generator.ts +1181 -0
- package/src/sdd/constitution/validator.ts +253 -0
- package/src/sdd/cost/estimator.ts +147 -0
- package/src/sdd/coverage/tracker.ts +342 -0
- package/src/sdd/disaster/recovery.ts +79 -0
- package/src/sdd/discovery/adaptive.ts +167 -0
- package/src/sdd/discovery/briefing-analyzer.ts +802 -0
- package/src/sdd/discovery/briefing.ts +770 -0
- package/src/sdd/discovery/graph-builder.ts +598 -0
- package/src/sdd/documentation/generator.ts +158 -0
- package/src/sdd/domain/types.ts +658 -0
- package/src/sdd/drift/detector.ts +465 -0
- package/src/sdd/drift/exclusion.ts +223 -0
- package/src/sdd/drift/signals.ts +577 -0
- package/src/sdd/enforcement/interceptor.ts +444 -0
- package/src/sdd/enforcement/workflow-tracker.ts +263 -0
- package/src/sdd/graph/engine.ts +277 -0
- package/src/sdd/graph/index.ts +700 -0
- package/src/sdd/graph/integrity-guard.ts +348 -0
- package/src/sdd/graph/integrity.ts +628 -0
- package/src/sdd/graph/pruner.ts +221 -0
- package/src/sdd/graph/traverse.ts +331 -0
- package/src/sdd/incidents/manager.ts +87 -0
- package/src/sdd/knowledge/transfer.ts +140 -0
- package/src/sdd/migrations/fixes.ts +154 -0
- package/src/sdd/migrations/index.ts +14 -0
- package/src/sdd/migrations/migration-runner.ts +118 -0
- package/src/sdd/monitoring/setup.ts +237 -0
- package/src/sdd/monitoring/telemetry.ts +44 -0
- package/src/sdd/patterns/anti-patterns.ts +333 -0
- package/src/sdd/patterns/ast-clones.ts +214 -0
- package/src/sdd/patterns/config-drift.ts +346 -0
- package/src/sdd/patterns/contradictions.ts +323 -0
- package/src/sdd/patterns/learner.ts +266 -0
- package/src/sdd/permissions/access.ts +478 -0
- package/src/sdd/persistence/repository.ts +166 -0
- package/src/sdd/persistence/sqlite.ts +703 -0
- package/src/sdd/persistence/yaml.ts +409 -0
- package/src/sdd/promises/classifier.ts +253 -0
- package/src/sdd/promises/tracker.ts +258 -0
- package/src/sdd/quality/scorer.ts +263 -0
- package/src/sdd/rollback/manager.ts +361 -0
- package/src/sdd/session/handoff.ts +354 -0
- package/src/sdd/sla/tracker.ts +68 -0
- package/src/sdd/sync/git-sync.ts +401 -0
- package/src/sdd/toggle/state.ts +38 -0
- package/src/sdd/transactions/manager.ts +93 -0
- package/src/sdd/validation/coverage-index.ts +339 -0
- package/src/sdd/validation/executable.ts +127 -0
- package/src/sdd/validation/smart-validator.ts +470 -0
- package/src/sdd/validation/validator.ts +641 -0
- package/src/sdd/workflow/exporter.ts +169 -0
- package/src/sdd/workflows/ab-testing.ts +90 -0
- package/src/sdd/workflows/bug-fix.ts +81 -0
- package/src/sdd/workflows/data-migration.ts +86 -0
- package/src/sdd/workflows/deprecation.ts +87 -0
- package/src/sdd/workflows/feature-flags.ts +91 -0
- package/src/sdd/workflows/hotfix.ts +83 -0
- package/src/sdd/workflows/multi-tenancy.ts +84 -0
- package/src/sdd/workflows/onboarding.ts +82 -0
- package/src/sdd/workflows/refactoring.ts +90 -0
- package/src/server/events.ts +184 -0
- package/src/server/server.ts +1088 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, DecisionNode } from "../domain/types.js"
|
|
2
|
+
import { getNodesByType } from "../graph/engine.js"
|
|
3
|
+
import { getPendingChanges } from "../changes/manager.js"
|
|
4
|
+
|
|
5
|
+
export interface WorkflowExport {
|
|
6
|
+
project_id: string
|
|
7
|
+
exported_at: string
|
|
8
|
+
summary: {
|
|
9
|
+
total_nodes: number
|
|
10
|
+
total_relationships: number
|
|
11
|
+
nodes_by_type: Record<string, number>
|
|
12
|
+
status_distribution: Record<string, number>
|
|
13
|
+
}
|
|
14
|
+
changes: ChangeExport[]
|
|
15
|
+
decisions: DecisionExport[]
|
|
16
|
+
blockers: BlockerExport[]
|
|
17
|
+
recommendations: string[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ChangeExport {
|
|
21
|
+
id: string
|
|
22
|
+
status: string
|
|
23
|
+
title: string
|
|
24
|
+
created_at: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface DecisionExport {
|
|
28
|
+
id: string
|
|
29
|
+
decision: string
|
|
30
|
+
rationale?: string
|
|
31
|
+
created_at: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface BlockerExport {
|
|
35
|
+
node_id: string
|
|
36
|
+
node_type: string
|
|
37
|
+
name: string
|
|
38
|
+
reason: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function exportWorkflow(graph: KnowledgeGraph): WorkflowExport {
|
|
42
|
+
const nodesByType: Record<string, number> = {}
|
|
43
|
+
for (const node of graph.nodes) {
|
|
44
|
+
nodesByType[node.type] = (nodesByType[node.type] || 0) + 1
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const statusDistribution: Record<string, number> = {}
|
|
48
|
+
for (const node of graph.nodes) {
|
|
49
|
+
statusDistribution[node.status] = (statusDistribution[node.status] || 0) + 1
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const changes = getNodesByType<ChangeNode>(graph, "change").map((c) => ({
|
|
53
|
+
id: c.id,
|
|
54
|
+
status: c.status,
|
|
55
|
+
title: c.metadata.title,
|
|
56
|
+
created_at: c.created_at,
|
|
57
|
+
}))
|
|
58
|
+
|
|
59
|
+
const decisions = getNodesByType<DecisionNode>(graph, "decision").map((d) => ({
|
|
60
|
+
id: d.id,
|
|
61
|
+
decision: d.metadata.decision,
|
|
62
|
+
rationale: d.metadata.context,
|
|
63
|
+
created_at: d.created_at,
|
|
64
|
+
}))
|
|
65
|
+
|
|
66
|
+
const blockers = graph.nodes
|
|
67
|
+
.filter((n) => n.status === "BLOCKED")
|
|
68
|
+
.map((n) => ({
|
|
69
|
+
node_id: n.id,
|
|
70
|
+
node_type: n.type,
|
|
71
|
+
name: n.name,
|
|
72
|
+
reason: (n.metadata as any).reason || "Unknown",
|
|
73
|
+
}))
|
|
74
|
+
|
|
75
|
+
const recommendations = generateRecommendations(graph)
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
project_id: graph.project_id,
|
|
79
|
+
exported_at: new Date().toISOString(),
|
|
80
|
+
summary: {
|
|
81
|
+
total_nodes: graph.nodes.length,
|
|
82
|
+
total_relationships: graph.relationships.length,
|
|
83
|
+
nodes_by_type: nodesByType,
|
|
84
|
+
status_distribution: statusDistribution,
|
|
85
|
+
},
|
|
86
|
+
changes,
|
|
87
|
+
decisions,
|
|
88
|
+
blockers,
|
|
89
|
+
recommendations,
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function generateRecommendations(graph: KnowledgeGraph): string[] {
|
|
94
|
+
const recs: string[] = []
|
|
95
|
+
|
|
96
|
+
const pendingChanges = getPendingChanges(graph)
|
|
97
|
+
if (pendingChanges.length > 3) {
|
|
98
|
+
recs.push(`${pendingChanges.length} changes pending approval - consider batch review`)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const features = getNodesByType(graph, "feature")
|
|
102
|
+
const completedFeatures = features.filter((f) => f.status === "COMPLETED")
|
|
103
|
+
if (features.length > 0 && completedFeatures.length / features.length < 0.5) {
|
|
104
|
+
recs.push("Less than 50% of features completed - focus on finishing existing work")
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const requirements = getNodesByType(graph, "requirement")
|
|
108
|
+
const tests = getNodesByType(graph, "test")
|
|
109
|
+
if (requirements.length > 0 && tests.length < requirements.length * 0.5) {
|
|
110
|
+
recs.push("Low test coverage - add tests for requirements")
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const blocked = graph.nodes.filter((n) => n.status === "BLOCKED")
|
|
114
|
+
if (blocked.length > 0) {
|
|
115
|
+
recs.push(`${blocked.length} blocked items need resolution`)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (recs.length === 0) {
|
|
119
|
+
recs.push("Project looks healthy - keep up the good work!")
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return recs
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function formatWorkflowExport(exp: WorkflowExport): string {
|
|
126
|
+
const lines = [
|
|
127
|
+
`## SDD Workflow Export`,
|
|
128
|
+
`**Project:** ${exp.project_id}`,
|
|
129
|
+
`**Exported:** ${exp.exported_at}`,
|
|
130
|
+
"",
|
|
131
|
+
"### Summary",
|
|
132
|
+
`- Nodes: ${exp.summary.total_nodes}`,
|
|
133
|
+
`- Relationships: ${exp.summary.total_relationships}`,
|
|
134
|
+
"",
|
|
135
|
+
"#### Nodes by Type",
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
for (const [type, count] of Object.entries(exp.summary.nodes_by_type)) {
|
|
139
|
+
lines.push(`- ${type}: ${count}`)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
lines.push("\n#### Status Distribution")
|
|
143
|
+
for (const [status, count] of Object.entries(exp.summary.status_distribution)) {
|
|
144
|
+
lines.push(`- ${status}: ${count}`)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (exp.changes.length > 0) {
|
|
148
|
+
lines.push("\n### Changes")
|
|
149
|
+
for (const c of exp.changes) {
|
|
150
|
+
lines.push(`- **${c.id}** (${c.status}): ${c.title}`)
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (exp.blockers.length > 0) {
|
|
155
|
+
lines.push("\n### Blockers")
|
|
156
|
+
for (const b of exp.blockers) {
|
|
157
|
+
lines.push(`- **${b.name}** (${b.node_type}): ${b.reason}`)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (exp.recommendations.length > 0) {
|
|
162
|
+
lines.push("\n### Recommendations")
|
|
163
|
+
for (const r of exp.recommendations) {
|
|
164
|
+
lines.push(`- ${r}`)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return lines.join("\n")
|
|
169
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, ExperimentNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface ABTestingWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
hypothesis: string
|
|
6
|
+
variants: Array<{
|
|
7
|
+
name: string
|
|
8
|
+
description: string
|
|
9
|
+
traffic_percentage: number
|
|
10
|
+
}>
|
|
11
|
+
primary_metric: string
|
|
12
|
+
duration_days: number
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function createExperimentChange(
|
|
16
|
+
_graph: KnowledgeGraph,
|
|
17
|
+
workflow: ABTestingWorkflow
|
|
18
|
+
): { change: ChangeNode; experiment: ExperimentNode } {
|
|
19
|
+
const changeId = `change-experiment-${Date.now()}`
|
|
20
|
+
const experimentId = `experiment-${Date.now()}`
|
|
21
|
+
|
|
22
|
+
const experiment: ExperimentNode = {
|
|
23
|
+
id: experimentId,
|
|
24
|
+
type: 'experiment',
|
|
25
|
+
name: `Experiment: ${workflow.hypothesis}`,
|
|
26
|
+
description: workflow.hypothesis,
|
|
27
|
+
status: 'PROPOSED',
|
|
28
|
+
version: 1,
|
|
29
|
+
metadata: {
|
|
30
|
+
hypothesis: workflow.hypothesis,
|
|
31
|
+
variants: workflow.variants,
|
|
32
|
+
primary_metric: workflow.primary_metric,
|
|
33
|
+
duration_days: workflow.duration_days,
|
|
34
|
+
},
|
|
35
|
+
created_at: new Date().toISOString(),
|
|
36
|
+
updated_at: new Date().toISOString(),
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const change: ChangeNode = {
|
|
40
|
+
id: changeId,
|
|
41
|
+
type: 'change',
|
|
42
|
+
name: `Experiment: ${workflow.hypothesis}`,
|
|
43
|
+
description: workflow.hypothesis,
|
|
44
|
+
status: 'PROPOSED',
|
|
45
|
+
version: 1,
|
|
46
|
+
metadata: {
|
|
47
|
+
title: `Experiment: ${workflow.hypothesis}`,
|
|
48
|
+
reason: workflow.hypothesis,
|
|
49
|
+
approval_level: 'REVIEW',
|
|
50
|
+
affected_nodes: [experimentId],
|
|
51
|
+
affected_relationships: [],
|
|
52
|
+
new_nodes: [experimentId],
|
|
53
|
+
removed_nodes: [],
|
|
54
|
+
modified_nodes: [],
|
|
55
|
+
affected_files: [],
|
|
56
|
+
affected_tests: [],
|
|
57
|
+
implementation_tasks: [],
|
|
58
|
+
origin: 'ab_testing_workflow',
|
|
59
|
+
},
|
|
60
|
+
created_at: new Date().toISOString(),
|
|
61
|
+
updated_at: new Date().toISOString(),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return { change, experiment }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function getExperimentInstructions(experiment: ExperimentNode): string {
|
|
68
|
+
const lines = [
|
|
69
|
+
'## A/B Testing Workflow',
|
|
70
|
+
'',
|
|
71
|
+
`**Hypothesis:** ${experiment.metadata.hypothesis}`,
|
|
72
|
+
`**Primary Metric:** ${experiment.metadata.primary_metric}`,
|
|
73
|
+
`**Duration:** ${experiment.metadata.duration_days} days`,
|
|
74
|
+
'',
|
|
75
|
+
'### Variants',
|
|
76
|
+
...experiment.metadata.variants.map(v =>
|
|
77
|
+
`- **${v.name}**: ${v.description} (${v.traffic_percentage}% traffic)`
|
|
78
|
+
),
|
|
79
|
+
'',
|
|
80
|
+
'### Steps',
|
|
81
|
+
'1. Implement variant code',
|
|
82
|
+
'2. Set up tracking for primary metric',
|
|
83
|
+
'3. Split traffic according to percentages',
|
|
84
|
+
'4. Monitor for statistical significance',
|
|
85
|
+
'5. Analyze results after duration',
|
|
86
|
+
'6. Implement winning variant',
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
return lines.join('\n')
|
|
90
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, BugFixNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface BugFixWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
description: string
|
|
6
|
+
files: string[]
|
|
7
|
+
severity: 'critical' | 'high' | 'medium' | 'low'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function createBugFixChange(
|
|
11
|
+
_graph: KnowledgeGraph,
|
|
12
|
+
workflow: BugFixWorkflow
|
|
13
|
+
): { change: ChangeNode; bugFix: BugFixNode } {
|
|
14
|
+
const changeId = `change-bugfix-${Date.now()}`
|
|
15
|
+
const bugFixId = `bugfix-${Date.now()}`
|
|
16
|
+
|
|
17
|
+
const bugFix: BugFixNode = {
|
|
18
|
+
id: bugFixId,
|
|
19
|
+
type: 'bug_fix',
|
|
20
|
+
name: `Bug Fix: ${workflow.description}`,
|
|
21
|
+
description: workflow.description,
|
|
22
|
+
status: 'PROPOSED',
|
|
23
|
+
version: 1,
|
|
24
|
+
metadata: {
|
|
25
|
+
bug_description: workflow.description,
|
|
26
|
+
affected_files: workflow.files,
|
|
27
|
+
severity: workflow.severity,
|
|
28
|
+
},
|
|
29
|
+
created_at: new Date().toISOString(),
|
|
30
|
+
updated_at: new Date().toISOString(),
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const change: ChangeNode = {
|
|
34
|
+
id: changeId,
|
|
35
|
+
type: 'change',
|
|
36
|
+
name: `Bug Fix: ${workflow.description}`,
|
|
37
|
+
description: workflow.description,
|
|
38
|
+
status: 'PROPOSED',
|
|
39
|
+
version: 1,
|
|
40
|
+
metadata: {
|
|
41
|
+
title: `Bug Fix: ${workflow.description}`,
|
|
42
|
+
reason: workflow.description,
|
|
43
|
+
approval_level: 'AUTO',
|
|
44
|
+
affected_nodes: [bugFixId],
|
|
45
|
+
affected_relationships: [],
|
|
46
|
+
new_nodes: [bugFixId],
|
|
47
|
+
removed_nodes: [],
|
|
48
|
+
modified_nodes: [],
|
|
49
|
+
affected_files: workflow.files,
|
|
50
|
+
affected_tests: [],
|
|
51
|
+
implementation_tasks: [],
|
|
52
|
+
origin: 'bug_fix_workflow',
|
|
53
|
+
},
|
|
54
|
+
created_at: new Date().toISOString(),
|
|
55
|
+
updated_at: new Date().toISOString(),
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return { change, bugFix }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function getBugFixInstructions(bugFix: BugFixNode): string {
|
|
62
|
+
const lines = [
|
|
63
|
+
'## Bug Fix Workflow',
|
|
64
|
+
'',
|
|
65
|
+
`**Bug:** ${bugFix.metadata.bug_description}`,
|
|
66
|
+
`**Severity:** ${bugFix.metadata.severity}`,
|
|
67
|
+
`**Affected Files:** ${bugFix.metadata.affected_files.join(', ')}`,
|
|
68
|
+
'',
|
|
69
|
+
'### Steps',
|
|
70
|
+
'1. Reproduce the bug',
|
|
71
|
+
'2. Identify root cause',
|
|
72
|
+
'3. Create fix',
|
|
73
|
+
'4. Add tests to prevent regression',
|
|
74
|
+
'5. Verify fix works',
|
|
75
|
+
'',
|
|
76
|
+
'### Auto-Approval',
|
|
77
|
+
'Bug fixes are approved automatically (AUTO approval level).',
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
return lines.join('\n')
|
|
81
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, MigrationNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface DataMigrationWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
source_schema: string
|
|
6
|
+
target_schema: string
|
|
7
|
+
description: string
|
|
8
|
+
data_transformations?: string[]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function createMigrationChange(
|
|
12
|
+
_graph: KnowledgeGraph,
|
|
13
|
+
workflow: DataMigrationWorkflow
|
|
14
|
+
): { change: ChangeNode; migration: MigrationNode } {
|
|
15
|
+
const changeId = `change-migration-${Date.now()}`
|
|
16
|
+
const migrationId = `migration-${Date.now()}`
|
|
17
|
+
|
|
18
|
+
const migration: MigrationNode = {
|
|
19
|
+
id: migrationId,
|
|
20
|
+
type: 'migration',
|
|
21
|
+
name: `Migration: ${workflow.description}`,
|
|
22
|
+
description: workflow.description,
|
|
23
|
+
status: 'PROPOSED',
|
|
24
|
+
version: 1,
|
|
25
|
+
metadata: {
|
|
26
|
+
source_schema: workflow.source_schema,
|
|
27
|
+
target_schema: workflow.target_schema,
|
|
28
|
+
data_transformations: workflow.data_transformations,
|
|
29
|
+
},
|
|
30
|
+
created_at: new Date().toISOString(),
|
|
31
|
+
updated_at: new Date().toISOString(),
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const change: ChangeNode = {
|
|
35
|
+
id: changeId,
|
|
36
|
+
type: 'change',
|
|
37
|
+
name: `Migration: ${workflow.description}`,
|
|
38
|
+
description: workflow.description,
|
|
39
|
+
status: 'PROPOSED',
|
|
40
|
+
version: 1,
|
|
41
|
+
metadata: {
|
|
42
|
+
title: `Migration: ${workflow.description}`,
|
|
43
|
+
reason: workflow.description,
|
|
44
|
+
approval_level: 'APPROVAL',
|
|
45
|
+
affected_nodes: [migrationId],
|
|
46
|
+
affected_relationships: [],
|
|
47
|
+
new_nodes: [migrationId],
|
|
48
|
+
removed_nodes: [],
|
|
49
|
+
modified_nodes: [],
|
|
50
|
+
affected_files: [],
|
|
51
|
+
affected_tests: [],
|
|
52
|
+
implementation_tasks: [],
|
|
53
|
+
origin: 'data_migration_workflow',
|
|
54
|
+
},
|
|
55
|
+
created_at: new Date().toISOString(),
|
|
56
|
+
updated_at: new Date().toISOString(),
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return { change, migration }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getMigrationInstructions(migration: MigrationNode): string {
|
|
63
|
+
const lines = [
|
|
64
|
+
'## Data Migration Workflow',
|
|
65
|
+
'',
|
|
66
|
+
`**Source Schema:** ${migration.metadata.source_schema}`,
|
|
67
|
+
`**Target Schema:** ${migration.metadata.target_schema}`,
|
|
68
|
+
'',
|
|
69
|
+
'### Steps',
|
|
70
|
+
'1. Backup current data',
|
|
71
|
+
'2. Analyze schema differences',
|
|
72
|
+
'3. Generate migration script',
|
|
73
|
+
'4. Test migration on staging',
|
|
74
|
+
'5. Run migration on production',
|
|
75
|
+
'6. Verify data integrity',
|
|
76
|
+
'',
|
|
77
|
+
'### Rollback',
|
|
78
|
+
'Migration includes rollback script for emergency recovery.',
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
if (migration.metadata.data_transformations) {
|
|
82
|
+
lines.push('', '### Data Transformations', ...migration.metadata.data_transformations.map(t => `- ${t}`))
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return lines.join('\n')
|
|
86
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, DeprecationNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface DeprecationWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
target_feature: string
|
|
6
|
+
description: string
|
|
7
|
+
removal_date: string
|
|
8
|
+
migration_guide?: string
|
|
9
|
+
affected_endpoints: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function createDeprecationChange(
|
|
13
|
+
_graph: KnowledgeGraph,
|
|
14
|
+
workflow: DeprecationWorkflow
|
|
15
|
+
): { change: ChangeNode; deprecation: DeprecationNode } {
|
|
16
|
+
const changeId = `change-deprecate-${Date.now()}`
|
|
17
|
+
const deprecationId = `deprecate-${Date.now()}`
|
|
18
|
+
|
|
19
|
+
const deprecation: DeprecationNode = {
|
|
20
|
+
id: deprecationId,
|
|
21
|
+
type: 'deprecation',
|
|
22
|
+
name: `Deprecation: ${workflow.target_feature}`,
|
|
23
|
+
description: workflow.description,
|
|
24
|
+
status: 'PROPOSED',
|
|
25
|
+
version: 1,
|
|
26
|
+
metadata: {
|
|
27
|
+
target_feature: workflow.target_feature,
|
|
28
|
+
removal_date: workflow.removal_date,
|
|
29
|
+
migration_guide: workflow.migration_guide,
|
|
30
|
+
affected_endpoints: workflow.affected_endpoints,
|
|
31
|
+
notification_sent: false,
|
|
32
|
+
},
|
|
33
|
+
created_at: new Date().toISOString(),
|
|
34
|
+
updated_at: new Date().toISOString(),
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const change: ChangeNode = {
|
|
38
|
+
id: changeId,
|
|
39
|
+
type: 'change',
|
|
40
|
+
name: `Deprecation: ${workflow.target_feature}`,
|
|
41
|
+
description: workflow.description,
|
|
42
|
+
status: 'PROPOSED',
|
|
43
|
+
version: 1,
|
|
44
|
+
metadata: {
|
|
45
|
+
title: `Deprecation: ${workflow.target_feature}`,
|
|
46
|
+
reason: workflow.description,
|
|
47
|
+
approval_level: 'APPROVAL',
|
|
48
|
+
affected_nodes: [deprecationId],
|
|
49
|
+
affected_relationships: [],
|
|
50
|
+
new_nodes: [deprecationId],
|
|
51
|
+
removed_nodes: [],
|
|
52
|
+
modified_nodes: [],
|
|
53
|
+
affected_files: [],
|
|
54
|
+
affected_tests: [],
|
|
55
|
+
implementation_tasks: [],
|
|
56
|
+
origin: 'deprecation_workflow',
|
|
57
|
+
},
|
|
58
|
+
created_at: new Date().toISOString(),
|
|
59
|
+
updated_at: new Date().toISOString(),
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return { change, deprecation }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function getDeprecationInstructions(deprecation: DeprecationNode): string {
|
|
66
|
+
const lines = [
|
|
67
|
+
'## Deprecation Workflow',
|
|
68
|
+
'',
|
|
69
|
+
`**Target:** ${deprecation.metadata.target_feature}`,
|
|
70
|
+
`**Removal Date:** ${deprecation.metadata.removal_date}`,
|
|
71
|
+
`**Affected Endpoints:** ${deprecation.metadata.affected_endpoints.join(', ')}`,
|
|
72
|
+
'',
|
|
73
|
+
'### Steps',
|
|
74
|
+
'1. Find all usages of the feature',
|
|
75
|
+
'2. Create migration guide',
|
|
76
|
+
'3. Send notifications to affected users',
|
|
77
|
+
'4. Add deprecation warnings',
|
|
78
|
+
'5. Monitor usage',
|
|
79
|
+
'6. Remove feature on removal date',
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
if (deprecation.metadata.migration_guide) {
|
|
83
|
+
lines.push('', '### Migration Guide', deprecation.metadata.migration_guide)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return lines.join('\n')
|
|
87
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, FeatureFlagNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface FeatureFlagWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
flag_name: string
|
|
6
|
+
description: string
|
|
7
|
+
rollout_percentage: number
|
|
8
|
+
target_audience?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function createFeatureFlagChange(
|
|
12
|
+
_graph: KnowledgeGraph,
|
|
13
|
+
workflow: FeatureFlagWorkflow
|
|
14
|
+
): { change: ChangeNode; featureFlag: FeatureFlagNode } {
|
|
15
|
+
const changeId = `change-flag-${Date.now()}`
|
|
16
|
+
const flagId = `flag-${Date.now()}`
|
|
17
|
+
|
|
18
|
+
const featureFlag: FeatureFlagNode = {
|
|
19
|
+
id: flagId,
|
|
20
|
+
type: 'feature_flag',
|
|
21
|
+
name: `Feature Flag: ${workflow.flag_name}`,
|
|
22
|
+
description: workflow.description,
|
|
23
|
+
status: 'PROPOSED',
|
|
24
|
+
version: 1,
|
|
25
|
+
metadata: {
|
|
26
|
+
flag_name: workflow.flag_name,
|
|
27
|
+
description: workflow.description,
|
|
28
|
+
enabled: false,
|
|
29
|
+
rollout_percentage: workflow.rollout_percentage,
|
|
30
|
+
target_audience: workflow.target_audience,
|
|
31
|
+
},
|
|
32
|
+
created_at: new Date().toISOString(),
|
|
33
|
+
updated_at: new Date().toISOString(),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const change: ChangeNode = {
|
|
37
|
+
id: changeId,
|
|
38
|
+
type: 'change',
|
|
39
|
+
name: `Feature Flag: ${workflow.flag_name}`,
|
|
40
|
+
description: workflow.description,
|
|
41
|
+
status: 'PROPOSED',
|
|
42
|
+
version: 1,
|
|
43
|
+
metadata: {
|
|
44
|
+
title: `Feature Flag: ${workflow.flag_name}`,
|
|
45
|
+
reason: workflow.description,
|
|
46
|
+
approval_level: 'AUTO',
|
|
47
|
+
affected_nodes: [flagId],
|
|
48
|
+
affected_relationships: [],
|
|
49
|
+
new_nodes: [flagId],
|
|
50
|
+
removed_nodes: [],
|
|
51
|
+
modified_nodes: [],
|
|
52
|
+
affected_files: [],
|
|
53
|
+
affected_tests: [],
|
|
54
|
+
implementation_tasks: [],
|
|
55
|
+
origin: 'feature_flag_workflow',
|
|
56
|
+
},
|
|
57
|
+
created_at: new Date().toISOString(),
|
|
58
|
+
updated_at: new Date().toISOString(),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return { change, featureFlag }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function getFeatureFlagInstructions(featureFlag: FeatureFlagNode): string {
|
|
65
|
+
const lines = [
|
|
66
|
+
'## Feature Flag Workflow',
|
|
67
|
+
'',
|
|
68
|
+
`**Flag:** ${featureFlag.metadata.flag_name}`,
|
|
69
|
+
`**Description:** ${featureFlag.metadata.description}`,
|
|
70
|
+
`**Rollout:** ${featureFlag.metadata.rollout_percentage}%`,
|
|
71
|
+
'',
|
|
72
|
+
'### Implementation',
|
|
73
|
+
'1. Create flag check in code',
|
|
74
|
+
'2. Wrap feature with flag condition',
|
|
75
|
+
'3. Set up flag management',
|
|
76
|
+
'4. Monitor usage',
|
|
77
|
+
'',
|
|
78
|
+
'### Rollout Strategy',
|
|
79
|
+
'1. Start with 0% rollout',
|
|
80
|
+
'2. Gradually increase percentage',
|
|
81
|
+
'3. Monitor metrics',
|
|
82
|
+
'4. Full rollout when confident',
|
|
83
|
+
'5. Remove flag after cleanup period',
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
if (featureFlag.metadata.target_audience) {
|
|
87
|
+
lines.push('', `**Target Audience:** ${featureFlag.metadata.target_audience}`)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return lines.join('\n')
|
|
91
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { KnowledgeGraph, ChangeNode, HotfixNode } from '../domain/types.js'
|
|
2
|
+
|
|
3
|
+
export interface HotfixWorkflow {
|
|
4
|
+
id: string
|
|
5
|
+
description: string
|
|
6
|
+
files: string[]
|
|
7
|
+
urgency: 'critical' | 'high' | 'medium'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function createHotfixChange(
|
|
11
|
+
_graph: KnowledgeGraph,
|
|
12
|
+
workflow: HotfixWorkflow
|
|
13
|
+
): { change: ChangeNode; hotfix: HotfixNode } {
|
|
14
|
+
const changeId = `change-hotfix-${Date.now()}`
|
|
15
|
+
const hotfixId = `hotfix-${Date.now()}`
|
|
16
|
+
|
|
17
|
+
const hotfix: HotfixNode = {
|
|
18
|
+
id: hotfixId,
|
|
19
|
+
type: 'hotfix',
|
|
20
|
+
name: `Hotfix: ${workflow.description}`,
|
|
21
|
+
description: workflow.description,
|
|
22
|
+
status: 'PROPOSED',
|
|
23
|
+
version: 1,
|
|
24
|
+
metadata: {
|
|
25
|
+
incident_description: workflow.description,
|
|
26
|
+
urgency: workflow.urgency,
|
|
27
|
+
fix_applied: false,
|
|
28
|
+
post_hoc_documented: false,
|
|
29
|
+
rollback_available: false,
|
|
30
|
+
},
|
|
31
|
+
created_at: new Date().toISOString(),
|
|
32
|
+
updated_at: new Date().toISOString(),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const change: ChangeNode = {
|
|
36
|
+
id: changeId,
|
|
37
|
+
type: 'change',
|
|
38
|
+
name: `Hotfix: ${workflow.description}`,
|
|
39
|
+
description: workflow.description,
|
|
40
|
+
status: 'PROPOSED',
|
|
41
|
+
version: 1,
|
|
42
|
+
metadata: {
|
|
43
|
+
title: `Hotfix: ${workflow.description}`,
|
|
44
|
+
reason: workflow.description,
|
|
45
|
+
approval_level: 'POST_HOC',
|
|
46
|
+
affected_nodes: [hotfixId],
|
|
47
|
+
affected_relationships: [],
|
|
48
|
+
new_nodes: [hotfixId],
|
|
49
|
+
removed_nodes: [],
|
|
50
|
+
modified_nodes: [],
|
|
51
|
+
affected_files: workflow.files,
|
|
52
|
+
affected_tests: [],
|
|
53
|
+
implementation_tasks: [],
|
|
54
|
+
origin: 'hotfix_workflow',
|
|
55
|
+
},
|
|
56
|
+
created_at: new Date().toISOString(),
|
|
57
|
+
updated_at: new Date().toISOString(),
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return { change, hotfix }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function getHotfixInstructions(hotfix: HotfixNode): string {
|
|
64
|
+
const lines = [
|
|
65
|
+
'## Hotfix Workflow',
|
|
66
|
+
'',
|
|
67
|
+
`**Incident:** ${hotfix.metadata.incident_description}`,
|
|
68
|
+
`**Urgency:** ${hotfix.metadata.urgency}`,
|
|
69
|
+
'',
|
|
70
|
+
'### Emergency Mode',
|
|
71
|
+
'1. Enforcement is temporarily disabled',
|
|
72
|
+
'2. Apply the fix directly',
|
|
73
|
+
'3. After fix is applied, document retroactively',
|
|
74
|
+
'',
|
|
75
|
+
'### Post-Hoc Documentation',
|
|
76
|
+
'After the incident is resolved:',
|
|
77
|
+
'1. Use `sdd.hotfix` to document the change',
|
|
78
|
+
'2. Create proper Change node with status COMPLETED',
|
|
79
|
+
'3. Re-enable enforcement',
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
return lines.join('\n')
|
|
83
|
+
}
|