sdd-agent-platform 0.4.1 → 0.4.2
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 +30 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +67 -69
- 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 +64 -9
- 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 +0 -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 +26 -17
- 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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +12 -9
- 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 +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- 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 +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +12 -25
- 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 +1 -7
- 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 +26 -8
- 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 +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +1 -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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
- 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 +1 -1
- 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/project.js +8 -8
- 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 +0 -1
- 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 +0 -24
- 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 +1 -1
- 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 +178 -58
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +14 -7
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -1
- 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 +5 -4
- 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 +3 -2
- 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 +54 -61
- 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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +24 -8
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- 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 +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
- 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 +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +69 -27
- 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 +15 -15
- 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 +9 -9
- 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/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/tool-capabilities.js +3 -3
- 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.js +12 -12
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
- 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 +4 -7
- 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 +19 -17
- 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-config.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +2 -0
- 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 +45 -15
- 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.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- 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 +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
- 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 +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +126 -9
- 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 +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +7 -5
- 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 -8
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
- 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 +37 -27
- 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 +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +53 -14
- 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/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +1 -0
- 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 +0 -3
- 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 +5 -44
- 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 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
- 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 +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +97 -10
- 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 +8 -6
- 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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +55 -34
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- 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 +44 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +170 -23
- 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.d.ts +170 -18
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +544 -32
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- 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/test-support/fixtures.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +8 -23
- 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.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- 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 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +28 -53
- 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 +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +10 -50
- 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 +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +159 -150
- 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/test-runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +238 -103
- 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-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +27 -5
- 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.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +9 -32
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.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 +228 -15
- 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 +49 -15
- 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 +42 -6
- 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 +4 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- 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 +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +72 -6
- 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/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +55 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +538 -34
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +67 -69
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +43 -31
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +14 -11
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +12 -25
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +2 -1
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +143 -45
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +193 -58
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +15 -7
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +50 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +33 -18
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +55 -62
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +25 -8
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +2 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +82 -35
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +15 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +18 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +241 -4
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +47 -15
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +132 -10
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +31 -8
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +50 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +39 -29
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +62 -16
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +109 -10
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +8 -6
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +123 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +58 -43
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +249 -23
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +196 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +860 -54
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +9 -23
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +27 -56
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +10 -54
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +8 -1
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +93 -79
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +166 -154
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +100 -47
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +265 -107
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +47 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +48 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +15 -31
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +9 -33
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +246 -17
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +339 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +53 -14
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +45 -8
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +45 -6
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +6 -5
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +1 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +75 -7
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +518 -25
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +670 -41
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/package.json +1 -1
- 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 +13 -2
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/execution.js +49 -1
- 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 +6 -1
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/lifecycle.js +15 -2
- package/packages/cli/dist/commands/lifecycle.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +48 -2
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +52 -2
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +6 -0
- package/packages/cli/dist/commands/stage-close.js +295 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +68 -2
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/test.js +180 -2
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +7 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +222 -26
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/dispatch.js +4 -9
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +27 -26
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/doctor.js +1 -1
- 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 +1 -0
- package/packages/cli/dist/renderers/json.js +3 -0
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
- package/packages/cli/dist/renderers/registry-runtime.js +20 -0
- 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 +0 -4
- package/packages/cli/dist/renderers/workflow.js +30 -89
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +67 -69
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +64 -9
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +26 -17
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +3 -0
- package/packages/core/dist/config/init-project.js +12 -9
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +4 -4
- package/packages/core/dist/config/starter-documents.js +12 -25
- 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 +1 -7
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +26 -8
- 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 +2 -1
- package/packages/core/dist/contracts.js +1 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +3 -0
- package/packages/core/dist/delegation/validation.d.ts +3 -0
- package/packages/core/dist/delegation/validation.js +7 -4
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +8 -8
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +0 -1
- 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 +0 -24
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +178 -58
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.js +14 -7
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -1
- 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 +5 -4
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +3 -2
- 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 +54 -61
- 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 +1 -0
- package/packages/core/dist/lifecycle/ship.js +24 -8
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +12 -2
- package/packages/core/dist/orchestration/runtime.js +62 -21
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +5 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +69 -27
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +15 -15
- 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 +9 -9
- 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/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +3 -3
- 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.js +12 -12
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +4 -4
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +4 -7
- 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 +19 -17
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +1 -1
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +2 -0
- 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 +45 -15
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +373 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- 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 +37 -0
- package/packages/core/dist/router/stage-route-binding.js +235 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +2 -0
- package/packages/core/dist/router.js +2 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +126 -9
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +0 -2
- package/packages/core/dist/run-state/inspect-run.js +7 -5
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +28 -8
- package/packages/core/dist/run-state/run-index.d.ts +0 -2
- package/packages/core/dist/run-state/run-index.js +1 -3
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +37 -27
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +5 -2
- package/packages/core/dist/run-state/task-evidence.js +53 -14
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +1 -0
- package/packages/core/dist/run-state.js +1 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +0 -3
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +5 -44
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +10 -0
- package/packages/core/dist/runtime-paths.js +65 -0
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +200 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +2 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +97 -10
- 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 +8 -6
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +1 -0
- package/packages/core/dist/sdd-docs/task-parser.js +55 -34
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +322 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +241 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +888 -0
- package/packages/core/dist/stage-collaboration.js +3870 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +44 -1
- package/packages/core/dist/status/project-status.js +170 -23
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +170 -18
- package/packages/core/dist/storage/runtime-store.js +544 -32
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- 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/test-support/fixtures.js +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +8 -23
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +138 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -1
- package/packages/core/dist/verification/goal-verify.js +28 -53
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +0 -2
- package/packages/core/dist/verification/rendering.js +10 -50
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +159 -150
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +12 -2
- package/packages/core/dist/verification/test-runtime.js +238 -103
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +18 -0
- package/packages/core/dist/verification/validation-wave.js +27 -5
- package/packages/core/dist/verification/validation-wave.js.map +1 -1
- package/packages/core/dist/verification/verify-contract.d.ts +1 -1
- package/packages/core/dist/verification/verify-contract.js +9 -32
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +228 -15
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +49 -15
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +42 -6
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +4 -5
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- 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 +0 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.js +72 -6
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +55 -5
- package/packages/core/dist/workflow-state/resolve.js +538 -34
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -243
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -110
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -497
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -270
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/packages/cli/dist/commands/artifact.d.ts +0 -6
- package/packages/cli/dist/commands/artifact.js +0 -168
- package/packages/cli/dist/commands/artifact.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
- package/packages/cli/dist/renderers/artifacts.js +0 -43
- package/packages/cli/dist/renderers/artifacts.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
- package/packages/core/dist/sync-back/apply.d.ts +0 -17
- package/packages/core/dist/sync-back/apply.js +0 -243
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -110
- package/packages/core/dist/sync-back/inspect.js +0 -497
- package/packages/core/dist/sync-back/inspect.js.map +0 -1
- package/packages/core/dist/sync-back.d.ts +0 -2
- package/packages/core/dist/sync-back.js +0 -3
- package/packages/core/dist/sync-back.js.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import type { SddTask, SddTaskModel } from '../sdd-docs/task-parser.js';
|
|
3
|
+
|
|
4
|
+
export type ValidationCacheUnsafeReason = 'env_unknown' | 'tool_version_unknown' | 'non_deterministic_command' | 'external_service_dependency' | 'source_closure_unknown';
|
|
5
|
+
|
|
6
|
+
export interface ValidationCacheKeyInput {
|
|
7
|
+
branch: string;
|
|
8
|
+
model: SddTaskModel;
|
|
9
|
+
task: SddTask;
|
|
10
|
+
command: string;
|
|
11
|
+
argv: string[] | null;
|
|
12
|
+
shell: boolean;
|
|
13
|
+
validationScopeTaskIds: string[];
|
|
14
|
+
acceptanceRefs: string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ValidationCachePlan {
|
|
18
|
+
cacheKey: string;
|
|
19
|
+
normalizedCommand: string;
|
|
20
|
+
cwd: string;
|
|
21
|
+
envFingerprint: string;
|
|
22
|
+
toolFingerprint: string;
|
|
23
|
+
verifyContractHash: string | null;
|
|
24
|
+
tasksContractHash: string | null;
|
|
25
|
+
sourceClosureHash: string;
|
|
26
|
+
targetClosureHash: string;
|
|
27
|
+
unsafeReasons: ValidationCacheUnsafeReason[];
|
|
28
|
+
eligible: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function buildValidationCachePlan(input: ValidationCacheKeyInput): ValidationCachePlan {
|
|
32
|
+
const normalizedCommand = normalizeCommand(input.command, input.argv);
|
|
33
|
+
const envFingerprint = runtimeEnvFingerprint();
|
|
34
|
+
const toolFingerprint = runtimeToolFingerprint();
|
|
35
|
+
const sourceClosureHash = stableHash({
|
|
36
|
+
branch: input.branch,
|
|
37
|
+
sourceTaskIds: input.validationScopeTaskIds.slice().sort(),
|
|
38
|
+
spec: input.model.documents.specContractHash ?? input.model.documents.specHash ?? null,
|
|
39
|
+
plan: input.model.documents.planContractHash ?? input.model.documents.planHash ?? null,
|
|
40
|
+
tasks: input.model.documents.tasksContractHash ?? input.model.documents.tasksHash ?? null,
|
|
41
|
+
verify: input.model.documents.verifyContractHash ?? input.model.documents.verifyHash ?? null
|
|
42
|
+
});
|
|
43
|
+
const targetClosureHash = stableHash({
|
|
44
|
+
acceptanceRefs: input.acceptanceRefs.slice().sort(),
|
|
45
|
+
taskIds: input.validationScopeTaskIds.slice().sort()
|
|
46
|
+
});
|
|
47
|
+
const unsafeReasons = unsafeReasonsForCommand(input.command, input.task);
|
|
48
|
+
const cacheKey = stableHash({
|
|
49
|
+
contract: 'phase-8.26-validation-cache-key-v1',
|
|
50
|
+
command: normalizedCommand,
|
|
51
|
+
cwd: '.',
|
|
52
|
+
envFingerprint,
|
|
53
|
+
toolFingerprint,
|
|
54
|
+
verifyContractHash: input.model.documents.verifyContractHash ?? null,
|
|
55
|
+
tasksContractHash: input.model.documents.tasksContractHash ?? null,
|
|
56
|
+
sourceClosureHash,
|
|
57
|
+
targetClosureHash
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
cacheKey,
|
|
61
|
+
normalizedCommand,
|
|
62
|
+
cwd: '.',
|
|
63
|
+
envFingerprint,
|
|
64
|
+
toolFingerprint,
|
|
65
|
+
verifyContractHash: input.model.documents.verifyContractHash ?? null,
|
|
66
|
+
tasksContractHash: input.model.documents.tasksContractHash ?? null,
|
|
67
|
+
sourceClosureHash,
|
|
68
|
+
targetClosureHash,
|
|
69
|
+
unsafeReasons,
|
|
70
|
+
eligible: unsafeReasons.length === 0
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function unsafeReasonsForCommand(command: string, task: SddTask): ValidationCacheUnsafeReason[] {
|
|
75
|
+
const normalized = command.trim().toLowerCase();
|
|
76
|
+
const reasons: ValidationCacheUnsafeReason[] = [];
|
|
77
|
+
if (!normalized || task.affectedFiles.length === 0) {
|
|
78
|
+
reasons.push('source_closure_unknown');
|
|
79
|
+
}
|
|
80
|
+
if (/\b(date|time|random|uuid|sleep)\b/.test(normalized)) {
|
|
81
|
+
reasons.push('non_deterministic_command');
|
|
82
|
+
}
|
|
83
|
+
if (/\b(curl|wget|ssh|scp|docker\s+pull|npm\s+install|pnpm\s+install|yarn\s+install)\b|https?:\/\//.test(normalized)) {
|
|
84
|
+
reasons.push('external_service_dependency');
|
|
85
|
+
}
|
|
86
|
+
if (normalized.startsWith('manual:')) {
|
|
87
|
+
reasons.push('non_deterministic_command');
|
|
88
|
+
}
|
|
89
|
+
return [...new Set(reasons)];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function normalizeCommand(command: string, argv: string[] | null): string {
|
|
93
|
+
return argv ? JSON.stringify(argv) : command.trim().replace(/\s+/g, ' ');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function runtimeEnvFingerprint(): string {
|
|
97
|
+
return stableHash({ platform: process.platform, arch: process.arch, nodeEnv: process.env.NODE_ENV ?? null });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function runtimeToolFingerprint(): string {
|
|
101
|
+
return stableHash({ node: process.version });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function stableHash(value: unknown): string {
|
|
105
|
+
return createHash('sha256').update(JSON.stringify(value), 'utf8').digest('hex');
|
|
106
|
+
}
|
|
@@ -7,11 +7,13 @@ import path from 'node:path';
|
|
|
7
7
|
import { evaluateAndRecordWorkflowGateDecision } from '../workflow-gate/evidence-packet.js';
|
|
8
8
|
import { initProject } from '../config/init-project.js';
|
|
9
9
|
import { writeBranchDocs } from '../test-support/fixtures.js';
|
|
10
|
-
import { listRuntimeAcceptanceEvidenceMaps, listRuntimeValidationEnvironmentSessions, listRuntimeValidationWaveRuns, listRuntimeWorkflowGateDecisions, recordRuntimeDurableGap } from '../storage/runtime-store.js';
|
|
10
|
+
import { listRuntimeAcceptanceEvidenceMaps, listRuntimeTestSteps, listRuntimeValidationCacheUses, listRuntimeValidationEnvironmentSessions, listRuntimeValidationWaveRuns, listRuntimeWorkflowGateDecisions, recordRuntimeDurableGap } from '../storage/runtime-store.js';
|
|
11
11
|
import { readRunState, writeRunState } from '../run-state/run-state.js';
|
|
12
12
|
import { readTaskEvidenceView } from '../run-state/task-evidence.js';
|
|
13
13
|
import { writeVerifyContract } from './verify-contract.js';
|
|
14
14
|
import { planValidationWave, renderValidationWaveResult, runValidationWave } from './validation-wave.js';
|
|
15
|
+
import { evaluateLifecycleRiskDecisionForModel, recordLifecycleRiskDecisionProjection } from '../risk.js';
|
|
16
|
+
import { parseSddBranch } from '../sdd-docs/task-parser.js';
|
|
15
17
|
|
|
16
18
|
function taskMarkdown(taskId: string, command: string, wave: number): string {
|
|
17
19
|
return `### ${taskId}: Validation wave task
|
|
@@ -172,6 +174,7 @@ ${taskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 1)}
|
|
|
172
174
|
${taskMarkdown('T2', 'node -e "process.stdout.write(\'two\')"', 1)}`);
|
|
173
175
|
await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
174
176
|
|
|
177
|
+
await seedLifecycleRiskDecision(root, 'feature');
|
|
175
178
|
const result = await runValidationWave(root, { branch: 'feature', wave: 1, approved: true });
|
|
176
179
|
const waves = await listRuntimeValidationWaveRuns(root, { partition: 'feature', waveRunId: result.waveRunId });
|
|
177
180
|
const sessions = await listRuntimeValidationEnvironmentSessions(root, { partition: 'feature', waveRunId: result.waveRunId });
|
|
@@ -191,7 +194,7 @@ ${taskMarkdown('T2', 'node -e "process.stdout.write(\'two\')"', 1)}`);
|
|
|
191
194
|
const workflowGateScope = (result.workflowGateDecision?.payload as { workflowScope?: { waveRunId: string | null; taskIds: string[]; runIds: string[]; evidenceRefs: string[] } } | undefined)?.workflowScope;
|
|
192
195
|
const wavePayloadScope = (waves[0].payload as { workflowScope?: unknown }).workflowScope as typeof workflowGateScope;
|
|
193
196
|
const gateDecisions = await listRuntimeWorkflowGateDecisions(root, { partition: 'feature', decisionKind: 'validation_wave' });
|
|
194
|
-
const expectedEvidenceRefs = result.taskResults.flatMap((taskResult) => [taskResult.validationArtifact
|
|
197
|
+
const expectedEvidenceRefs = result.taskResults.flatMap((taskResult) => [taskResult.validationArtifact].filter((ref): ref is string => Boolean(ref))).sort();
|
|
195
198
|
|
|
196
199
|
assert.equal(workflowGateScope?.waveRunId, result.waveRunId);
|
|
197
200
|
assert.deepEqual(workflowGateScope?.taskIds, ['T1', 'T2']);
|
|
@@ -204,6 +207,39 @@ ${taskMarkdown('T2', 'node -e "process.stdout.write(\'two\')"', 1)}`);
|
|
|
204
207
|
}
|
|
205
208
|
});
|
|
206
209
|
|
|
210
|
+
test('validation wave reuses identical deterministic validation command through cache', async () => {
|
|
211
|
+
const root = await mkdtemp(path.join(tmpdir(), 'sdd-validation-wave-cache-'));
|
|
212
|
+
try {
|
|
213
|
+
await initProject(root);
|
|
214
|
+
await writeBranchDocs(root, 'feature', `# Tasks
|
|
215
|
+
|
|
216
|
+
${taskMarkdown('T1', 'node shared-cache-command.js', 1)}
|
|
217
|
+
${taskMarkdown('T2', 'node shared-cache-command.js', 1)}`);
|
|
218
|
+
await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
219
|
+
const counterPath = path.join(root, 'validation-counter.txt');
|
|
220
|
+
const commandInput = { argv: [process.execPath, '-e', "const fs=require('fs'); const file=process.argv[1]; const count=fs.existsSync(file) ? Number(fs.readFileSync(file,'utf8')) : 0; fs.writeFileSync(file, String(count + 1)); process.stdout.write('ok');", counterPath] };
|
|
221
|
+
|
|
222
|
+
await seedLifecycleRiskDecision(root, 'feature');
|
|
223
|
+
const result = await runValidationWave(root, {
|
|
224
|
+
branch: 'feature',
|
|
225
|
+
wave: 1,
|
|
226
|
+
approved: true,
|
|
227
|
+
commandInputsByTask: { T1: [commandInput], T2: [commandInput] }
|
|
228
|
+
});
|
|
229
|
+
const steps = (await Promise.all(result.taskResults.map((taskResult) => listRuntimeTestSteps(root, { runId: taskResult.runId })))).flat();
|
|
230
|
+
const cacheUses = await listRuntimeValidationCacheUses(root, { branchSlug: 'feature' });
|
|
231
|
+
|
|
232
|
+
assert.equal(result.status, 'PASS');
|
|
233
|
+
assert.equal(await readFile(counterPath, 'utf8'), '1');
|
|
234
|
+
assert.equal(steps.some((step) => (step.payload as { cacheStatus?: string }).cacheStatus === 'miss'), true);
|
|
235
|
+
assert.equal(steps.some((step) => (step.payload as { cacheStatus?: string }).cacheStatus === 'hit'), true);
|
|
236
|
+
assert.equal(cacheUses.length, 1);
|
|
237
|
+
assert.deepEqual(cacheUses[0].mappedTaskIds, ['T2']);
|
|
238
|
+
} finally {
|
|
239
|
+
await rm(root, { recursive: true, force: true });
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
207
243
|
test('validation wave gate evaluates durable gaps across the whole wave', async () => {
|
|
208
244
|
const root = await mkdtemp(path.join(tmpdir(), 'sdd-validation-wave-durable-gap-'));
|
|
209
245
|
try {
|
|
@@ -214,6 +250,7 @@ ${taskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 1)}
|
|
|
214
250
|
${taskMarkdown('T2', 'node -e "process.stdout.write(\'two\')"', 1)}`);
|
|
215
251
|
await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
216
252
|
|
|
253
|
+
await seedLifecycleRiskDecision(root, 'feature');
|
|
217
254
|
const result = await runValidationWave(root, { branch: 'feature', wave: 1, approved: true });
|
|
218
255
|
const secondTask = result.taskResults.find((taskResult) => taskResult.taskId === 'T2');
|
|
219
256
|
assert.ok(result.workflowGateDecision);
|
|
@@ -238,7 +275,7 @@ ${taskMarkdown('T2', 'node -e "process.stdout.write(\'two\')"', 1)}`);
|
|
|
238
275
|
});
|
|
239
276
|
await writeRunState(root, { ...await readRunState(root, secondTask.runId), status: 'blocked' });
|
|
240
277
|
|
|
241
|
-
const expectedEvidenceRefs = result.taskResults.flatMap((taskResult) => [taskResult.validationArtifact
|
|
278
|
+
const expectedEvidenceRefs = result.taskResults.flatMap((taskResult) => [taskResult.validationArtifact].filter((ref): ref is string => Boolean(ref)));
|
|
242
279
|
const { decision } = await evaluateAndRecordWorkflowGateDecision(root, {
|
|
243
280
|
branch: 'feature',
|
|
244
281
|
taskId: result.taskResults[0]?.taskId ?? null,
|
|
@@ -295,7 +332,7 @@ ${batchTaskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 'docs-batch
|
|
|
295
332
|
assert.equal(result.status, 'BLOCKED');
|
|
296
333
|
assert.equal(result.plan.selectionBoundary, 'wave');
|
|
297
334
|
assert.equal(result.plan.batchId, 'docs-batch-a');
|
|
298
|
-
assert.match(result.next, /sdd test wave --branch feature
|
|
335
|
+
assert.match(result.next, /sdd test wave-1 --branch feature/);
|
|
299
336
|
assert.doesNotMatch(result.next, /sdd test batch docs-batch-a/);
|
|
300
337
|
} finally {
|
|
301
338
|
await rm(root, { recursive: true, force: true });
|
|
@@ -311,6 +348,7 @@ test('validation wave uses verify acceptance mapping for runtime coverage', asyn
|
|
|
311
348
|
${batchTaskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 'docs-batch-a').replace(' - node -e "process.stdout.write(\'one\')" => AC-T1', ' - node -e "process.stdout.write(\'one\')"')}`);
|
|
312
349
|
await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
313
350
|
|
|
351
|
+
await seedLifecycleRiskDecision(root, 'feature');
|
|
314
352
|
const result = await runValidationWave(root, { branch: 'feature', batchId: 'docs-batch-a', approved: true });
|
|
315
353
|
|
|
316
354
|
assert.equal(result.status, 'PASS');
|
|
@@ -320,6 +358,10 @@ ${batchTaskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 'docs-batch
|
|
|
320
358
|
}
|
|
321
359
|
});
|
|
322
360
|
|
|
361
|
+
async function seedLifecycleRiskDecision(root: string, branch: string): Promise<void> {
|
|
362
|
+
const model = await parseSddBranch(root, branch);
|
|
363
|
+
await recordLifecycleRiskDecisionProjection(root, evaluateLifecycleRiskDecisionForModel(branch, model));
|
|
364
|
+
}
|
|
323
365
|
|
|
324
366
|
test('validation wave blocks missing verify without generating runtime evidence', async () => {
|
|
325
367
|
const root = await mkdtemp(path.join(tmpdir(), 'sdd-validation-wave-blocked-'));
|
|
@@ -334,7 +376,7 @@ ${taskMarkdown('T1', 'node -e "process.stdout.write(\'one\')"', 1)}`);
|
|
|
334
376
|
assert.equal(result.status, 'BLOCKED');
|
|
335
377
|
assert.equal(result.taskResults.length, 0);
|
|
336
378
|
assert.match(result.gaps.join('\n'), /verify\.md contract is BLOCKED/);
|
|
337
|
-
assert.match(result.next, /sdd test wave --branch feature
|
|
379
|
+
assert.match(result.next, /sdd test wave-1 --branch feature/);
|
|
338
380
|
} finally {
|
|
339
381
|
await rm(root, { recursive: true, force: true });
|
|
340
382
|
}
|
|
@@ -28,6 +28,23 @@ interface VerifyBatchPlan {
|
|
|
28
28
|
acceptanceMapping: Map<string, string[]>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export interface VerifyValidationUnit {
|
|
32
|
+
validationUnitId: string;
|
|
33
|
+
timing: string | null;
|
|
34
|
+
taskIds: string[];
|
|
35
|
+
checks: string[];
|
|
36
|
+
forbiddenValidation: string[];
|
|
37
|
+
requiredArtifacts: string[];
|
|
38
|
+
acceptanceMapping: Record<string, string[]>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface VerifyValidationUnitList {
|
|
42
|
+
contract: 'sdd-verify-validation-units-v1';
|
|
43
|
+
branch: string;
|
|
44
|
+
verifyContract: VerifyContractInspection;
|
|
45
|
+
units: VerifyValidationUnit[];
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
export interface ValidationWavePlan {
|
|
32
49
|
contract: typeof VALIDATION_WAVE_RUNTIME_CONTRACT_VERSION;
|
|
33
50
|
branch: string;
|
|
@@ -66,6 +83,19 @@ export interface ValidationWaveRunResult {
|
|
|
66
83
|
next: string;
|
|
67
84
|
}
|
|
68
85
|
|
|
86
|
+
export async function listVerifyValidationUnits(projectRoot: string, options: { branch?: string | null } = {}): Promise<VerifyValidationUnitList> {
|
|
87
|
+
const context = await resolveSddContext(projectRoot, { branch: options.branch ?? undefined, branchSource: options.branch ? 'cli_option' : undefined });
|
|
88
|
+
const verifyContract = await inspectVerifyContract(projectRoot, { branch: context.partition, branchSource: 'cli_option' });
|
|
89
|
+
const verifyBatches = await readVerifyBatchPlans(verifyContract);
|
|
90
|
+
return {
|
|
91
|
+
contract: 'sdd-verify-validation-units-v1',
|
|
92
|
+
branch: context.partition,
|
|
93
|
+
verifyContract,
|
|
94
|
+
units: Array.from(verifyBatches.values()).map(verifyValidationUnitFromBatch)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
69
99
|
export async function planValidationWave(projectRoot: string, options: RunValidationWaveOptions = {}): Promise<ValidationWavePlan> {
|
|
70
100
|
const context = await resolveSddContext(projectRoot, { branch: options.branch ?? undefined, branchSource: options.branch ? 'cli_option' : undefined });
|
|
71
101
|
const model = await parseSddBranch(projectRoot, context.partition);
|
|
@@ -159,7 +189,7 @@ export async function runValidationWave(projectRoot: string, options: RunValidat
|
|
|
159
189
|
waveRunId,
|
|
160
190
|
taskIds: plan.taskIds,
|
|
161
191
|
runIds: taskResults.map((result) => result.runId),
|
|
162
|
-
evidenceRefs: taskResults.flatMap((result) => [result.validationArtifact
|
|
192
|
+
evidenceRefs: taskResults.flatMap((result) => [result.validationArtifact].filter((ref): ref is string => Boolean(ref)))
|
|
163
193
|
})).decision
|
|
164
194
|
: null;
|
|
165
195
|
const status = finalWaveStatus(validationStatus, workflowGateDecision);
|
|
@@ -449,6 +479,19 @@ function serializeVerifyBatchPlan(batch: VerifyBatchPlan): ValidationWavePlan['v
|
|
|
449
479
|
};
|
|
450
480
|
}
|
|
451
481
|
|
|
482
|
+
|
|
483
|
+
function verifyValidationUnitFromBatch(batch: VerifyBatchPlan): VerifyValidationUnit {
|
|
484
|
+
return {
|
|
485
|
+
validationUnitId: batch.id,
|
|
486
|
+
timing: batch.timing,
|
|
487
|
+
taskIds: batch.tasks,
|
|
488
|
+
checks: batch.checks,
|
|
489
|
+
forbiddenValidation: batch.forbiddenValidation,
|
|
490
|
+
requiredArtifacts: batch.requiredArtifacts,
|
|
491
|
+
acceptanceMapping: Object.fromEntries(batch.acceptanceMapping)
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
452
495
|
function cleanYamlScalar(value: string): string {
|
|
453
496
|
const trimmed = value.trim();
|
|
454
497
|
if (trimmed.startsWith('"') && trimmed.endsWith('"')) {
|
|
@@ -494,7 +537,7 @@ function finalWaveStatus(validationStatus: RuntimeValidationWaveStatus, workflow
|
|
|
494
537
|
|
|
495
538
|
function nextForValidationWave(status: RuntimeValidationWaveStatus, branch: string, selectionBoundary: ValidationWaveSelectionBoundary, batchId: string | null, wave: number | null, taskIds: string[], workflowGateDecision: WorkflowGateDecision | null): string {
|
|
496
539
|
if (status === 'PASS') {
|
|
497
|
-
return `sdd
|
|
540
|
+
return `sdd test close --branch ${branch} --target goal-verify --compact-json`;
|
|
498
541
|
}
|
|
499
542
|
if (workflowGateDecision && workflowGateDecision.status !== 'PASS') {
|
|
500
543
|
return `Inspect validation wave gate ${workflowGateDecision.decisionId}, resolve blockers or decision-card requirements, then rerun ${rerunValidationCommand(branch, selectionBoundary, batchId, wave, taskIds)}.`;
|
|
@@ -504,10 +547,10 @@ function nextForValidationWave(status: RuntimeValidationWaveStatus, branch: stri
|
|
|
504
547
|
|
|
505
548
|
function rerunValidationCommand(branch: string, selectionBoundary: ValidationWaveSelectionBoundary, batchId: string | null, wave: number | null, taskIds: string[]): string {
|
|
506
549
|
if (selectionBoundary === 'batch' && batchId) {
|
|
507
|
-
return `sdd test
|
|
550
|
+
return `sdd test ${batchId} --branch ${branch}`;
|
|
508
551
|
}
|
|
509
552
|
if (selectionBoundary === 'tasks' && taskIds.length > 0) {
|
|
510
|
-
return `sdd test
|
|
553
|
+
return `sdd test ${taskIds.length === 1 ? `task-${taskIds[0]}` : taskIds.map((taskId) => `task-${taskId}`).join(',')} --branch ${branch}`;
|
|
511
554
|
}
|
|
512
|
-
return wave === null ? `sdd test wave --branch ${branch}` : `sdd test wave --branch ${branch}
|
|
555
|
+
return wave === null ? `sdd test wave-all --branch ${branch}` : `sdd test wave-${wave} --branch ${branch}`;
|
|
513
556
|
}
|
|
@@ -31,11 +31,12 @@ test('writeVerifyContract creates task-derived verify contract', async () => {
|
|
|
31
31
|
|
|
32
32
|
const written = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
33
33
|
const inspection = await inspectVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
34
|
-
|
|
35
34
|
assert.equal(written.status, 'created');
|
|
36
35
|
assert.match(written.content, /contract: sdd-verify-doc-v1/);
|
|
36
|
+
assert.doesNotMatch(written.content, /based_on_tasks_/);
|
|
37
|
+
assert.doesNotMatch(written.content, /created_at:/);
|
|
37
38
|
assert.match(written.content, /verification_batches:/);
|
|
38
|
-
assert.match(written.content, /id:
|
|
39
|
+
assert.match(written.content, /id: "task-T1"/);
|
|
39
40
|
assert.match(written.content, /failure_policy:\n repair_flow: deferred/);
|
|
40
41
|
assert.match(written.content, /\| T1 \|/);
|
|
41
42
|
assert.match(written.content, /author_role: verification-designer/);
|
|
@@ -131,8 +132,8 @@ Only UI image.
|
|
|
131
132
|
}
|
|
132
133
|
});
|
|
133
134
|
|
|
134
|
-
test('inspectVerifyContract warns when verify
|
|
135
|
-
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-
|
|
135
|
+
test('inspectVerifyContract warns when verify matrix no longer mentions current tasks', async () => {
|
|
136
|
+
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-task-drift-'));
|
|
136
137
|
try {
|
|
137
138
|
await writeBranchDocs(root, 'feature', validTaskMarkdown('T1', []));
|
|
138
139
|
await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
@@ -141,55 +142,37 @@ test('inspectVerifyContract warns when verify document is stale', async () => {
|
|
|
141
142
|
const inspection = await inspectVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
142
143
|
|
|
143
144
|
assert.equal(inspection.status, 'WARN');
|
|
144
|
-
assert.equal(inspection.issues.some((issue) => issue.field === 'based_on_tasks_contract_hash'),
|
|
145
|
+
assert.equal(inspection.issues.some((issue) => issue.field === 'based_on_tasks_contract_hash'), false);
|
|
145
146
|
assert.equal(inspection.issues.some((issue) => issue.field === 'tasks' && /T2/.test(issue.message)), true);
|
|
146
147
|
} finally {
|
|
147
148
|
await rm(root, { recursive: true, force: true });
|
|
148
149
|
}
|
|
149
150
|
});
|
|
150
151
|
|
|
151
|
-
test('inspectVerifyContract
|
|
152
|
-
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-legacy-'));
|
|
153
|
-
try {
|
|
154
|
-
await writeBranchDocs(root, 'feature', validTaskMarkdown('T1', []));
|
|
155
|
-
const written = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
156
|
-
await writeFile(path.join(root, 'specs', 'feature', 'verify.md'), written.content.replace(/^based_on_tasks_contract_hash: .+\n/m, ''), 'utf8');
|
|
157
|
-
|
|
158
|
-
const inspection = await inspectVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
159
|
-
|
|
160
|
-
assert.equal(inspection.status, 'BLOCKED');
|
|
161
|
-
assert.equal(inspection.issues.some((issue) => issue.field === 'based_on_tasks_contract_hash' && issue.level === 'FAIL'), true);
|
|
162
|
-
} finally {
|
|
163
|
-
await rm(root, { recursive: true, force: true });
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
test('writeVerifyContract upgrades legacy verify documents without force', async () => {
|
|
168
|
-
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-upgrade-'));
|
|
152
|
+
test('inspectVerifyContract ignores legacy based_on metadata', async () => {
|
|
153
|
+
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-legacy-ignored-'));
|
|
169
154
|
try {
|
|
170
155
|
await writeBranchDocs(root, 'feature', validTaskMarkdown('T1', []));
|
|
171
156
|
const written = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
172
|
-
|
|
157
|
+
const legacy = written.content.replace('author_role: verification-designer', 'based_on_tasks_contract_hash: legacy\nbased_on_tasks_hash: legacy\nauthor_role: verification-designer');
|
|
158
|
+
await writeFile(path.join(root, 'specs', 'feature', 'verify.md'), legacy, 'utf8');
|
|
173
159
|
|
|
174
|
-
const upgraded = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
175
160
|
const inspection = await inspectVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
176
161
|
|
|
177
|
-
assert.equal(upgraded.status, 'updated');
|
|
178
|
-
assert.match(upgraded.content, /based_on_tasks_contract_hash: /);
|
|
179
162
|
assert.equal(inspection.status, 'PASS');
|
|
163
|
+
assert.equal(inspection.issues.some((issue) => issue.field === 'based_on_tasks_contract_hash'), false);
|
|
180
164
|
} finally {
|
|
181
165
|
await rm(root, { recursive: true, force: true });
|
|
182
166
|
}
|
|
183
167
|
});
|
|
184
168
|
|
|
185
|
-
test('writeVerifyContract preserves
|
|
186
|
-
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-preserve-
|
|
169
|
+
test('writeVerifyContract preserves current verify documents without based_on metadata', async () => {
|
|
170
|
+
const root = await mkdtemp(path.join(tmpdir(), 'sdd-verify-contract-preserve-current-'));
|
|
187
171
|
try {
|
|
188
172
|
await writeBranchDocs(root, 'feature', validTaskMarkdown('T1', []));
|
|
189
173
|
const written = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
190
174
|
const verifyPath = path.join(root, 'specs', 'feature', 'verify.md');
|
|
191
175
|
const initial = await readFile(verifyPath, 'utf8');
|
|
192
|
-
await writeFile(path.join(root, 'specs', 'feature', 'tasks.md'), validTaskMarkdown('T2', []), 'utf8');
|
|
193
176
|
|
|
194
177
|
const preserved = await writeVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
195
178
|
const inspection = await inspectVerifyContract(root, { branch: 'feature', branchSource: 'cli_option' });
|
|
@@ -197,7 +180,8 @@ test('writeVerifyContract preserves stale bound verify documents without force',
|
|
|
197
180
|
assert.equal(written.status, 'created');
|
|
198
181
|
assert.equal(preserved.status, 'unchanged');
|
|
199
182
|
assert.equal(preserved.content, initial);
|
|
200
|
-
assert.
|
|
183
|
+
assert.doesNotMatch(preserved.content, /based_on_tasks_/);
|
|
184
|
+
assert.equal(inspection.status, 'PASS');
|
|
201
185
|
} finally {
|
|
202
186
|
await rm(root, { recursive: true, force: true });
|
|
203
187
|
}
|
|
@@ -74,32 +74,13 @@ export async function inspectVerifyContract(projectRoot: string, options: { bran
|
|
|
74
74
|
action: 'Regenerate verify.md with sdd verifies write or update the frontmatter contract.'
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
if (!model.documents.verifyBasedOnTasksContractHash) {
|
|
78
|
-
issues.push({
|
|
79
|
-
level: 'FAIL',
|
|
80
|
-
field: 'based_on_tasks_contract_hash',
|
|
81
|
-
message: 'verify.md does not bind to the frozen tasks contract hash.',
|
|
82
|
-
action: `Run /sdd:tasks or sdd verifies write --branch ${context.partition} --force to regenerate verify.md from the current tasks contract.`
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (model.documents.verifyStale) {
|
|
87
|
-
issues.push({
|
|
88
|
-
level: model.documents.verifyBasedOnTasksContractHash ? 'WARN' : 'FAIL',
|
|
89
|
-
field: 'based_on_tasks_contract_hash',
|
|
90
|
-
message: model.documents.verifyBasedOnTasksContractHash
|
|
91
|
-
? `verify.md is stale for current tasks contract hash ${model.documents.tasksContractHash}.`
|
|
92
|
-
: 'verify.md cannot be proven current because based_on_tasks_contract_hash is missing.',
|
|
93
|
-
action: `Run /sdd:tasks or sdd verifies write --branch ${context.partition} --force after reviewing task contract changes.`
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
77
|
const authorRole = readDocumentScalar(raw, 'author_role');
|
|
97
78
|
if (authorRole !== VERIFY_CONTRACT_AUTHOR_ROLE) {
|
|
98
79
|
issues.push({
|
|
99
80
|
level: 'WARN',
|
|
100
81
|
field: 'author_role',
|
|
101
82
|
message: `verify.md must be owned by ${VERIFY_CONTRACT_AUTHOR_ROLE}, not ${authorRole ?? 'missing'}.`,
|
|
102
|
-
action: 'Regenerate verify.md with a verification-designer role before running sdd test
|
|
83
|
+
action: 'Regenerate verify.md with a verification-designer role before running sdd test <validation_unit_id-or-validation_text>.'
|
|
103
84
|
});
|
|
104
85
|
}
|
|
105
86
|
const independentFromRoles = readDocumentList(raw, 'independent_from_roles');
|
|
@@ -153,14 +134,13 @@ export async function inspectVerifyContract(projectRoot: string, options: { bran
|
|
|
153
134
|
export async function writeVerifyContract(projectRoot: string, options: { branch?: string | null; branchSource?: ContextBranchSource; force?: boolean } = {}): Promise<WriteVerifyContractResult> {
|
|
154
135
|
const context = await resolveSddContext(projectRoot, options);
|
|
155
136
|
const model = await parseSddBranch(projectRoot, context.partition);
|
|
156
|
-
const content = renderVerifyContractDocument(model
|
|
137
|
+
const content = renderVerifyContractDocument(model);
|
|
157
138
|
const existed = await exists(model.verifyPath);
|
|
158
139
|
if (existed && !options.force) {
|
|
159
140
|
const current = await readFile(model.verifyPath, 'utf8');
|
|
160
|
-
const currentTasksContractHash = readDocumentScalar(current, 'based_on_tasks_contract_hash');
|
|
161
141
|
const hasCurrentBatchPlan = /^verification_batches:\s*$/m.test(current);
|
|
162
|
-
const
|
|
163
|
-
if (current === content || (
|
|
142
|
+
const hasCurrentContract = current.includes(`contract: ${VERIFY_DOCUMENT_CONTRACT_VERSION}`);
|
|
143
|
+
if (current === content || (hasCurrentContract && hasCurrentBatchPlan)) {
|
|
164
144
|
return {
|
|
165
145
|
branch: context.partition,
|
|
166
146
|
verifyPath: model.verifyPath,
|
|
@@ -181,18 +161,14 @@ export async function writeVerifyContract(projectRoot: string, options: { branch
|
|
|
181
161
|
};
|
|
182
162
|
}
|
|
183
163
|
|
|
184
|
-
export function renderVerifyContractDocument(model: SddTaskModel
|
|
164
|
+
export function renderVerifyContractDocument(model: SddTaskModel): string {
|
|
185
165
|
return `---
|
|
186
166
|
contract: ${VERIFY_DOCUMENT_CONTRACT_VERSION}
|
|
187
167
|
version: 1.0.0
|
|
188
168
|
branch: ${model.branch}
|
|
189
|
-
based_on_tasks_contract_hash: ${model.documents.tasksContractHash ?? 'missing'}
|
|
190
|
-
based_on_tasks_hash: ${model.documents.tasksHash ?? 'missing'}
|
|
191
169
|
author_role: ${VERIFY_CONTRACT_AUTHOR_ROLE}
|
|
192
170
|
independent_from_roles:
|
|
193
171
|
${REQUIRED_INDEPENDENT_FROM_ROLES.map((role) => ` - ${role}`).join('\n')}
|
|
194
|
-
created_at: ${timestamp}
|
|
195
|
-
updated_at: ${timestamp}
|
|
196
172
|
---
|
|
197
173
|
|
|
198
174
|
# Verify Contract: ${model.branch}
|
|
@@ -216,16 +192,16 @@ ${model.tasks.length > 0 ? model.tasks.map(renderTaskMatrixRow).join('\n') : '|
|
|
|
216
192
|
|
|
217
193
|
- The agent that creates tasks.md must not be the same authority that owns verify.md.
|
|
218
194
|
- The implementer must not own verify.md or perform authoritative goal verification.
|
|
219
|
-
- Reviewer and validator evidence must use
|
|
220
|
-
- Physical evidence files live under branch evidence .sdd/runs/<
|
|
195
|
+
- Reviewer and validator evidence must use .sdd/runs/<branch>/test/*.md or .sdd/runs/<branch>/do/*.md refs.
|
|
196
|
+
- Physical evidence files live under branch stage evidence .sdd/runs/<branch>/<stage>/*.md.
|
|
221
197
|
- Goal-level verify must resolve the latest eligible run by branch and task unless --run is explicitly supplied for replay.
|
|
222
198
|
- PASS requires policy-backed acceptance evidence, not mention-only acceptance text.
|
|
223
199
|
- \`/sdd:test\` consumes this contract and must not create or refresh it.
|
|
224
|
-
-
|
|
200
|
+
- Goal-level verification feeds runtime truth-alignment; normal workflow completion proceeds through test judgment, goal verification, and ship readiness.
|
|
225
201
|
|
|
226
202
|
## 5. Out of Scope
|
|
227
203
|
|
|
228
|
-
- This document does not replace runtime.sqlite, branch evidence artifacts, validator reports, or
|
|
204
|
+
- This document does not replace runtime.sqlite, branch stage evidence artifacts, validator reports, or truth-alignment projections.
|
|
229
205
|
- This document does not authorize publish, push, tag, release, or source changes outside the selected task boundary.
|
|
230
206
|
`;
|
|
231
207
|
}
|
|
@@ -4,7 +4,7 @@ import { WORK_UNIT_CONTRACT_VERSION } from '../contracts.js';
|
|
|
4
4
|
export type WorkUnitType = 'main-agent' | 'co-main-agent' | 'subagent';
|
|
5
5
|
export type WorkUnitStatus = 'pending' | 'running' | 'completed' | 'blocked' | 'failed' | 'cancelled';
|
|
6
6
|
export type WorkUnitAuthority = 'stage-owner' | 'stage-contributor' | 'non-authoritative';
|
|
7
|
-
export type WorkUnitRequiredBefore = 'stage-output' | 'handoff' | '
|
|
7
|
+
export type WorkUnitRequiredBefore = 'stage-output' | 'handoff' | 'ship' | 'never';
|
|
8
8
|
|
|
9
9
|
export interface WorkUnit {
|
|
10
10
|
contract: typeof WORK_UNIT_CONTRACT_VERSION;
|