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,47 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtemp, rm } from 'node:fs/promises';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
|
|
7
|
+
import { initProject } from '../config/init-project.js';
|
|
8
|
+
import { recordTruthAlignmentProjection, type TruthAlignmentProjection } from '../stage-collaboration.js';
|
|
9
|
+
import { validTaskMarkdown, writeBranchDocs } from '../test-support/fixtures.js';
|
|
10
|
+
import { runShip } from './ship.js';
|
|
11
|
+
|
|
12
|
+
test('ship dry-run blocks unresolved truth reconciliation and points to owner-manager route', async () => {
|
|
13
|
+
const root = await mkdtemp(path.join(tmpdir(), 'sdd-ship-truth-reconcile-'));
|
|
14
|
+
try {
|
|
15
|
+
await initProject(root);
|
|
16
|
+
await writeBranchDocs(root, 'master', validTaskMarkdown('T1', []));
|
|
17
|
+
await recordTruthAlignmentProjection(root, truthAlignmentProjection());
|
|
18
|
+
|
|
19
|
+
const ship = await runShip(root, { branch: 'master', dryRun: true });
|
|
20
|
+
const check = ship.checks.find((entry) => entry.name === 'truth_reconciliation');
|
|
21
|
+
|
|
22
|
+
assert.equal(ship.status, 'BLOCKED');
|
|
23
|
+
assert.equal(check?.status, 'BLOCKED');
|
|
24
|
+
assert.match(check?.message ?? '', /change=implementation_mismatch impact=material owner=do-manager frontier=do>test>goal-verify>ship/);
|
|
25
|
+
assert.equal(check?.nextAction, 'sdd do task <task_id> --branch master');
|
|
26
|
+
assert.equal(ship.projectStatus.truthReconciliation?.nextIntent.canonicalCommand.includes('sync-back'), false);
|
|
27
|
+
} finally {
|
|
28
|
+
await rm(root, { recursive: true, force: true });
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
function truthAlignmentProjection(): TruthAlignmentProjection {
|
|
33
|
+
return {
|
|
34
|
+
contract: 'sdd-truth-alignment-v1',
|
|
35
|
+
branch: 'master',
|
|
36
|
+
sourceStage: 'goal-verify',
|
|
37
|
+
declaredTruthRefs: [{ kind: 'document', ref: 'specs/master/tasks.md', hash: 'tasks-hash' }],
|
|
38
|
+
acceptedRealityRefs: [{ kind: 'artifact', ref: '.sdd/runs/master/do/implementation-v1.md', hash: 'implementation-hash' }],
|
|
39
|
+
status: 'drift_detected',
|
|
40
|
+
ownerStage: 'do',
|
|
41
|
+
semanticImpact: 'material',
|
|
42
|
+
staleRefs: [{ kind: 'artifact', ref: '.sdd/runs/master/do/implementation-v1.md', hash: 'old-implementation-hash' }],
|
|
43
|
+
invalidatesStages: ['do'],
|
|
44
|
+
reasons: ['accepted implementation evidence no longer matches declared truth'],
|
|
45
|
+
createdAt: '2026-06-01T00:00:00.000Z'
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -4,6 +4,7 @@ import { doctor } from '../doctor/doctor.js';
|
|
|
4
4
|
import type { DoctorLevel, DoctorReport } from '../doctor/model.js';
|
|
5
5
|
import { getProjectStatus, type ProjectStatus } from '../status/project-status.js';
|
|
6
6
|
import { evaluateAndRecordWorkflowGateDecision } from '../workflow-gate/evidence-packet.js';
|
|
7
|
+
import { listRuntimeRepairs, type RuntimeRepairRecord } from '../storage/runtime-store.js';
|
|
7
8
|
|
|
8
9
|
export interface ShipReadinessCheck {
|
|
9
10
|
name: string;
|
|
@@ -35,6 +36,7 @@ export interface ShipResult {
|
|
|
35
36
|
lifecycleRisk: ProjectStatus['lifecycleRisk'];
|
|
36
37
|
capabilityHealth: ProjectStatus['capabilityHealth'];
|
|
37
38
|
workflowGateHealth: ProjectStatus['workflowGateHealth'];
|
|
39
|
+
truthReconciliation: ProjectStatus['truthReconciliation'];
|
|
38
40
|
};
|
|
39
41
|
doctor: {
|
|
40
42
|
status: DoctorLevel;
|
|
@@ -53,7 +55,8 @@ export async function runShip(projectRoot: string, options: { branch?: string |
|
|
|
53
55
|
? (await evaluateAndRecordWorkflowGateDecision(projectRoot, { branch: projectStatus.branch, taskId: projectStatus.latestRun.taskId, runId: projectStatus.latestRun.runId, decisionKind: 'ship' })).decision
|
|
54
56
|
: null;
|
|
55
57
|
const projectStatusWithGate = gateDecision ? await getProjectStatus(projectRoot, { branch: options.branch ?? undefined, branchSource: options.branch ? 'cli_option' : undefined }) : projectStatus;
|
|
56
|
-
const
|
|
58
|
+
const openRepairs = await listRuntimeRepairs(projectRoot, { branchSlug: projectStatus.branch, status: 'open' });
|
|
59
|
+
const checks = buildShipChecks(projectStatusWithGate, doctorReport, gateDecision, openRepairs);
|
|
57
60
|
const blocked = checks.some((check) => check.status === 'BLOCKED');
|
|
58
61
|
const status = blocked ? 'BLOCKED' : 'PASS';
|
|
59
62
|
const releasePath = path.join(projectStatus.context.specDir, 'release.md');
|
|
@@ -87,14 +90,15 @@ export async function runShip(projectRoot: string, options: { branch?: string |
|
|
|
87
90
|
tokenProjection: projectStatusWithGate.tokenProjection,
|
|
88
91
|
lifecycleRisk: projectStatusWithGate.lifecycleRisk,
|
|
89
92
|
capabilityHealth: projectStatusWithGate.capabilityHealth,
|
|
90
|
-
workflowGateHealth: projectStatusWithGate.workflowGateHealth
|
|
93
|
+
workflowGateHealth: projectStatusWithGate.workflowGateHealth,
|
|
94
|
+
truthReconciliation: projectStatusWithGate.truthReconciliation
|
|
91
95
|
},
|
|
92
96
|
doctor: summarizeDoctor(doctorReport),
|
|
93
97
|
releaseDocument
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
100
|
|
|
97
|
-
function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorReport, gateDecision: ProjectStatus['workflowGateHealth']['latestDecision']): ShipReadinessCheck[] {
|
|
101
|
+
function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorReport, gateDecision: ProjectStatus['workflowGateHealth']['latestDecision'], openRepairs: RuntimeRepairRecord[]): ShipReadinessCheck[] {
|
|
98
102
|
const checks: ShipReadinessCheck[] = [];
|
|
99
103
|
checks.push({
|
|
100
104
|
name: 'documents',
|
|
@@ -120,14 +124,26 @@ function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorRepor
|
|
|
120
124
|
message: `doctor_status=${doctorReport.status}`,
|
|
121
125
|
nextAction: `sdd doctor fast --branch ${projectStatus.branch}`
|
|
122
126
|
});
|
|
127
|
+
checks.push({
|
|
128
|
+
name: 'open_repairs',
|
|
129
|
+
status: openRepairs.length === 0 ? 'PASS' : 'BLOCKED',
|
|
130
|
+
message: `open=${openRepairs.length} types=${[...new Set(openRepairs.map((repair) => repair.repairType))].join(',') || 'none'}`,
|
|
131
|
+
nextAction: openRepairs[0]?.recommendedCommands[0] ?? `sdd doctor --branch ${projectStatus.branch} --latest-only`
|
|
132
|
+
});
|
|
123
133
|
checks.push({
|
|
124
134
|
name: 'latest_run',
|
|
125
135
|
status: latestRunReady(projectStatus) ? 'PASS' : 'BLOCKED',
|
|
126
136
|
message: projectStatus.latestRun
|
|
127
|
-
? `run=${projectStatus.latestRun.runId} status=${projectStatus.latestRun.status} validation=${projectStatus.latestRun.validationStatus}
|
|
137
|
+
? `run=${projectStatus.latestRun.runId} status=${projectStatus.latestRun.status} validation=${projectStatus.latestRun.validationStatus}`
|
|
128
138
|
: 'run=none',
|
|
129
139
|
nextAction: projectStatus.latestRun ? `sdd run inspect ${projectStatus.latestRun.runId}` : `sdd do task <task_id> --branch ${projectStatus.branch}`
|
|
130
140
|
});
|
|
141
|
+
checks.push({
|
|
142
|
+
name: 'truth_reconciliation',
|
|
143
|
+
status: projectStatus.truthReconciliation ? 'BLOCKED' : 'PASS',
|
|
144
|
+
message: projectStatus.truthReconciliation ? `change=${projectStatus.truthReconciliation.changeKind} impact=${projectStatus.truthReconciliation.semanticImpact} owner=${projectStatus.truthReconciliation.ownerStage}-manager frontier=${projectStatus.truthReconciliation.minimalFrontier.join('>') || 'none'}` : 'none',
|
|
145
|
+
nextAction: projectStatus.truthReconciliation?.nextIntent.canonicalCommand
|
|
146
|
+
});
|
|
131
147
|
checks.push({
|
|
132
148
|
name: 'evidence_health',
|
|
133
149
|
status: projectStatus.latestRunStaleReasons.length === 0 && projectStatus.affectedFileConflicts.length === 0 ? 'PASS' : 'BLOCKED',
|
|
@@ -167,8 +183,8 @@ function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorRepor
|
|
|
167
183
|
checks.push({
|
|
168
184
|
name: 'capability_health',
|
|
169
185
|
status: projectStatus.capabilityHealth.status === 'blocked' ? 'BLOCKED' : 'PASS',
|
|
170
|
-
message: `status=${projectStatus.capabilityHealth.status} baseline=${projectStatus.capabilityHealth.baselineDomains.length}/${projectStatus.capabilityHealth.requiredProfessionalDomains.length} release_critical_gaps=${projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} evidence_candidate=${projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${projectStatus.capabilityHealth.evidence.blocked}` ,
|
|
171
|
-
nextAction: projectStatus.capabilityHealth.status === 'blocked' ? `Run sdd test
|
|
186
|
+
message: `status=${projectStatus.capabilityHealth.status} baseline=${projectStatus.capabilityHealth.baselineDomains.length}/${projectStatus.capabilityHealth.requiredProfessionalDomains.length} release_critical_gaps=${projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} adoption_closures=${projectStatus.capabilityHealth.adoptions.releaseCriticalClosures.join(',') || 'none'} evidence_candidate=${projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${projectStatus.capabilityHealth.evidence.blocked}` ,
|
|
187
|
+
nextAction: projectStatus.capabilityHealth.status === 'blocked' ? `Run sdd test <validation_unit_id-or-validation_text> for ${projectStatus.branch} to record accepted runtime evidence; capability output remains advisory.` : undefined
|
|
172
188
|
});
|
|
173
189
|
checks.push({
|
|
174
190
|
name: 'workflow_gate',
|
|
@@ -247,12 +263,13 @@ function renderReleaseDocument(input: {
|
|
|
247
263
|
`- tasks: total=${input.projectStatus.tasks.total} pending=${input.projectStatus.tasks.pending} in_progress=${input.projectStatus.tasks.inProgress} completed=${input.projectStatus.tasks.completed} blocked=${input.projectStatus.tasks.blocked} gaps=${input.projectStatus.tasks.gaps}`,
|
|
248
264
|
`- dependency_blockers: ${input.projectStatus.dependencyBlockers.map((blocker) => `${blocker.taskId}->${blocker.dependencyId}`).join(',') || 'none'}`,
|
|
249
265
|
`- task_risk: high=${input.projectStatus.taskRisk.highRiskTasks.join(',') || 'none'} medium=${input.projectStatus.taskRisk.mediumRiskTasks.join(',') || 'none'} source_boundary=${input.projectStatus.taskRisk.sourceBoundaryTasks.join(',') || 'none'} context=${input.projectStatus.taskRisk.contextRiskTasks.join(',') || 'none'} token=${input.projectStatus.taskRisk.tokenRiskTasks.join(',') || 'none'} performance=${input.projectStatus.taskRisk.performanceRiskTasks.join(',') || 'none'}`,
|
|
250
|
-
latestRun ? `- latest_run: ${latestRun.runId} status=${latestRun.status} validation=${latestRun.validationStatus}
|
|
266
|
+
latestRun ? `- latest_run: ${latestRun.runId} status=${latestRun.status} validation=${latestRun.validationStatus}` : '- latest_run: none',
|
|
251
267
|
evidence ? `- latest_run_evidence: route_preflight=${evidence.routePreflight} agent_executions=${evidence.agentExecutions} team_sessions=${evidence.teamSessions} worker_runtimes=${evidence.workerRuntimes} stale_worker_runtimes=${evidence.staleWorkerRuntimes} artifact_ingestions=${evidence.artifactIngestions}` : '- latest_run_evidence: none',
|
|
252
268
|
`- token_health: ${input.projectStatus.tokenProjection.health} estimated_tokens=${input.projectStatus.tokenProjection.estimatedTokens ?? 'unknown'} context_packages=${input.projectStatus.tokenProjection.contextPackages} team_runtime_decisions=${input.projectStatus.tokenProjection.teamRuntimeDecisions}`,
|
|
253
269
|
`- lifecycle_risk: status=${input.projectStatus.lifecycleRisk.status} profile=${input.projectStatus.lifecycleRisk.profile ?? 'none'} approval=${input.projectStatus.lifecycleRisk.approvalPolicy ?? 'none'} input=${input.projectStatus.lifecycleRisk.inputHash ?? 'none'} expected=${input.projectStatus.lifecycleRisk.expectedInputHash}`,
|
|
254
|
-
`- capability_health: status=${input.projectStatus.capabilityHealth.status} baseline=${input.projectStatus.capabilityHealth.baselineDomains.length}/${input.projectStatus.capabilityHealth.requiredProfessionalDomains.length} active=${input.projectStatus.capabilityHealth.activeDomains.join(',') || 'none'} release_critical_gaps=${input.projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} evidence_candidate=${input.projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${input.projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${input.projectStatus.capabilityHealth.evidence.blocked}`,
|
|
270
|
+
`- capability_health: status=${input.projectStatus.capabilityHealth.status} baseline=${input.projectStatus.capabilityHealth.baselineDomains.length}/${input.projectStatus.capabilityHealth.requiredProfessionalDomains.length} active=${input.projectStatus.capabilityHealth.activeDomains.join(',') || 'none'} release_critical_gaps=${input.projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} adoption_closures=${input.projectStatus.capabilityHealth.adoptions.releaseCriticalClosures.join(',') || 'none'} evidence_candidate=${input.projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${input.projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${input.projectStatus.capabilityHealth.evidence.blocked}`,
|
|
255
271
|
`- workflow_gate: decisions=${input.projectStatus.workflowGateHealth.decisions} latest=${input.projectStatus.workflowGateHealth.latestDecision ? `${input.projectStatus.workflowGateHealth.latestDecision.decisionKind}:${input.projectStatus.workflowGateHealth.latestDecision.status}:${input.projectStatus.workflowGateHealth.latestDecision.decisionId}` : 'none'}`,
|
|
272
|
+
input.projectStatus.truthReconciliation ? `- truth_reconciliation: change=${input.projectStatus.truthReconciliation.changeKind} impact=${input.projectStatus.truthReconciliation.semanticImpact} owner=${input.projectStatus.truthReconciliation.ownerStage}-manager frontier=${input.projectStatus.truthReconciliation.minimalFrontier.join('>') || 'none'} next=${input.projectStatus.truthReconciliation.nextIntent.canonicalCommand}` : '- truth_reconciliation: none',
|
|
256
273
|
`- doctor_fast: status=${input.doctorReport.status} checks=${input.doctorReport.checks.length}`,
|
|
257
274
|
'',
|
|
258
275
|
'## Next actions',
|
|
@@ -6,7 +6,7 @@ import type { SubagentDispatch, SubagentResult } from '../subagents/contracts.js
|
|
|
6
6
|
import type { WorkUnit } from '../work-units/contracts.js';
|
|
7
7
|
|
|
8
8
|
export type OrchestrationGateStatus = 'PASS' | 'WARN' | 'BLOCKED';
|
|
9
|
-
export type OrchestrationGateTarget = 'route' | 'execution' | 'handoff' | '
|
|
9
|
+
export type OrchestrationGateTarget = 'route' | 'execution' | 'handoff' | 'ship' | 'test';
|
|
10
10
|
|
|
11
11
|
export interface OrchestrationGate {
|
|
12
12
|
status: OrchestrationGateStatus;
|
|
@@ -2,8 +2,8 @@ import { STAGE_RUN_CONTRACT_VERSION, SUBAGENT_DISPATCH_CONTRACT_VERSION, SUBAGEN
|
|
|
2
2
|
import { evaluateContextLoadSignal, decideContextOffload, recordContextLoadSignalProjection, recordContextOffloadDecisionProjection } from '../context-offload/runtime.js';
|
|
3
3
|
import type { ContextLoadSignal, ContextOffloadDecision } from '../context-offload/contracts.js';
|
|
4
4
|
import type { ArtifactResultIngestionRecord } from '../artifacts/ingestion.js';
|
|
5
|
-
import { evaluateLifecycleRiskDecisionForModel } from '../risk/consumer-diagnostics.js';
|
|
6
|
-
import { lifecycleRiskDecisionScopeKey, recordLifecycleRiskDecisionProjection } from '../risk/kernel.js';
|
|
5
|
+
import { evaluateLifecycleRiskDecisionForModel, inspectLifecycleRiskDecisionForModel, type LifecycleRiskConsumerDiagnostic, type LifecycleRiskDiagnosticStatus } from '../risk/consumer-diagnostics.js';
|
|
6
|
+
import { lifecycleRiskDecisionScopeKey, recordLifecycleRiskDecisionProjection, readLifecycleRiskDecisionProjection } from '../risk/kernel.js';
|
|
7
7
|
import type { LifecycleRiskDecision } from '../risk/contracts.js';
|
|
8
8
|
import type { SddTask, SddTaskModel } from '../sdd-docs/task-parser.js';
|
|
9
9
|
import { recordStageRunProjection, recordWorkflowHandoffProjection, validateWorkflowHandoff } from '../stage-runtime/runtime.js';
|
|
@@ -15,23 +15,55 @@ import { recordWorkUnitProjection, workUnitBlocksGate, WORK_UNIT_PROJECTION_TYPE
|
|
|
15
15
|
import type { WorkUnit, WorkUnitStatus } from '../work-units/contracts.js';
|
|
16
16
|
import type { CompleteExecutionOrchestrationInput, EnsureExecutionOrchestrationInput, EnsureTaskOrchestrationInput, OrchestrationGate, OrchestrationGateTarget } from './contracts.js';
|
|
17
17
|
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
export interface StageLocalLifecycleRiskDecisionResolution {
|
|
19
|
+
status: LifecycleRiskDiagnosticStatus;
|
|
20
|
+
decision: LifecycleRiskDecision;
|
|
21
|
+
persisted: boolean;
|
|
22
|
+
diagnostic: LifecycleRiskConsumerDiagnostic;
|
|
23
|
+
reasons: string[];
|
|
24
|
+
nextAction: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function ensureLifecycleRiskDecision(projectRoot: string, model: SddTaskModel, input: { branch: string }): Promise<LifecycleRiskDecision> {
|
|
28
|
+
const decision = evaluateLifecycleRiskDecisionForModel(input.branch, model);
|
|
29
|
+
await recordLifecycleRiskDecisionProjection(projectRoot, decision);
|
|
30
|
+
return decision;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function resolveStageLocalLifecycleRiskDecision(projectRoot: string, model: SddTaskModel, input: { branch: string }): Promise<StageLocalLifecycleRiskDecisionResolution> {
|
|
34
|
+
const diagnostic = await inspectLifecycleRiskDecisionForModel(projectRoot, input.branch, model);
|
|
35
|
+
const existing = await readLifecycleRiskDecisionProjection(projectRoot, { branch: input.branch });
|
|
36
|
+
const nextAction = 'Run /sdd or /sdd:spec to create or refresh the lifecycle decision before using stage-local entries.';
|
|
37
|
+
if (existing && (diagnostic.status === 'fresh' || diagnostic.status === 'blocked')) {
|
|
38
|
+
return {
|
|
39
|
+
status: diagnostic.status,
|
|
40
|
+
decision: existing.payload,
|
|
41
|
+
persisted: true,
|
|
42
|
+
diagnostic,
|
|
43
|
+
reasons: diagnostic.reasons,
|
|
44
|
+
nextAction
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const expected = evaluateLifecycleRiskDecisionForModel(input.branch, model);
|
|
48
|
+
const reasons = stageLocalLifecycleBlockReasons(diagnostic);
|
|
49
|
+
return {
|
|
50
|
+
status: diagnostic.status,
|
|
51
|
+
decision: blockedStageLocalLifecycleDecision(expected, reasons),
|
|
52
|
+
persisted: false,
|
|
53
|
+
diagnostic,
|
|
54
|
+
reasons,
|
|
55
|
+
nextAction
|
|
56
|
+
};
|
|
26
57
|
}
|
|
27
58
|
|
|
28
59
|
export async function ensureTaskOrchestration(projectRoot: string, model: SddTaskModel, task: SddTask | null, input: EnsureTaskOrchestrationInput): Promise<{ riskDecision: LifecycleRiskDecision; stageRun: StageRun; contextLoadSignal: ContextLoadSignal; contextOffloadDecision: ContextOffloadDecision }> {
|
|
29
|
-
await
|
|
30
|
-
const riskDecision =
|
|
60
|
+
const lifecycle = await resolveStageLocalLifecycleRiskDecision(projectRoot, model, { branch: input.branch });
|
|
61
|
+
const riskDecision = lifecycle.decision;
|
|
31
62
|
const scope = runtimeScope(input.branch, input.taskId, input.runId);
|
|
32
63
|
const now = new Date().toISOString();
|
|
33
64
|
const stage = input.stage ?? 'do';
|
|
34
|
-
const
|
|
65
|
+
const stageStatus = lifecycle.status === 'fresh' ? input.status ?? 'active' : 'blocked';
|
|
66
|
+
const stageRun = buildStageRun(scope, stage, input.agent ?? 'implementer', stageStatus, riskDecision, input.outputRefs ?? [], now);
|
|
35
67
|
await recordStageRunProjection(projectRoot, stageRun);
|
|
36
68
|
const contextLoadSignal = evaluateContextLoadSignal({
|
|
37
69
|
scope,
|
|
@@ -133,7 +165,7 @@ export async function inspectOrchestrationGate(projectRoot: string, input: { bra
|
|
|
133
165
|
blockingReasons.push(`Lifecycle risk blocks workflow: ${riskDecision.reasons.join(' ')}`);
|
|
134
166
|
} else if (riskDecision?.approvalPolicy === 'human-required' && target !== 'test') {
|
|
135
167
|
blockingReasons.push('Lifecycle risk requires human approval before automated workflow continuation.');
|
|
136
|
-
} else if (riskDecision?.approvalPolicy === 'review-required' &&
|
|
168
|
+
} else if (riskDecision?.approvalPolicy === 'review-required' && target === 'ship') {
|
|
137
169
|
warnings.push('Lifecycle risk requires review evidence before final workflow closure.');
|
|
138
170
|
}
|
|
139
171
|
if (contextOffloadDecision?.action === 'block-for-curation') {
|
|
@@ -144,7 +176,7 @@ export async function inspectOrchestrationGate(projectRoot: string, input: { bra
|
|
|
144
176
|
const blockingSubagentDispatches = dispatches.filter((dispatch) => subagentDispatchBlocksGate(dispatch, resultByDispatch.get(dispatch.id) ?? null) && dispatch.requiredBefore === gateName);
|
|
145
177
|
blockingReasons.push(...blockingWorkUnits.map((workUnit) => `Work unit ${workUnit.id} blocks ${gateName}: status=${workUnit.status}.`));
|
|
146
178
|
blockingReasons.push(...blockingSubagentDispatches.map((dispatch) => `Subagent dispatch ${dispatch.id} blocks ${dispatch.requiredBefore}: status=${dispatch.status}.`));
|
|
147
|
-
if (
|
|
179
|
+
if (target === 'ship' && handoff && handoff.status !== 'accepted' && handoff.status !== 'proposed') {
|
|
148
180
|
blockingReasons.push(`Workflow handoff ${handoff.fromStage}->${handoff.toStage} is ${handoff.status}.`);
|
|
149
181
|
}
|
|
150
182
|
const status = blockingReasons.length > 0 ? 'BLOCKED' : warnings.length > 0 ? 'WARN' : 'PASS';
|
|
@@ -179,8 +211,31 @@ export function lifecycleAutonomyCeilingFromDecision(decision: LifecycleRiskDeci
|
|
|
179
211
|
return 'research_before_implementation';
|
|
180
212
|
}
|
|
181
213
|
|
|
182
|
-
function
|
|
183
|
-
return
|
|
214
|
+
function blockedStageLocalLifecycleDecision(expected: LifecycleRiskDecision, reasons: string[]): LifecycleRiskDecision {
|
|
215
|
+
return {
|
|
216
|
+
...expected,
|
|
217
|
+
profile: 'blocked',
|
|
218
|
+
requiredStages: [],
|
|
219
|
+
blockedStages: expected.requiredStages,
|
|
220
|
+
requiredEvidence: [],
|
|
221
|
+
requiredReviews: [],
|
|
222
|
+
humanCheckpointRequired: true,
|
|
223
|
+
approvalPolicy: 'blocked',
|
|
224
|
+
confidence: 'high',
|
|
225
|
+
reasons,
|
|
226
|
+
generatedAt: new Date().toISOString()
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function stageLocalLifecycleBlockReasons(diagnostic: LifecycleRiskConsumerDiagnostic): string[] {
|
|
231
|
+
const headline = diagnostic.status === 'missing'
|
|
232
|
+
? 'Stage-local entry requires an active lifecycle decision created by /sdd or /sdd:spec.'
|
|
233
|
+
: diagnostic.status === 'stale'
|
|
234
|
+
? 'Stage-local entry requires a refreshed lifecycle decision because the active projection is stale.'
|
|
235
|
+
: diagnostic.status === 'incompatible'
|
|
236
|
+
? 'Stage-local entry requires a refreshed lifecycle decision because the active projection is incompatible.'
|
|
237
|
+
: 'Stage-local entry is blocked by the active lifecycle decision.';
|
|
238
|
+
return uniqueStrings([headline, ...diagnostic.reasons]);
|
|
184
239
|
}
|
|
185
240
|
|
|
186
241
|
function buildStageRun(scope: RuntimeScope, stage: SddStage, agent: string, status: StageRun['status'], riskDecision: LifecycleRiskDecision, outputRefs: RuntimeRef[], now: string): StageRun {
|
|
@@ -308,9 +363,6 @@ function nextStage(stage: SddStage): SddStage {
|
|
|
308
363
|
return 'goal-verify';
|
|
309
364
|
}
|
|
310
365
|
if (stage === 'goal-verify') {
|
|
311
|
-
return 'sync-back';
|
|
312
|
-
}
|
|
313
|
-
if (stage === 'sync-back') {
|
|
314
366
|
return 'ship';
|
|
315
367
|
}
|
|
316
368
|
return 'do';
|
|
@@ -320,8 +372,8 @@ function gateNameForTarget(target: OrchestrationGateTarget): WorkUnit['requiredB
|
|
|
320
372
|
if (target === 'ship') {
|
|
321
373
|
return 'ship';
|
|
322
374
|
}
|
|
323
|
-
if (target === '
|
|
324
|
-
return '
|
|
375
|
+
if (target === 'test') {
|
|
376
|
+
return 'handoff';
|
|
325
377
|
}
|
|
326
378
|
if (target === 'execution') {
|
|
327
379
|
return 'stage-output';
|
|
@@ -33,7 +33,7 @@ test('Phase 8 contract objects expose required runtime boundaries', () => {
|
|
|
33
33
|
contract: LIFECYCLE_RISK_DECISION_CONTRACT_VERSION,
|
|
34
34
|
scope,
|
|
35
35
|
profile: 'compact',
|
|
36
|
-
requiredStages: ['tasks', 'verifies', 'do', 'test', 'goal-verify'
|
|
36
|
+
requiredStages: ['tasks', 'verifies', 'do', 'test', 'goal-verify'],
|
|
37
37
|
skippedStages: [],
|
|
38
38
|
blockedStages: [],
|
|
39
39
|
requiredEvidence: [],
|
|
@@ -209,9 +209,8 @@ test('work units, subagents, context offload, evidence, and model artifacts stay
|
|
|
209
209
|
commands: [],
|
|
210
210
|
acceptanceCoverage: [],
|
|
211
211
|
capabilityEvidence: [],
|
|
212
|
-
syncBackReady: false,
|
|
213
212
|
gaps: [],
|
|
214
|
-
next: 'sdd
|
|
213
|
+
next: 'sdd test close --branch master --target goal-verify --compact-json',
|
|
215
214
|
generatedAt: now
|
|
216
215
|
};
|
|
217
216
|
|
|
@@ -38,7 +38,7 @@ test('lifecycle risk kernel selects compact for bounded context and evidence sig
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
assert.equal(decision.profile, 'compact');
|
|
41
|
-
assert.deepEqual(decision.requiredStages, ['tasks', 'verifies', 'do', 'test', 'goal-verify'
|
|
41
|
+
assert.deepEqual(decision.requiredStages, ['tasks', 'verifies', 'do', 'test', 'goal-verify']);
|
|
42
42
|
assert.equal(decision.approvalPolicy, 'review-required');
|
|
43
43
|
assert.equal(decision.requiredReviews.some((review) => review.kind === 'evidence'), true);
|
|
44
44
|
});
|
|
@@ -52,7 +52,7 @@ test('lifecycle risk kernel selects full for source runtime and security risks',
|
|
|
52
52
|
const decision = evaluateLifecycleRiskDecisionFromProfile(profile, knownFacts(), '2026-05-01T00:00:00.000Z');
|
|
53
53
|
|
|
54
54
|
assert.equal(decision.profile, 'full');
|
|
55
|
-
assert.deepEqual(decision.requiredStages, ['spec', 'plan', 'tasks', 'verifies', 'do', 'test', 'goal-verify', '
|
|
55
|
+
assert.deepEqual(decision.requiredStages, ['spec', 'plan', 'tasks', 'verifies', 'do', 'test', 'goal-verify', 'ship']);
|
|
56
56
|
assert.equal(decision.requiredReviews.some((review) => review.kind === 'source-boundary'), true);
|
|
57
57
|
assert.equal(decision.requiredReviews.some((review) => review.kind === 'runtime-state'), true);
|
|
58
58
|
assert.equal(decision.requiredReviews.some((review) => review.kind === 'security'), true);
|
|
@@ -90,7 +90,7 @@ test('lifecycle risk kernel blocks unknown intent or blocked signals first', ()
|
|
|
90
90
|
|
|
91
91
|
assert.equal(unknownIntent.profile, 'blocked');
|
|
92
92
|
assert.deepEqual(unknownIntent.requiredStages, []);
|
|
93
|
-
assert.deepEqual(unknownIntent.blockedStages, ['spec', 'plan', 'tasks', 'verifies', 'do', 'test', 'goal-verify', '
|
|
93
|
+
assert.deepEqual(unknownIntent.blockedStages, ['spec', 'plan', 'tasks', 'verifies', 'do', 'test', 'goal-verify', 'ship']);
|
|
94
94
|
assert.equal(unknownIntent.approvalPolicy, 'blocked');
|
|
95
95
|
assert.equal(blockedSignal.profile, 'blocked');
|
|
96
96
|
assert.equal(blockedSignal.approvalPolicy, 'blocked');
|