sdd-agent-platform 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +67 -69
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +64 -9
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +26 -17
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +12 -9
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +12 -25
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +1 -7
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +26 -8
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +8 -8
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +0 -24
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +178 -58
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +14 -7
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +5 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +54 -61
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +24 -8
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +69 -27
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +15 -15
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +9 -9
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +12 -12
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +4 -7
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +19 -17
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +45 -15
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +126 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +7 -5
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +28 -8
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +37 -27
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +53 -14
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +5 -44
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +97 -10
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +8 -6
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +55 -34
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +44 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +170 -23
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +170 -18
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +544 -32
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +8 -23
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +28 -53
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +10 -50
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +159 -150
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +238 -103
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +27 -5
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +9 -32
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +228 -15
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +49 -15
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +42 -6
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +4 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +72 -6
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +55 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +538 -34
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +67 -69
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +43 -31
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +14 -11
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +12 -25
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +2 -1
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +143 -45
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +193 -58
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +15 -7
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +50 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +33 -18
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +55 -62
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +25 -8
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +2 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +82 -35
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +15 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +18 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +241 -4
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +47 -15
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +132 -10
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +31 -8
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +50 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +39 -29
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +62 -16
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +109 -10
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +8 -6
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +123 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +58 -43
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +249 -23
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +196 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +860 -54
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +9 -23
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +27 -56
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +10 -54
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +8 -1
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +93 -79
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +166 -154
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +100 -47
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +265 -107
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +47 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +48 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +15 -31
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +9 -33
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +246 -17
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +339 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +53 -14
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +45 -8
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +45 -6
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +6 -5
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +1 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +75 -7
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +518 -25
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +670 -41
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/package.json +1 -1
- package/packages/cli/dist/args.js +2 -2
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/ai-tools.js +13 -2
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/execution.js +49 -1
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/governance.js +1 -1
- package/packages/cli/dist/commands/governance.js.map +1 -1
- package/packages/cli/dist/commands/init.js +6 -1
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/lifecycle.js +15 -2
- package/packages/cli/dist/commands/lifecycle.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +48 -2
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +52 -2
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +6 -0
- package/packages/cli/dist/commands/stage-close.js +295 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +68 -2
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/test.js +180 -2
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +7 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +222 -26
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/dispatch.js +4 -9
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +27 -26
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/doctor.js +1 -1
- package/packages/cli/dist/renderers/doctor.js.map +1 -1
- package/packages/cli/dist/renderers/execution.js +1 -1
- package/packages/cli/dist/renderers/execution.js.map +1 -1
- package/packages/cli/dist/renderers/json.d.ts +1 -0
- package/packages/cli/dist/renderers/json.js +3 -0
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
- package/packages/cli/dist/renderers/registry-runtime.js +20 -0
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +1 -1
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +0 -4
- package/packages/cli/dist/renderers/workflow.js +30 -89
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +67 -69
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +64 -9
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +26 -17
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +3 -0
- package/packages/core/dist/config/init-project.js +12 -9
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +4 -4
- package/packages/core/dist/config/starter-documents.js +12 -25
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/context/build-package.d.ts +1 -1
- package/packages/core/dist/context/build-package.js +1 -7
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +26 -8
- package/packages/core/dist/context/evidence-summary.js.map +1 -1
- package/packages/core/dist/context/log-worker.js +2 -2
- package/packages/core/dist/context/log-worker.js.map +1 -1
- package/packages/core/dist/context-offload/contracts.d.ts +1 -1
- package/packages/core/dist/contracts.d.ts +2 -1
- package/packages/core/dist/contracts.js +1 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +3 -0
- package/packages/core/dist/delegation/validation.d.ts +3 -0
- package/packages/core/dist/delegation/validation.js +7 -4
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +8 -8
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +0 -1
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +4 -4
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +0 -24
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +178 -58
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.js +14 -7
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/packages/core/dist/execution/background-executor.js +4 -4
- package/packages/core/dist/execution/background-executor.js.map +1 -1
- package/packages/core/dist/execution/foreground-subagents.js +3 -3
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
- package/packages/core/dist/execution/host-invocation.js +5 -4
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +3 -2
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.js +2 -2
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +54 -61
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +1 -0
- package/packages/core/dist/lifecycle/ship.js +24 -8
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +12 -2
- package/packages/core/dist/orchestration/runtime.js +62 -21
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +5 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +69 -27
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +15 -15
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.js +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +9 -9
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/eval-learning-context.js +4 -4
- package/packages/core/dist/registries/eval-learning-context.js.map +1 -1
- package/packages/core/dist/registries/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +3 -3
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-plugins.js +2 -2
- package/packages/core/dist/registries/tool-plugins.js.map +1 -1
- package/packages/core/dist/registries/worker-adapters.js +11 -11
- package/packages/core/dist/registries/worker-adapters.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.js +12 -12
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +4 -4
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +4 -7
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
- package/packages/core/dist/risk/workflow-gates.js +19 -17
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +1 -1
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +2 -0
- package/packages/core/dist/router/route-projection.js +1 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +45 -15
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +373 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/runtime-validation.js +2 -2
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +235 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +2 -0
- package/packages/core/dist/router.js +2 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +126 -9
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +0 -2
- package/packages/core/dist/run-state/inspect-run.js +7 -5
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +28 -8
- package/packages/core/dist/run-state/run-index.d.ts +0 -2
- package/packages/core/dist/run-state/run-index.js +1 -3
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +37 -27
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +5 -2
- package/packages/core/dist/run-state/task-evidence.js +53 -14
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +1 -0
- package/packages/core/dist/run-state.js +1 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +0 -3
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +5 -44
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +10 -0
- package/packages/core/dist/runtime-paths.js +65 -0
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +200 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +2 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +97 -10
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +8 -6
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +1 -0
- package/packages/core/dist/sdd-docs/task-parser.js +55 -34
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +322 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +241 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +888 -0
- package/packages/core/dist/stage-collaboration.js +3870 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +44 -1
- package/packages/core/dist/status/project-status.js +170 -23
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +170 -18
- package/packages/core/dist/storage/runtime-store.js +544 -32
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/subagents/contracts.d.ts +1 -1
- package/packages/core/dist/subagents/runtime.js +7 -7
- package/packages/core/dist/subagents/runtime.js.map +1 -1
- package/packages/core/dist/test-support/fixtures.js +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +8 -23
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +138 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -1
- package/packages/core/dist/verification/goal-verify.js +28 -53
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +0 -2
- package/packages/core/dist/verification/rendering.js +10 -50
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +159 -150
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +12 -2
- package/packages/core/dist/verification/test-runtime.js +238 -103
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +18 -0
- package/packages/core/dist/verification/validation-wave.js +27 -5
- package/packages/core/dist/verification/validation-wave.js.map +1 -1
- package/packages/core/dist/verification/verify-contract.d.ts +1 -1
- package/packages/core/dist/verification/verify-contract.js +9 -32
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +228 -15
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +49 -15
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +42 -6
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +4 -5
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.js +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +0 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.js +72 -6
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +55 -5
- package/packages/core/dist/workflow-state/resolve.js +538 -34
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -243
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -110
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -497
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -270
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/packages/cli/dist/commands/artifact.d.ts +0 -6
- package/packages/cli/dist/commands/artifact.js +0 -168
- package/packages/cli/dist/commands/artifact.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
- package/packages/cli/dist/renderers/artifacts.js +0 -43
- package/packages/cli/dist/renderers/artifacts.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
- package/packages/core/dist/sync-back/apply.d.ts +0 -17
- package/packages/core/dist/sync-back/apply.js +0 -243
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -110
- package/packages/core/dist/sync-back/inspect.js +0 -497
- package/packages/core/dist/sync-back/inspect.js.map +0 -1
- package/packages/core/dist/sync-back.d.ts +0 -2
- package/packages/core/dist/sync-back.js +0 -3
- package/packages/core/dist/sync-back.js.map +0 -1
|
@@ -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,12 +211,12 @@ 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, /projected command
|
|
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, /sdd ship --branch <branch> --
|
|
211
|
-
assert.match(skill, /`test`/);
|
|
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`/);
|
|
212
220
|
assert.doesNotMatch(skill, /follow apply_policy/);
|
|
213
221
|
assert.match(skill, /workflow_status=not_started/);
|
|
214
222
|
assert.match(skill, /workflow branch entry/);
|
|
@@ -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,34 +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
|
|
252
|
-
assert.match(doCommand, /
|
|
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/);
|
|
253
264
|
assert.match(testCommand, /sdd instructions test --json/);
|
|
254
|
-
assert.match(testCommand, /sdd test
|
|
255
|
-
assert.match(testCommand, /
|
|
256
|
-
assert.match(testCommand, /
|
|
257
|
-
assert.match(testCommand, /
|
|
258
|
-
assert.match(
|
|
259
|
-
assert.match(
|
|
260
|
-
assert.match(
|
|
261
|
-
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/);
|
|
262
274
|
assert.match(shipCommand, /sdd instructions ship --json/);
|
|
263
|
-
assert.match(shipCommand, /sdd ship --branch <branch> --
|
|
264
|
-
assert.match(shipCommand, /
|
|
265
|
-
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/);
|
|
266
278
|
} finally {
|
|
267
279
|
await rm(root, { recursive: true, force: true });
|
|
268
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,18 +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
|
|
36
|
-
const tasksContent = renderInitTasksDocument(options.branch, now, options.docsLanguage);
|
|
37
|
+
const tasksContent = renderInitTasksDocument(options.branch, options.docsLanguage);
|
|
37
38
|
const documents = [
|
|
38
|
-
{ name: 'spec.md', content: renderInitSpecDocument(options.branch,
|
|
39
|
-
{ name: 'plan.md', content: renderInitPlanDocument(options.branch,
|
|
39
|
+
{ name: 'spec.md', content: renderInitSpecDocument(options.branch, options.docsLanguage) },
|
|
40
|
+
{ name: 'plan.md', content: renderInitPlanDocument(options.branch, options.docsLanguage) },
|
|
40
41
|
{ name: 'tasks.md', content: tasksContent },
|
|
41
|
-
{ name: 'verify.md', content: renderInitVerifyDocument(options.branch,
|
|
42
|
+
{ name: 'verify.md', content: renderInitVerifyDocument(options.branch, options.docsLanguage) }
|
|
42
43
|
];
|
|
43
44
|
|
|
44
45
|
if (!options.scaffoldDocuments) {
|
|
@@ -82,16 +83,14 @@ export async function applyInitDocuments(projectRoot: string, options: { branch:
|
|
|
82
83
|
return { branch: options.branch, root: path.relative(projectRoot, docsRoot), documents: reports };
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
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> {
|
|
86
87
|
const sddDir = getSddDir(projectRoot);
|
|
87
|
-
const runsDir = getRunsDir(projectRoot);
|
|
88
88
|
const configPath = getProjectConfigPath(projectRoot);
|
|
89
89
|
const requestedBranch = options.branch?.trim();
|
|
90
90
|
const scaffoldDocuments = options.scaffoldDocuments ?? true;
|
|
91
91
|
const branch = requestedBranch || 'master';
|
|
92
92
|
assertSafePathSegment(branch, 'branch');
|
|
93
|
-
await mkdir(
|
|
94
|
-
|
|
93
|
+
await mkdir(sddDir, { recursive: true });
|
|
95
94
|
let created = false;
|
|
96
95
|
let projectConfig = null;
|
|
97
96
|
if (options.force || !await exists(configPath)) {
|
|
@@ -116,5 +115,9 @@ export async function initProject(projectRoot: string, options: { force?: boolea
|
|
|
116
115
|
|
|
117
116
|
await mkdir(sddDir, { recursive: true });
|
|
118
117
|
const aiTools = await applyAiToolEntries(projectRoot, { tool: options.aiTool ?? 'auto' });
|
|
119
|
-
|
|
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 };
|
|
120
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,10 +1,9 @@
|
|
|
1
|
-
import { hashDocumentContent, hashTasksContract } from '../sdd-docs/document-hashes.js';
|
|
2
1
|
|
|
3
2
|
function usesChineseInitDocs(value: string): boolean {
|
|
4
3
|
return value === 'zh-CN';
|
|
5
4
|
}
|
|
6
5
|
|
|
7
|
-
export function renderInitSpecDocument(branch: string,
|
|
6
|
+
export function renderInitSpecDocument(branch: string, docsLanguage: string): string {
|
|
8
7
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
9
8
|
const title = zh ? '# Spec: Project Onboarding / 项目入门' : '# Spec: Project Onboarding';
|
|
10
9
|
const objectiveLines = zh ? `- User value: 仓库在第一个真实变更前已有可见的 SDD 入口。
|
|
@@ -39,8 +38,6 @@ ${title}
|
|
|
39
38
|
- lifecycle_profile: \`direct\`
|
|
40
39
|
- source_request: \`Created by sdd init\`
|
|
41
40
|
- status: \`draft\`
|
|
42
|
-
- created_at: \`${timestamp}\`
|
|
43
|
-
- updated_at: \`${timestamp}\`
|
|
44
41
|
|
|
45
42
|
## 1. Objective / Customer Value
|
|
46
43
|
|
|
@@ -79,7 +76,7 @@ ${story}
|
|
|
79
76
|
|
|
80
77
|
- Running background agents.
|
|
81
78
|
- Creating worktrees.
|
|
82
|
-
-
|
|
79
|
+
- Claiming truth-alignment or release approval without accepted runtime evidence.
|
|
83
80
|
|
|
84
81
|
## 6. Requirements
|
|
85
82
|
|
|
@@ -131,7 +128,7 @@ ${story}
|
|
|
131
128
|
`;
|
|
132
129
|
}
|
|
133
130
|
|
|
134
|
-
export function renderInitPlanDocument(branch: string,
|
|
131
|
+
export function renderInitPlanDocument(branch: string, docsLanguage: string): string {
|
|
135
132
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
136
133
|
const title = zh ? '# Plan: Project Onboarding / 项目入门' : '# Plan: Project Onboarding';
|
|
137
134
|
const background = zh
|
|
@@ -160,8 +157,6 @@ ${title}
|
|
|
160
157
|
- spec_id: \`onboarding\`
|
|
161
158
|
- plan_id: \`onboarding\`
|
|
162
159
|
- branch: \`${branch}\`
|
|
163
|
-
- created_at: \`${timestamp}\`
|
|
164
|
-
- updated_at: \`${timestamp}\`
|
|
165
160
|
|
|
166
161
|
## 0.1 Requirement Trace
|
|
167
162
|
|
|
@@ -263,7 +258,7 @@ Explain why \`specs/${branch}/tasks.md\` should be split into the planned task b
|
|
|
263
258
|
`;
|
|
264
259
|
}
|
|
265
260
|
|
|
266
|
-
export function renderInitTasksDocument(branch: string,
|
|
261
|
+
export function renderInitTasksDocument(branch: string, docsLanguage: string): string {
|
|
267
262
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
268
263
|
const title = zh ? '# Tasks: Project Onboarding / 项目入门' : '# Tasks: Project Onboarding';
|
|
269
264
|
const boundary = zh
|
|
@@ -289,8 +284,6 @@ ${title}
|
|
|
289
284
|
- branch: \`${branch}\`
|
|
290
285
|
- lifecycle_profile: \`direct\`
|
|
291
286
|
- status: \`draft\`
|
|
292
|
-
- created_at: \`${timestamp}\`
|
|
293
|
-
- updated_at: \`${timestamp}\`
|
|
294
287
|
|
|
295
288
|
## 1. Delivery Map
|
|
296
289
|
|
|
@@ -349,7 +342,7 @@ Forbidden scope:
|
|
|
349
342
|
- Do not create worktrees.
|
|
350
343
|
- Do not start background agents.
|
|
351
344
|
- Do not commit changes.
|
|
352
|
-
- Do not
|
|
345
|
+
- Do not claim truth-alignment or release approval automatically.
|
|
353
346
|
|
|
354
347
|
#### Acceptance
|
|
355
348
|
|
|
@@ -391,31 +384,25 @@ ${implementationNotes}
|
|
|
391
384
|
`;
|
|
392
385
|
}
|
|
393
386
|
|
|
394
|
-
export function renderInitVerifyDocument(branch: string,
|
|
387
|
+
export function renderInitVerifyDocument(branch: string, docsLanguage: string): string {
|
|
395
388
|
const zh = usesChineseInitDocs(docsLanguage);
|
|
396
389
|
const title = zh ? '# Verify: Project Onboarding / 项目入门' : '# Verify: Project Onboarding';
|
|
397
390
|
const purpose = zh
|
|
398
|
-
? '这份 verify.md 是从 starter tasks 派生的 verification guidance,不是 runtime evidence,也不替代 `sdd test
|
|
399
|
-
: 'This verify.md is task-derived verification guidance, not runtime evidence, and it does not replace validation evidence produced by `sdd test
|
|
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>`.';
|
|
400
393
|
const availability = zh
|
|
401
394
|
? '在替换真实 spec/plan/tasks 前,只能检查 onboarding scaffold 是否仍然可见且未被误当作已批准实现。'
|
|
402
395
|
: 'Before replacing the real spec/plan/tasks, verification can only inspect that the onboarding scaffold is visible and not mistaken for approved implementation.';
|
|
403
|
-
const tasksContractHash = hashTasksContract(tasksContent) ?? 'missing';
|
|
404
|
-
const tasksHash = hashDocumentContent(tasksContent);
|
|
405
396
|
return `---
|
|
406
397
|
template: sdd-init-onboarding-verify-v1
|
|
407
398
|
version: 1.4.0
|
|
408
399
|
contract: sdd-verify-doc-v1
|
|
409
400
|
sdd_managed_starter: true
|
|
410
401
|
branch: ${branch}
|
|
411
|
-
based_on_tasks_contract_hash: ${tasksContractHash}
|
|
412
|
-
based_on_tasks_hash: ${tasksHash}
|
|
413
402
|
author_role: verification-designer
|
|
414
403
|
independent_from_roles:
|
|
415
404
|
- task-planner
|
|
416
405
|
- implementer
|
|
417
|
-
created_at: ${timestamp}
|
|
418
|
-
updated_at: ${timestamp}
|
|
419
406
|
---
|
|
420
407
|
|
|
421
408
|
${title}
|
|
@@ -428,18 +415,18 @@ ${purpose}
|
|
|
428
415
|
|
|
429
416
|
| Task | Acceptance refs | Validation commands | Required artifacts | Verification availability |
|
|
430
417
|
|---|---|---|---|---|
|
|
431
|
-
| ONBOARDING-1 | AC-1<br>AC-2 | sdd status --branch ${branch}<br>sdd test task
|
|
418
|
+
| ONBOARDING-1 | AC-1<br>AC-2 | sdd status --branch ${branch}<br>sdd test task-ONBOARDING-1 --branch ${branch} | none | ${availability} |
|
|
432
419
|
|
|
433
420
|
## 3. Verification Rules
|
|
434
421
|
|
|
435
|
-
- 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.
|
|
436
423
|
- Replace starter spec, plan, tasks, and verify documents with a real branch contract before implementation.
|
|
437
|
-
- Runtime PASS is judged by \`sdd test
|
|
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.
|
|
438
425
|
- Re-run \`sdd verifies write --branch ${branch} --force\` only after reviewing changed task expectations.
|
|
439
426
|
|
|
440
427
|
## 4. Out of Scope
|
|
441
428
|
|
|
442
429
|
- This document is not evidence in \`.sdd/runtime.sqlite\`.
|
|
443
|
-
- This document is not a release, ship, or
|
|
430
|
+
- This document is not a release, ship, or truth-alignment approval.
|
|
444
431
|
`;
|
|
445
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[];
|
|
@@ -73,10 +73,11 @@ export const CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION = 'sdd-context-offload-de
|
|
|
73
73
|
export const SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION = 'sdd-scoped-context-handoff-v1';
|
|
74
74
|
export const TEST_EVIDENCE_RUN_CONTRACT_VERSION = 'sdd-test-evidence-run-v1';
|
|
75
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';
|
|
76
77
|
|
|
77
78
|
export type RuntimeConfidence = 'high' | 'medium' | 'low';
|
|
78
79
|
export type RuntimeProjectionStaleness = 'fresh' | 'stale' | 'incompatible' | 'unknown';
|
|
79
|
-
export type SddStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'goal-verify' | '
|
|
80
|
+
export type SddStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'goal-verify' | 'ship';
|
|
80
81
|
export type RuntimeRefKind = 'document' | 'task' | 'run' | 'artifact' | 'projection' | 'evidence' | 'command' | 'external';
|
|
81
82
|
|
|
82
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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DELEGATION_LIVENESS_CONTRACT, DELEGATION_LIVENESS_VERSION } from '../contracts.js';
|
|
2
|
-
import {
|
|
2
|
+
import { normalizeStageEvidenceOrLegacyArtifactRef } from '../runtime-paths.js';
|
|
3
3
|
import { validateSddResultArtifact } from '../artifacts/sdd-result.js';
|
|
4
4
|
import type { DelegationRecord, DelegationStatus } from './model.js';
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ export interface DelegationValidationReport {
|
|
|
17
17
|
issues: ContractValidationIssue[];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function createDelegationRecord(input: { delegationId: string; task: string; agent: string; expectedArtifact: string; runMode?: DelegationRecord['runMode']; blocking?: boolean; requiredForPhaseExit?: boolean; startedAt?: string; timeoutSeconds?: number; status?: DelegationStatus }): DelegationRecord {
|
|
20
|
+
export function createDelegationRecord(input: { delegationId: string; task: string; agent: string; expectedArtifact: string; runMode?: DelegationRecord['runMode']; blocking?: boolean; requiredForPhaseExit?: boolean; startedAt?: string; timeoutSeconds?: number; status?: DelegationStatus; attempt?: number; retryOf?: string | null; replayReason?: DelegationRecord['replayReason'] }): DelegationRecord {
|
|
21
21
|
return {
|
|
22
22
|
contract: DELEGATION_LIVENESS_CONTRACT,
|
|
23
23
|
version: DELEGATION_LIVENESS_VERSION,
|
|
@@ -33,7 +33,10 @@ export function createDelegationRecord(input: { delegationId: string; task: stri
|
|
|
33
33
|
timeoutSeconds: input.timeoutSeconds ?? 900,
|
|
34
34
|
expectedArtifact: input.expectedArtifact,
|
|
35
35
|
terminalEventRequired: true,
|
|
36
|
-
terminalEventAt: null
|
|
36
|
+
terminalEventAt: null,
|
|
37
|
+
attempt: input.attempt,
|
|
38
|
+
retryOf: input.retryOf ?? null,
|
|
39
|
+
replayReason: input.replayReason ?? null
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
42
|
|
|
@@ -105,9 +108,9 @@ function validateDelegationShape(delegation: DelegationRecord): ContractValidati
|
|
|
105
108
|
|
|
106
109
|
function validateRunRelativeArtifactReference(value: string, issues: ContractValidationIssue[], field = 'artifacts'): void {
|
|
107
110
|
try {
|
|
108
|
-
|
|
111
|
+
normalizeStageEvidenceOrLegacyArtifactRef(value);
|
|
109
112
|
} catch (error) {
|
|
110
|
-
issues.push(contractIssue(field, messageFromError(error), 'Use
|
|
113
|
+
issues.push(contractIssue(field, messageFromError(error), 'Use repo-relative .sdd/runs/<branch>/<stage>/*.md stage evidence refs for new delegation evidence.'));
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
|
|
@@ -57,7 +57,7 @@ export async function inspectDocumentChainEvidence(projectRoot: string, branch?:
|
|
|
57
57
|
level: 'WARN',
|
|
58
58
|
check: 'document_chain_high_risk_evidence',
|
|
59
59
|
message: `High-risk task ${task.id} should require explicit reviewer and validator evidence artifacts.`,
|
|
60
|
-
action: 'Add
|
|
60
|
+
action: 'Add .sdd/runs/<branch>/do/code-review-vN.md and .sdd/runs/<branch>/test/validation-vN.md or equivalent accepted stage evidence paths.'
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
if (task.verificationAvailability.length === 0) {
|