sdd-agent-platform 0.4.2 → 0.5.1
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 +34 -41
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +56 -73
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +9 -64
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +17 -26
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +8 -7
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +8 -12
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +3 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +377 -411
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +18 -25
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +8 -26
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +6 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +4 -7
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +3 -13
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js +1 -9
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +9 -9
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +43 -180
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +7 -14
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +85 -86
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +2 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +31 -67
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +59 -85
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js +461 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +2 -12
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +32 -80
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +2 -5
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +27 -69
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +118 -34
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +8 -15
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.d.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +21 -21
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +11 -23
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +18 -20
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +16 -48
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +20 -28
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/router.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +13 -124
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +5 -7
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +15 -66
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +26 -36
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +0 -4
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +5 -51
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +7 -16
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +1 -4
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +10 -97
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +6 -8
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +85 -68
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +19 -26
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +3 -6
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +111 -263
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +1272 -1124
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +5 -5
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +1 -44
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +47 -170
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +73 -73
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.d.ts +167 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js +377 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +329 -314
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +53 -7
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +9 -12
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -48
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +1 -520
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +14 -14
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +111 -159
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.d.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js +521 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +21 -21
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +0 -18
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +5 -27
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +45 -45
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +9 -227
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +9 -50
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +4 -42
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +2 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +23 -63
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +43 -65
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +5 -2
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +238 -185
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +56 -73
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -227
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -278
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +301 -301
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +181 -181
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -240
- package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -99
- package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +314 -318
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +128 -123
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +265 -265
- package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -147
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +400 -432
- package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -30
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +304 -311
- package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -189
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -163
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -48
- package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -41
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -47
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -71
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -178
- package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -6
- package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -9
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +121 -116
- package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -183
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -26
- package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -58
- package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -14
- package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -90
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -127
- package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +104 -112
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +19 -27
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -84
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -251
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -330
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -107
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -300
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +628 -755
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -453
- package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -88
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +48 -48
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +195 -195
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +187 -235
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -305
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -106
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -453
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -226
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -143
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -437
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -102
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -271
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +111 -121
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -231
- package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +57 -65
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -175
- package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +80 -64
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +32 -68
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -174
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -373
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -29
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -146
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -47
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +255 -280
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/contracts.ts +179 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/kernel.ts +522 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -50
- package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +331 -394
- package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +243 -242
- package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +152 -153
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/phase9-lifecycle-graph.test.ts +103 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -222
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -160
- package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +426 -473
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +230 -146
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +142 -142
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +253 -253
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +302 -309
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -246
- package/node_modules/@sdd-agent-platform/core/src/registries/plan-scout-domains.ts +89 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -119
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +454 -445
- package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -37
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -135
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -132
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -144
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -42
- package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +98 -97
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -63
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -233
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +251 -263
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -205
- package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +327 -327
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +388 -390
- package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -154
- package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -33
- package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -100
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +356 -356
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +428 -665
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -73
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +189 -223
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +464 -453
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +124 -124
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -123
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +273 -279
- package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -170
- package/node_modules/@sdd-agent-platform/core/src/router.ts +5 -6
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +126 -240
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -27
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +172 -172
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -109
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +252 -253
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +80 -52
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +301 -352
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -118
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -416
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +198 -252
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -146
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +8 -9
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +60 -60
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +249 -256
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +139 -140
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +65 -66
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +249 -253
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +101 -96
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +314 -292
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.test.ts +380 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.ts +207 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -306
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -97
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -39
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +467 -523
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +738 -709
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -81
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/spec-manager-contracts.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +435 -450
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +316 -322
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2963 -2902
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5856 -5831
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -40
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -209
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +360 -360
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -511
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +651 -851
- package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +489 -681
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1981 -1981
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -232
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -307
- package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.test.ts +141 -0
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.ts +566 -0
- package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -193
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +413 -398
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +102 -56
- package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -72
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +9 -12
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +137 -137
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -84
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +455 -506
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.test.ts → task-evidence-judgment.test.ts} +261 -261
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.ts → task-evidence-judgment.ts} +619 -619
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1190 -1190
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -106
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -556
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +334 -334
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -112
- package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +190 -425
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +169 -507
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +136 -182
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +135 -174
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +153 -194
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +111 -115
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +95 -93
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -32
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +114 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +184 -224
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -158
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +969 -956
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +967 -992
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -712
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -130
- package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -269
- package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -150
- package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -15
- package/package.json +2 -2
- package/packages/cli/dist/args.js +2 -2
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/ai-tools.js +2 -13
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/{verifies.d.ts → artifact.d.ts} +1 -1
- package/packages/cli/dist/commands/artifact.js +168 -0
- package/packages/cli/dist/commands/artifact.js.map +1 -0
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/evidence.js.map +1 -0
- package/packages/cli/dist/commands/execution.js +127 -49
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/governance.js +1 -1
- package/packages/cli/dist/commands/governance.js.map +1 -1
- package/packages/cli/dist/commands/init.js +1 -6
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/instructions.d.ts +1 -1
- package/packages/cli/dist/commands/instructions.js +15 -1
- package/packages/cli/dist/commands/instructions.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +63 -40
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +13 -52
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +60 -0
- package/packages/cli/dist/commands/stage-close.js +270 -41
- package/packages/cli/dist/commands/stage-close.js.map +1 -1
- package/packages/cli/dist/commands/status.js +9 -68
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/dispatch.js +6 -26
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +153 -159
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +5 -0
- package/packages/cli/dist/renderers/artifacts.js +43 -0
- package/packages/cli/dist/renderers/artifacts.js.map +1 -0
- package/packages/cli/dist/renderers/doctor.js +1 -2
- package/packages/cli/dist/renderers/doctor.js.map +1 -1
- package/packages/cli/dist/renderers/execution.js +1 -1
- package/packages/cli/dist/renderers/execution.js.map +1 -1
- package/packages/cli/dist/renderers/json.d.ts +0 -1
- package/packages/cli/dist/renderers/json.js +0 -3
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +1 -2
- package/packages/cli/dist/renderers/registry-runtime.js +0 -20
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +1 -1
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +53 -0
- package/packages/cli/dist/renderers/workflow.js +93 -34
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +56 -73
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +9 -64
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +17 -26
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +8 -7
- package/packages/core/dist/config/init-project.js +8 -12
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +1 -1
- package/packages/core/dist/config/project-config.js +1 -1
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +3 -4
- package/packages/core/dist/config/starter-documents.js +377 -411
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/context/build-package.d.ts +1 -1
- package/packages/core/dist/context/build-package.js +18 -25
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +8 -26
- package/packages/core/dist/context/evidence-summary.js.map +1 -1
- package/packages/core/dist/context/log-worker.js +2 -2
- package/packages/core/dist/context/log-worker.js.map +1 -1
- package/packages/core/dist/context-offload/contracts.d.ts +1 -1
- package/packages/core/dist/contracts.d.ts +6 -1
- package/packages/core/dist/contracts.js +5 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +0 -3
- package/packages/core/dist/delegation/validation.d.ts +0 -3
- package/packages/core/dist/delegation/validation.js +4 -7
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +3 -13
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/local-run-index.js +1 -9
- package/packages/core/dist/doctor/checks/local-run-index.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +9 -9
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +1 -0
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +4 -4
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +24 -0
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +2 -2
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +43 -180
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +1 -1
- package/packages/core/dist/evidence/lookup.js +7 -14
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/coordination.js +110 -0
- package/packages/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/packages/core/dist/execution/background-executor.js +4 -4
- package/packages/core/dist/execution/background-executor.js.map +1 -1
- package/packages/core/dist/execution/foreground-subagents.js +3 -3
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
- package/packages/core/dist/execution/host-invocation.js +85 -86
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +2 -3
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.js +2 -2
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +31 -67
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +0 -1
- package/packages/core/dist/lifecycle/ship.js +59 -85
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/packages/core/dist/lifecycle-graph/contracts.js +7 -0
- package/packages/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/packages/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/packages/core/dist/lifecycle-graph/kernel.js +461 -0
- package/packages/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/packages/core/dist/lifecycle-graph.d.ts +2 -0
- package/packages/core/dist/lifecycle-graph.js +3 -0
- package/packages/core/dist/lifecycle-graph.js.map +1 -0
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +2 -12
- package/packages/core/dist/orchestration/runtime.js +32 -80
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +2 -5
- package/packages/core/dist/registries/agent-capability-catalog.js +27 -69
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +118 -34
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.js +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +8 -15
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/eval-learning-context.js +4 -4
- package/packages/core/dist/registries/eval-learning-context.js.map +1 -1
- package/packages/core/dist/registries/plan-scout-domains.d.ts +13 -0
- package/packages/core/dist/registries/plan-scout-domains.js +76 -0
- package/packages/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/packages/core/dist/registries/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/skill-capabilities.js +7 -7
- package/packages/core/dist/registries/skill-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +4 -4
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-plugins.js +2 -2
- package/packages/core/dist/registries/tool-plugins.js.map +1 -1
- package/packages/core/dist/registries/worker-adapters.js +11 -11
- package/packages/core/dist/registries/worker-adapters.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.d.ts +1 -1
- package/packages/core/dist/registries/workflow-gates.js +21 -21
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/consumer-diagnostics.js +2 -1
- package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -1
- package/packages/core/dist/risk/kernel.js +6 -6
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +11 -23
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
- package/packages/core/dist/risk/workflow-gates.js +18 -20
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +0 -2
- package/packages/core/dist/router/route-projection.js +1 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +16 -48
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.js +11 -1
- package/packages/core/dist/router/runtime-import.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +2 -2
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +2 -2
- package/packages/core/dist/router/stage-route-binding.js +20 -28
- package/packages/core/dist/router/stage-route-binding.js.map +1 -1
- package/packages/core/dist/router.d.ts +0 -1
- package/packages/core/dist/router.js +0 -1
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +6 -6
- package/packages/core/dist/run-state/artifacts.js +13 -124
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +2 -0
- package/packages/core/dist/run-state/inspect-run.js +5 -7
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +28 -28
- package/packages/core/dist/run-state/run-index.d.ts +3 -2
- package/packages/core/dist/run-state/run-index.js +15 -66
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +26 -36
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +0 -4
- package/packages/core/dist/run-state/task-evidence.js +5 -51
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state.d.ts +0 -1
- package/packages/core/dist/run-state.js +0 -1
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +1 -1
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +7 -16
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -2
- package/packages/core/dist/runtime-paths.d.ts +0 -1
- package/packages/core/dist/runtime-paths.js +1 -4
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +2 -2
- package/packages/core/dist/runtime-projection-p0.js +11 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -1
- package/packages/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +0 -2
- package/packages/core/dist/sdd-docs/document-hashes.js +10 -97
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +6 -8
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +5 -2
- package/packages/core/dist/sdd-docs/task-parser.js +85 -68
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-rendering.js +2 -2
- package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/packages/core/dist/spec-entry.js +40 -0
- package/packages/core/dist/spec-entry.js.map +1 -0
- package/packages/core/dist/spec-manager-contracts.d.ts +12 -0
- package/packages/core/dist/spec-manager-contracts.js +2 -0
- package/packages/core/dist/spec-manager-contracts.js.map +1 -0
- package/packages/core/dist/stage-artifacts.d.ts +2 -2
- package/packages/core/dist/stage-artifacts.js +19 -26
- package/packages/core/dist/stage-artifacts.js.map +1 -1
- package/packages/core/dist/stage-collaboration-contracts.d.ts +1 -1
- package/packages/core/dist/stage-collaboration-contracts.js +3 -6
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -1
- package/packages/core/dist/stage-collaboration.d.ts +111 -263
- package/packages/core/dist/stage-collaboration.js +1272 -1124
- package/packages/core/dist/stage-collaboration.js.map +1 -1
- package/packages/core/dist/stage-runtime/runtime.js +5 -5
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +1 -44
- package/packages/core/dist/status/project-status.js +47 -170
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.js +73 -73
- package/packages/core/dist/subagents/contracts.d.ts +1 -1
- package/packages/core/dist/subagents/runtime.js +7 -7
- package/packages/core/dist/subagents/runtime.js.map +1 -1
- package/packages/core/dist/sync-back/apply.d.ts +1 -0
- package/packages/core/dist/sync-back/apply.js +2 -0
- package/packages/core/dist/sync-back/apply.js.map +1 -0
- package/packages/core/dist/sync-back/inspect.d.ts +1 -0
- package/packages/core/dist/sync-back/inspect.js +2 -0
- package/packages/core/dist/sync-back/inspect.js.map +1 -0
- package/packages/core/dist/sync-back.d.ts +1 -0
- package/packages/core/dist/sync-back.js +2 -0
- package/packages/core/dist/sync-back.js.map +1 -0
- package/packages/core/dist/task-execution-contract.d.ts +167 -0
- package/packages/core/dist/task-execution-contract.js +377 -0
- package/packages/core/dist/task-execution-contract.js.map +1 -0
- package/packages/core/dist/test-support/fixtures.js +329 -314
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -0
- package/packages/core/dist/test-support/run-state.js +53 -7
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.js +9 -12
- package/packages/core/dist/truth-reconciliation.js.map +1 -1
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -48
- package/packages/core/dist/verification/goal-verify.js +1 -520
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +5 -5
- package/packages/core/dist/verification/rendering.js +14 -14
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.d.ts +1 -0
- package/packages/core/dist/verification/single-task-loop.js +111 -159
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/task-evidence-judgment.d.ts +49 -0
- package/packages/core/dist/verification/task-evidence-judgment.js +521 -0
- package/packages/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/packages/core/dist/verification/test-runtime.js +21 -21
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-wave.d.ts +0 -18
- package/packages/core/dist/verification/validation-wave.js +5 -27
- package/packages/core/dist/verification/validation-wave.js.map +1 -1
- package/packages/core/dist/verification/verify-contract.js +45 -45
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +3 -3
- package/packages/core/dist/verification.js +2 -2
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +9 -227
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +9 -50
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +4 -42
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +2 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +2 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.js +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +1 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +23 -63
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/resolve.d.ts +2 -2
- package/packages/core/dist/workflow-state/resolve.js +43 -65
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/package.json +5 -2
- package/tsconfig.build.json +6 -7
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +0 -269
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +0 -492
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +0 -383
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +0 -188
- package/packages/cli/dist/commands/lifecycle.d.ts +0 -6
- package/packages/cli/dist/commands/lifecycle.js +0 -125
- package/packages/cli/dist/commands/lifecycle.js.map +0 -1
- package/packages/cli/dist/commands/test.d.ts +0 -6
- package/packages/cli/dist/commands/test.js +0 -373
- package/packages/cli/dist/commands/test.js.map +0 -1
- package/packages/cli/dist/commands/verifies.js +0 -87
- package/packages/cli/dist/commands/verifies.js.map +0 -1
- package/packages/cli/dist/commands/verify.d.ts +0 -6
- package/packages/cli/dist/commands/verify.js +0 -330
- package/packages/cli/dist/commands/verify.js.map +0 -1
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
|
|
4
|
+
import { evaluatePlanArtifactDepth, evaluateSpecArtifactDepth, evaluateTasksArtifactDepth, formatArtifactDepthBlockingIssues } from './artifact-depth.js';
|
|
5
|
+
|
|
6
|
+
test('spec artifact depth reports missing evidence targets and unrouted ambiguity', () => {
|
|
7
|
+
const issues = evaluateSpecArtifactDepth(`---
|
|
8
|
+
contract: sdd-spec-doc-v3
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Thin Spec
|
|
12
|
+
|
|
13
|
+
## Problem Reframing / Intent Discovery
|
|
14
|
+
|
|
15
|
+
Surface request: change the report. Reframed problem: clarify the reporting contract. Inferred real intent: reduce downstream ambiguity.
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
| ID | Requirement | Priority | Source |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| REQ-1 | Add the report. | Must | user |
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria / Evidence Targets
|
|
24
|
+
|
|
25
|
+
| ID | Acceptance | Covers | Priority |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| AC-1 | It works. | REQ-1 | Must |
|
|
28
|
+
|
|
29
|
+
## Definitions / Rules
|
|
30
|
+
|
|
31
|
+
Domain rule: reporting scope is branch-local.
|
|
32
|
+
|
|
33
|
+
## Open Questions / Ambiguity Ledger
|
|
34
|
+
|
|
35
|
+
None.
|
|
36
|
+
|
|
37
|
+
## Close Quality Evidence
|
|
38
|
+
|
|
39
|
+
- downstream_business_guesswork_remaining: []
|
|
40
|
+
`);
|
|
41
|
+
|
|
42
|
+
assert.deepEqual(issues.map((issue) => issue.code).sort(), [
|
|
43
|
+
'spec.ambiguity.unrouted',
|
|
44
|
+
'spec.too_thin.acceptance_evidence_missing'
|
|
45
|
+
]);
|
|
46
|
+
assert.deepEqual(issues.map((issue) => [issue.code, issue.severity]).sort(), [
|
|
47
|
+
['spec.ambiguity.unrouted', 'warning'],
|
|
48
|
+
['spec.too_thin.acceptance_evidence_missing', 'warning']
|
|
49
|
+
]);
|
|
50
|
+
assert.deepEqual(formatArtifactDepthBlockingIssues(issues), []);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('plan artifact depth treats implementation-decided API and SQL as blocker', () => {
|
|
54
|
+
const issues = evaluatePlanArtifactDepth(`---
|
|
55
|
+
contract: sdd-plan-doc-v3
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
# Thin Plan
|
|
59
|
+
|
|
60
|
+
## Current Implementation Map
|
|
61
|
+
|
|
62
|
+
Observed \`ReportController\` and \`ReportMapper.xml\`; therefore the design must reuse existing controller ownership and mapper conventions.
|
|
63
|
+
|
|
64
|
+
## Interface / API / Schema Design
|
|
65
|
+
|
|
66
|
+
The API and SQL will be finalized during implementation. It uses SQL table joins and source fields.
|
|
67
|
+
|
|
68
|
+
## State / Data / Concurrency Design
|
|
69
|
+
|
|
70
|
+
The database query reads report tables and aggregates rows.
|
|
71
|
+
|
|
72
|
+
## Risk Controls
|
|
73
|
+
|
|
74
|
+
Risk: wrong aggregation. Control: validation hook in scenario tests.
|
|
75
|
+
|
|
76
|
+
## Validation Strategy
|
|
77
|
+
|
|
78
|
+
Scenario: query report. Input data: seeded rows. Expected SQL result: exact grouped rows. Command / evidence: integration test. Proves aggregation. Does not prove UI styling.
|
|
79
|
+
|
|
80
|
+
## Plan Close Quality Evidence
|
|
81
|
+
|
|
82
|
+
- downstream_design_guesswork_remaining: []
|
|
83
|
+
`);
|
|
84
|
+
|
|
85
|
+
assert.deepEqual(issues.map((issue) => issue.code).sort(), [
|
|
86
|
+
'plan.downstream_guesswork.tasks_or_execute_would_redesign',
|
|
87
|
+
'plan.too_thin.api_shape_not_decided',
|
|
88
|
+
'plan.too_thin.sql_mapping_missing_join_keys'
|
|
89
|
+
]);
|
|
90
|
+
assert.deepEqual(issues.map((issue) => [issue.code, issue.severity]).sort(), [
|
|
91
|
+
['plan.downstream_guesswork.tasks_or_execute_would_redesign', 'blocker'],
|
|
92
|
+
['plan.too_thin.api_shape_not_decided', 'warning'],
|
|
93
|
+
['plan.too_thin.sql_mapping_missing_join_keys', 'warning']
|
|
94
|
+
]);
|
|
95
|
+
assert.equal(formatArtifactDepthBlockingIssues(issues).length, 1);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test('plan artifact depth keeps thin but decided mapping as warning-only diagnostics', () => {
|
|
99
|
+
const issues = evaluatePlanArtifactDepth(`---
|
|
100
|
+
contract: sdd-plan-doc-v3
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
# Warning Plan
|
|
104
|
+
|
|
105
|
+
## Current Implementation Map
|
|
106
|
+
|
|
107
|
+
Observed 'ReportController' and 'ReportMapper.xml'; therefore the design reuses existing controller ownership and mapper conventions.
|
|
108
|
+
|
|
109
|
+
## Interface / API / Schema Design
|
|
110
|
+
|
|
111
|
+
The endpoint returns report rows from the existing mapper. SQL uses report joins and source fields selected by the accepted plan.
|
|
112
|
+
|
|
113
|
+
## State / Data / Concurrency Design
|
|
114
|
+
|
|
115
|
+
The database query reads report tables and aggregates rows.
|
|
116
|
+
|
|
117
|
+
## Risk Controls
|
|
118
|
+
|
|
119
|
+
Risk: wrong aggregation. Control: validation hook in scenario tests.
|
|
120
|
+
|
|
121
|
+
## Validation Strategy
|
|
122
|
+
|
|
123
|
+
Scenario: query report. Input data: seeded rows. Expected SQL result: exact grouped rows. Command / evidence: integration test. Proves aggregation. Does not prove UI styling.
|
|
124
|
+
|
|
125
|
+
## Plan Close Quality Evidence
|
|
126
|
+
|
|
127
|
+
- downstream_design_guesswork_remaining: []
|
|
128
|
+
`);
|
|
129
|
+
|
|
130
|
+
assert.deepEqual(issues.map((issue) => [issue.code, issue.severity]).sort(), [
|
|
131
|
+
['plan.too_thin.api_shape_not_decided', 'warning'],
|
|
132
|
+
['plan.too_thin.sql_mapping_missing_join_keys', 'warning']
|
|
133
|
+
]);
|
|
134
|
+
assert.deepEqual(formatArtifactDepthBlockingIssues(issues), []);
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
test('tasks artifact depth reports missing failure route and leaked execute guesswork', () => {
|
|
138
|
+
const issues = evaluateTasksArtifactDepth(`---
|
|
139
|
+
contract: sdd-tasks-doc-v2
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
# Thin Tasks
|
|
143
|
+
|
|
144
|
+
## Split Basis
|
|
145
|
+
|
|
146
|
+
Split from plan decisions into implementation and validation tasks.
|
|
147
|
+
|
|
148
|
+
## Implementation Tasks
|
|
149
|
+
|
|
150
|
+
### T1 — Implement report
|
|
151
|
+
|
|
152
|
+
Why this task exists: implements PLAN-1 and execute must not reinterpret scope.
|
|
153
|
+
|
|
154
|
+
Implementation will determine the final SQL join and response fields.
|
|
155
|
+
|
|
156
|
+
\`\`\`sdd-task
|
|
157
|
+
id: T1
|
|
158
|
+
status: pending
|
|
159
|
+
taskClass: implementation
|
|
160
|
+
unitType: core
|
|
161
|
+
wave: 1
|
|
162
|
+
validationHandoff:
|
|
163
|
+
- T2
|
|
164
|
+
\`\`\`
|
|
165
|
+
|
|
166
|
+
## Validation Tasks
|
|
167
|
+
|
|
168
|
+
### T2 — Validate report
|
|
169
|
+
|
|
170
|
+
Expected result: report rows match the accepted plan.
|
|
171
|
+
|
|
172
|
+
\`\`\`sdd-task
|
|
173
|
+
id: T2
|
|
174
|
+
status: pending
|
|
175
|
+
taskClass: validation
|
|
176
|
+
unitType: validation
|
|
177
|
+
wave: 2
|
|
178
|
+
validatesImplementationTasks:
|
|
179
|
+
- T1
|
|
180
|
+
\`\`\`
|
|
181
|
+
|
|
182
|
+
## Task Dependencies and Handoff
|
|
183
|
+
|
|
184
|
+
T2 depends on T1.
|
|
185
|
+
|
|
186
|
+
## Open Execution Questions
|
|
187
|
+
|
|
188
|
+
None.
|
|
189
|
+
|
|
190
|
+
## Tasks Close Quality Evidence
|
|
191
|
+
|
|
192
|
+
- downstream_execution_guesswork_remaining: []
|
|
193
|
+
`);
|
|
194
|
+
|
|
195
|
+
assert.deepEqual(issues.map((issue) => issue.code).sort(), [
|
|
196
|
+
'tasks.failure_route.missing',
|
|
197
|
+
'tasks.plan_repair.design_guesswork_leaked_to_execute'
|
|
198
|
+
]);
|
|
199
|
+
assert.deepEqual(issues.map((issue) => [issue.code, issue.severity]).sort(), [
|
|
200
|
+
['tasks.failure_route.missing', 'blocker'],
|
|
201
|
+
['tasks.plan_repair.design_guesswork_leaked_to_execute', 'blocker']
|
|
202
|
+
]);
|
|
203
|
+
assert.deepEqual(formatArtifactDepthBlockingIssues(issues).map((item) => item.replace(/:.*/, '')), ['blocker', 'blocker']);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
test('tasks artifact depth accepts oversized slice when tasks-manager records keep-together decision', () => {
|
|
207
|
+
const issues = evaluateTasksArtifactDepth(`---
|
|
208
|
+
contract: sdd-tasks-doc-v2
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
# Reviewed Tasks
|
|
212
|
+
|
|
213
|
+
## Split Basis
|
|
214
|
+
|
|
215
|
+
Tasks-manager reviewed the split decision: keep together as one backend/runtime rollback unit because Controller, Service, Mapper, DTO, VO, XML, and SQL must be reverted together. Internal order: controller route, service read model, mapper XML, SQL filters, DTO/VO wiring.
|
|
216
|
+
|
|
217
|
+
## Implementation Tasks
|
|
218
|
+
|
|
219
|
+
### T1 — Implement report read model
|
|
220
|
+
|
|
221
|
+
Why this task exists: implements PLAN-1. Work-unit context: the backend/runtime rollback unit must stay together. Plan decision: preserve existing controller ownership. Risk: execute must not reinterpret SQL ownership.
|
|
222
|
+
|
|
223
|
+
Change Controller, Service, Mapper, DTO, VO, mapper XML, SQL, JSP, and UI configuration in one task. Affected surfaces: ReportController, ReportService, ReportMapper, ReportDTO, ReportVO, mapper XML, permission SQL, JSP, and UI route.
|
|
224
|
+
|
|
225
|
+
\`\`\`sdd-task
|
|
226
|
+
id: T1
|
|
227
|
+
status: pending
|
|
228
|
+
taskClass: implementation
|
|
229
|
+
unitType: core
|
|
230
|
+
wave: 1
|
|
231
|
+
validationHandoff:
|
|
232
|
+
- T2
|
|
233
|
+
\`\`\`
|
|
234
|
+
|
|
235
|
+
## Validation Tasks
|
|
236
|
+
|
|
237
|
+
### T2 — Validate report read model
|
|
238
|
+
|
|
239
|
+
Expected result: report rows match the accepted plan. Evidence is enough when SQL/API review proves the read model; does not prove release readiness.
|
|
240
|
+
|
|
241
|
+
\`\`\`sdd-task
|
|
242
|
+
id: T2
|
|
243
|
+
status: pending
|
|
244
|
+
taskClass: validation
|
|
245
|
+
unitType: validation
|
|
246
|
+
wave: 2
|
|
247
|
+
validatesImplementationTasks:
|
|
248
|
+
- T1
|
|
249
|
+
\`\`\`
|
|
250
|
+
|
|
251
|
+
## Task Dependencies and Handoff
|
|
252
|
+
|
|
253
|
+
T2 depends on T1.
|
|
254
|
+
|
|
255
|
+
## Open Execution Questions
|
|
256
|
+
|
|
257
|
+
No blocking execution questions. Failure route: tasks repair, plan repair, spec/user decision, or environment diagnostic.
|
|
258
|
+
|
|
259
|
+
## Tasks Close Quality Evidence
|
|
260
|
+
|
|
261
|
+
- downstream_execution_guesswork_remaining: []
|
|
262
|
+
`);
|
|
263
|
+
|
|
264
|
+
assert.equal(issues.some((issue) => issue.code === 'tasks.review.split_adjudication_missing'), false);
|
|
265
|
+
assert.deepEqual(formatArtifactDepthBlockingIssues(issues), []);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
test('artifact depth keeps advisory and warning diagnostics out of blocking formatter', () => {
|
|
269
|
+
const specIssues = evaluateSpecArtifactDepth(`---
|
|
270
|
+
contract: sdd-spec-doc-v3
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
# Advisory Spec
|
|
274
|
+
|
|
275
|
+
## Problem Reframing / Intent Discovery
|
|
276
|
+
|
|
277
|
+
Surface request only.
|
|
278
|
+
|
|
279
|
+
## Requirements
|
|
280
|
+
|
|
281
|
+
| ID | Requirement | Priority | Source |
|
|
282
|
+
|---|---|---|---|
|
|
283
|
+
| REQ-1 | Add the report because the branch scope requires it. | Must | user |
|
|
284
|
+
|
|
285
|
+
## Acceptance Criteria / Evidence Targets
|
|
286
|
+
|
|
287
|
+
| ID | Acceptance | Covers | Evidence Target |
|
|
288
|
+
|---|---|---|---|
|
|
289
|
+
| AC-1 | Report returns branch-local rows. | REQ-1 | API test evidence target. |
|
|
290
|
+
|
|
291
|
+
## Definitions / Rules
|
|
292
|
+
|
|
293
|
+
Domain rule: branch-local report scope is invariant.
|
|
294
|
+
|
|
295
|
+
## Open Questions / Ambiguity Ledger
|
|
296
|
+
|
|
297
|
+
No blocking user decisions. Researchable gaps: none. Safe assumptions: none. Deferred: none.
|
|
298
|
+
|
|
299
|
+
## Close Quality Evidence
|
|
300
|
+
|
|
301
|
+
- downstream_business_guesswork_remaining: []
|
|
302
|
+
`);
|
|
303
|
+
|
|
304
|
+
assert.deepEqual(specIssues.map((issue) => [issue.code, issue.severity]).sort(), [
|
|
305
|
+
['spec.too_thin.problem_reframing_missing', 'advisory']
|
|
306
|
+
]);
|
|
307
|
+
assert.deepEqual(formatArtifactDepthBlockingIssues(specIssues), []);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
test('artifact depth treats explicit downstream guesswork as blocker across stages', () => {
|
|
311
|
+
const specBlockers = evaluateSpecArtifactDepth(`---
|
|
312
|
+
contract: sdd-spec-doc-v3
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
# Blocked Spec
|
|
316
|
+
|
|
317
|
+
## Problem Reframing / Intent Discovery
|
|
318
|
+
|
|
319
|
+
Surface request: change report. Reframed problem: clarify report semantics. Inferred real intent: avoid ambiguity.
|
|
320
|
+
|
|
321
|
+
## Requirements
|
|
322
|
+
|
|
323
|
+
| ID | Requirement | Priority | Source |
|
|
324
|
+
|---|---|---|---|
|
|
325
|
+
| REQ-1 | Add report because branch scope requires it. | Must | user |
|
|
326
|
+
|
|
327
|
+
## Acceptance Criteria / Evidence Targets
|
|
328
|
+
|
|
329
|
+
| ID | Acceptance | Covers | Evidence Target |
|
|
330
|
+
|---|---|---|---|
|
|
331
|
+
| AC-1 | Report returns branch-local rows. | REQ-1 | API evidence target. |
|
|
332
|
+
|
|
333
|
+
## Definitions / Rules
|
|
334
|
+
|
|
335
|
+
Domain rule: branch-local report scope is invariant.
|
|
336
|
+
|
|
337
|
+
## Open Questions / Ambiguity Ledger
|
|
338
|
+
|
|
339
|
+
No blocking user decisions. Researchable gaps: none. Safe assumptions: none. Deferred: none.
|
|
340
|
+
|
|
341
|
+
## Close Quality Evidence
|
|
342
|
+
|
|
343
|
+
- downstream_business_guesswork_remaining: [\"report ownership undecided\"]
|
|
344
|
+
`);
|
|
345
|
+
const planBlockers = evaluatePlanArtifactDepth(`---
|
|
346
|
+
contract: sdd-plan-doc-v3
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
# Blocked Plan
|
|
350
|
+
|
|
351
|
+
## Current Implementation Map
|
|
352
|
+
|
|
353
|
+
Observed 'ReportController' and 'ReportMapper.xml'; therefore the design reuses existing ownership and mapper conventions.
|
|
354
|
+
|
|
355
|
+
## Interface / API / Schema Design
|
|
356
|
+
|
|
357
|
+
Request field 'branchId'; response DTO 'ReportRowVO'; mapper field 'report.branch_id'; status field 'report.status'. No SQL table ownership changes.
|
|
358
|
+
|
|
359
|
+
## State / Data / Concurrency Design
|
|
360
|
+
|
|
361
|
+
Runtime reads 'report.branch_id', 'report.status', 'report.created_at', 'report.asset_id', and 'report.amount'; rollback is not applicable because this is read-only.
|
|
362
|
+
|
|
363
|
+
## Risk Controls
|
|
364
|
+
|
|
365
|
+
Risk: wrong branch filter. Control: scenario validation checks SQL evidence.
|
|
366
|
+
|
|
367
|
+
## Validation Strategy
|
|
368
|
+
|
|
369
|
+
Scenario: query report. Input data: branch rows. Expected SQL result: exact rows. Command evidence: integration test. Proves branch filter. Does not prove UI styling.
|
|
370
|
+
|
|
371
|
+
## Plan Close Quality Evidence
|
|
372
|
+
|
|
373
|
+
- downstream_design_guesswork_remaining: [\"SQL grouping undecided\"]
|
|
374
|
+
`);
|
|
375
|
+
|
|
376
|
+
assert.equal(specBlockers.find((issue) => issue.code === 'spec.downstream_guesswork.plan_would_rediscover_requirements')?.severity, 'blocker');
|
|
377
|
+
assert.equal(planBlockers.find((issue) => issue.code === 'plan.downstream_guesswork.tasks_or_execute_would_redesign')?.severity, 'blocker');
|
|
378
|
+
assert.equal(formatArtifactDepthBlockingIssues(specBlockers).length, 1);
|
|
379
|
+
assert.equal(formatArtifactDepthBlockingIssues(planBlockers).length, 1);
|
|
380
|
+
});
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
export type ArtifactDepthStage = 'spec' | 'plan' | 'tasks';
|
|
2
|
+
export type ArtifactDepthIssueSeverity = 'blocker' | 'warning' | 'advisory';
|
|
3
|
+
|
|
4
|
+
export interface ArtifactDepthIssue {
|
|
5
|
+
stage: ArtifactDepthStage;
|
|
6
|
+
severity: ArtifactDepthIssueSeverity;
|
|
7
|
+
code: string;
|
|
8
|
+
message: string;
|
|
9
|
+
repair: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function evaluateSpecArtifactDepth(content: string): ArtifactDepthIssue[] {
|
|
13
|
+
const problem = extractMarkdownSection(content, 'Problem Reframing / Intent Discovery') ?? '';
|
|
14
|
+
const requirements = extractMarkdownSection(content, 'Requirements') ?? '';
|
|
15
|
+
const acceptance = extractMarkdownSection(content, 'Acceptance Criteria / Evidence Targets') ?? '';
|
|
16
|
+
const definitions = extractMarkdownSection(content, 'Definitions / Rules') ?? '';
|
|
17
|
+
const ambiguity = extractMarkdownSection(content, 'Open Questions / Ambiguity Ledger') ?? '';
|
|
18
|
+
const closeEvidence = extractMarkdownSection(content, 'Close Quality Evidence') ?? '';
|
|
19
|
+
const issues: ArtifactDepthIssue[] = [];
|
|
20
|
+
|
|
21
|
+
if (!/surface request/i.test(problem) || !/reframed problem/i.test(problem) || !/inferred real intent|real intent/i.test(problem)) {
|
|
22
|
+
issues.push(issue('spec', 'spec.too_thin.problem_reframing_missing', 'spec lacks problem reframing depth', 'Rewrite Problem Reframing / Intent Discovery with surface request, reframed problem, inferred intent, and observable success.', 'advisory'));
|
|
23
|
+
}
|
|
24
|
+
if (!/\bREQ-\d+\b/i.test(requirements) || !/reasoning|basis|source|constraint|because|why|rule|invariant|domain/i.test(`${requirements}\n${definitions}`)) {
|
|
25
|
+
issues.push(issue('spec', 'spec.too_thin.domain_rules_missing', 'spec requirements are not tied to domain rules or scope boundaries', 'Add requirement reasoning, source basis, domain rules, invariants, and scope boundaries before plan.', 'advisory'));
|
|
26
|
+
}
|
|
27
|
+
if (!/\bAC-\d+\b/i.test(acceptance) || !/evidence target/i.test(acceptance) || !/REQ-\d+/i.test(acceptance)) {
|
|
28
|
+
issues.push(issue('spec', 'spec.too_thin.acceptance_evidence_missing', 'spec acceptance criteria lack evidence targets tied to requirements', 'Add evidence targets for each core acceptance criterion and map them to requirement IDs.', 'warning'));
|
|
29
|
+
}
|
|
30
|
+
if (!/blocking user decisions?|blocking before plan|no blocking/i.test(ambiguity) || !/researchable|resolved by scout|scout|safe assumptions?|assumptions?|deferred/i.test(ambiguity)) {
|
|
31
|
+
issues.push(issue('spec', 'spec.ambiguity.unrouted', 'spec ambiguity is not explicitly routed', 'Classify uncertainty into researchable gaps, blocking user decisions, assumptions, and deferred items.', 'warning'));
|
|
32
|
+
}
|
|
33
|
+
if (closeEvidence && !/downstream_business_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
34
|
+
issues.push(issue('spec', 'spec.downstream_guesswork.plan_would_rediscover_requirements', 'spec leaves downstream business guesswork for plan', 'Either resolve business guesswork in spec or route it as a blocking user decision before close.', 'blocker'));
|
|
35
|
+
}
|
|
36
|
+
return issues;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function evaluatePlanArtifactDepth(content: string): ArtifactDepthIssue[] {
|
|
40
|
+
const implementationMap = extractMarkdownSection(content, 'Current Implementation Map') ?? '';
|
|
41
|
+
const interfaceDesign = extractMarkdownSection(content, 'Interface / API / Schema Design') ?? '';
|
|
42
|
+
const stateDesign = extractMarkdownSection(content, 'State / Data / Concurrency Design') ?? '';
|
|
43
|
+
const validationStrategy = extractMarkdownSection(content, 'Validation Strategy') ?? '';
|
|
44
|
+
const riskControls = extractMarkdownSection(content, 'Risk Controls') ?? '';
|
|
45
|
+
const closeEvidence = extractMarkdownSection(content, 'Plan Close Quality Evidence') ?? '';
|
|
46
|
+
const issues: ArtifactDepthIssue[] = [];
|
|
47
|
+
|
|
48
|
+
if (!hasConcreteImplementationSurface(implementationMap)) {
|
|
49
|
+
issues.push(issue('plan', 'plan.too_thin.current_implementation_facts_not_reasoned', 'plan lacks reasoned current implementation facts', 'Connect observed files/classes/data facts to design implications, ownership, reuse/change/do-not-reuse decisions, or scout gaps.', 'advisory'));
|
|
50
|
+
}
|
|
51
|
+
if (!hasApiShape(interfaceDesign)) {
|
|
52
|
+
issues.push(issue('plan', 'plan.too_thin.api_shape_not_decided', 'plan API/interface shape is undecided', 'Specify request/query fields, response DTO/VO shape, error behavior, pagination, and owner surface where applicable.', 'warning'));
|
|
53
|
+
}
|
|
54
|
+
if (!hasSqlOrDataMappingDepth(interfaceDesign, stateDesign)) {
|
|
55
|
+
issues.push(issue('plan', 'plan.too_thin.sql_mapping_missing_join_keys', 'plan SQL/data mapping lacks executable depth', 'Name source fields, join keys, grouping/distinct rules, mapper ownership, date/status filters, or justify non-applicability.', 'warning'));
|
|
56
|
+
}
|
|
57
|
+
if (!hasScenarioValidationMatrix(validationStrategy, riskControls)) {
|
|
58
|
+
issues.push(issue('plan', 'plan.too_thin.validation_not_scenario_level', 'plan validation is not scenario-level', 'Add scenario rows with input/user action, expected API/UI/SQL result, evidence command/manual check, proves, and does-not-prove.', 'warning'));
|
|
59
|
+
}
|
|
60
|
+
if (looksDenseButShallow(implementationMap, interfaceDesign, riskControls)) {
|
|
61
|
+
issues.push(issue('plan', 'plan.dense_but_shallow.code_facts_not_connected_to_decisions', 'plan is dense but code/data facts are not connected to decisions', 'For each important fact, state the design implication, selected decision, rejected alternative, and risk control.', 'warning'));
|
|
62
|
+
}
|
|
63
|
+
if (leaksDesignDecisionToImplementation(interfaceDesign, stateDesign)) {
|
|
64
|
+
issues.push(issue('plan', 'plan.downstream_guesswork.tasks_or_execute_would_redesign', 'plan leaks design decisions to implementation', 'Resolve API/SQL/data decisions in plan before tasks or execute consume the design.', 'blocker'));
|
|
65
|
+
}
|
|
66
|
+
if (closeEvidence && !/downstream_design_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
67
|
+
issues.push(issue('plan', 'plan.downstream_guesswork.tasks_or_execute_would_redesign', 'plan leaves design guesswork for tasks or execute', 'Resolve or explicitly route design guesswork before tasks consume the plan.', 'blocker'));
|
|
68
|
+
}
|
|
69
|
+
return issues;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function evaluateTasksArtifactDepth(content: string): ArtifactDepthIssue[] {
|
|
73
|
+
const splitBasis = extractMarkdownSection(content, ['Split Basis', 'Task Split Basis', 'Work Unit Split Basis']) ?? '';
|
|
74
|
+
const implementationTasks = extractMarkdownSection(content, ['Implementation Tasks', 'Implementation Work Units', 'Implementation Task Units']) ?? '';
|
|
75
|
+
const validationTasks = extractMarkdownSection(content, ['Validation Tasks', 'Validation Work Units', 'Validation Task Units']) ?? '';
|
|
76
|
+
const dependencies = extractMarkdownSection(content, ['Task Dependencies and Handoff', 'Dependencies and Validation Handoff', 'Task Dependency and Validation Handoff']) ?? '';
|
|
77
|
+
const openQuestions = extractMarkdownSection(content, ['Open Execution Questions', 'Open Questions', 'Execution Questions']) ?? '';
|
|
78
|
+
const closeEvidence = extractMarkdownSection(content, ['Tasks Close Quality Evidence', 'Close Quality Evidence']) ?? '';
|
|
79
|
+
const issues: ArtifactDepthIssue[] = [];
|
|
80
|
+
|
|
81
|
+
if (!/why this task exists|work-unit context|plan decision|design part|must not reinterpret|risk/i.test(implementationTasks)) {
|
|
82
|
+
issues.push(issue('tasks', 'tasks.too_thin.work_unit_context_missing', 'implementation tasks lack work-unit context', 'Explain which plan decision each task implements, why the boundary exists, and what execute must not reinterpret.', 'warning'));
|
|
83
|
+
}
|
|
84
|
+
if (!/validationHandoff\s*:/i.test(implementationTasks)) {
|
|
85
|
+
issues.push(issue('tasks', 'tasks.parser.missing_validation_handoff', 'implementation tasks lack validation handoff metadata', 'Add validationHandoff metadata from each implementation task to later validation task IDs.', 'blocker'));
|
|
86
|
+
}
|
|
87
|
+
if (!/validatesImplementationTasks\s*:/i.test(validationTasks) && !/validates_implementation_tasks\s*:/i.test(validationTasks)) {
|
|
88
|
+
issues.push(issue('tasks', 'tasks.parser.missing_validates_implementation_tasks', 'validation tasks lack implementation task refs', 'Add validatesImplementationTasks metadata to each validation task.', 'blocker'));
|
|
89
|
+
}
|
|
90
|
+
if (!/expected result|pass criteria|evidence is enough|does not prove|acceptance checks|manual inspection|test/i.test(validationTasks)) {
|
|
91
|
+
issues.push(issue('tasks', 'tasks.validation.expected_result_missing', 'validation tasks lack expected results', 'Add expected result, sufficient evidence, and does-not-prove notes for validation tasks.', 'warning'));
|
|
92
|
+
}
|
|
93
|
+
if (!/failure routing|failure route|return to|plan repair|spec\/user decision|environment diagnostic|tasks repair/i.test(`${validationTasks}\n${openQuestions}`)) {
|
|
94
|
+
issues.push(issue('tasks', 'tasks.failure_route.missing', 'tasks lack failure routes', 'Add failure routes to implementation task, tasks repair, plan repair, spec/user decision, or environment diagnostic.', 'blocker'));
|
|
95
|
+
}
|
|
96
|
+
if (isOversizedExecutionSlice(implementationTasks) && !hasExecutionSliceDecision(`${splitBasis}\n${implementationTasks}\n${dependencies}`)) {
|
|
97
|
+
issues.push(issue('tasks', 'tasks.review.split_adjudication_missing', 'tasks contain a broad execution slice without recorded tasks-stage split adjudication', 'Have task-reviewer flag the slice and tasks-manager either split it or record why the rollback unit stays together with an internal execution order before close.', 'warning'));
|
|
98
|
+
}
|
|
99
|
+
if (/rollback unit/i.test(implementationTasks) && /parallel/i.test(dependencies) && !/rollback boundary|reverted together|shared rollback|separate rollback|rollback units? stay separate|rollback-separated/i.test(dependencies)) {
|
|
100
|
+
issues.push(issue('tasks', 'tasks.boundary.rollback_unit_torn', 'tasks parallelism may tear rollback units', 'Explain rollback boundaries and why parallel tasks do not modify the same rollback unit unsafely.', 'blocker'));
|
|
101
|
+
}
|
|
102
|
+
if (/execute (?:will|should|must) decide|decide in execute|tbd in execute|implementation will determine|finalize during execute|确定|待实现时确定/i.test(`${implementationTasks}\n${openQuestions}`)) {
|
|
103
|
+
issues.push(issue('tasks', 'tasks.plan_repair.design_guesswork_leaked_to_execute', 'tasks leak design guesswork into execute', 'Route unresolved SQL/API/data design decisions back to plan before execute.', 'blocker'));
|
|
104
|
+
}
|
|
105
|
+
if (closeEvidence && !/downstream_execution_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
106
|
+
issues.push(issue('tasks', 'tasks.plan_repair.design_guesswork_leaked_to_execute', 'tasks leave execution guesswork unresolved', 'Resolve execution guesswork in tasks or route it to tasks/plan/spec repair before close.', 'blocker'));
|
|
107
|
+
}
|
|
108
|
+
return issues;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function formatArtifactDepthIssues(issues: ArtifactDepthIssue[]): string[] {
|
|
112
|
+
return issues.map((item) => `${item.severity}:${item.code}: ${item.message}. ${item.repair}`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function formatArtifactDepthBlockingIssues(issues: ArtifactDepthIssue[]): string[] {
|
|
116
|
+
return formatArtifactDepthIssues(issues.filter((item) => item.severity === 'blocker'));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function issue(stage: ArtifactDepthStage, code: string, message: string, repair: string, severity: ArtifactDepthIssueSeverity = 'warning'): ArtifactDepthIssue {
|
|
120
|
+
return { stage, severity, code, message, repair };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function hasConcreteImplementationSurface(section: string): boolean {
|
|
124
|
+
if (/scout gap|needs scout|unresolved gap|not applicable|no existing surface/i.test(section)) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
const namedSurfaces = section.match(/\b[A-Z][A-Za-z0-9_]*(?:Controller|Service|ServiceImpl|Mapper|Repository|Entity|DTO|VO|Request|Response|Component|Page|Config|Test)\b/g) ?? [];
|
|
128
|
+
const fileRefs = section.match(/`[^`]+\.(?:ts|tsx|js|jsx|java|kt|go|py|rs|xml|sql|jsp|vue|md)`/g) ?? [];
|
|
129
|
+
return namedSurfaces.length + fileRefs.length >= 2 && /reuse|change|do-not-reuse|do not reuse|owner|ownership|convention|boundary|surface|implication|decision|because|therefore/i.test(section);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function hasApiShape(section: string): boolean {
|
|
133
|
+
if (/not applicable|no interface|no api|no schema/i.test(section) && /because|checked|reason/i.test(section)) {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
if (/TypeScript function contract|runtime-store projection schema|projection schema|function contract/i.test(section) && /field|schema|ref|hash|status|owner/i.test(section)) {
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return /\b(query|request|response|DTO|VO|endpoint|controller|service|mapper|分页|权限|错误|响应包装)\b/i.test(section)
|
|
140
|
+
&& /\b(field|default|required|optional|error|pagination|shape|字段|参数|返回|错误|分页)\b/i.test(section)
|
|
141
|
+
&& (section.match(/`[^`]+`/g) ?? []).length >= 4;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function hasSqlOrDataMappingDepth(interfaceDesign: string, stateDesign: string): boolean {
|
|
145
|
+
const combined = `${interfaceDesign}\n${stateDesign}`;
|
|
146
|
+
if (/not applicable|no sql|no database|no data mapping/i.test(combined) && /because|checked|reason/i.test(combined)) {
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
if (/runtime-store projection schema|projection state|projection persistence|runtime projection/i.test(combined) && /ref|hash|scopeKey|projectionType|status|rollback/i.test(combined)) {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
const requiresSqlDepth = /\b(SQL|MyBatis|mapper XML|database|table|column|join|aggregate|distinct|source field|表|字段|聚合|分组|去重)\b/i.test(combined);
|
|
153
|
+
if (!requiresSqlDepth) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
return /\b(join key|join keys|foreign key|primary key|source field|mapper owner|grouping|distinct|pagination|filter|status filter|date range|关联键|主键|外键|来源字段|分组|去重|分页|过滤)\b/i.test(combined)
|
|
157
|
+
&& (combined.match(/`[^`]+`/g) ?? []).length >= 5;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function hasScenarioValidationMatrix(validationStrategy: string, riskControls: string): boolean {
|
|
161
|
+
const combined = `${validationStrategy}\n${riskControls}`;
|
|
162
|
+
const hasScenario = /scenario|input data|user action|expected|proves|does not prove|场景|输入|预期|证明/i.test(combined);
|
|
163
|
+
const hasEvidence = /command|evidence|manual|test|api|ui|sql|hook|artifact|证据|检查/i.test(combined);
|
|
164
|
+
const hasRiskLink = /risk|impact|control|validation hook|task-stage constraint|风险|影响|控制/i.test(combined);
|
|
165
|
+
return hasScenario && hasEvidence && hasRiskLink;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function looksDenseButShallow(...sections: string[]): boolean {
|
|
169
|
+
const text = sections.join('\n');
|
|
170
|
+
const lineCount = text.split(/\r?\n/).filter((line) => line.trim().length > 0).length;
|
|
171
|
+
const factCount = (text.match(/`[^`]+`|\b[A-Z][A-Za-z0-9_]*(?:Controller|Service|Mapper|Entity|DTO|VO|Request|Response)\b/g) ?? []).length;
|
|
172
|
+
const reasoningCount = (text.match(/because|therefore|implies|decision|tradeoff|risk control|validation hook|why|so that|因此|所以|取舍|决策|风险控制/g) ?? []).length;
|
|
173
|
+
return lineCount >= 12 && factCount >= 8 && reasoningCount < 3;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function leaksDesignDecisionToImplementation(...sections: string[]): boolean {
|
|
177
|
+
return /implementation will determine|finali[sz](?:e|ed) during implementation|decide in implementation|implementation phase will decide|execute (?:will|should|must) decide|decide in execute|tbd in execute|待实现时确定|执行时确定/i.test(sections.join('\n'));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function isOversizedExecutionSlice(section: string): boolean {
|
|
181
|
+
const codeBlocks = (section.match(/```sdd-task/g) ?? []).length;
|
|
182
|
+
const touchedAreas = (section.match(/affectedAreas\s*:|affected_files\s*:|Allowed code changes|Allowed files|Controller|Service|Mapper|DTO|VO|XML|SQL|UI|JSP|Vue|React/gi) ?? []).length;
|
|
183
|
+
return codeBlocks <= 2 && touchedAreas >= 8;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function hasExecutionSliceDecision(section: string): boolean {
|
|
187
|
+
return /execution slice|split rationale|split chain|split from|work-unit boundary|keep together|single rollback unit|sequence|internal order|ordered steps|step order|rollback unit|rollback boundary|tasks-manager|task manager|reviewed split|split decision|裁决|不拆分|保留|内部顺序|执行顺序|回滚单元/i.test(section);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function extractMarkdownSection(content: string, section: string | string[]): string | null {
|
|
191
|
+
for (const sectionName of Array.isArray(section) ? section : [section]) {
|
|
192
|
+
const escaped = escapeRegex(sectionName).replace(/\s+/g, '\\s+');
|
|
193
|
+
const match = new RegExp(`^##\\s+(?:\\d+(?:\\.\\d+)*\\.?\\s+)?${escaped}\\s*$`, 'im').exec(content);
|
|
194
|
+
if (!match) {
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
const start = match.index + match[0].length;
|
|
198
|
+
const rest = content.slice(start);
|
|
199
|
+
const next = /^##\s+/im.exec(rest);
|
|
200
|
+
return (next ? rest.slice(0, next.index) : rest).trim();
|
|
201
|
+
}
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function escapeRegex(value: string): string {
|
|
206
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
207
|
+
}
|