@llm-dev-ops/agentics-cli 1.4.59 → 1.4.69
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 +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +167 -0
- package/dist/commands/agents.js.map +1 -1
- package/dist/pipeline/auto-chain.d.ts +1 -0
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +124 -37
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/execution-context.d.ts.map +1 -1
- package/dist/pipeline/execution-context.js +12 -37
- package/dist/pipeline/execution-context.js.map +1 -1
- package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/adr-generator.js +160 -1
- package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js +400 -3
- package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts +43 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.js +413 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/research-dossier.d.ts +0 -13
- package/dist/pipeline/phase2/phases/research-dossier.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/research-dossier.js +114 -1
- package/dist/pipeline/phase2/phases/research-dossier.js.map +1 -1
- package/dist/pipeline/phase2/phases/research-quality-gate.d.ts +48 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.js +322 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts +41 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.js +350 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts +14 -0
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.js +500 -10
- package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
- package/dist/pipeline/phase2/phases/tdd-plan-generator.js +1 -1
- package/dist/pipeline/phase2/phases/tdd-plan-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts +72 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.js +332 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.js.map +1 -0
- package/dist/pipeline/phase2/types.d.ts +2 -0
- package/dist/pipeline/phase2/types.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.js +169 -4
- package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.js +12 -2
- package/dist/pipeline/phase3/phases/test-generator.js.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js +99 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.d.ts +17 -4
- package/dist/pipeline/phase4/phases/deployment-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.js +364 -44
- package/dist/pipeline/phase4/phases/deployment-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/erp-client-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/erp-client-generator.js +27 -15
- package/dist/pipeline/phase4/phases/erp-client-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/erp-target-resolver.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/erp-target-resolver.js +49 -2
- package/dist/pipeline/phase4/phases/erp-target-resolver.js.map +1 -1
- package/dist/pipeline/phase4/phases/http-server-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/http-server-generator.js +263 -3
- package/dist/pipeline/phase4/phases/http-server-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/infra-adapter-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/infra-adapter-generator.js +335 -37
- package/dist/pipeline/phase4/phases/infra-adapter-generator.js.map +1 -1
- package/dist/pipeline/phase4/types.d.ts +3 -1
- package/dist/pipeline/phase4/types.d.ts.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +211 -2
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts +54 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js +417 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js.map +1 -0
- package/dist/pipeline/phases/prompt-generator.js +1 -1
- package/dist/pipeline/phases/prompt-generator.js.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts +116 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.js +666 -159
- package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
- package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
- package/dist/pipeline/swarm-orchestrator.js +62 -6
- package/dist/pipeline/swarm-orchestrator.js.map +1 -1
- package/dist/routing/capability-classifier.d.ts +43 -0
- package/dist/routing/capability-classifier.d.ts.map +1 -0
- package/dist/routing/capability-classifier.js +157 -0
- package/dist/routing/capability-classifier.js.map +1 -0
- package/dist/routing/composition-engine.d.ts +77 -0
- package/dist/routing/composition-engine.d.ts.map +1 -0
- package/dist/routing/composition-engine.js +249 -0
- package/dist/routing/composition-engine.js.map +1 -0
- package/dist/routing/graph-federation.d.ts +71 -0
- package/dist/routing/graph-federation.d.ts.map +1 -0
- package/dist/routing/graph-federation.js +210 -0
- package/dist/routing/graph-federation.js.map +1 -0
- package/dist/routing/graph-loader.d.ts +74 -0
- package/dist/routing/graph-loader.d.ts.map +1 -0
- package/dist/routing/graph-loader.js +383 -0
- package/dist/routing/graph-loader.js.map +1 -0
- package/dist/routing/graph-router.d.ts +103 -0
- package/dist/routing/graph-router.d.ts.map +1 -0
- package/dist/routing/graph-router.js +415 -0
- package/dist/routing/graph-router.js.map +1 -0
- package/dist/routing/graph-validator.d.ts +44 -0
- package/dist/routing/graph-validator.d.ts.map +1 -0
- package/dist/routing/graph-validator.js +329 -0
- package/dist/routing/graph-validator.js.map +1 -0
- package/dist/routing/index.d.ts +52 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +68 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/outcome-recorder.d.ts +71 -0
- package/dist/routing/outcome-recorder.d.ts.map +1 -0
- package/dist/routing/outcome-recorder.js +133 -0
- package/dist/routing/outcome-recorder.js.map +1 -0
- package/dist/routing/weight-adjuster.d.ts +59 -0
- package/dist/routing/weight-adjuster.d.ts.map +1 -0
- package/dist/routing/weight-adjuster.js +167 -0
- package/dist/routing/weight-adjuster.js.map +1 -0
- package/dist/routing/weighted-resolver.d.ts +55 -0
- package/dist/routing/weighted-resolver.d.ts.map +1 -0
- package/dist/routing/weighted-resolver.js +133 -0
- package/dist/routing/weighted-resolver.js.map +1 -0
- package/dist/synthesis/ask-artifact-writer.d.ts.map +1 -1
- package/dist/synthesis/ask-artifact-writer.js +8 -0
- package/dist/synthesis/ask-artifact-writer.js.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.d.ts +14 -0
- package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.js +224 -1
- package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
- package/dist/synthesis/simulation-renderers.d.ts.map +1 -1
- package/dist/synthesis/simulation-renderers.js +211 -40
- package/dist/synthesis/simulation-renderers.js.map +1 -1
- package/package.json +3 -1
- package/scripts/postinstall.sh +25 -0
- package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
- package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
- package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
- package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
- package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
- package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
- package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
- package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
- package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
- package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
- package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
- package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
- package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
- package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
- package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
- package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
- package/dist/bundled-agents/copilot-agents/package.json +0 -5
- package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
- package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
- package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
- package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
- package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
- package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
- package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
- package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
- package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
- package/dist/bundled-agents/platform-agents/package.json +0 -22
- package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
- package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
- package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
- package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
- package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
- package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
- package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
- package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
- package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
- package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
- package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
- package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
- package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
- package/dist/bundled-agents/sentinel-agents/package.json +0 -62
- package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
- package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
- package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
- package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
- package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
- package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
- package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
- package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 2 Quality Gate: DDD Model Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates DDD domain model completeness before code generation.
|
|
5
|
+
* Prevents copy-paste entities by ensuring:
|
|
6
|
+
* - Every bounded context has aggregates with typed fields
|
|
7
|
+
* - Ubiquitous language glossary is non-empty
|
|
8
|
+
* - Context map has real relationships
|
|
9
|
+
* - ADRs reference correct technology (not wrong ERP/cloud provider)
|
|
10
|
+
*
|
|
11
|
+
* Error codes:
|
|
12
|
+
* ECLI-P2-050 DDD model quality too low for code generation
|
|
13
|
+
* ECLI-P2-051 DDD model not available on context
|
|
14
|
+
* ECLI-P2-052 ADR technology mismatch detected
|
|
15
|
+
*/
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Detection Patterns
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Generic index signature patterns that indicate copy-paste or untyped entities.
|
|
21
|
+
* These produce `Record<string, unknown>` style types in generated code.
|
|
22
|
+
*/
|
|
23
|
+
const GENERIC_SIGNATURE_PATTERNS = [
|
|
24
|
+
/\[key:\s*string\]\s*:\s*unknown/g,
|
|
25
|
+
/\[key:\s*string\]\s*:\s*any/g,
|
|
26
|
+
/Record\s*<\s*string\s*,\s*(?:unknown|any)\s*>/g,
|
|
27
|
+
/\{\s*\[k:\s*string\]\s*:\s*\w+\s*\}/g,
|
|
28
|
+
/\bMap\s*<\s*string\s*,\s*(?:unknown|any)\s*>/g,
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Known cloud provider names for technology mismatch detection.
|
|
32
|
+
*/
|
|
33
|
+
const CLOUD_PROVIDERS = new Map([
|
|
34
|
+
['aws', ['AWS', 'Amazon', 'Lambda', 'DynamoDB', 'S3', 'SQS', 'SNS', 'ECS', 'EKS', 'Aurora', 'RDS', 'Kinesis', 'EventBridge', 'CloudFormation', 'CDK']],
|
|
35
|
+
['azure', ['Azure', 'Cosmos DB', 'Azure Functions', 'AKS', 'Azure SQL', 'Service Bus', 'Event Grid', 'Bicep', 'ARM']],
|
|
36
|
+
['gcp', ['GCP', 'Google Cloud', 'Cloud Run', 'Cloud SQL', 'Pub/Sub', 'BigQuery', 'Firestore', 'Cloud Functions', 'GKE', 'Spanner']],
|
|
37
|
+
]);
|
|
38
|
+
/**
|
|
39
|
+
* Known ERP system names for technology mismatch detection.
|
|
40
|
+
*/
|
|
41
|
+
const ERP_SYSTEMS = new Map([
|
|
42
|
+
['sap', ['SAP', 'S/4HANA', 'SAP HANA', 'ABAP', 'BAPI', 'IDoc', 'RFC', 'OData']],
|
|
43
|
+
['oracle', ['Oracle ERP', 'Oracle Cloud', 'JD Edwards', 'PeopleSoft']],
|
|
44
|
+
['dynamics', ['Dynamics 365', 'D365', 'Business Central', 'Finance and Operations']],
|
|
45
|
+
['netsuite', ['NetSuite', 'SuiteScript', 'SuiteFlow']],
|
|
46
|
+
]);
|
|
47
|
+
/**
|
|
48
|
+
* Known database engines for technology mismatch detection.
|
|
49
|
+
*/
|
|
50
|
+
const DATABASE_ENGINES = new Map([
|
|
51
|
+
['postgresql', ['PostgreSQL', 'Postgres', 'pg_']],
|
|
52
|
+
['mysql', ['MySQL', 'MariaDB']],
|
|
53
|
+
['dynamodb', ['DynamoDB']],
|
|
54
|
+
['mongodb', ['MongoDB', 'Mongoose']],
|
|
55
|
+
['cosmosdb', ['Cosmos DB', 'CosmosDB']],
|
|
56
|
+
['firestore', ['Firestore']],
|
|
57
|
+
['sqlserver', ['SQL Server', 'MSSQL', 'T-SQL']],
|
|
58
|
+
]);
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// Validation Helpers
|
|
61
|
+
// ============================================================================
|
|
62
|
+
/**
|
|
63
|
+
* Check if an aggregate has typed fields (not just names).
|
|
64
|
+
* Typed fields means entities or value objects with descriptions
|
|
65
|
+
* that contain type information, or invariants that reference fields.
|
|
66
|
+
*/
|
|
67
|
+
function aggregateHasTypedFields(agg) {
|
|
68
|
+
// Check entities have non-trivial descriptions (> 15 chars, not just the name repeated)
|
|
69
|
+
const typedEntities = agg.entities.filter((e) => e.description.length > 15 &&
|
|
70
|
+
e.description.toLowerCase() !== e.name.toLowerCase() &&
|
|
71
|
+
!isGenericDescription(e.description));
|
|
72
|
+
// Check value objects have invariants and non-trivial descriptions
|
|
73
|
+
const typedValueObjects = agg.valueObjects.filter((vo) => vo.description.length > 15 &&
|
|
74
|
+
(vo.invariants.length > 0 || hasFieldTypeIndicators(vo.description)));
|
|
75
|
+
// At least one entity or value object must have real type info
|
|
76
|
+
return typedEntities.length > 0 || typedValueObjects.length > 0;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Detect generic/placeholder descriptions that don't add real type information.
|
|
80
|
+
*/
|
|
81
|
+
function isGenericDescription(desc) {
|
|
82
|
+
const lower = desc.toLowerCase().trim();
|
|
83
|
+
const genericPhrases = [
|
|
84
|
+
'represents a',
|
|
85
|
+
'contains data',
|
|
86
|
+
'holds information',
|
|
87
|
+
'stores data',
|
|
88
|
+
'generic entity',
|
|
89
|
+
'base entity',
|
|
90
|
+
'to be defined',
|
|
91
|
+
'placeholder',
|
|
92
|
+
'tbd',
|
|
93
|
+
];
|
|
94
|
+
return genericPhrases.some((p) => lower.startsWith(p) || lower === p);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check whether a description contains field-type indicators
|
|
98
|
+
* (e.g. "string", "number", "Date", "UUID", "decimal").
|
|
99
|
+
*/
|
|
100
|
+
function hasFieldTypeIndicators(desc) {
|
|
101
|
+
return /\b(?:string|number|boolean|Date|UUID|decimal|integer|float|bigint|enum|array|list)\b/i.test(desc);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Detect generic index signature patterns in DDD model content.
|
|
105
|
+
*/
|
|
106
|
+
function countGenericSignatures(model) {
|
|
107
|
+
const allText = serializeModelText(model);
|
|
108
|
+
let count = 0;
|
|
109
|
+
for (const pattern of GENERIC_SIGNATURE_PATTERNS) {
|
|
110
|
+
const re = new RegExp(pattern.source, pattern.flags);
|
|
111
|
+
const matches = allText.match(re);
|
|
112
|
+
if (matches)
|
|
113
|
+
count += matches.length;
|
|
114
|
+
}
|
|
115
|
+
return count;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Serialize all DDD model text content for scanning.
|
|
119
|
+
*/
|
|
120
|
+
function serializeModelText(model) {
|
|
121
|
+
const parts = [];
|
|
122
|
+
for (const ctx of model.contexts) {
|
|
123
|
+
parts.push(ctx.name, ctx.description);
|
|
124
|
+
for (const agg of ctx.aggregates) {
|
|
125
|
+
parts.push(agg.name, agg.root);
|
|
126
|
+
for (const e of agg.entities)
|
|
127
|
+
parts.push(e.name, e.description);
|
|
128
|
+
for (const vo of agg.valueObjects)
|
|
129
|
+
parts.push(vo.name, vo.description, ...vo.invariants);
|
|
130
|
+
parts.push(...agg.invariants);
|
|
131
|
+
}
|
|
132
|
+
for (const evt of ctx.domainEvents)
|
|
133
|
+
parts.push(evt.name, evt.description, ...evt.payload);
|
|
134
|
+
for (const cmd of ctx.commands)
|
|
135
|
+
parts.push(cmd.name, cmd.description, ...cmd.input, ...cmd.preconditions, ...cmd.postconditions);
|
|
136
|
+
for (const q of ctx.queries)
|
|
137
|
+
parts.push(q.name, q.description, q.returns, ...q.parameters);
|
|
138
|
+
for (const term of ctx.ubiquitousLanguage)
|
|
139
|
+
parts.push(term.term, term.definition);
|
|
140
|
+
}
|
|
141
|
+
for (const rel of model.contextMap)
|
|
142
|
+
parts.push(rel.upstream, rel.downstream, rel.description, rel.type);
|
|
143
|
+
for (const term of model.ubiquitousLanguageGlossary)
|
|
144
|
+
parts.push(term.term, term.definition);
|
|
145
|
+
return parts.join('\n');
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Detect technology mismatches between ADRs and user-stated constraints.
|
|
149
|
+
*
|
|
150
|
+
* Extracts the dominant cloud provider, ERP system, and database from the DDD
|
|
151
|
+
* model text, then checks ADRs for references to competing technologies.
|
|
152
|
+
*/
|
|
153
|
+
function detectTechnologyMismatches(model, adrs) {
|
|
154
|
+
const mismatches = [];
|
|
155
|
+
const modelText = serializeModelText(model).toLowerCase();
|
|
156
|
+
const adrText = adrs.map((a) => `${a.context} ${a.decision} ${a.title}`).join('\n').toLowerCase();
|
|
157
|
+
const combinedText = `${modelText}\n${adrText}`;
|
|
158
|
+
// Detect dominant technologies in the model
|
|
159
|
+
const detectedCloud = detectDominant(combinedText, CLOUD_PROVIDERS);
|
|
160
|
+
const detectedERP = detectDominant(combinedText, ERP_SYSTEMS);
|
|
161
|
+
const _detectedDB = detectDominant(combinedText, DATABASE_ENGINES);
|
|
162
|
+
void _detectedDB; // reserved for future DB mismatch checks
|
|
163
|
+
// Check ADRs for competing cloud provider references
|
|
164
|
+
if (detectedCloud) {
|
|
165
|
+
for (const [provider, keywords] of CLOUD_PROVIDERS) {
|
|
166
|
+
if (provider === detectedCloud)
|
|
167
|
+
continue;
|
|
168
|
+
for (const kw of keywords) {
|
|
169
|
+
if (adrText.includes(kw.toLowerCase())) {
|
|
170
|
+
mismatches.push(`ADR references ${kw} (${provider}) but dominant cloud provider in model is ${detectedCloud}. ` +
|
|
171
|
+
'Verify the correct cloud provider is used consistently.');
|
|
172
|
+
break; // One mismatch per provider is enough
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Check ADRs for competing ERP references
|
|
178
|
+
if (detectedERP) {
|
|
179
|
+
for (const [system, keywords] of ERP_SYSTEMS) {
|
|
180
|
+
if (system === detectedERP)
|
|
181
|
+
continue;
|
|
182
|
+
for (const kw of keywords) {
|
|
183
|
+
if (adrText.includes(kw.toLowerCase())) {
|
|
184
|
+
mismatches.push(`ADR references ${kw} (${system}) but dominant ERP system in model is ${detectedERP}. ` +
|
|
185
|
+
'Ensure ADRs align with the user\'s stated ERP system.');
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return mismatches;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Find the dominant technology from a set of known providers/systems
|
|
195
|
+
* by counting keyword occurrences in the text.
|
|
196
|
+
*/
|
|
197
|
+
function detectDominant(text, providers) {
|
|
198
|
+
let maxCount = 0;
|
|
199
|
+
let dominant = null;
|
|
200
|
+
for (const [name, keywords] of providers) {
|
|
201
|
+
let count = 0;
|
|
202
|
+
for (const kw of keywords) {
|
|
203
|
+
const re = new RegExp(`\\b${escapeRegExp(kw)}\\b`, 'gi');
|
|
204
|
+
const matches = text.match(re);
|
|
205
|
+
if (matches)
|
|
206
|
+
count += matches.length;
|
|
207
|
+
}
|
|
208
|
+
if (count > maxCount) {
|
|
209
|
+
maxCount = count;
|
|
210
|
+
dominant = name;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Only return if there's a meaningful signal (at least 2 mentions)
|
|
214
|
+
return maxCount >= 2 ? dominant : null;
|
|
215
|
+
}
|
|
216
|
+
/** Escape special regex characters in a string. */
|
|
217
|
+
function escapeRegExp(str) {
|
|
218
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
219
|
+
}
|
|
220
|
+
// ============================================================================
|
|
221
|
+
// Main Validation
|
|
222
|
+
// ============================================================================
|
|
223
|
+
const PASSING_SCORE = 60;
|
|
224
|
+
const WEIGHTS = {
|
|
225
|
+
contextsExist: 15, // at least one bounded context
|
|
226
|
+
aggregatesTyped: 25, // aggregates have typed fields
|
|
227
|
+
ubiquitousLanguage: 15, // glossary is non-empty
|
|
228
|
+
contextMapComplete: 15, // context map has real relations
|
|
229
|
+
commandsAndEvents: 15, // domain has commands and events
|
|
230
|
+
contentIntegrity: 10, // no generic index signatures
|
|
231
|
+
technologyAlignment: 5, // ADR tech matches model tech
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Validate DDD domain model quality and produce a detailed report.
|
|
235
|
+
*/
|
|
236
|
+
export function validateDDDQuality(model, adrs) {
|
|
237
|
+
const issues = [];
|
|
238
|
+
const contexts = model.contexts;
|
|
239
|
+
const totalContexts = contexts.length;
|
|
240
|
+
// ---- Empty model fast-path ----
|
|
241
|
+
if (totalContexts === 0) {
|
|
242
|
+
return {
|
|
243
|
+
passed: false,
|
|
244
|
+
score: 0,
|
|
245
|
+
issues: ['DDD model contains zero bounded contexts. DDD generation may have failed entirely.'],
|
|
246
|
+
totalContexts: 0,
|
|
247
|
+
contextsWithAggregates: 0,
|
|
248
|
+
aggregatesWithTypedFields: 0,
|
|
249
|
+
totalAggregates: 0,
|
|
250
|
+
ubiquitousLanguageTerms: 0,
|
|
251
|
+
contextMapRelations: 0,
|
|
252
|
+
genericIndexSignaturesDetected: 0,
|
|
253
|
+
technologyMismatches: [],
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
// ---- Count signals ----
|
|
257
|
+
// 1. Contexts with aggregates
|
|
258
|
+
const contextsWithAggregates = contexts.filter((c) => c.aggregates.length > 0).length;
|
|
259
|
+
// 2. Aggregates with typed fields
|
|
260
|
+
const allAggregates = contexts.flatMap((c) => c.aggregates);
|
|
261
|
+
const totalAggregates = allAggregates.length;
|
|
262
|
+
const aggregatesWithTypedFields = allAggregates.filter(aggregateHasTypedFields).length;
|
|
263
|
+
// 3. Ubiquitous language terms (context-level + global glossary)
|
|
264
|
+
const contextLevelTerms = contexts.flatMap((c) => c.ubiquitousLanguage).length;
|
|
265
|
+
const globalTerms = model.ubiquitousLanguageGlossary.length;
|
|
266
|
+
const ubiquitousLanguageTerms = contextLevelTerms + globalTerms;
|
|
267
|
+
// 4. Context map relations
|
|
268
|
+
const contextMapRelations = model.contextMap.length;
|
|
269
|
+
// 5. Commands and events (indicate real domain modeling, not just CRUD)
|
|
270
|
+
const totalCommands = contexts.flatMap((c) => c.commands).length;
|
|
271
|
+
const totalEvents = contexts.flatMap((c) => c.domainEvents).length;
|
|
272
|
+
// 6. Generic index signatures
|
|
273
|
+
const genericIndexSignaturesDetected = countGenericSignatures(model);
|
|
274
|
+
// 7. Technology mismatches (only if ADRs provided)
|
|
275
|
+
const technologyMismatches = adrs ? detectTechnologyMismatches(model, adrs) : [];
|
|
276
|
+
// ---- Compute sub-scores ----
|
|
277
|
+
// Contexts exist
|
|
278
|
+
const contextsScore = totalContexts > 0
|
|
279
|
+
? (contextsWithAggregates / totalContexts) * WEIGHTS.contextsExist
|
|
280
|
+
: 0;
|
|
281
|
+
// Aggregates typed
|
|
282
|
+
const aggRatio = totalAggregates > 0 ? aggregatesWithTypedFields / totalAggregates : 0;
|
|
283
|
+
const aggregatesScore = aggRatio * WEIGHTS.aggregatesTyped;
|
|
284
|
+
// Ubiquitous language
|
|
285
|
+
const ulThreshold = 5;
|
|
286
|
+
const ulRatio = Math.min(1, ubiquitousLanguageTerms / ulThreshold);
|
|
287
|
+
const ulScore = ulRatio * WEIGHTS.ubiquitousLanguage;
|
|
288
|
+
// Context map
|
|
289
|
+
const expectedRelations = Math.max(1, totalContexts - 1); // at least N-1 relations
|
|
290
|
+
const cmRatio = Math.min(1, contextMapRelations / expectedRelations);
|
|
291
|
+
const cmScore = cmRatio * WEIGHTS.contextMapComplete;
|
|
292
|
+
// Commands and events (expect at least 1 per context)
|
|
293
|
+
const ceRatio = totalContexts > 0
|
|
294
|
+
? Math.min(1, (totalCommands + totalEvents) / (totalContexts * 2))
|
|
295
|
+
: 0;
|
|
296
|
+
const ceScore = ceRatio * WEIGHTS.commandsAndEvents;
|
|
297
|
+
// Content integrity (penalize generic signatures)
|
|
298
|
+
const integrityPenalty = Math.min(WEIGHTS.contentIntegrity, genericIndexSignaturesDetected * 2);
|
|
299
|
+
const integrityScore = WEIGHTS.contentIntegrity - integrityPenalty;
|
|
300
|
+
// Technology alignment
|
|
301
|
+
const techPenalty = Math.min(WEIGHTS.technologyAlignment, technologyMismatches.length * 2.5);
|
|
302
|
+
const techScore = WEIGHTS.technologyAlignment - techPenalty;
|
|
303
|
+
const rawScore = contextsScore + aggregatesScore + ulScore + cmScore +
|
|
304
|
+
ceScore + integrityScore + techScore;
|
|
305
|
+
const score = Math.max(0, Math.min(100, Math.round(rawScore)));
|
|
306
|
+
// ---- Collect actionable issues ----
|
|
307
|
+
if (contextsWithAggregates < totalContexts) {
|
|
308
|
+
issues.push(`Only ${contextsWithAggregates}/${totalContexts} bounded contexts have aggregates. ` +
|
|
309
|
+
'Every bounded context should define at least one aggregate root.');
|
|
310
|
+
}
|
|
311
|
+
if (totalAggregates > 0 && aggregatesWithTypedFields < totalAggregates) {
|
|
312
|
+
issues.push(`Only ${aggregatesWithTypedFields}/${totalAggregates} aggregates have typed field definitions. ` +
|
|
313
|
+
'Entities and value objects need descriptions with concrete types, not just names.');
|
|
314
|
+
}
|
|
315
|
+
if (ubiquitousLanguageTerms === 0) {
|
|
316
|
+
issues.push('Ubiquitous language glossary is empty. Add domain terms with definitions.');
|
|
317
|
+
}
|
|
318
|
+
else if (ubiquitousLanguageTerms < ulThreshold) {
|
|
319
|
+
issues.push(`Only ${ubiquitousLanguageTerms}/${ulThreshold} ubiquitous language terms defined. ` +
|
|
320
|
+
'Expand the glossary to cover key domain concepts.');
|
|
321
|
+
}
|
|
322
|
+
if (totalContexts > 1 && contextMapRelations === 0) {
|
|
323
|
+
issues.push('Context map has no relationships despite multiple bounded contexts. ' +
|
|
324
|
+
'Define upstream/downstream relationships between contexts.');
|
|
325
|
+
}
|
|
326
|
+
else if (totalContexts > 1 && contextMapRelations < totalContexts - 1) {
|
|
327
|
+
issues.push(`Only ${contextMapRelations} context map relations for ${totalContexts} contexts. ` +
|
|
328
|
+
`Expected at least ${totalContexts - 1} relationships.`);
|
|
329
|
+
}
|
|
330
|
+
if (totalCommands === 0) {
|
|
331
|
+
issues.push('No domain commands defined. Add commands that express intent to change domain state.');
|
|
332
|
+
}
|
|
333
|
+
if (totalEvents === 0) {
|
|
334
|
+
issues.push('No domain events defined. Add events that signal meaningful state changes.');
|
|
335
|
+
}
|
|
336
|
+
if (genericIndexSignaturesDetected > 0) {
|
|
337
|
+
issues.push(`${genericIndexSignaturesDetected} generic index signatures detected (e.g. "[key: string]: unknown"). ` +
|
|
338
|
+
'Replace with concrete typed fields to prevent Record<string, unknown> in generated code.');
|
|
339
|
+
}
|
|
340
|
+
for (const mismatch of technologyMismatches) {
|
|
341
|
+
issues.push(`ECLI-P2-052: ${mismatch}`);
|
|
342
|
+
}
|
|
343
|
+
const passed = score >= PASSING_SCORE;
|
|
344
|
+
return {
|
|
345
|
+
passed,
|
|
346
|
+
score,
|
|
347
|
+
issues,
|
|
348
|
+
totalContexts,
|
|
349
|
+
contextsWithAggregates,
|
|
350
|
+
aggregatesWithTypedFields,
|
|
351
|
+
totalAggregates,
|
|
352
|
+
ubiquitousLanguageTerms,
|
|
353
|
+
contextMapRelations,
|
|
354
|
+
genericIndexSignaturesDetected,
|
|
355
|
+
technologyMismatches,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
// ============================================================================
|
|
359
|
+
// Pipeline Stage Entry Point
|
|
360
|
+
// ============================================================================
|
|
361
|
+
/**
|
|
362
|
+
* Execute the DDD quality gate as a Phase 2 pipeline stage.
|
|
363
|
+
*
|
|
364
|
+
* Reads the DDD domain model and optionally ADRs from context stage outputs,
|
|
365
|
+
* validates the model, and returns a stage output indicating pass or fail.
|
|
366
|
+
*
|
|
367
|
+
* @throws Error with ECLI-P2-051 if DDD model is not on context
|
|
368
|
+
*/
|
|
369
|
+
export async function executeDDDQualityGate(context) {
|
|
370
|
+
const start = Date.now();
|
|
371
|
+
const dddOutput = context.stageOutputs.get('ddd-generation');
|
|
372
|
+
if (!dddOutput || dddOutput.status !== 'completed' || !dddOutput.data) {
|
|
373
|
+
throw new Error('ECLI-P2-051: DDD model not available on context. ' +
|
|
374
|
+
'The ddd-generation stage must complete successfully before the DDD quality gate.');
|
|
375
|
+
}
|
|
376
|
+
const model = dddOutput.data;
|
|
377
|
+
// Optionally load ADRs for technology mismatch detection
|
|
378
|
+
const adrOutput = context.stageOutputs.get('adr-generation');
|
|
379
|
+
const adrs = (adrOutput?.status === 'completed' && adrOutput.data)
|
|
380
|
+
? adrOutput.data.records ?? []
|
|
381
|
+
: [];
|
|
382
|
+
const report = validateDDDQuality(model, adrs);
|
|
383
|
+
const elapsed = Date.now() - start;
|
|
384
|
+
if (!report.passed) {
|
|
385
|
+
console.error(` [QUALITY-GATE] DDD model FAILED (score: ${report.score}/100)`);
|
|
386
|
+
for (const issue of report.issues) {
|
|
387
|
+
console.error(` - ${issue}`);
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
stage: 'ddd-generation',
|
|
391
|
+
status: 'failed',
|
|
392
|
+
data: report,
|
|
393
|
+
artifacts: [],
|
|
394
|
+
timing: elapsed,
|
|
395
|
+
summary: `ECLI-P2-050: DDD model quality too low (score: ${report.score}/100, minimum: ${PASSING_SCORE}). ` +
|
|
396
|
+
`Issues: ${report.issues.join(' | ')}`,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
console.error(` [QUALITY-GATE] DDD model PASSED (score: ${report.score}/100)`);
|
|
400
|
+
console.error(` Contexts: ${report.totalContexts}, Aggregates: ${report.totalAggregates} ` +
|
|
401
|
+
`(${report.aggregatesWithTypedFields} typed), UL terms: ${report.ubiquitousLanguageTerms}`);
|
|
402
|
+
return {
|
|
403
|
+
stage: 'ddd-generation',
|
|
404
|
+
status: 'completed',
|
|
405
|
+
data: report,
|
|
406
|
+
artifacts: [],
|
|
407
|
+
timing: elapsed,
|
|
408
|
+
summary: `DDD quality gate passed (score: ${report.score}/100). ` +
|
|
409
|
+
`${report.totalContexts} contexts, ${report.totalAggregates} aggregates, ` +
|
|
410
|
+
`${report.ubiquitousLanguageTerms} UL terms validated.`,
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
//# sourceMappingURL=ddd-quality-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ddd-quality-gate.js","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/ddd-quality-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,0BAA0B,GAAsB;IACpD,kCAAkC;IAClC,8BAA8B;IAC9B,gDAAgD;IAChD,sCAAsC;IACtC,+CAA+C;CAChD,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAA2C,IAAI,GAAG,CAAC;IACtE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACtJ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,iBA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M,EAAE,WAAW;QACnB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,EAAE;QACb,MAAM,EAAE,OAAO;QACf,OAAO,EACL,mCAAmC,MAAM,CAAC,KAAK,SAAS;YACxD,GAAG,MAAM,CAAC,aAAa,cAAc,MAAM,CAAC,eAAe,eAAe;YAC1E,GAAG,MAAM,CAAC,uBAAuB,sBAAsB;KAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -23,18 +23,5 @@ import type { Phase2Context, Phase2StageOutput, Phase1Artifacts, ResearchDossier
|
|
|
23
23
|
* @returns A fully populated ResearchDossier
|
|
24
24
|
*/
|
|
25
25
|
export declare function buildResearchDossier(artifacts: Phase1Artifacts, traceId: string): ResearchDossier;
|
|
26
|
-
/**
|
|
27
|
-
* Generate the research dossier as Stage 2 of the Phase 2 pipeline.
|
|
28
|
-
*
|
|
29
|
-
* 1. Creates a telemetry span
|
|
30
|
-
* 2. Calls buildResearchDossier (pure extraction)
|
|
31
|
-
* 3. Validates against ResearchDossierSchema (warn-only)
|
|
32
|
-
* 4. Writes research-dossier.json to phase2Dir
|
|
33
|
-
* 5. Stores output on context.stageOutputs
|
|
34
|
-
* 6. Returns Phase2StageOutput
|
|
35
|
-
*
|
|
36
|
-
* @param context - Mutable Phase 2 pipeline context
|
|
37
|
-
* @returns Stage output with status, timing, and artifact paths
|
|
38
|
-
*/
|
|
39
26
|
export declare function generateResearchDossier(context: Phase2Context): Promise<Phase2StageOutput>;
|
|
40
27
|
//# sourceMappingURL=research-dossier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"research-dossier.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/research-dossier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,eAAe,EAOhB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"research-dossier.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/phase2/phases/research-dossier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,eAAe,EAOhB,MAAM,aAAa,CAAC;AAk5BrB;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,MAAM,GACd,eAAe,CAuDjB;AA8ND,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CA8J5B"}
|
|
@@ -15,6 +15,7 @@ import * as fs from 'node:fs';
|
|
|
15
15
|
import * as path from 'node:path';
|
|
16
16
|
import { ResearchDossierSchema } from '../schemas.js';
|
|
17
17
|
import { createSpan, endSpan, emitSpan } from '../telemetry.js';
|
|
18
|
+
import { createClaudeCodeRunner } from '../../../runtime/claude-code-runner.js';
|
|
18
19
|
// ============================================================================
|
|
19
20
|
// Constants
|
|
20
21
|
// ============================================================================
|
|
@@ -971,12 +972,124 @@ function renderDossierMarkdown(dossier) {
|
|
|
971
972
|
* @param context - Mutable Phase 2 pipeline context
|
|
972
973
|
* @returns Stage output with status, timing, and artifact paths
|
|
973
974
|
*/
|
|
975
|
+
// ============================================================================
|
|
976
|
+
// ADR-027: LLM-Powered Domain Research
|
|
977
|
+
//
|
|
978
|
+
// The mechanical dossier re-slices the user's query into labeled items.
|
|
979
|
+
// This function calls Claude to generate ACTUAL domain research: industry
|
|
980
|
+
// terminology, real API surfaces, regulatory frameworks, domain entities
|
|
981
|
+
// with typed attributes, and technology-specific integration patterns.
|
|
982
|
+
// ============================================================================
|
|
983
|
+
function enrichDossierWithLLM(dossier, query, phase1Dir = '') {
|
|
984
|
+
try {
|
|
985
|
+
const runner = createClaudeCodeRunner();
|
|
986
|
+
// Summarize what the mechanical extraction found
|
|
987
|
+
const existingItems = dossier.items.slice(0, 15)
|
|
988
|
+
.map(i => `- [${i.category}] ${i.title}`)
|
|
989
|
+
.join('\n');
|
|
990
|
+
// Load Phase 1 agent results if available (manifest tracks all 110 agents)
|
|
991
|
+
let agentContext = '';
|
|
992
|
+
try {
|
|
993
|
+
const manifestPath = path.join(phase1Dir, 'manifest.json');
|
|
994
|
+
if (phase1Dir && fs.existsSync(manifestPath)) {
|
|
995
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
996
|
+
if (manifest.agents_invoked && manifest.agents_invoked.length > 0) {
|
|
997
|
+
const successAgents = manifest.agents_invoked.filter(a => a.status === 'success' || a.status === '200');
|
|
998
|
+
const agentDomains = [...new Set(successAgents.map(a => a.domain))];
|
|
999
|
+
agentContext = `\nAGENTICS FLEET: ${successAgents.length} agents across ${agentDomains.length} domains completed analysis: ${agentDomains.slice(0, 15).join(', ')}.\n` +
|
|
1000
|
+
`These agents (copilot/planner, research-lab/hypothesis, connector-hub/erp-surface, etc.) have already analyzed this domain. Build on their findings.\n`;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
catch { /* non-fatal */ }
|
|
1005
|
+
const prompt = `You are a senior enterprise architect conducting deep domain research.\n` +
|
|
1006
|
+
`\nCLIENT REQUEST: ${query}\n` +
|
|
1007
|
+
(agentContext ? agentContext : '') +
|
|
1008
|
+
`\nMECHANICAL EXTRACTION (already found):\n${existingItems}\n` +
|
|
1009
|
+
`\nConduct REAL domain research and produce additional findings. You MUST include:\n` +
|
|
1010
|
+
`\n1. DOMAIN ENTITIES: Key business objects with their typed attributes (e.g., "TradePosition: instrument_id: string, quantity: number, mark_to_market: number, counterparty_id: string")\n` +
|
|
1011
|
+
`2. REAL API SURFACES: Actual API names for any mentioned systems (e.g., for SAP: API_BUSINESS_PARTNER, API_PRODUCT_SRV; for Salesforce: /services/data/vXX/sobjects). Do NOT fabricate — only name APIs you know exist.\n` +
|
|
1012
|
+
`3. REGULATORY FRAMEWORKS: Real regulations relevant to this domain (e.g., EMIR, MiFID II, SOX, HIPAA, GDPR — only those actually applicable)\n` +
|
|
1013
|
+
`4. DOMAIN ALGORITHMS: Key calculations and business rules (e.g., Value at Risk, demand forecasting, yield optimization — specific to this domain)\n` +
|
|
1014
|
+
`5. INTEGRATION PATTERNS: How the mentioned systems actually connect (batch vs real-time, event-driven, ETL, CDC)\n` +
|
|
1015
|
+
`6. KEY STAKEHOLDERS: Real roles in this domain (e.g., Chief Risk Officer, Floor Trader, Compliance Officer — not generic "Employees")\n` +
|
|
1016
|
+
`7. FAILURE MODES: Domain-specific risks (e.g., stale market data, position limit breaches, settlement failures)\n` +
|
|
1017
|
+
`\nReturn a JSON object:\n` +
|
|
1018
|
+
`{\n` +
|
|
1019
|
+
` "items": [\n` +
|
|
1020
|
+
` {\n` +
|
|
1021
|
+
` "category": "requirement|constraint|stakeholder|risk|recommendation|decision-rationale",\n` +
|
|
1022
|
+
` "title": "Short descriptive title",\n` +
|
|
1023
|
+
` "content": "Detailed domain-specific finding with real terminology",\n` +
|
|
1024
|
+
` "severity": "high|medium|low"\n` +
|
|
1025
|
+
` }\n` +
|
|
1026
|
+
` ]\n` +
|
|
1027
|
+
`}\n` +
|
|
1028
|
+
`\nCRITICAL: Include REAL domain knowledge from your training. Real API names, real regulatory frameworks, real industry terminology. This research drives all downstream code generation.`;
|
|
1029
|
+
const result = runner.invoke(prompt, {
|
|
1030
|
+
runId: `research-llm-${Date.now()}`,
|
|
1031
|
+
timeoutMs: 180_000,
|
|
1032
|
+
});
|
|
1033
|
+
const data = result.data;
|
|
1034
|
+
// Extract items from response (may be direct JSON or wrapped in content)
|
|
1035
|
+
let llmItems;
|
|
1036
|
+
if (Array.isArray(data.items)) {
|
|
1037
|
+
llmItems = data.items;
|
|
1038
|
+
}
|
|
1039
|
+
else if (typeof data.content === 'string') {
|
|
1040
|
+
try {
|
|
1041
|
+
const parsed = JSON.parse(data.content);
|
|
1042
|
+
if (Array.isArray(parsed.items))
|
|
1043
|
+
llmItems = parsed.items;
|
|
1044
|
+
}
|
|
1045
|
+
catch { /* not JSON */ }
|
|
1046
|
+
}
|
|
1047
|
+
if (!llmItems || llmItems.length === 0) {
|
|
1048
|
+
process.stderr.write('[research-dossier] LLM research: no items in response\n');
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
// Merge LLM items into dossier
|
|
1052
|
+
const validCategories = new Set([
|
|
1053
|
+
'requirement', 'constraint', 'stakeholder', 'success-criterion',
|
|
1054
|
+
'timeline', 'risk', 'recommendation', 'decision-rationale',
|
|
1055
|
+
]);
|
|
1056
|
+
let addedCount = 0;
|
|
1057
|
+
for (const item of llmItems) {
|
|
1058
|
+
const category = validCategories.has(item.category)
|
|
1059
|
+
? item.category
|
|
1060
|
+
: 'recommendation';
|
|
1061
|
+
const nextId = `RD-${String(dossier.items.length + 1).padStart(3, '0')}`;
|
|
1062
|
+
dossier.items.push({
|
|
1063
|
+
id: nextId,
|
|
1064
|
+
source: 'decision-memo', // LLM research attributed to decision-memo
|
|
1065
|
+
category,
|
|
1066
|
+
title: (item.title || '').slice(0, 200),
|
|
1067
|
+
content: (item.content || '').slice(0, 1000),
|
|
1068
|
+
severity: item.severity,
|
|
1069
|
+
});
|
|
1070
|
+
addedCount++;
|
|
1071
|
+
}
|
|
1072
|
+
// Rebuild summary
|
|
1073
|
+
dossier.summary = buildDossierSummary(dossier.items, dossier.crossReferences);
|
|
1074
|
+
process.stderr.write(`[research-dossier] LLM domain research: added ${addedCount} items in ${result.durationMs}ms\n`);
|
|
1075
|
+
}
|
|
1076
|
+
catch (err) {
|
|
1077
|
+
process.stderr.write(`[research-dossier] LLM research enrichment failed (using mechanical dossier): ${err instanceof Error ? err.message : String(err)}\n`);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
974
1080
|
export async function generateResearchDossier(context) {
|
|
975
1081
|
const span = createSpan('research-dossier', 'generate', { traceId: context.traceId });
|
|
976
1082
|
const startTime = Date.now();
|
|
977
1083
|
try {
|
|
978
|
-
//
|
|
1084
|
+
// Mechanical extraction from Phase 1 artifacts
|
|
979
1085
|
const dossier = buildResearchDossier(context.phase1Artifacts, context.traceId);
|
|
1086
|
+
// ADR-027: Enrich with LLM-generated domain research (real APIs, regulations, entities)
|
|
1087
|
+
const query = context.phase1Artifacts?.scenario?.query
|
|
1088
|
+
?? context.phase1Artifacts?.manifest?.['query']
|
|
1089
|
+
?? '';
|
|
1090
|
+
if (query) {
|
|
1091
|
+
enrichDossierWithLLM(dossier, query, context.phase1Dir);
|
|
1092
|
+
}
|
|
980
1093
|
// Incorporate agent results (research-lab, copilot, etc.) from pre-dispatch
|
|
981
1094
|
const runDir = path.dirname(context.phase2Dir);
|
|
982
1095
|
const agentReportPath = path.join(runDir, '.pre-phase2', 'agentics-agents-report.json');
|