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
package/README.md
CHANGED
|
@@ -20,16 +20,16 @@ Sufficient SDD, not maximum SDD.
|
|
|
20
20
|
|
|
21
21
|
## 适合解决什么问题
|
|
22
22
|
|
|
23
|
-
普通 agent
|
|
23
|
+
普通 agent 可以直接改代码,但在高风险任务里容易把需求边界、状态流转、并发、数据库、审查、验证和出货门禁混在主会话里。SDD Agent Platform 在 Claude Code 外增加一层可检查的工程约束:
|
|
24
24
|
|
|
25
25
|
| 维度 | 普通 agent 直接执行 | SDD Agent Platform |
|
|
26
26
|
|---|---|---|
|
|
27
27
|
| 路径选择 | 依赖 prompt 判断 | lifecycle decision 选择 direct / compact / full / research |
|
|
28
28
|
| 任务边界 | 容易随实现扩大 | `sdd tasks inspect` 固定 Boundary / Acceptance / affected files |
|
|
29
|
-
| agent 参与 | 证据混在主会话 | implementer / reviewer / validator 输出
|
|
30
|
-
| 验收 | 自然语言总结 | `.sdd/runtime.sqlite` +
|
|
31
|
-
|
|
|
32
|
-
| 健康检查 | 临时脚本 | `sdd doctor` 检查配置、
|
|
29
|
+
| agent 参与 | 证据混在主会话 | implementer / reviewer / validator 输出 `.sdd/runs/<branch>/<stage>/*.md` stage evidence |
|
|
30
|
+
| 验收 | 自然语言总结 | `.sdd/runtime.sqlite` + stage evidence refs/hashes + acceptance coverage |
|
|
31
|
+
| 状态推进 | 人工记得改状态 | runtime 更新 lifecycle/task/validation/gate/truthAlignment;Markdown 由 agent/stage-manager 编写 |
|
|
32
|
+
| 健康检查 | 临时脚本 | `sdd doctor` 检查配置、runtime state、current evidence、generated entry drift |
|
|
33
33
|
|
|
34
34
|
## 5 分钟快速开始
|
|
35
35
|
|
|
@@ -70,7 +70,7 @@ sdd doctor
|
|
|
70
70
|
|
|
71
71
|
```text
|
|
72
72
|
.sdd/project.yml
|
|
73
|
-
.sdd/
|
|
73
|
+
.sdd/runtime.sqlite
|
|
74
74
|
.claude/commands/... # managed generated entries
|
|
75
75
|
.claude/skills/sdd/... # managed generated skill
|
|
76
76
|
```
|
|
@@ -85,11 +85,11 @@ sdd doctor
|
|
|
85
85
|
/sdd
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
`/sdd` 会先读取 `sdd status`,再根据 CLI/core 的 recommended next command 判断下一步是补 spec、写 plan、拆 tasks、继续顺序 `sdd do task`、按 task/batch/wave 边界运行 `/sdd:test`,还是进入 `sdd ship --dry-run` 出货前检查。当前 Claude Code 投影正常入口为 `spec`、`plan`、`tasks`、`do`、`test`、`ship`、`doctor`;`
|
|
88
|
+
`/sdd` 会先读取 `sdd status`,再根据 CLI/core 的 recommended next command 判断下一步是补 spec、写 plan、拆 tasks、继续顺序 `sdd do task`、按 task/batch/wave 边界运行 `/sdd:test`,还是进入 `sdd ship --dry-run` 出货前检查。当前 Claude Code 投影正常入口为 `spec`、`plan`、`tasks`、`do`、`test`、`ship`、`doctor`;`verifies` 与 `goal-verify` 是 tasks/test bundle 内部 continuation,`verify`、`init`、`update`、`run-task`、`verify-task` 是 CLI / instruction action,不是当前默认 slash 用户入口。
|
|
89
89
|
|
|
90
90
|
## 主工作流
|
|
91
91
|
|
|
92
|
-
常见主路径如下。`/sdd:do`
|
|
92
|
+
常见主路径如下。`/sdd:do` 负责把 `T1` 或任务标题语义绑定到同一个 task boundary 并组织实现证据,`/sdd:test` 按 verify.md 中声明的 validation unit / batch / wave 验证边界执行;`sdd verify task` 仅保留为低级诊断入口,不是 happy path。
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
95
|
# 读状态、任务边界和路由
|
|
@@ -97,22 +97,23 @@ sdd status --branch master
|
|
|
97
97
|
sdd tasks inspect <task_id> --branch master
|
|
98
98
|
sdd tasks route <task_id> --branch master
|
|
99
99
|
|
|
100
|
-
# tasks 阶段应产出 tasks.md 与 verify.md;
|
|
101
|
-
sdd do task <task_id> --branch master
|
|
102
|
-
--review-artifact artifacts/review-<task_id>.md \
|
|
103
|
-
--validation-artifact artifacts/validation-<task_id>.md
|
|
100
|
+
# tasks 阶段应产出 tasks.md 与 verify.md;do 阶段只消费已接受 task boundary
|
|
101
|
+
sdd do task <task_id-or-task-text> --branch master
|
|
104
102
|
|
|
105
103
|
# 执行验证命令、生成 test evidence、判断 acceptance coverage;batch_end/wave_end 任务按 verify.md 合并验证
|
|
106
104
|
sdd test task <task_id> --branch master
|
|
107
105
|
sdd test batch <batch_id> --branch master
|
|
108
106
|
sdd test wave --branch master --wave 1
|
|
109
107
|
|
|
110
|
-
#
|
|
111
|
-
sdd
|
|
112
|
-
|
|
108
|
+
# /sdd:test bundle 完成 test -> goal-verify 后,ship 消费 accepted evidence 与 aligned truth
|
|
109
|
+
sdd test close --branch master
|
|
110
|
+
sdd test close --branch master --target goal-verify
|
|
111
|
+
sdd ship close --branch master
|
|
112
|
+
|
|
113
|
+
# 可选:让前台 subagent 做观察/调研,主 agent 先消费 digest,需要时再 deep-read stage evidence
|
|
113
114
|
sdd subagents run <task_id> --branch master --run <run_id> --agent observer --json
|
|
114
115
|
|
|
115
|
-
#
|
|
116
|
+
# 低级诊断:sdd verifies write、sdd verify task
|
|
116
117
|
```
|
|
117
118
|
|
|
118
119
|
subagent 输出的 `agents[].digest`、`summaryRefs` 和 `doNotReadUnlessNeededRefs` 用于主 agent 快速消费观察结果;它们始终是 non-authoritative guidance,不能替代 `/sdd:test`、decision card、ship 或最终风险判断。
|
|
@@ -123,25 +124,25 @@ subagent 输出的 `agents[].digest`、`summaryRefs` 和 `doNotReadUnlessNeededR
|
|
|
123
124
|
|---|---|
|
|
124
125
|
| `specs/<partition>/spec.md` | 需求、范围、验收标准 |
|
|
125
126
|
| `specs/<partition>/plan.md` | 设计方案、风险控制、验证矩阵 |
|
|
126
|
-
| `specs/<partition>/tasks.md` | 可执行 task、边界、
|
|
127
|
+
| `specs/<partition>/tasks.md` | 可执行 task、边界、stage evidence 要求 |
|
|
127
128
|
| `specs/<partition>/verify.md` | 验证设计契约;独立于 task planning / implementation authority |
|
|
128
|
-
| `.sdd/runtime.sqlite` | runtime state、events、projections、evidence ledger、
|
|
129
|
+
| `.sdd/runtime.sqlite` | runtime state、events、projections、evidence ledger、selection pointers、refs/hashes 的事实源 |
|
|
129
130
|
| `.sdd/run-index.json` | 可重建的本地查询索引,不是权威事实源 |
|
|
130
|
-
| `.sdd/runs/<
|
|
131
|
+
| `.sdd/runs/<branch>/<stage>/*.md` | agent/stage-manager authored stage evidence;runtime 只注册 ref/hash/gate metadata |
|
|
131
132
|
| `.claude/**` | managed AI entry projection,不是手写事实源 |
|
|
132
133
|
|
|
133
134
|
## 文档地图
|
|
134
135
|
|
|
135
136
|
| 文档 | 面向对象 | 用途 |
|
|
136
137
|
|---|---|---|
|
|
137
|
-
| [用户指南](docs/user-guide.md) | 人类用户 | 安装、初始化、执行任务、test gate、
|
|
138
|
-
| [AI README](docs/ai-readme.md) | Claude Code / AI 操作者 | status-first、
|
|
138
|
+
| [用户指南](docs/user-guide.md) | 人类用户 | 安装、初始化、执行任务、test gate、truthAlignment、subagent digest、doctor、常见问题 |
|
|
139
|
+
| [AI README](docs/ai-readme.md) | Claude Code / AI 操作者 | status-first、stage evidence、task boundary、truthAlignment 策略 |
|
|
139
140
|
| [文档信息架构](docs/documentation-information-architecture.md) | 维护者 | Markdown 分类、迁移风险、当前入口地图 |
|
|
140
141
|
| [命令信息架构](docs/architecture/command-information-architecture.md) | 平台维护者 | CLI 命令分层、入口职责和用户路径 |
|
|
141
142
|
| [架构设计](docs/architecture/sdd-agent-platform-architecture.md) | 平台维护者 | 平台架构和核心设计 |
|
|
142
143
|
| [Lifecycle Decision Model](docs/architecture/lifecycle-decision-model.md) | 平台维护者 | direct / compact / full / research 的决策模型 |
|
|
143
144
|
| [Phase artifacts index](specs/master/phases/README.md) | 平台维护者 | 本仓库 SDD phase 归档入口 |
|
|
144
|
-
| [Phase status](specs/master/phases/PHASE_STATUS.md) | 平台维护者 |
|
|
145
|
+
| [Phase status](specs/master/phases/PHASE_STATUS.md) | 平台维护者 | 当前阶段状态;Phase 9 正在收敛 runtime control-plane、six-bundle 入口、truthAlignment 与旧 surface 清理 |
|
|
145
146
|
|
|
146
147
|
研究与历史分析材料保留在 `docs/research/`;runtime contract assets 保留在 `commands/`、`agents/`、`templates/`、`workflows/` 等目录,不作为普通 Markdown 文档搬迁。
|
|
147
148
|
|
|
@@ -151,13 +152,14 @@ subagent 输出的 `agents[].digest`、`summaryRefs` 和 `doNotReadUnlessNeededR
|
|
|
151
152
|
packages/ TypeScript runtime 与 CLI
|
|
152
153
|
commands/ Claude Code 命令入口说明源材料
|
|
153
154
|
agents/ SDD lifecycle agent contract
|
|
154
|
-
templates/ spec / plan / tasks / project
|
|
155
|
+
templates/ spec / plan / tasks / project 模板
|
|
155
156
|
workflows/ 阶段 workflow contract
|
|
156
157
|
adapters/ 项目适配模板
|
|
157
|
-
schemas/ runtime、
|
|
158
|
+
schemas/ runtime、stage evidence 与 contract pack
|
|
158
159
|
docs/ 用户、AI、架构、研究文档
|
|
159
160
|
specs/ 本项目自身的 SDD 文档
|
|
160
|
-
|
|
161
|
+
runs/ agent/stage-manager authored branch stage evidence
|
|
162
|
+
.sdd/ 本地 runtime 状态和索引
|
|
161
163
|
context/ 项目记忆与决策上下文
|
|
162
164
|
```
|
|
163
165
|
|
|
@@ -224,11 +226,11 @@ sdd doctor
|
|
|
224
226
|
- 自动 commit / push / force push。
|
|
225
227
|
- 自动创建 PR、issue、外部评论或修改共享系统。
|
|
226
228
|
- 自动执行 destructive git、清理未提交变更或删除历史 run evidence。
|
|
227
|
-
-
|
|
229
|
+
- 绕过 runtime gate、truthAlignment、accepted evidence selection 或人工确认要求直接标记通过。
|
|
228
230
|
- 把 `.claude/**`、`commands/**`、`agents/**`、`templates/**`、`workflows/**` 当作普通文档随意搬迁。
|
|
229
231
|
|
|
230
|
-
已有未提交变更不应阻塞 SDD workflow;正确做法是通过 branch/partition、
|
|
232
|
+
已有未提交变更不应阻塞 SDD workflow;正确做法是通过 branch/partition、runtime state、stage evidence refs/hashes 和 accepted selection pointers 隔离风险,而不是要求工作树必须干净。
|
|
231
233
|
|
|
232
234
|
## 当前状态
|
|
233
235
|
|
|
234
|
-
截至当前主线文档,Phase 1~
|
|
236
|
+
截至当前主线文档,Phase 1~8 已完成平台编排、入口投影、分发、harness engineering、agent/skill/team runtime、storage v2、verification/test、ship 和 core modularization 等基础;Phase 9 正在落地 runtime control-plane:six-bundle 用户入口、八个内部 runtime stage、SQLite current state、stage evidence refs/hashes、truthAlignment、accepted evidence selection、advisory nextIntent,以及旧入口/旧 evidence surface 清理。
|
|
@@ -20,20 +20,37 @@ Use the local or globally installed \`sdd\` CLI as the source of truth for this
|
|
|
20
20
|
|
|
21
21
|
1. Accept the user's natural-language intent, then run \`sdd status\` first and report only workflow state, blocker/current task, and the recommended next command; do not paste or restate full status unless asked.
|
|
22
22
|
2. Run \`sdd instructions overview --json\` only when the next action is unclear or you need the full dynamic command contract.
|
|
23
|
-
3. Dynamic routing comes from CLI/core output, not this skill text; follow the recommended next command before choosing a projected command
|
|
23
|
+
3. Dynamic routing comes from CLI/core output, not this skill text; follow the recommended next command before choosing a projected command bundle (\`spec\`, \`plan\`, \`tasks\`, \`do\`, \`test\`, \`ship\`, or \`doctor\`). The \`tasks\` bundle covers \`tasks -> verifies\`; the \`test\` bundle covers \`test -> goal-verify\`.
|
|
24
24
|
4. If the intent is still ambiguous after status, ask one clarifying question before spec/plan/do/test/ship work.
|
|
25
25
|
5. For risky requests that mention state-machine, concurrency, database, SQL, security, API/schema, CI/build, or external unknowns, run \`sdd lifecycle decide --from-text <text>\` before spec/plan work.
|
|
26
26
|
6. If status reports workflow_status=not_started, start the spec stage for the resolved Git branch partition; do not use \`sdd init\` as the workflow branch entry.
|
|
27
27
|
7. If status points to gaps, drift, or doctor/update work, handle that maintenance action before do/test/ship.
|
|
28
28
|
8. If status recommends a task, run \`sdd tasks inspect <task_id>\` and use the task Boundary and Acceptance before starting \`do\`.
|
|
29
|
-
9. If status recommends do or test, follow the corresponding projected command
|
|
30
|
-
10. If status exposes
|
|
31
|
-
11. If the user asks to release or go online, run \`sdd ship --branch <branch> --
|
|
29
|
+
9. If status recommends do, tasks, or test, follow the corresponding projected command bundle or its canonical CLI command instead of inferring completion from chat.
|
|
30
|
+
10. If status exposes projection drift, run \`sdd doctor\` and follow diagnostic/recovery guidance before resuming the ordinary happy path.
|
|
31
|
+
11. If the user asks to release or go online, run \`sdd ship close --branch <branch> --json\` for local readiness first; do not publish, push, tag, or create external release state without explicit confirmation.
|
|
32
32
|
|
|
33
33
|
Refresh this managed skill with \`sdd update\` when drift is reported.
|
|
34
34
|
`
|
|
35
35
|
},
|
|
36
36
|
commandEntry('sdd-doctor', '.claude/commands/sdd/doctor.md', 'doctor', 'Check project config, scoped run evidence, generated AI entry drift, and use sdd doctor fast|deep|recover for explicit diagnostic scope.'),
|
|
37
|
+
{
|
|
38
|
+
id: 'sdd-update',
|
|
39
|
+
kind: 'command',
|
|
40
|
+
relativePath: '.claude/commands/sdd/update.md',
|
|
41
|
+
title: 'SDD update',
|
|
42
|
+
body: `Refresh SDD-managed AI entries and re-import declared external/user-global/project skill capability metadata through the same idempotent update path used by init bootstrap. Use this for existing initialized projects when generated entries drift or a skill import needs dedupe/refresh.
|
|
43
|
+
|
|
44
|
+
Run:
|
|
45
|
+
|
|
46
|
+
\`\`\`bash
|
|
47
|
+
sdd update
|
|
48
|
+
sdd update --import-skill <capability_id> --source project|user-global|external --source-ref <path-or-reference> --domain <domain> --stage <stage>
|
|
49
|
+
\`\`\`
|
|
50
|
+
|
|
51
|
+
This command is maintenance only: it updates SDD-managed projections and non-authoritative skill capability metadata in .sdd/project.yml. It does not execute imported skills, grant lifecycle authority, close gates, or publish external state.
|
|
52
|
+
`
|
|
53
|
+
},
|
|
37
54
|
{
|
|
38
55
|
id: 'sdd-spec',
|
|
39
56
|
kind: 'command',
|
|
@@ -60,125 +77,106 @@ Do not design implementation in \`spec.md\`; stop before plan work when requirem
|
|
|
60
77
|
kind: 'command',
|
|
61
78
|
relativePath: '.claude/commands/sdd/plan.md',
|
|
62
79
|
title: 'SDD plan',
|
|
63
|
-
body: `Refine
|
|
80
|
+
body: `Refine specs/<branch>/plan.md and .sdd/runs/<branch>/plan/*.md as agent-authored plan-stage evidence. Runtime close validates refs, hashes, contracts, and handoff state into .sdd/runtime.sqlite; it must not create or modify Markdown.
|
|
64
81
|
|
|
65
82
|
Run:
|
|
66
83
|
|
|
67
84
|
\`\`\`bash
|
|
68
85
|
sdd instructions plan --json
|
|
86
|
+
sdd plan close --branch <branch> --json
|
|
69
87
|
\`\`\`
|
|
70
88
|
|
|
71
|
-
Then write or refine \`specs/<branch>/plan.md\` as the technical bridge from approved spec to task-ready execution.
|
|
89
|
+
Then write or refine \`specs/<branch>/plan.md\` as the technical bridge from approved spec to task-ready execution. Have planner/reviewer/plan-manager author \`.sdd/runs/<branch>/plan/*.md\` evidence, including \`plan-collaboration-contract-vN.md\`, before close.
|
|
72
90
|
|
|
73
|
-
Use PlantUML fences for diagrams when useful: component diagrams for impact surface, sequence/activity diagrams for workflows and concurrency, state diagrams for state-machine risk, and deployment/data diagrams when release or data topology matters.
|
|
91
|
+
Use PlantUML fences for diagrams when useful: component diagrams for impact surface, sequence/activity diagrams for workflows and concurrency, state diagrams for state-machine risk, and deployment/data diagrams when release or data topology matters. Stop before tasks when the technical solution is incomplete or has unresolved design gaps.
|
|
74
92
|
|
|
75
|
-
|
|
76
|
-
`
|
|
93
|
+
Do not let runtime author, repair, normalize, or migrate Markdown.`
|
|
77
94
|
},
|
|
78
95
|
{
|
|
79
96
|
id: 'sdd-tasks',
|
|
80
97
|
kind: 'command',
|
|
81
98
|
relativePath: '.claude/commands/sdd/tasks.md',
|
|
82
99
|
title: 'SDD tasks',
|
|
83
|
-
body: `
|
|
100
|
+
body: `Use this generated command as the user-visible bundle for the \`tasks -> verifies\` runtime stages. First refine specs/<branch>/tasks.md and .sdd/runs/<branch>/tasks/*.md as agent-authored tasks-stage evidence, then continue to verifies through this bundle only after runtime/status targets that internal stage.
|
|
84
101
|
|
|
85
102
|
Run:
|
|
86
103
|
|
|
87
104
|
\`\`\`bash
|
|
105
|
+
sdd status
|
|
88
106
|
sdd instructions tasks --json
|
|
89
107
|
sdd tasks format
|
|
108
|
+
sdd tasks close --branch <branch> --json
|
|
109
|
+
sdd tasks close --branch <branch> --target verifies --json
|
|
90
110
|
\`\`\`
|
|
91
111
|
|
|
92
|
-
|
|
112
|
+
Workflow:
|
|
93
113
|
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
1. Write or refine \`specs/<branch>/tasks.md\` from the approved spec and plan. Include Delivery Map, implementation waves, validation batches/waves, review gate declarations, task blocks with acceptance_refs and plan_refs, affected_files, change_surface, implementation_wave, validation_batch, validation_timing, requires_verify_before_next, validation, risk, agent_fit, allowed_agents, required_artifacts, verification_availability, autonomy, plus companion sections for Boundary, Acceptance, Definition of Done, Evidence Expectations, and Implementation Notes.
|
|
115
|
+
2. Have task-planner/reviewer/tasks-manager author \`.sdd/runs/<branch>/tasks/*.md\` evidence, including \`tasks-collaboration-contract-vN.md\`, before \`sdd tasks close\`. Keep metadata inside the \`\`\`sdd-task fenced block and companion sections outside it.
|
|
116
|
+
3. Run \`sdd tasks close --branch <branch> --json\`; runtime validates refs/frontmatter/hashes/contracts and writes only SQLite.
|
|
117
|
+
4. If the fresh runtime handoff targets \`verifies\` inside this same bundle, have verification-designer/reviewer/verifies-manager author \`specs/<branch>/verify.md\` plus \`.sdd/runs/<branch>/verifies/*.md\` evidence, including \`verifies-collaboration-contract-vN.md\`.
|
|
118
|
+
5. Run \`sdd tasks close --branch <branch> --target verifies --json\`; runtime validates verifies-stage refs/contracts and returns the next legal route.
|
|
119
|
+
|
|
120
|
+
Do not implement code, run validation commands, silently advance to do, or let runtime author Markdown.`
|
|
96
121
|
},
|
|
97
122
|
{
|
|
98
123
|
id: 'sdd-test',
|
|
99
124
|
kind: 'command',
|
|
100
125
|
relativePath: '.claude/commands/sdd/test.md',
|
|
101
126
|
title: 'SDD test',
|
|
102
|
-
body: `
|
|
127
|
+
body: `Use this generated command as the user-visible bundle for the \`test -> goal-verify\` runtime stages. Bind validation intent to an accepted verify.md validation unit, execute that unit, keep command summaries in runtime read models, have test-stage agents author .sdd/runs/<branch>/test/*.md evidence, then continue to goal verification through this bundle only after runtime/status targets that internal stage.
|
|
103
128
|
|
|
104
129
|
Run:
|
|
105
130
|
|
|
106
131
|
\`\`\`bash
|
|
107
132
|
sdd status
|
|
108
133
|
sdd instructions test --json
|
|
109
|
-
|
|
110
|
-
sdd test
|
|
111
|
-
sdd test
|
|
112
|
-
sdd test wave --branch <branch> --wave <n>
|
|
134
|
+
sdd test <validation_unit_id-or-validation_text> --branch <branch>
|
|
135
|
+
sdd test close --branch <branch> --json
|
|
136
|
+
sdd test close --branch <branch> --target goal-verify --json
|
|
113
137
|
\`\`\`
|
|
114
138
|
|
|
115
139
|
Workflow:
|
|
116
140
|
|
|
117
|
-
1. Confirm \`verify.md\` exists
|
|
118
|
-
2. Use \`sdd test
|
|
119
|
-
3.
|
|
120
|
-
4.
|
|
121
|
-
5.
|
|
141
|
+
1. Confirm accepted \`verify.md\` exists for the selected branch; if missing or stale, return to verifies through the tasks bundle.
|
|
142
|
+
2. Use \`sdd test <validation_unit_id-or-validation_text> --branch <branch>\` as the normal entry; task id, validation batch id, and accepted task title/text are equivalent only when they bind to one verify.md validation unit.
|
|
143
|
+
3. Use \`sdd test task|batch|wave\` only for explicit low-level diagnostics, replay, or narrowed override flags such as \`--command\`, \`--run\`, \`--command-json\`, \`--command-file\`, or passthrough argv.
|
|
144
|
+
4. Have test-runner/reviewer/test-manager author \`.sdd/runs/<branch>/test/*.md\` evidence, including \`test-collaboration-contract-vN.md\`; PASS command output should not create log artifacts unless the validation contract explicitly needs stdout/stderr as primary evidence.
|
|
145
|
+
5. Run \`sdd test close --branch <branch> --json\`; runtime validates refs/frontmatter/hashes/contracts and writes only SQLite.
|
|
146
|
+
6. If the fresh runtime handoff targets \`goal-verify\` inside this same bundle, have goal-verifier/reviewer author \`.sdd/runs/<branch>/goal-verify/*.md\` evidence, then run \`sdd test close --branch <branch> --target goal-verify --json\` so runtime records truthAlignment before ship readiness.
|
|
122
147
|
|
|
123
|
-
Do not auto-fix failures, author or refresh \`verify.md\`, mutate \`tasks.md\`,
|
|
124
|
-
`
|
|
148
|
+
Do not auto-fix failures, author or refresh \`verify.md\`, mutate \`tasks.md\`, commit, publish, or treat command success alone as semantic PASS.`
|
|
125
149
|
},
|
|
126
150
|
{
|
|
127
151
|
id: 'sdd-do',
|
|
128
152
|
kind: 'command',
|
|
129
153
|
relativePath: '.claude/commands/sdd/do.md',
|
|
130
154
|
title: 'SDD do',
|
|
131
|
-
body: `
|
|
155
|
+
body: `Semantically bind /sdd:do or sdd do task input to one accepted task boundary, then run do-stage collaboration: implementer/reviewer/do-manager write .sdd/runs/<branch>/do/*.md evidence and runtime reconciles gate truth into SQLite.
|
|
132
156
|
|
|
133
157
|
Run:
|
|
134
158
|
|
|
135
159
|
\`\`\`bash
|
|
136
160
|
sdd status
|
|
137
161
|
sdd instructions do --json
|
|
138
|
-
sdd tasks inspect <
|
|
162
|
+
sdd tasks inspect <bound_task_id>
|
|
139
163
|
\`\`\`
|
|
140
164
|
|
|
141
165
|
Workflow:
|
|
142
166
|
|
|
143
|
-
|
|
167
|
+
Use CLI/core output as the source of truth. Task id and accepted task title/text are equivalent when they bind to the same accepted task boundary. Agent evidence flow: implementer edits only inside the bound task boundary and writes \`.sdd/runs/<branch>/do/implementation-vN.md\`; code-reviewer writes \`.sdd/runs/<branch>/do/code-review-vN.md\`; do-manager writes \`.sdd/runs/<branch>/do/do-manager-vN.md\` as a closure request. Runtime reads these Markdown refs/hashes/frontmatter, validates the gate, and writes only SQLite projections/run state. This command entry does not authorize autonomous background execution.
|
|
144
168
|
|
|
145
169
|
|
|
146
|
-
1.
|
|
147
|
-
2.
|
|
170
|
+
1. Run \`sdd status\`, then let CLI/core bind the user request or recommended next command to exactly one accepted task boundary. Stop if binding is ambiguous, missing, stale, or boundary-expanding.
|
|
171
|
+
2. Run \`sdd instructions do --json\` and \`sdd tasks inspect <bound_task_id>\`; restate only the bound task Boundary, blocking gaps, and validation commands.
|
|
148
172
|
3. Work only inside the selected task boundary; do not expand scope without a checkpoint.
|
|
149
|
-
4.
|
|
150
|
-
5.
|
|
151
|
-
6.
|
|
152
|
-
7.
|
|
173
|
+
4. Implement within affected_files and capture changed file refs/hashes in \`.sdd/runs/<branch>/do/implementation-vN.md\` frontmatter.
|
|
174
|
+
5. Have code-reviewer write \`.sdd/runs/<branch>/do/code-review-vN.md\` against the implementation evidence hash, whether approved or blocked.
|
|
175
|
+
6. Have do-manager write \`.sdd/runs/<branch>/do/do-manager-vN.md\` as a closure request that references the reviewed implementation and review hash.
|
|
176
|
+
7. Run \`sdd do task <task_id-or-task-text> --branch <branch>\`; runtime must read \`.sdd/runs/<branch>/do/*.md\`, validate frontmatter/hash/review/manager closure, and write only SQLite projections/run state.
|
|
177
|
+
8. Report the run id, status, binding target, blocking gaps, accepted evidence refs, and next gate. If completed, proceed to \`sdd test <validation_unit_id-or-validation_text> --branch <branch>\` for verification.
|
|
153
178
|
|
|
154
|
-
Do not create worktrees, auto commit,
|
|
155
|
-
`
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: 'sdd-sync-back',
|
|
159
|
-
kind: 'command',
|
|
160
|
-
relativePath: '.claude/commands/sdd/sync-back.md',
|
|
161
|
-
title: 'SDD sync-back',
|
|
162
|
-
body: `Inspect or replay legacy task completion write-back state for diagnostic, recovery, or compatibility use. Sync-back is a low-level projection repair command, not an ordinary happy-path workflow stage.
|
|
163
|
-
|
|
164
|
-
Run:
|
|
165
|
-
|
|
166
|
-
\`\`\`bash
|
|
167
|
-
sdd status
|
|
168
|
-
sdd instructions sync-back --json
|
|
169
|
-
sdd sync-back inspect --branch <branch> --task <task_id>
|
|
170
|
-
\`\`\`
|
|
171
|
-
|
|
172
|
-
Diagnostic workflow:
|
|
173
|
-
|
|
174
|
-
1. Resolve exactly one task id and workflow partition from an explicit recovery request, old run replay, CI inspection, or doctor/status diagnostic. Stop and ask if either is ambiguous.
|
|
175
|
-
2. Run \`sdd sync-back inspect --branch <branch> --task <task_id>\` before any apply; pass \`<run_id>\` only for replay, CI, or old-run inspection.
|
|
176
|
-
3. Report what apply would write: target tasks file, task id, markdown status transition, proposal path, evidence artifacts, apply_policy, and policy reasons.
|
|
177
|
-
4. If inspect reports \`status=ready\` and \`apply_policy=direct\`, run \`sdd sync-back apply --branch <branch> --task <task_id>\` only for explicit recovery/replay.
|
|
178
|
-
5. If inspect reports approval_required=true, ask for explicit human confirmation and only then run \`sdd sync-back apply --branch <branch> --task <task_id> --approved\`.
|
|
179
|
-
6. Explain that default apply writes only tasks.md for the target task, appends the sync-back implementation note, marks run sync_back applied, and rebuilds the local run index; \`--refresh-verify\` is an explicit recovery option after reviewed task-contract changes.
|
|
180
|
-
|
|
181
|
-
Do not apply without inspect, do not use \`--approved\` without human confirmation, do not change source files during sync-back, and do not recommend sync-back after normal \`/sdd:test\` PASS.
|
|
179
|
+
Do not create worktrees, auto commit, mark missing evidence as PASS, or let runtime author Markdown artifacts.
|
|
182
180
|
`
|
|
183
181
|
},
|
|
184
182
|
{
|
|
@@ -186,26 +184,26 @@ Do not apply without inspect, do not use \`--approved\` without human confirmati
|
|
|
186
184
|
kind: 'command',
|
|
187
185
|
relativePath: '.claude/commands/sdd/ship.md',
|
|
188
186
|
title: 'SDD ship',
|
|
189
|
-
body: `
|
|
187
|
+
body: `Close ship readiness through agent-authored .sdd/runs/<branch>/ship/*.md evidence. Optional specs/<branch>/release.md is ship-agent authored, not runtime-authored.
|
|
190
188
|
|
|
191
189
|
Run:
|
|
192
190
|
|
|
193
191
|
\`\`\`bash
|
|
194
|
-
sdd
|
|
192
|
+
sdd status
|
|
195
193
|
sdd instructions ship --json
|
|
194
|
+
sdd ship close --branch <branch> --json
|
|
196
195
|
\`\`\`
|
|
197
196
|
|
|
198
197
|
Workflow:
|
|
199
198
|
|
|
200
199
|
1. Resolve the target branch/partition from \`sdd status\` or the user's explicit branch.
|
|
201
|
-
2.
|
|
202
|
-
3.
|
|
203
|
-
4.
|
|
200
|
+
2. Confirm goal-verify has recorded aligned truthAlignment or validated reconciliation truth.
|
|
201
|
+
3. Have ship-manager/release agent author \`.sdd/runs/<branch>/ship/*.md\` evidence, including \`ship-collaboration-contract-vN.md\`; write \`specs/<branch>/release.md\` only as an explicit ship-agent artifact if needed.
|
|
202
|
+
4. Run \`sdd ship close --branch <branch> --json\`; runtime validates readiness refs/contracts/truthAlignment and writes only \`.sdd/runtime.sqlite\`.
|
|
204
203
|
5. Run generated-entry drift, current-run health, typecheck, test, build, and package dry-run gates when preparing a real package release.
|
|
205
204
|
6. Stop before publish, push, tag, deploy, or external release creation unless the user explicitly approves that separate action.
|
|
206
205
|
|
|
207
|
-
Do not skip failed gates, do not treat historical doctor debt as a release blocker unless it affects current evidence, and do not
|
|
208
|
-
`
|
|
206
|
+
Do not skip failed gates, do not treat historical doctor debt as a release blocker unless it affects current evidence, and do not let runtime author release Markdown.`
|
|
209
207
|
}
|
|
210
208
|
];
|
|
211
209
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-tools.js","sourceRoot":"","sources":["../src/ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM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AAa,CAAC,SAA2B,EAAE,MAAqB;IACvE,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,YAAY;QAC5B,UAAU,EAAE,SAAS,CAAC,EAAE;QACxB,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,IAAI,EAAE,UAAU,SAAS,CAAC,IAAI,EAAE;QAChC,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC;QACnC,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAC1C,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,MAAqB;IAC3C,IAAI,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACnG,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,CAAC;AACnD,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
1
3
|
import { ARTIFACT_RESULT_INGESTION_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
-
import {
|
|
3
|
-
import { artifactKind } from '../run-state/artifacts.js';
|
|
4
|
+
import { getBranchStageEvidencePathFromRef, isBranchStageEvidenceRef, normalizeStageEvidenceOrLegacyArtifactRef, toArtifactRootRelativePath, toEvidencePayloadFileName } from '../runtime-paths.js';
|
|
5
|
+
import { artifactKind, readArtifact } from '../run-state/artifacts.js';
|
|
4
6
|
import { appendEvent } from '../run-state/events.js';
|
|
5
7
|
import { readRunState, writeRunState } from '../run-state/run-state.js';
|
|
6
8
|
import { runtimeScopedId, withRuntimeStore } from '../storage/runtime-store.js';
|
|
@@ -10,16 +12,33 @@ import { isDerivedEvidenceRef } from './sdd-evidence.js';
|
|
|
10
12
|
import { validateSddResultArtifact } from './sdd-result.js';
|
|
11
13
|
export async function ingestArtifactResult(projectRoot, runId, input) {
|
|
12
14
|
const state = await readRunState(projectRoot, runId);
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
15
|
+
const originalDelegation = state.delegations[input.delegationId];
|
|
16
|
+
if (!originalDelegation) {
|
|
15
17
|
throw new Error(`Unknown delegation ${input.delegationId} in run ${runId}.`);
|
|
16
18
|
}
|
|
17
|
-
const artifactPath =
|
|
18
|
-
const
|
|
19
|
+
const artifactPath = normalizeStageEvidenceOrLegacyArtifactRef(input.artifactPath);
|
|
20
|
+
const contentDigest = await hashArtifact(projectRoot, runId, artifactPath);
|
|
21
|
+
let delegation = originalDelegation;
|
|
22
|
+
let key = artifactIngestionKey(delegation.delegationId, artifactPath);
|
|
19
23
|
const existing = (state.artifactIngestions ?? {})[key];
|
|
20
|
-
if (existing) {
|
|
24
|
+
if (existing?.status === 'accepted' && (!existing.contentDigest || existing.contentDigest === contentDigest)) {
|
|
25
|
+
return { valid: true, duplicate: true, record: existing, delegation };
|
|
26
|
+
}
|
|
27
|
+
if (existing?.status === 'accepted' && existing.contentDigest !== contentDigest) {
|
|
28
|
+
delegation = allocateRetryDelegation(state, originalDelegation, 'artifact_reingest');
|
|
29
|
+
key = artifactIngestionKey(delegation.delegationId, artifactPath);
|
|
30
|
+
const retryExisting = (state.artifactIngestions ?? {})[key];
|
|
31
|
+
if (retryExisting?.status === 'accepted' && retryExisting.contentDigest === contentDigest) {
|
|
32
|
+
return { valid: true, duplicate: true, record: retryExisting, delegation };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (existing) {
|
|
21
36
|
return { valid: existing.status === 'accepted', duplicate: true, record: existing, delegation };
|
|
22
37
|
}
|
|
38
|
+
else if (isDelegationTerminal(delegation.status)) {
|
|
39
|
+
delegation = allocateRetryDelegation(state, originalDelegation, 'artifact_reingest');
|
|
40
|
+
key = artifactIngestionKey(delegation.delegationId, artifactPath);
|
|
41
|
+
}
|
|
23
42
|
const report = await validateSddResultArtifact(projectRoot, runId, artifactPath, { expectedTask: delegation.task, expectedAgent: delegation.agent });
|
|
24
43
|
const issues = [...report.issues];
|
|
25
44
|
if (isDelegationTerminal(delegation.status)) {
|
|
@@ -44,7 +63,10 @@ export async function ingestArtifactResult(projectRoot, runId, input) {
|
|
|
44
63
|
delegationStatus: accepted ? targetStatus : (report.valid ? null : 'RECOVERABLE'),
|
|
45
64
|
ingestedAt: now,
|
|
46
65
|
issues,
|
|
47
|
-
gaps: accepted ? gaps : []
|
|
66
|
+
gaps: accepted ? gaps : [],
|
|
67
|
+
contentDigest,
|
|
68
|
+
retryOf: delegation.retryOf ?? null,
|
|
69
|
+
replayReason: delegation.replayReason ?? null
|
|
48
70
|
};
|
|
49
71
|
const nextDelegation = accepted
|
|
50
72
|
? { ...delegation, status: targetStatus, expectedArtifact: artifactPath, terminalEventAt: now }
|
|
@@ -139,6 +161,39 @@ async function recordRuntimeEvidenceAdmission(projectRoot, state, ingestion, tru
|
|
|
139
161
|
}
|
|
140
162
|
});
|
|
141
163
|
}
|
|
164
|
+
async function hashArtifact(projectRoot, runId, evidenceRef) {
|
|
165
|
+
if (isBranchStageEvidenceRef(evidenceRef)) {
|
|
166
|
+
try {
|
|
167
|
+
return createHash('sha256').update(await readFile(getBranchStageEvidencePathFromRef(projectRoot, evidenceRef), 'utf8'), 'utf8').digest('hex');
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return createHash('sha256').update(await readArtifact(projectRoot, runId, toEvidencePayloadFileName(evidenceRef)), 'utf8').digest('hex');
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return createHash('sha256').update(await readArtifact(projectRoot, runId, toArtifactRootRelativePath(evidenceRef)), 'utf8').digest('hex');
|
|
174
|
+
}
|
|
175
|
+
function allocateRetryDelegation(state, delegation, replayReason) {
|
|
176
|
+
const attempt = nextDelegationAttempt(state, delegation.task, delegation.agent);
|
|
177
|
+
return {
|
|
178
|
+
...delegation,
|
|
179
|
+
delegationId: `B-${delegation.task}-${delegation.agent}-${String(attempt).padStart(3, '0')}`,
|
|
180
|
+
status: 'RUNNING',
|
|
181
|
+
startedAt: new Date().toISOString(),
|
|
182
|
+
lastHeartbeatAt: null,
|
|
183
|
+
terminalEventAt: null,
|
|
184
|
+
attempt,
|
|
185
|
+
retryOf: delegation.delegationId,
|
|
186
|
+
replayReason
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function nextDelegationAttempt(state, taskId, agent) {
|
|
190
|
+
const prefix = `B-${taskId}-${agent}-`;
|
|
191
|
+
const attempts = Object.keys(state.delegations)
|
|
192
|
+
.filter((delegationId) => delegationId.startsWith(prefix))
|
|
193
|
+
.map((delegationId) => Number.parseInt(delegationId.slice(prefix.length), 10))
|
|
194
|
+
.filter(Number.isFinite);
|
|
195
|
+
return Math.max(1, ...attempts) + 1;
|
|
196
|
+
}
|
|
142
197
|
function artifactIngestionKey(delegationId, artifactPath) {
|
|
143
198
|
return `${delegationId}:${artifactPath}`;
|
|
144
199
|
}
|
|
@@ -173,7 +228,7 @@ function artifactIngestionGaps(delegation, status) {
|
|
|
173
228
|
if (status === 'PASS') {
|
|
174
229
|
return [];
|
|
175
230
|
}
|
|
176
|
-
return [taskGap(delegation.task, delegation.agent, `Artifact ingestion returned ${status} for ${delegation.delegationId}.`, 'Inspect the ingested artifact evidence before
|
|
231
|
+
return [taskGap(delegation.task, delegation.agent, `Artifact ingestion returned ${status} for ${delegation.delegationId}.`, 'Inspect the ingested artifact evidence before continuing stage closure.')];
|
|
177
232
|
}
|
|
178
233
|
function contractIssue(field, message, recommendation) {
|
|
179
234
|
return { field, message, recommendation };
|