sdd-agent-platform 0.4.0 → 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 +36 -39
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +72 -71
- 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 +13 -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 +16 -20
- 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 +4 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +3 -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 +7 -7
- 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 +277 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -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 +16 -7
- 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.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- 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 +59 -66
- 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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +55 -19
- 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 +20 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +218 -18
- 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 +17 -17
- 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.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +32 -2
- 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.d.ts +2 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +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 +28 -13
- 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 +61 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +192 -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 +73 -17
- 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-inspection.js +11 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
- 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 +168 -18
- 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/events.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +22 -54
- 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/invocation-ledger.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +53 -9
- 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 +51 -34
- 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 +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +169 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- 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 +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +2 -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 +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +109 -14
- 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/context.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +276 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- 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 +15 -4
- 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 +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +139 -38
- 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 +105 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +343 -8
- 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 +348 -3
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +1017 -8
- 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 +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +19 -20
- 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 +44 -37
- 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 +19 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- 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 +213 -111
- 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 +28 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +546 -125
- 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 +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +450 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +105 -30
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +164 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- 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.d.ts +8 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- 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 +80 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +674 -41
- 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/dist/workflow-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
- 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 +72 -71
- 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 +52 -6
- 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 +44 -29
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +15 -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 +17 -20
- 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 +4 -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 +7 -7
- 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 +217 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -3
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +57 -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 +17 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +16 -7
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +10 -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 +34 -13
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +60 -67
- 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 +58 -19
- 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 +3 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +8 -3
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +319 -20
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +17 -17
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +42 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
- 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 +45 -4
- 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 +32 -13
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +68 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +212 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +391 -6
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +78 -17
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
- 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 +173 -18
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +24 -59
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +59 -9
- 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 +53 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +55 -41
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +252 -0
- 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 +2 -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 +131 -14
- 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/context.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +306 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +15 -4
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +261 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +169 -41
- 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 +497 -8
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +560 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1510 -9
- 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 +21 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +20 -20
- 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 +46 -42
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +18 -52
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +84 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +138 -64
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +226 -116
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +148 -48
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +619 -136
- 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 +383 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +556 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +131 -8
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +117 -30
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
- 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 +425 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +507 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +182 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +194 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +115 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +19 -4
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +224 -0
- 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 +851 -9
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +862 -45
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -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 +70 -4
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js +4 -4
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/test.js +272 -5
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +9 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +257 -20
- 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 +42 -27
- 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 +27 -2
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +5 -3
- 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 +46 -84
- 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 +72 -71
- 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 +13 -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 +16 -20
- 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 +4 -1
- package/packages/core/dist/contracts.js +3 -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 +7 -7
- 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 +277 -3
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +61 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/packages/core/dist/execution/agent-execution-records.js +15 -8
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -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 +16 -7
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- 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 +59 -66
- 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 +3 -0
- package/packages/core/dist/lifecycle/ship.js +55 -19
- 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 +20 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +218 -18
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +17 -17
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/packages/core/dist/registries/agent-runtime-static.js +32 -2
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.d.ts +2 -17
- package/packages/core/dist/registries/capability-sources.js +222 -10
- package/packages/core/dist/registries/capability-sources.js.map +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 +28 -13
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +61 -1
- package/packages/core/dist/router/route-projection.d.ts +3 -1
- package/packages/core/dist/router/route-projection.js +192 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +73 -17
- 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-inspection.js +11 -4
- package/packages/core/dist/router/runtime-inspection.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +31 -3
- 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 +168 -18
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/events.js +2 -2
- package/packages/core/dist/run-state/events.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +3 -3
- package/packages/core/dist/run-state/inspect-run.js +22 -54
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/invocation-ledger.js +2 -2
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +53 -9
- 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 +51 -34
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +65 -0
- package/packages/core/dist/run-state/task-evidence.js +169 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- 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 +2 -0
- package/packages/core/dist/run-state.js +2 -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 +20 -0
- package/packages/core/dist/runtime-paths.js +109 -14
- 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/context.js +1 -1
- package/packages/core/dist/sdd-docs/context.js.map +1 -1
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +276 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +15 -4
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/packages/core/dist/sdd-docs/task-parser.js +139 -38
- 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 +105 -1
- package/packages/core/dist/status/project-status.js +343 -8
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +348 -3
- package/packages/core/dist/storage/runtime-store.js +1017 -8
- 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 +21 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +19 -20
- 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 +44 -37
- 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 +19 -49
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +213 -111
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +28 -3
- package/packages/core/dist/verification/test-runtime.js +546 -125
- 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 +76 -0
- package/packages/core/dist/verification/validation-wave.js +450 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +3 -1
- package/packages/core/dist/verification/verify-contract.js +105 -30
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +2 -0
- package/packages/core/dist/verification.js +2 -0
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +164 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +182 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +88 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/packages/core/dist/workflow-state/dependencies.js +25 -11
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- 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 +80 -3
- package/packages/core/dist/workflow-state/resolve.js +674 -41
- 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/dist/workflow-state.d.ts +1 -0
- package/packages/core/dist/workflow-state.js +1 -0
- package/packages/core/dist/workflow-state.js.map +1 -1
- 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 -221
- 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 -91
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -395
- 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 -248
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -522
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -446
- 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 -221
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -91
- package/packages/core/dist/sync-back/inspect.js +0 -395
- 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
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
1
2
|
import { SDD_RESULT_CONTRACT, SDD_RESULT_VERSION } from '../contracts.js';
|
|
2
3
|
import { readArtifact } from '../run-state/artifacts.js';
|
|
3
|
-
import {
|
|
4
|
+
import { getBranchStageEvidencePathFromRef, isBranchStageEvidenceRef, normalizeStageEvidenceOrLegacyArtifactRef, toEvidencePayloadFileName } from '../runtime-paths.js';
|
|
4
5
|
import { validateArtifactTrust } from './sdd-evidence.js';
|
|
5
6
|
import type { ArtifactTrustValidationReport, ContractValidationIssue } from './sdd-evidence.js';
|
|
6
7
|
|
|
@@ -25,29 +26,29 @@ export interface SddResultValidationReport {
|
|
|
25
26
|
|
|
26
27
|
export async function validateSddResultArtifact(projectRoot: string, runId: string, runRelativeArtifactPath: string, options: { expectedTask?: string; expectedAgent?: string } = {}): Promise<SddResultValidationReport> {
|
|
27
28
|
const issues: ContractValidationIssue[] = [];
|
|
28
|
-
let
|
|
29
|
+
let evidenceRef: string;
|
|
29
30
|
try {
|
|
30
|
-
|
|
31
|
+
evidenceRef = normalizeStageEvidenceOrLegacyArtifactRef(runRelativeArtifactPath);
|
|
31
32
|
} catch (error) {
|
|
32
|
-
return { valid: false, result: null, issues: [contractIssue('artifacts', messageFromError(error), 'Use a
|
|
33
|
+
return { valid: false, result: null, issues: [contractIssue('artifacts', messageFromError(error), 'Use a repo-relative stage evidence ref under .sdd/runs/<branch>/<stage>/*.md. Source/test files belong in ## Evidence, not in sdd-result.artifacts.')] };
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
let raw: string;
|
|
36
37
|
try {
|
|
37
|
-
raw = await
|
|
38
|
+
raw = await readSddResultEvidence(projectRoot, runId, evidenceRef);
|
|
38
39
|
} catch (error) {
|
|
39
|
-
return { valid: false, result: null, issues: [contractIssue('artifacts', `Cannot read
|
|
40
|
+
return { valid: false, result: null, issues: [contractIssue('artifacts', `Cannot read evidence ${evidenceRef}: ${messageFromError(error)}`, `Create the expected stage evidence and pass ${evidenceRef}.`)] };
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
if (raw.trim().length === 0) {
|
|
43
|
-
issues.push(contractIssue('artifacts', `
|
|
44
|
+
issues.push(contractIssue('artifacts', `Evidence ${evidenceRef} is empty.`, 'Write non-empty evidence and an sdd-result block.'));
|
|
44
45
|
}
|
|
45
46
|
const parsed = parseSddResultMarkdown(raw);
|
|
46
47
|
issues.push(...parsed.issues);
|
|
47
48
|
let trust: ArtifactTrustValidationReport | undefined;
|
|
48
49
|
if (parsed.result) {
|
|
49
|
-
issues.push(...validateSddResult(parsed.result, { ...options, runRelativeArtifactPath }));
|
|
50
|
-
trust = validateArtifactTrust(raw, parsed.result,
|
|
50
|
+
issues.push(...validateSddResult(parsed.result, { ...options, runRelativeArtifactPath: evidenceRef }));
|
|
51
|
+
trust = validateArtifactTrust(raw, parsed.result, evidenceRef, options);
|
|
51
52
|
if (!trust.valid) {
|
|
52
53
|
issues.push(...trust.issues);
|
|
53
54
|
}
|
|
@@ -135,22 +136,30 @@ function validateSddResultMetadata(metadata: Record<string, string | string[]>):
|
|
|
135
136
|
issues.push(contractIssue('status', `Unsupported sdd-result status ${status ?? 'missing'}.`, 'Use PASS, PASS_WITH_GAPS, FAIL, BLOCKED, TIMED_OUT, or CANCELLED.'));
|
|
136
137
|
}
|
|
137
138
|
if (artifacts.length === 0) {
|
|
138
|
-
issues.push(contractIssue('artifacts', 'sdd-result artifacts must contain at least one
|
|
139
|
+
issues.push(contractIssue('artifacts', 'sdd-result artifacts must contain at least one evidence ref.', 'Add the current stage evidence ref, for example .sdd/runs/<branch>/<stage>/<file>.md. Source/test files belong in ## Evidence.'));
|
|
139
140
|
}
|
|
140
141
|
for (const artifactPath of artifacts) {
|
|
141
|
-
|
|
142
|
-
if (!artifactPath.replace(/\\/g, '/').startsWith('artifacts/')) {
|
|
143
|
-
issues.push(contractIssue('artifacts', `Source/test path ${artifactPath} is not a run artifact reference.`, 'Move source/test file citations to ## Evidence; keep only run-relative artifacts/<file> paths in sdd-result.artifacts.'));
|
|
144
|
-
}
|
|
142
|
+
validateSddResultEvidenceReference(artifactPath, issues);
|
|
145
143
|
}
|
|
146
144
|
return issues;
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
function
|
|
147
|
+
async function readSddResultEvidence(projectRoot: string, runId: string, evidenceRef: string): Promise<string> {
|
|
148
|
+
if (isBranchStageEvidenceRef(evidenceRef)) {
|
|
149
|
+
try {
|
|
150
|
+
return await readFile(getBranchStageEvidencePathFromRef(projectRoot, evidenceRef), 'utf8');
|
|
151
|
+
} catch {
|
|
152
|
+
return readArtifact(projectRoot, runId, toEvidencePayloadFileName(evidenceRef));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return readArtifact(projectRoot, runId, toEvidencePayloadFileName(evidenceRef));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function validateSddResultEvidenceReference(value: string, issues: ContractValidationIssue[], field = 'artifacts'): void {
|
|
150
159
|
try {
|
|
151
|
-
|
|
160
|
+
normalizeStageEvidenceOrLegacyArtifactRef(value);
|
|
152
161
|
} catch (error) {
|
|
153
|
-
issues.push(contractIssue(field, messageFromError(error), 'Use a
|
|
162
|
+
issues.push(contractIssue(field, messageFromError(error), 'Use a repo-relative stage evidence ref under .sdd/runs/<branch>/<stage>/*.md.'));
|
|
154
163
|
}
|
|
155
164
|
}
|
|
156
165
|
|
|
@@ -19,7 +19,15 @@ test('initProject creates readable project config', async () => {
|
|
|
19
19
|
assert.equal(config.contract, 'phase-1.2-project-contract');
|
|
20
20
|
assert.equal(config.sdd.docs_language, 'zh-CN');
|
|
21
21
|
assert.equal(config.lifecycle.decision_required, true);
|
|
22
|
-
assert.
|
|
22
|
+
assert.equal(config.runtime.runtime_store, '.sdd/runtime.sqlite');
|
|
23
|
+
assert.equal(config.runtime.stage_evidence, '.sdd/runs/<branch>/<stage>/*.md');
|
|
24
|
+
assert.equal(config.runtime.truth_alignment_mode, 'required');
|
|
25
|
+
const renderedConfig = await readFile(init.configPath, 'utf8');
|
|
26
|
+
assert.match(renderedConfig, /Project-level SDD document prose language/);
|
|
27
|
+
assert.match(renderedConfig, /runtime_store: \.sdd\/runtime\.sqlite/);
|
|
28
|
+
assert.match(renderedConfig, /stage_evidence: \.sdd\/runs\/<branch>\/<stage>\/\*\.md/);
|
|
29
|
+
assert.match(renderedConfig, /truth_alignment_mode: required/);
|
|
30
|
+
await assert.rejects(access(path.join(root, '.sdd', 'runs')));
|
|
23
31
|
} finally {
|
|
24
32
|
await rm(root, { recursive: true, force: true });
|
|
25
33
|
}
|
|
@@ -186,13 +194,13 @@ test('initProject projects managed Claude Code entries by default', async () =>
|
|
|
186
194
|
const init = await initProject(root);
|
|
187
195
|
const skill = await readFile(path.join(root, '.claude', 'skills', 'sdd', 'SKILL.md'), 'utf8');
|
|
188
196
|
const doctorCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'doctor.md'), 'utf8');
|
|
197
|
+
const updateCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'update.md'), 'utf8');
|
|
189
198
|
|
|
190
199
|
const specCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'spec.md'), 'utf8');
|
|
191
200
|
const planCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'plan.md'), 'utf8');
|
|
192
201
|
const tasksCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'tasks.md'), 'utf8');
|
|
193
202
|
const doCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'do.md'), 'utf8');
|
|
194
203
|
const testCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'test.md'), 'utf8');
|
|
195
|
-
const syncBackCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'sync-back.md'), 'utf8');
|
|
196
204
|
const shipCommand = await readFile(path.join(root, '.claude', 'commands', 'sdd', 'ship.md'), 'utf8');
|
|
197
205
|
|
|
198
206
|
assert.equal(init.aiTools.length, 1);
|
|
@@ -203,13 +211,13 @@ test('initProject projects managed Claude Code entries by default', async () =>
|
|
|
203
211
|
assert.match(skill, /do not paste or restate full status/);
|
|
204
212
|
assert.match(skill, /natural-language intent/);
|
|
205
213
|
assert.match(skill, /CLI\/core output/);
|
|
206
|
-
assert.match(skill,
|
|
214
|
+
assert.match(skill, /projected command bundle/);
|
|
207
215
|
assert.match(skill, /ambiguous after status/);
|
|
208
216
|
assert.match(skill, /sdd tasks inspect <task_id>/);
|
|
209
|
-
assert.
|
|
210
|
-
assert.match(skill,
|
|
211
|
-
assert.match(skill,
|
|
212
|
-
assert.
|
|
217
|
+
assert.doesNotMatch(skill, /sync-back|sync_back/);
|
|
218
|
+
assert.match(skill, /sdd ship close --branch <branch> --json/);
|
|
219
|
+
assert.match(skill, /`test -> goal-verify`/);
|
|
220
|
+
assert.doesNotMatch(skill, /follow apply_policy/);
|
|
213
221
|
assert.match(skill, /workflow_status=not_started/);
|
|
214
222
|
assert.match(skill, /workflow branch entry/);
|
|
215
223
|
assert.match(doctorCommand, /sdd instructions doctor --json/);
|
|
@@ -218,14 +226,15 @@ test('initProject projects managed Claude Code entries by default', async () =>
|
|
|
218
226
|
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'init.md')), /ENOENT/);
|
|
219
227
|
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'verify.md')), /ENOENT/);
|
|
220
228
|
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'verifies.md')), /ENOENT/);
|
|
221
|
-
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'update.md')), /ENOENT/);
|
|
222
229
|
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'instructions.md')), /ENOENT/);
|
|
230
|
+
await assert.rejects(access(path.join(root, '.claude', 'commands', 'sdd', 'sync-back.md')), /ENOENT/);
|
|
223
231
|
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-root'), false);
|
|
224
232
|
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-init'), false);
|
|
225
233
|
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-verify'), false);
|
|
226
234
|
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-verifies'), false);
|
|
227
|
-
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-update'),
|
|
235
|
+
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-update'), true);
|
|
228
236
|
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-instructions'), false);
|
|
237
|
+
assert.equal(init.aiTools[0].entries.some((entry) => entry.id === 'sdd-sync-back'), false);
|
|
229
238
|
assert.match(specCommand, /sdd instructions spec --json/);
|
|
230
239
|
assert.match(planCommand, /sdd instructions plan --json/);
|
|
231
240
|
assert.match(tasksCommand, /sdd instructions tasks --json/);
|
|
@@ -235,31 +244,37 @@ test('initProject projects managed Claude Code entries by default', async () =>
|
|
|
235
244
|
assert.match(tasksCommand, /metadata inside the ```sdd-task fenced block/);
|
|
236
245
|
assert.match(specCommand, /workflow partition entry/);
|
|
237
246
|
assert.match(specCommand, /not a technical design/);
|
|
238
|
-
assert.match(planCommand, /Refine
|
|
239
|
-
assert.match(planCommand, /
|
|
240
|
-
assert.match(planCommand, /
|
|
247
|
+
assert.match(planCommand, /Refine specs\/<branch>\/plan\.md and \.sdd\/runs\/<branch>\/plan\/\*\.md/);
|
|
248
|
+
assert.match(planCommand, /technical bridge from approved spec to task-ready execution/);
|
|
249
|
+
assert.match(planCommand, /plan-collaboration-contract-vN\.md/);
|
|
241
250
|
assert.match(planCommand, /PlantUML/);
|
|
242
|
-
assert.match(planCommand, /state
|
|
243
|
-
assert.match(tasksCommand, /
|
|
244
|
-
assert.match(tasksCommand, /
|
|
251
|
+
assert.match(planCommand, /state diagrams for state-machine risk/);
|
|
252
|
+
assert.match(tasksCommand, /user-visible bundle for the `tasks -> verifies` runtime stages/);
|
|
253
|
+
assert.match(tasksCommand, /tasks-collaboration-contract-vN\.md/);
|
|
254
|
+
assert.match(tasksCommand, /sdd tasks close --branch <branch> --target verifies --json/);
|
|
255
|
+
assert.match(tasksCommand, /verifies-collaboration-contract-vN\.md/);
|
|
245
256
|
assert.match(doCommand, /sdd status/);
|
|
246
257
|
assert.match(doCommand, /sdd instructions do --json/);
|
|
247
|
-
assert.match(doCommand, /sdd tasks inspect <
|
|
248
|
-
assert.match(doCommand, /
|
|
249
|
-
assert.match(doCommand,
|
|
250
|
-
assert.match(doCommand, /
|
|
251
|
-
assert.match(doCommand, /sdd
|
|
258
|
+
assert.match(doCommand, /sdd tasks inspect <bound_task_id>/);
|
|
259
|
+
assert.match(doCommand, /runs\/<branch>\/do\/implementation-vN\.md/);
|
|
260
|
+
assert.match(doCommand, /runs\/<branch>\/do\/code-review-vN\.md/);
|
|
261
|
+
assert.match(doCommand, /runs\/<branch>\/do\/do-manager-vN\.md/);
|
|
262
|
+
assert.match(doCommand, /sdd do task <task_id-or-task-text> --branch <branch>/);
|
|
263
|
+
assert.match(doCommand, /write only SQLite projections\/run state/);
|
|
252
264
|
assert.match(testCommand, /sdd instructions test --json/);
|
|
253
|
-
assert.match(testCommand, /sdd
|
|
254
|
-
assert.match(testCommand, /
|
|
255
|
-
assert.match(
|
|
256
|
-
assert.match(
|
|
257
|
-
assert.match(
|
|
258
|
-
assert.match(
|
|
265
|
+
assert.match(testCommand, /sdd test <validation_unit_id-or-validation_text> --branch <branch>/);
|
|
266
|
+
assert.match(testCommand, /Bind validation intent to an accepted verify\.md validation unit/);
|
|
267
|
+
assert.match(testCommand, /test-collaboration-contract-vN\.md/);
|
|
268
|
+
assert.match(testCommand, /user-visible bundle for the `test -> goal-verify` runtime stages/);
|
|
269
|
+
assert.match(testCommand, /sdd test close --branch <branch> --target goal-verify --json/);
|
|
270
|
+
assert.match(testCommand, /runs\/<branch>\/goal-verify\/\*\.md/);
|
|
271
|
+
assert.match(updateCommand, /sdd update/);
|
|
272
|
+
assert.match(updateCommand, /does not execute imported skills/);
|
|
273
|
+
assert.doesNotMatch(`${skill}\n${doCommand}\n${testCommand}\n${shipCommand}\n${updateCommand}`, /sync-back|sync_back/);
|
|
259
274
|
assert.match(shipCommand, /sdd instructions ship --json/);
|
|
260
|
-
assert.match(shipCommand, /sdd ship --branch <branch> --
|
|
261
|
-
assert.match(shipCommand, /
|
|
262
|
-
assert.match(shipCommand, /
|
|
275
|
+
assert.match(shipCommand, /sdd ship close --branch <branch> --json/);
|
|
276
|
+
assert.match(shipCommand, /truthAlignment/);
|
|
277
|
+
assert.match(shipCommand, /ship-collaboration-contract-vN\.md/);
|
|
263
278
|
} finally {
|
|
264
279
|
await rm(root, { recursive: true, force: true });
|
|
265
280
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { applyAiToolEntries, type AiProjectionResult, type AiToolSelection } from '../ai-tools.js';
|
|
4
|
-
import {
|
|
4
|
+
import { importRuntimeSkillCapability, type RuntimeSkillImportRequest, type RuntimeSkillImportResult } from '../router/runtime-import.js';
|
|
5
|
+
import { getProjectConfigPath, getSddDir } from '../runtime-paths.js';
|
|
5
6
|
import { detectProjectConfig, readProjectConfig, renderProjectConfig } from './project-config.js';
|
|
6
7
|
import { assertSafePathSegment } from '../path-safety.js';
|
|
7
8
|
import { exists } from '../storage/json-io.js';
|
|
@@ -27,17 +28,18 @@ export interface InitProjectResult {
|
|
|
27
28
|
created: boolean;
|
|
28
29
|
documents: InitDocumentsResult;
|
|
29
30
|
aiTools: AiProjectionResult[];
|
|
31
|
+
skillImports: RuntimeSkillImportResult[];
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export async function applyInitDocuments(projectRoot: string, options: { branch: string; force?: boolean; scaffoldDocuments: boolean; docsLanguage: string }): Promise<InitDocumentsResult> {
|
|
33
35
|
assertSafePathSegment(options.branch, 'branch');
|
|
34
36
|
const docsRoot = path.join(projectRoot, 'specs', options.branch);
|
|
35
|
-
const
|
|
37
|
+
const tasksContent = renderInitTasksDocument(options.branch, options.docsLanguage);
|
|
36
38
|
const documents = [
|
|
37
|
-
{ name: 'spec.md', content: renderInitSpecDocument(options.branch,
|
|
38
|
-
{ name: 'plan.md', content: renderInitPlanDocument(options.branch,
|
|
39
|
-
{ name: 'tasks.md', content:
|
|
40
|
-
{ name: 'verify.md', content: renderInitVerifyDocument(options.branch,
|
|
39
|
+
{ name: 'spec.md', content: renderInitSpecDocument(options.branch, options.docsLanguage) },
|
|
40
|
+
{ name: 'plan.md', content: renderInitPlanDocument(options.branch, options.docsLanguage) },
|
|
41
|
+
{ name: 'tasks.md', content: tasksContent },
|
|
42
|
+
{ name: 'verify.md', content: renderInitVerifyDocument(options.branch, options.docsLanguage) }
|
|
41
43
|
];
|
|
42
44
|
|
|
43
45
|
if (!options.scaffoldDocuments) {
|
|
@@ -81,16 +83,14 @@ export async function applyInitDocuments(projectRoot: string, options: { branch:
|
|
|
81
83
|
return { branch: options.branch, root: path.relative(projectRoot, docsRoot), documents: reports };
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
export async function initProject(projectRoot: string, options: { force?: boolean; aiTool?: AiToolSelection; branch?: string; scaffoldDocuments?: boolean } = {}): Promise<InitProjectResult> {
|
|
86
|
+
export async function initProject(projectRoot: string, options: { force?: boolean; aiTool?: AiToolSelection; branch?: string; scaffoldDocuments?: boolean; skillImports?: RuntimeSkillImportRequest[] } = {}): Promise<InitProjectResult> {
|
|
85
87
|
const sddDir = getSddDir(projectRoot);
|
|
86
|
-
const runsDir = getRunsDir(projectRoot);
|
|
87
88
|
const configPath = getProjectConfigPath(projectRoot);
|
|
88
89
|
const requestedBranch = options.branch?.trim();
|
|
89
90
|
const scaffoldDocuments = options.scaffoldDocuments ?? true;
|
|
90
91
|
const branch = requestedBranch || 'master';
|
|
91
92
|
assertSafePathSegment(branch, 'branch');
|
|
92
|
-
await mkdir(
|
|
93
|
-
|
|
93
|
+
await mkdir(sddDir, { recursive: true });
|
|
94
94
|
let created = false;
|
|
95
95
|
let projectConfig = null;
|
|
96
96
|
if (options.force || !await exists(configPath)) {
|
|
@@ -115,5 +115,9 @@ export async function initProject(projectRoot: string, options: { force?: boolea
|
|
|
115
115
|
|
|
116
116
|
await mkdir(sddDir, { recursive: true });
|
|
117
117
|
const aiTools = await applyAiToolEntries(projectRoot, { tool: options.aiTool ?? 'auto' });
|
|
118
|
-
|
|
118
|
+
const skillImports: RuntimeSkillImportResult[] = [];
|
|
119
|
+
for (const request of options.skillImports ?? []) {
|
|
120
|
+
skillImports.push(await importRuntimeSkillCapability(projectRoot, { ...request, force: request.force ?? options.force }));
|
|
121
|
+
}
|
|
122
|
+
return { configPath, created, documents, aiTools, skillImports };
|
|
119
123
|
}
|
|
@@ -41,7 +41,9 @@ export interface ProjectConfig<TAgentRuntimeConfig = unknown> {
|
|
|
41
41
|
runtime: {
|
|
42
42
|
background_write: boolean;
|
|
43
43
|
worktree_isolation: boolean;
|
|
44
|
-
|
|
44
|
+
runtime_store: string;
|
|
45
|
+
stage_evidence: string;
|
|
46
|
+
truth_alignment_mode: string;
|
|
45
47
|
};
|
|
46
48
|
lifecycle: {
|
|
47
49
|
decision_required: boolean;
|
|
@@ -93,7 +95,9 @@ export function defaultProjectConfig<TAgentRuntimeConfig = unknown>(projectName:
|
|
|
93
95
|
runtime: {
|
|
94
96
|
background_write: false,
|
|
95
97
|
worktree_isolation: false,
|
|
96
|
-
|
|
98
|
+
runtime_store: '.sdd/runtime.sqlite',
|
|
99
|
+
stage_evidence: '.sdd/runs/<branch>/<stage>/*.md',
|
|
100
|
+
truth_alignment_mode: 'required'
|
|
97
101
|
},
|
|
98
102
|
lifecycle: {
|
|
99
103
|
decision_required: true,
|
|
@@ -105,7 +109,7 @@ export function defaultProjectConfig<TAgentRuntimeConfig = unknown>(projectName:
|
|
|
105
109
|
export function renderProjectConfig(config: ProjectConfig<unknown>): string {
|
|
106
110
|
const detection = config.detection ? `detection:\n confidence: ${config.detection.confidence}\n mixed_stack: ${config.detection.mixed_stack}\n primary: ${config.detection.primary}\n candidates:\n${config.detection.candidates.map((candidate) => ` - id: ${candidate.id}\n confidence: ${candidate.confidence}\n score: ${candidate.score}`).join('\n')}\n` : '';
|
|
107
111
|
const defaultBranch = config.sdd.default_branch ? ` default_branch: ${config.sdd.default_branch}\n` : '';
|
|
108
|
-
return `contract: ${config.contract}\nproject:\n name: ${config.project.name}\n language: ${config.project.language}\n framework: ${config.project.framework}\n${detection}sdd:\n spec_dir: ${config.sdd.spec_dir}\n${defaultBranch} # Project-level SDD document prose language; runtime CLI/JSON output remains English.\n docs_language: ${config.sdd.docs_language}\n compatible_with: ${config.sdd.compatible_with}\nvalidation:\n default:\n${config.validation.default.map((command) => ` - ${command}`).join('\n')}\nediting:\n prefer_hashline: ${config.editing.prefer_hashline}\n native_edit_fallback: ${config.editing.native_edit_fallback}\nruntime:\n background_write: ${config.runtime.background_write}\n worktree_isolation: ${config.runtime.worktree_isolation}\n
|
|
112
|
+
return `contract: ${config.contract}\nproject:\n name: ${config.project.name}\n language: ${config.project.language}\n framework: ${config.project.framework}\n${detection}sdd:\n spec_dir: ${config.sdd.spec_dir}\n${defaultBranch} # Project-level SDD document prose language; runtime CLI/JSON output remains English.\n docs_language: ${config.sdd.docs_language}\n compatible_with: ${config.sdd.compatible_with}\nvalidation:\n default:\n${config.validation.default.map((command) => ` - ${command}`).join('\n')}\nediting:\n prefer_hashline: ${config.editing.prefer_hashline}\n native_edit_fallback: ${config.editing.native_edit_fallback}\nruntime:\n background_write: ${config.runtime.background_write}\n worktree_isolation: ${config.runtime.worktree_isolation}\n runtime_store: ${config.runtime.runtime_store}\n stage_evidence: ${config.runtime.stage_evidence}\n truth_alignment_mode: ${config.runtime.truth_alignment_mode}\nlifecycle:\n decision_required: ${config.lifecycle.decision_required}\n profiles:\n${config.lifecycle.profiles.map((profile) => ` - ${profile}`).join('\n')}\n`;
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
export async function readProjectConfig<TAgentRuntimeConfig = unknown>(projectRoot: string, parseAgentRuntime?: (raw: string) => TAgentRuntimeConfig | undefined): Promise<ProjectConfig<TAgentRuntimeConfig>> {
|
|
@@ -163,7 +167,9 @@ export function parseProjectConfig<TAgentRuntimeConfig = unknown>(raw: string, c
|
|
|
163
167
|
runtime: {
|
|
164
168
|
background_write: readBoolean(raw, 'background_write', false),
|
|
165
169
|
worktree_isolation: readBoolean(raw, 'worktree_isolation', false),
|
|
166
|
-
|
|
170
|
+
runtime_store: readScalar(raw, 'runtime_store') ?? '.sdd/runtime.sqlite',
|
|
171
|
+
stage_evidence: readScalar(raw, 'stage_evidence') ?? '.sdd/runs/<branch>/<stage>/*.md',
|
|
172
|
+
truth_alignment_mode: readScalar(raw, 'truth_alignment_mode') ?? 'required'
|
|
167
173
|
},
|
|
168
174
|
lifecycle: {
|
|
169
175
|
decision_required: readBoolean(raw, 'decision_required', true),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
|
|
1
2
|
function usesChineseInitDocs(value: string): boolean {
|
|
2
3
|
return value === 'zh-CN';
|
|
3
4
|
}
|
|
4
5
|
|
|
5
|
-
export function renderInitSpecDocument(branch: string,
|
|
6
|
+
export function renderInitSpecDocument(branch: string, docsLanguage: string): string {
|
|
6
7
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
7
8
|
const title = zh ? '# Spec: Project Onboarding / 项目入门' : '# Spec: Project Onboarding';
|
|
8
9
|
const objectiveLines = zh ? `- User value: 仓库在第一个真实变更前已有可见的 SDD 入口。
|
|
@@ -37,8 +38,6 @@ ${title}
|
|
|
37
38
|
- lifecycle_profile: \`direct\`
|
|
38
39
|
- source_request: \`Created by sdd init\`
|
|
39
40
|
- status: \`draft\`
|
|
40
|
-
- created_at: \`${timestamp}\`
|
|
41
|
-
- updated_at: \`${timestamp}\`
|
|
42
41
|
|
|
43
42
|
## 1. Objective / Customer Value
|
|
44
43
|
|
|
@@ -77,7 +76,7 @@ ${story}
|
|
|
77
76
|
|
|
78
77
|
- Running background agents.
|
|
79
78
|
- Creating worktrees.
|
|
80
|
-
-
|
|
79
|
+
- Claiming truth-alignment or release approval without accepted runtime evidence.
|
|
81
80
|
|
|
82
81
|
## 6. Requirements
|
|
83
82
|
|
|
@@ -129,7 +128,7 @@ ${story}
|
|
|
129
128
|
`;
|
|
130
129
|
}
|
|
131
130
|
|
|
132
|
-
export function renderInitPlanDocument(branch: string,
|
|
131
|
+
export function renderInitPlanDocument(branch: string, docsLanguage: string): string {
|
|
133
132
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
134
133
|
const title = zh ? '# Plan: Project Onboarding / 项目入门' : '# Plan: Project Onboarding';
|
|
135
134
|
const background = zh
|
|
@@ -158,8 +157,6 @@ ${title}
|
|
|
158
157
|
- spec_id: \`onboarding\`
|
|
159
158
|
- plan_id: \`onboarding\`
|
|
160
159
|
- branch: \`${branch}\`
|
|
161
|
-
- created_at: \`${timestamp}\`
|
|
162
|
-
- updated_at: \`${timestamp}\`
|
|
163
160
|
|
|
164
161
|
## 0.1 Requirement Trace
|
|
165
162
|
|
|
@@ -261,7 +258,7 @@ Explain why \`specs/${branch}/tasks.md\` should be split into the planned task b
|
|
|
261
258
|
`;
|
|
262
259
|
}
|
|
263
260
|
|
|
264
|
-
export function renderInitTasksDocument(branch: string,
|
|
261
|
+
export function renderInitTasksDocument(branch: string, docsLanguage: string): string {
|
|
265
262
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
266
263
|
const title = zh ? '# Tasks: Project Onboarding / 项目入门' : '# Tasks: Project Onboarding';
|
|
267
264
|
const boundary = zh
|
|
@@ -287,8 +284,6 @@ ${title}
|
|
|
287
284
|
- branch: \`${branch}\`
|
|
288
285
|
- lifecycle_profile: \`direct\`
|
|
289
286
|
- status: \`draft\`
|
|
290
|
-
- created_at: \`${timestamp}\`
|
|
291
|
-
- updated_at: \`${timestamp}\`
|
|
292
287
|
|
|
293
288
|
## 1. Delivery Map
|
|
294
289
|
|
|
@@ -347,7 +342,7 @@ Forbidden scope:
|
|
|
347
342
|
- Do not create worktrees.
|
|
348
343
|
- Do not start background agents.
|
|
349
344
|
- Do not commit changes.
|
|
350
|
-
- Do not
|
|
345
|
+
- Do not claim truth-alignment or release approval automatically.
|
|
351
346
|
|
|
352
347
|
#### Acceptance
|
|
353
348
|
|
|
@@ -389,12 +384,12 @@ ${implementationNotes}
|
|
|
389
384
|
`;
|
|
390
385
|
}
|
|
391
386
|
|
|
392
|
-
export function renderInitVerifyDocument(branch: string,
|
|
387
|
+
export function renderInitVerifyDocument(branch: string, docsLanguage: string): string {
|
|
393
388
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
394
389
|
const title = zh ? '# Verify: Project Onboarding / 项目入门' : '# Verify: Project Onboarding';
|
|
395
390
|
const purpose = zh
|
|
396
|
-
? '这份 verify.md 是从 starter tasks 派生的 verification guidance,不是 runtime evidence,也不替代
|
|
397
|
-
: 'This verify.md is task-derived verification guidance, not runtime evidence, and it does not replace validation evidence produced by
|
|
391
|
+
? '这份 verify.md 是从 starter tasks 派生的 verification guidance,不是 runtime evidence,也不替代 `sdd test <validation_unit_id-or-validation_text>` 产生的验证证据。'
|
|
392
|
+
: 'This verify.md is task-derived verification guidance, not runtime evidence, and it does not replace validation evidence produced by `sdd test <validation_unit_id-or-validation_text>`.';
|
|
398
393
|
const availability = zh
|
|
399
394
|
? '在替换真实 spec/plan/tasks 前,只能检查 onboarding scaffold 是否仍然可见且未被误当作已批准实现。'
|
|
400
395
|
: 'Before replacing the real spec/plan/tasks, verification can only inspect that the onboarding scaffold is visible and not mistaken for approved implementation.';
|
|
@@ -404,8 +399,10 @@ version: 1.4.0
|
|
|
404
399
|
contract: sdd-verify-doc-v1
|
|
405
400
|
sdd_managed_starter: true
|
|
406
401
|
branch: ${branch}
|
|
407
|
-
|
|
408
|
-
|
|
402
|
+
author_role: verification-designer
|
|
403
|
+
independent_from_roles:
|
|
404
|
+
- task-planner
|
|
405
|
+
- implementer
|
|
409
406
|
---
|
|
410
407
|
|
|
411
408
|
${title}
|
|
@@ -418,18 +415,18 @@ ${purpose}
|
|
|
418
415
|
|
|
419
416
|
| Task | Acceptance refs | Validation commands | Required artifacts | Verification availability |
|
|
420
417
|
|---|---|---|---|---|
|
|
421
|
-
| ONBOARDING-1 | AC-1<br>AC-2 | sdd status --branch ${branch}<br>sdd
|
|
418
|
+
| ONBOARDING-1 | AC-1<br>AC-2 | sdd status --branch ${branch}<br>sdd test task-ONBOARDING-1 --branch ${branch} | none | ${availability} |
|
|
422
419
|
|
|
423
420
|
## 3. Verification Rules
|
|
424
421
|
|
|
425
|
-
- This starter verify contract does not authorize source changes, validation execution, runtime mutation,
|
|
422
|
+
- This starter verify contract does not authorize source changes, validation execution, runtime mutation, truth-alignment approval, commit, push, publish, or release.
|
|
426
423
|
- Replace starter spec, plan, tasks, and verify documents with a real branch contract before implementation.
|
|
427
|
-
- Runtime PASS is judged by
|
|
424
|
+
- Runtime PASS is judged by \`sdd test <validation_unit_id-or-validation_text> --branch ${branch}\` consuming the current verify contract; \`sdd test task|batch|wave\` remains available for explicit low-level diagnostics.
|
|
428
425
|
- Re-run \`sdd verifies write --branch ${branch} --force\` only after reviewing changed task expectations.
|
|
429
426
|
|
|
430
427
|
## 4. Out of Scope
|
|
431
428
|
|
|
432
429
|
- This document is not evidence in \`.sdd/runtime.sqlite\`.
|
|
433
|
-
- This document is not a release, ship, or
|
|
430
|
+
- This document is not a release, ship, or truth-alignment approval.
|
|
434
431
|
`;
|
|
435
432
|
}
|
|
@@ -7,7 +7,7 @@ import { contextBudgetForProfile, type ContextBudget, type ContextProfile } from
|
|
|
7
7
|
import { contextSourceRefForAbsolutePath, contextSourceRefForProjectPath, uniqueContextSourceRefs } from './source-refs.js';
|
|
8
8
|
import type { ContextSourceRef } from './source-refs.js';
|
|
9
9
|
|
|
10
|
-
export type ContextBuildMode = 'do' | 'verify' | '
|
|
10
|
+
export type ContextBuildMode = 'do' | 'verify' | 'doctor';
|
|
11
11
|
export type ContextBuildRole = 'default' | 'implementer' | 'reviewer' | 'validator' | 'context-curator';
|
|
12
12
|
|
|
13
13
|
export interface ContextBuildPackage {
|
|
@@ -254,9 +254,6 @@ function contextMustReadRefs(mode: ContextBuildMode, role: ContextBuildRole, doc
|
|
|
254
254
|
if (mode === 'verify') {
|
|
255
255
|
return [docs[0], ...artifacts];
|
|
256
256
|
}
|
|
257
|
-
if (mode === 'sync-back') {
|
|
258
|
-
return [docs[0], ...affected];
|
|
259
|
-
}
|
|
260
257
|
return [docs[0]];
|
|
261
258
|
}
|
|
262
259
|
|
|
@@ -307,10 +304,7 @@ function contextNextCommands(taskId: string, branch: string, mode: ContextBuildM
|
|
|
307
304
|
return [`sdd do task ${taskId} --branch ${branch}`];
|
|
308
305
|
}
|
|
309
306
|
if (mode === 'verify') {
|
|
310
|
-
return [`sdd test task
|
|
311
|
-
}
|
|
312
|
-
if (mode === 'sync-back') {
|
|
313
|
-
return [`sdd sync-back inspect --branch ${branch} --task ${taskId}`];
|
|
307
|
+
return [`sdd test task-${taskId} --branch ${branch}`, `sdd evidence summary <run_id> --task ${taskId} --json`];
|
|
314
308
|
}
|
|
315
309
|
const agentSuffix = agent ? ` --agent ${agent}` : '';
|
|
316
310
|
return [`sdd doctor fast --branch ${branch}`, `sdd context build --task ${taskId} --branch ${branch} --mode verify${agentSuffix} --json`];
|
|
@@ -55,7 +55,8 @@ test('evidence summary projection is hash-backed and not usable for PASS', async
|
|
|
55
55
|
assert.equal(summary.usableForPass, false);
|
|
56
56
|
assert.equal(summary.taskId, 'T1');
|
|
57
57
|
assert.ok(summary.sources.some((source) => source.path.endsWith('runtime.sqlite') && source.kind === 'run_state' && source.hash.length === 64));
|
|
58
|
-
assert.ok(summary.sources.some((source) => source.path
|
|
58
|
+
assert.ok(summary.sources.some((source) => source.path === '.sdd/runs/master/test/validation-T1.md' && source.kind === 'artifact' && source.hash.length === 64));
|
|
59
|
+
assert.equal(summary.sources.some((source) => source.path.includes('evidence/artifacts')), false);
|
|
59
60
|
assert.ok(summary.policyRefs.some((ref) => ref.includes('reject-derived-source-evidence')));
|
|
60
61
|
assert.equal(projection?.scope_key, 'summary-run:T1');
|
|
61
62
|
assert.equal(payload.contract, 'sdd-evidence-summary-v1');
|
|
@@ -88,7 +89,7 @@ test('context build packages differ by mode and agent while remaining derived gu
|
|
|
88
89
|
assert.ok(validatorPackage.mustRead.some((ref) => ref.path === 'artifacts/validation-T1.md'));
|
|
89
90
|
assert.notDeepEqual(implementerPackage.mustRead.map((ref) => ref.path), validatorPackage.mustRead.map((ref) => ref.path));
|
|
90
91
|
assert.ok(validatorPackage.warnings.some((warning) => warning.includes('cannot satisfy PASS evidence')));
|
|
91
|
-
assert.ok(validatorPackage.nextCommands.includes('sdd test task
|
|
92
|
+
assert.ok(validatorPackage.nextCommands.includes('sdd test task-T1 --branch master'));
|
|
92
93
|
assert.equal(validatorPackage.nextCommands.some((command) => command.startsWith('sdd verify task')), false);
|
|
93
94
|
assert.ok(implementerPackage.budget.estimatedBytes <= implementerPackage.budget.maxBytes);
|
|
94
95
|
assert.ok(implementerPackage.budget.estimatedTokens > 0);
|
|
@@ -71,19 +71,28 @@ export async function buildEvidenceSummaryProjection(projectRoot: string, option
|
|
|
71
71
|
const admittedClaims = await readRuntimeEvidenceClaims(projectRoot, state.runId, taskId ?? null);
|
|
72
72
|
const artifactIngestions = Object.values(state.artifactIngestions ?? {}).filter((record) => !taskId || record.task === taskId);
|
|
73
73
|
const artifacts = state.artifacts.filter((artifact) => !taskId || artifact.task === taskId);
|
|
74
|
+
const branch = state.gitBranch ?? state.partition ?? 'unscoped';
|
|
74
75
|
const ledgerArtifactRefs = invocationLedger
|
|
75
76
|
.filter((entry) => entry.kind === 'artifact_hash' && entry.artifactPath)
|
|
76
|
-
.map((entry) => ({
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
.map((entry) => ({
|
|
78
|
+
path: stageEvidenceDisplayRefForRuntimeArtifact(branch, entry.artifactPath as string, 'artifact'),
|
|
79
|
+
kind: 'artifact' as const,
|
|
80
|
+
hash: entry.outputHash ?? null
|
|
81
|
+
}));
|
|
82
|
+
const artifactSourceRefs = artifacts.map((artifact) => ({ path: stageEvidenceDisplayRefForRuntimeArtifact(branch, artifact.path, artifact.kind), kind: 'artifact' as const }));
|
|
83
|
+
const hashedArtifactSourceRefs: ContextSourceRef[] = ledgerArtifactRefs
|
|
84
|
+
.filter((artifact): artifact is { path: string; kind: 'artifact'; hash: string } => artifact.hash !== null)
|
|
85
|
+
.map((artifact) => ({ path: artifact.path, kind: artifact.kind, hash: artifact.hash }));
|
|
86
|
+
const unresolvedArtifactSourceRefs = [
|
|
87
|
+
...artifactSourceRefs,
|
|
88
|
+
...ledgerArtifactRefs.filter((artifact) => artifact.hash === null).map((artifact) => ({ path: artifact.path, kind: artifact.kind }))
|
|
81
89
|
];
|
|
82
90
|
const sources = await uniqueContextSourceRefs([
|
|
83
91
|
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'run_state'),
|
|
84
92
|
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'command_output'),
|
|
85
93
|
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'ledger'),
|
|
86
|
-
...
|
|
94
|
+
...hashedArtifactSourceRefs,
|
|
95
|
+
...(await Promise.all(unresolvedArtifactSourceRefs.map((artifact) => contextSourceRefForProjectPath(projectRoot, artifact.path, artifact.kind))))
|
|
87
96
|
]);
|
|
88
97
|
const issueCodes = uniqueEvidenceIssueCodes(artifactIngestions.flatMap((record) => record.issues));
|
|
89
98
|
const passCount = Math.max(admittedClaims.filter((claim) => claim.status === 'PASS').length, artifactIngestions.filter((record) => record.status === 'accepted' && (record.resultStatus === 'PASS' || record.resultStatus === 'PASS_WITH_GAPS')).length);
|
|
@@ -91,8 +100,8 @@ export async function buildEvidenceSummaryProjection(projectRoot: string, option
|
|
|
91
100
|
const blockedCount = Math.max(admittedClaims.filter((claim) => claim.status === 'BLOCKED').length, artifactIngestions.filter((record) => record.resultStatus === 'BLOCKED' || record.resultStatus === 'TIMED_OUT' || record.resultStatus === 'CANCELLED' || record.gaps.length > 0).length);
|
|
92
101
|
const highlights = [
|
|
93
102
|
`run=${state.runId} status=${state.status} phase=${state.phase ?? 'none'}`,
|
|
94
|
-
`task=${taskId ?? 'none'} validation=${state.validation.status}
|
|
95
|
-
`
|
|
103
|
+
`task=${taskId ?? 'none'} validation=${state.validation.status}`,
|
|
104
|
+
`stage_evidence_refs=${artifacts.length} ingestions=${artifactIngestions.length} admitted_claims=${admittedClaims.length} events=${events.length} ledger=${invocationLedger.length}`,
|
|
96
105
|
`pass=${passCount} blocked=${blockedCount} fail=${failCount}`
|
|
97
106
|
];
|
|
98
107
|
if (issueCodes.length > 0) {
|
|
@@ -120,6 +129,16 @@ export async function buildEvidenceSummaryProjection(projectRoot: string, option
|
|
|
120
129
|
return projection;
|
|
121
130
|
}
|
|
122
131
|
|
|
132
|
+
function stageEvidenceDisplayRefForRuntimeArtifact(branch: string, artifactPath: string, kind: string): string {
|
|
133
|
+
const portablePath = artifactPath.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
134
|
+
if (portablePath.startsWith('.sdd/runs/')) {
|
|
135
|
+
return portablePath;
|
|
136
|
+
}
|
|
137
|
+
const fileName = portablePath.split('/').filter(Boolean).pop() ?? 'evidence.md';
|
|
138
|
+
const stage = kind === 'validation' || kind === 'test-validation' || fileName.startsWith('validation-') || fileName.startsWith('test-validation-') ? 'test' : 'do';
|
|
139
|
+
return `.sdd/runs/${branchToSafePartition(branch)}/${stage}/${fileName}`;
|
|
140
|
+
}
|
|
141
|
+
|
|
123
142
|
export async function readRuntimeEvidenceClaims(projectRoot: string, runId: string, taskId: string | null): Promise<EvidenceClaim[]> {
|
|
124
143
|
return withRuntimeStore(projectRoot, ({ db }) => {
|
|
125
144
|
const rows = taskId
|
|
@@ -33,9 +33,9 @@ export function validateLogWorkerSummary(summary: LogWorkerSummary): LogWorkerSu
|
|
|
33
33
|
}
|
|
34
34
|
const forbiddenAuthority = Array.isArray(candidate.forbiddenAuthority) ? candidate.forbiddenAuthority.filter((item) => typeof item === 'string') : [];
|
|
35
35
|
if (forbiddenAuthority.length > 0) {
|
|
36
|
-
issues.push(contractIssue('forbiddenAuthority', `Log worker summary claims forbidden workflow authority: ${forbiddenAuthority.join(', ')}.`, 'Remove PASS/BLOCKED/route/doctor/
|
|
36
|
+
issues.push(contractIssue('forbiddenAuthority', `Log worker summary claims forbidden workflow authority: ${forbiddenAuthority.join(', ')}.`, 'Remove PASS/BLOCKED/route/doctor/truth-alignment decisions from worker summaries.'));
|
|
37
37
|
}
|
|
38
|
-
for (const field of ['status', 'verdict', 'routeDecision', 'doctorVerdict', '
|
|
38
|
+
for (const field of ['status', 'verdict', 'routeDecision', 'doctorVerdict', 'truthAlignmentReady']) {
|
|
39
39
|
if (field in candidate) {
|
|
40
40
|
issues.push(contractIssue(field, `Log worker summary must not expose workflow decision field ${field}.`, 'Keep decision fields in core runtime outputs only.'));
|
|
41
41
|
}
|
|
@@ -26,7 +26,7 @@ export interface ContextOffloadDecision {
|
|
|
26
26
|
scope: RuntimeScope;
|
|
27
27
|
action: ContextOffloadAction;
|
|
28
28
|
loadSignalRef: RuntimeRef;
|
|
29
|
-
requiredBefore: 'stage-output' | 'handoff' | '
|
|
29
|
+
requiredBefore: 'stage-output' | 'handoff' | 'ship' | 'never';
|
|
30
30
|
inlineRefs: RuntimeRef[];
|
|
31
31
|
summarizeRefs: RuntimeRef[];
|
|
32
32
|
dispatchRefs: RuntimeRef[];
|
|
@@ -56,6 +56,8 @@ export const WORKFLOW_STATE_RESOLVER_CONTRACT_VERSION = 'phase-7.3-workflow-stat
|
|
|
56
56
|
export const VERIFY_DOCUMENT_CONTRACT_VERSION = 'sdd-verify-doc-v1';
|
|
57
57
|
export const AGENT_CAPABILITY_CATALOG_CONTRACT_VERSION = 'phase-7.6-agent-capability-catalog-v1';
|
|
58
58
|
export const COMMAND_TEAM_RUNTIME_CONTRACT_VERSION = 'phase-7.7-command-team-runtime-v1';
|
|
59
|
+
export const STAGE_TEAM_RUNTIME_CONTRACT_VERSION = 'phase-8.15-stage-team-runtime-v1';
|
|
60
|
+
export const WORKFLOW_GATE_RUNTIME_CONTRACT_VERSION = 'phase-8.16-workflow-gate-runtime-v1';
|
|
59
61
|
export const RUNTIME_PROJECTION_ENVELOPE_CONTRACT_VERSION = 'sdd-runtime-projection-envelope-v1';
|
|
60
62
|
export const CODING_FACT_SET_CONTRACT_VERSION = 'sdd-coding-fact-set-v1';
|
|
61
63
|
export const CODING_RISK_PROFILE_CONTRACT_VERSION = 'sdd-coding-risk-profile-v1';
|
|
@@ -71,10 +73,11 @@ export const CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION = 'sdd-context-offload-de
|
|
|
71
73
|
export const SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION = 'sdd-scoped-context-handoff-v1';
|
|
72
74
|
export const TEST_EVIDENCE_RUN_CONTRACT_VERSION = 'sdd-test-evidence-run-v1';
|
|
73
75
|
export const MODEL_PRODUCED_ARTIFACT_CONTRACT_VERSION = 'sdd-model-produced-artifact-v1';
|
|
76
|
+
export const STAGE_COLLABORATION_RUNTIME_CONTRACT_VERSION = 'phase-9.1-stage-collaboration-runtime-v1';
|
|
74
77
|
|
|
75
78
|
export type RuntimeConfidence = 'high' | 'medium' | 'low';
|
|
76
79
|
export type RuntimeProjectionStaleness = 'fresh' | 'stale' | 'incompatible' | 'unknown';
|
|
77
|
-
export type SddStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'goal-verify' | '
|
|
80
|
+
export type SddStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'goal-verify' | 'ship';
|
|
78
81
|
export type RuntimeRefKind = 'document' | 'task' | 'run' | 'artifact' | 'projection' | 'evidence' | 'command' | 'external';
|
|
79
82
|
|
|
80
83
|
export interface RuntimeScope {
|
|
@@ -20,4 +20,7 @@ export interface DelegationRecord {
|
|
|
20
20
|
expectedArtifact: string;
|
|
21
21
|
terminalEventRequired: boolean;
|
|
22
22
|
terminalEventAt?: string | null;
|
|
23
|
+
attempt?: number;
|
|
24
|
+
retryOf?: string | null;
|
|
25
|
+
replayReason?: 'document_contract_refresh' | 'artifact_reingest' | 'validation_replay' | 'manual_retry' | 'runtime_recovery' | null;
|
|
23
26
|
}
|