sdd-agent-platform 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -39
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +72 -71
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +64 -9
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +26 -17
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +13 -9
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +16 -20
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +1 -7
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +26 -8
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +4 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +8 -8
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +0 -24
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +277 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +5 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +16 -7
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +59 -66
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +55 -19
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +20 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +218 -18
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +17 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +32 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +2 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +9 -9
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +12 -12
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +4 -7
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +19 -17
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +28 -13
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +61 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +192 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +73 -17
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +11 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +168 -18
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +22 -54
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +53 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +51 -34
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +169 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +5 -44
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +109 -14
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +276 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +15 -4
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +139 -38
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +105 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +343 -8
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +348 -3
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +1017 -8
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +19 -20
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +44 -37
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +19 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +213 -111
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +28 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +546 -125
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +450 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +105 -30
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +164 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +80 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +674 -41
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +72 -71
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +52 -6
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +44 -29
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +15 -11
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +17 -20
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +4 -1
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +217 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -3
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +57 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +17 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +16 -7
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +34 -13
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +60 -67
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +58 -19
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +8 -3
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +319 -20
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +17 -17
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +42 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +45 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +32 -13
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +68 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +212 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +391 -6
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +78 -17
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +173 -18
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +24 -59
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +59 -9
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +53 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +55 -41
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +252 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +131 -14
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +306 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +15 -4
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +261 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +169 -41
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +497 -8
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +560 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1510 -9
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +20 -20
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +46 -42
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +18 -52
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +84 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +138 -64
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +226 -116
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +148 -48
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +619 -136
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +383 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +556 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +131 -8
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +117 -30
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +425 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +507 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +182 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +194 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +115 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +19 -4
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +224 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +851 -9
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +862 -45
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
- package/package.json +1 -1
- package/packages/cli/dist/args.js +2 -2
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/ai-tools.js +13 -2
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/execution.js +49 -1
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/governance.js +1 -1
- package/packages/cli/dist/commands/governance.js.map +1 -1
- package/packages/cli/dist/commands/init.js +6 -1
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/lifecycle.js +15 -2
- package/packages/cli/dist/commands/lifecycle.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +48 -2
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +52 -2
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +6 -0
- package/packages/cli/dist/commands/stage-close.js +295 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +70 -4
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js +4 -4
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/test.js +272 -5
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +9 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +257 -20
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/dispatch.js +4 -9
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +42 -27
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/doctor.js +1 -1
- package/packages/cli/dist/renderers/doctor.js.map +1 -1
- package/packages/cli/dist/renderers/execution.js +1 -1
- package/packages/cli/dist/renderers/execution.js.map +1 -1
- package/packages/cli/dist/renderers/json.d.ts +1 -0
- package/packages/cli/dist/renderers/json.js +3 -0
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
- package/packages/cli/dist/renderers/registry-runtime.js +27 -2
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +5 -3
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +0 -4
- package/packages/cli/dist/renderers/workflow.js +46 -84
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +72 -71
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +64 -9
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +26 -17
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +3 -0
- package/packages/core/dist/config/init-project.js +13 -9
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +4 -4
- package/packages/core/dist/config/starter-documents.js +16 -20
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/context/build-package.d.ts +1 -1
- package/packages/core/dist/context/build-package.js +1 -7
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +26 -8
- package/packages/core/dist/context/evidence-summary.js.map +1 -1
- package/packages/core/dist/context/log-worker.js +2 -2
- package/packages/core/dist/context/log-worker.js.map +1 -1
- package/packages/core/dist/context-offload/contracts.d.ts +1 -1
- package/packages/core/dist/contracts.d.ts +4 -1
- package/packages/core/dist/contracts.js +3 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +3 -0
- package/packages/core/dist/delegation/validation.d.ts +3 -0
- package/packages/core/dist/delegation/validation.js +7 -4
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +8 -8
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +0 -1
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +7 -7
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +0 -24
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +277 -3
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +61 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/packages/core/dist/execution/agent-execution-records.js +15 -8
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -1
- package/packages/core/dist/execution/background-executor.js +4 -4
- package/packages/core/dist/execution/background-executor.js.map +1 -1
- package/packages/core/dist/execution/foreground-subagents.js +3 -3
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
- package/packages/core/dist/execution/host-invocation.js +5 -4
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +16 -7
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +59 -66
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +3 -0
- package/packages/core/dist/lifecycle/ship.js +55 -19
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +12 -2
- package/packages/core/dist/orchestration/runtime.js +62 -21
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +20 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +218 -18
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +17 -17
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/packages/core/dist/registries/agent-runtime-static.js +32 -2
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.d.ts +2 -17
- package/packages/core/dist/registries/capability-sources.js +222 -10
- package/packages/core/dist/registries/capability-sources.js.map +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +9 -9
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/eval-learning-context.js +4 -4
- package/packages/core/dist/registries/eval-learning-context.js.map +1 -1
- package/packages/core/dist/registries/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +3 -3
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-plugins.js +2 -2
- package/packages/core/dist/registries/tool-plugins.js.map +1 -1
- package/packages/core/dist/registries/worker-adapters.js +11 -11
- package/packages/core/dist/registries/worker-adapters.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.js +12 -12
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +4 -4
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +4 -7
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
- package/packages/core/dist/risk/workflow-gates.js +19 -17
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +28 -13
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +61 -1
- package/packages/core/dist/router/route-projection.d.ts +3 -1
- package/packages/core/dist/router/route-projection.js +192 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +73 -17
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +373 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/runtime-inspection.js +11 -4
- package/packages/core/dist/router/runtime-inspection.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +31 -3
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +235 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +2 -0
- package/packages/core/dist/router.js +2 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +168 -18
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/events.js +2 -2
- package/packages/core/dist/run-state/events.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +3 -3
- package/packages/core/dist/run-state/inspect-run.js +22 -54
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/invocation-ledger.js +2 -2
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +53 -9
- package/packages/core/dist/run-state/run-index.d.ts +0 -2
- package/packages/core/dist/run-state/run-index.js +1 -3
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +51 -34
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +65 -0
- package/packages/core/dist/run-state/task-evidence.js +169 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +2 -0
- package/packages/core/dist/run-state.js +2 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +0 -3
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +5 -44
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +20 -0
- package/packages/core/dist/runtime-paths.js +109 -14
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +200 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/context.js +1 -1
- package/packages/core/dist/sdd-docs/context.js.map +1 -1
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +276 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +15 -4
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/packages/core/dist/sdd-docs/task-parser.js +139 -38
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +322 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +241 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +888 -0
- package/packages/core/dist/stage-collaboration.js +3870 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +105 -1
- package/packages/core/dist/status/project-status.js +343 -8
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +348 -3
- package/packages/core/dist/storage/runtime-store.js +1017 -8
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/subagents/contracts.d.ts +1 -1
- package/packages/core/dist/subagents/runtime.js +7 -7
- package/packages/core/dist/subagents/runtime.js.map +1 -1
- package/packages/core/dist/test-support/fixtures.js +21 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +19 -20
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +138 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -1
- package/packages/core/dist/verification/goal-verify.js +44 -37
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +0 -2
- package/packages/core/dist/verification/rendering.js +19 -49
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +213 -111
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +28 -3
- package/packages/core/dist/verification/test-runtime.js +546 -125
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +76 -0
- package/packages/core/dist/verification/validation-wave.js +450 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +3 -1
- package/packages/core/dist/verification/verify-contract.js +105 -30
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +2 -0
- package/packages/core/dist/verification.js +2 -0
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +164 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +182 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +88 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/packages/core/dist/workflow-state/dependencies.js +25 -11
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +80 -3
- package/packages/core/dist/workflow-state/resolve.js +674 -41
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/dist/workflow-state.d.ts +1 -0
- package/packages/core/dist/workflow-state.js +1 -0
- package/packages/core/dist/workflow-state.js.map +1 -1
- package/packages/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -221
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -91
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -395
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -248
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -522
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -446
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/packages/cli/dist/commands/artifact.d.ts +0 -6
- package/packages/cli/dist/commands/artifact.js +0 -168
- package/packages/cli/dist/commands/artifact.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
- package/packages/cli/dist/renderers/artifacts.js +0 -43
- package/packages/cli/dist/renderers/artifacts.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
- package/packages/core/dist/sync-back/apply.d.ts +0 -17
- package/packages/core/dist/sync-back/apply.js +0 -221
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -91
- package/packages/core/dist/sync-back/inspect.js +0 -395
- package/packages/core/dist/sync-back/inspect.js.map +0 -1
- package/packages/core/dist/sync-back.d.ts +0 -2
- package/packages/core/dist/sync-back.js +0 -3
- package/packages/core/dist/sync-back.js.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { STAGE_TEAM_RUNTIME_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
export type StageTeamLifecycleProfile = 'direct' | 'compact' | 'full' | 'research' | 'recover';
|
|
3
|
+
export type StageTeamStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'do' | 'test' | 'review' | 'ship' | 'recover';
|
|
4
|
+
export type StageTeamSessionStatus = 'planned' | 'running' | 'completed' | 'blocked' | 'cancelled';
|
|
5
|
+
export type StageRoleAssignmentStatus = 'assigned' | 'running' | 'completed' | 'blocked' | 'skipped';
|
|
6
|
+
export type StageRoleResultStatus = 'accepted' | 'candidate' | 'rejected' | 'superseded';
|
|
7
|
+
export type StageRoleResultKind = 'evidence' | 'review' | 'gap' | 'proposal' | 'diagnostic' | 'gate_assessment';
|
|
8
|
+
export type StageRoleAuthorityCeiling = 'advisory_only' | 'evidence_input' | 'proposal_input' | 'gate_input';
|
|
9
|
+
export type LlmAdvisorAssessmentKind = 'evidence_sufficiency' | 'gap_classification' | 'semantic_drift' | 'writeback_classification' | 'risk_escalation' | 'recovery_suggestion';
|
|
10
|
+
export type LlmAdvisorConcern = 'none' | 'low' | 'medium' | 'high';
|
|
11
|
+
export type LlmAdvisorValidity = 'valid' | 'invalid';
|
|
12
|
+
export type LlmAdvisorConfidence = 'low' | 'medium' | 'high';
|
|
13
|
+
export interface StageRoleProfileActivation {
|
|
14
|
+
roleId: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
advisory: boolean;
|
|
17
|
+
reason: string;
|
|
18
|
+
}
|
|
19
|
+
export interface StageTeamActivationProfile {
|
|
20
|
+
contract: typeof STAGE_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
21
|
+
profile: StageTeamLifecycleProfile;
|
|
22
|
+
requiredTeam: boolean;
|
|
23
|
+
roles: StageRoleProfileActivation[];
|
|
24
|
+
reason: string;
|
|
25
|
+
}
|
|
26
|
+
export interface StageTeamSessionRecord {
|
|
27
|
+
contract: typeof STAGE_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
28
|
+
sessionId: string;
|
|
29
|
+
partition: string;
|
|
30
|
+
runId: string | null;
|
|
31
|
+
taskId: string | null;
|
|
32
|
+
stage: StageTeamStage;
|
|
33
|
+
lifecycleProfile: StageTeamLifecycleProfile;
|
|
34
|
+
status: StageTeamSessionStatus;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
assignments: StageRoleAssignment[];
|
|
38
|
+
payload: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface StageRoleAssignment {
|
|
41
|
+
assignmentId: string;
|
|
42
|
+
roleId: string;
|
|
43
|
+
agentId: string | null;
|
|
44
|
+
status: StageRoleAssignmentStatus;
|
|
45
|
+
required: boolean;
|
|
46
|
+
authorityCeiling: StageRoleAuthorityCeiling;
|
|
47
|
+
materialRefs: string[];
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
}
|
|
51
|
+
export interface StageRoleResultRecord {
|
|
52
|
+
contract: typeof STAGE_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
53
|
+
resultId: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
assignmentId: string;
|
|
56
|
+
partition: string;
|
|
57
|
+
runId: string | null;
|
|
58
|
+
taskId: string | null;
|
|
59
|
+
roleId: string;
|
|
60
|
+
agentId: string | null;
|
|
61
|
+
outputKind: StageRoleResultKind;
|
|
62
|
+
authorityCeiling: StageRoleAuthorityCeiling;
|
|
63
|
+
status: StageRoleResultStatus;
|
|
64
|
+
summary: string;
|
|
65
|
+
evidenceRefs: string[];
|
|
66
|
+
durableGapIds: string[];
|
|
67
|
+
proposalRefs: string[];
|
|
68
|
+
advisorAssessmentIds: string[];
|
|
69
|
+
createdAt: string;
|
|
70
|
+
payload: unknown;
|
|
71
|
+
}
|
|
72
|
+
export interface LlmAdvisorAssessmentRecord {
|
|
73
|
+
contract: typeof STAGE_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
74
|
+
assessmentId: string;
|
|
75
|
+
sessionId: string | null;
|
|
76
|
+
partition: string;
|
|
77
|
+
runId: string | null;
|
|
78
|
+
taskId: string | null;
|
|
79
|
+
kind: LlmAdvisorAssessmentKind;
|
|
80
|
+
concern: LlmAdvisorConcern;
|
|
81
|
+
validity: LlmAdvisorValidity;
|
|
82
|
+
confidence: LlmAdvisorConfidence;
|
|
83
|
+
advisoryOnly: true;
|
|
84
|
+
summary: string;
|
|
85
|
+
evidenceRefs: string[];
|
|
86
|
+
durableGapIds: string[];
|
|
87
|
+
proposalRefs: string[];
|
|
88
|
+
createdAt: string;
|
|
89
|
+
payload: unknown;
|
|
90
|
+
}
|
|
91
|
+
export interface FanInEvidenceSetRecord {
|
|
92
|
+
contract: typeof STAGE_TEAM_RUNTIME_CONTRACT_VERSION;
|
|
93
|
+
fanInId: string;
|
|
94
|
+
partition: string;
|
|
95
|
+
runId: string | null;
|
|
96
|
+
taskId: string | null;
|
|
97
|
+
stage: StageTeamStage;
|
|
98
|
+
roleResultIds: string[];
|
|
99
|
+
durableGapIds: string[];
|
|
100
|
+
proposalRefs: string[];
|
|
101
|
+
advisorAssessmentIds: string[];
|
|
102
|
+
evidenceRefs: string[];
|
|
103
|
+
canonicalEvidenceRefs: string[];
|
|
104
|
+
gateInputOnly: true;
|
|
105
|
+
createdAt: string;
|
|
106
|
+
payload: unknown;
|
|
107
|
+
}
|
|
108
|
+
export declare function assertValidStageRoleResult(value: StageRoleResultRecord | Record<string, unknown>): asserts value is StageRoleResultRecord;
|
|
109
|
+
export declare function assertAdvisoryAssessment(value: LlmAdvisorAssessmentRecord | Record<string, unknown>): asserts value is LlmAdvisorAssessmentRecord;
|
|
110
|
+
export declare function assertValidFanInEvidenceSet(value: FanInEvidenceSetRecord | Record<string, unknown>): asserts value is FanInEvidenceSetRecord;
|
|
111
|
+
export declare function buildFanInEvidenceSet(input: Omit<FanInEvidenceSetRecord, 'contract' | 'gateInputOnly'>): FanInEvidenceSetRecord;
|
|
112
|
+
export declare function describeStageTeamActivation(profile: StageTeamLifecycleProfile): StageTeamActivationProfile;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { STAGE_TEAM_RUNTIME_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
const FORBIDDEN_LIFECYCLE_FIELDS = new Set([
|
|
3
|
+
'stage_passed',
|
|
4
|
+
'stagePassed',
|
|
5
|
+
'task_completed',
|
|
6
|
+
'taskCompleted',
|
|
7
|
+
'truth_alignment_approved',
|
|
8
|
+
'truthAlignmentApproved',
|
|
9
|
+
'ship_ready',
|
|
10
|
+
'shipReady',
|
|
11
|
+
'final_pass',
|
|
12
|
+
'finalPass'
|
|
13
|
+
]);
|
|
14
|
+
export function assertValidStageRoleResult(value) {
|
|
15
|
+
const forbidden = firstForbiddenLifecycleField(value);
|
|
16
|
+
if (forbidden) {
|
|
17
|
+
throw new Error(`RoleResult cannot carry lifecycle transition field ${forbidden}.`);
|
|
18
|
+
}
|
|
19
|
+
const outputKind = value.outputKind;
|
|
20
|
+
if (!isStageRoleResultKind(outputKind)) {
|
|
21
|
+
throw new Error(`RoleResult outputKind must be one of evidence, review, gap, proposal, diagnostic, gate_assessment.`);
|
|
22
|
+
}
|
|
23
|
+
const authorityCeiling = value.authorityCeiling;
|
|
24
|
+
if (!isStageRoleAuthorityCeiling(authorityCeiling)) {
|
|
25
|
+
throw new Error(`RoleResult authorityCeiling is invalid.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function assertAdvisoryAssessment(value) {
|
|
29
|
+
const forbidden = firstForbiddenLifecycleField(value);
|
|
30
|
+
if (forbidden) {
|
|
31
|
+
throw new Error(`LLM advisor assessment cannot carry lifecycle transition field ${forbidden}.`);
|
|
32
|
+
}
|
|
33
|
+
if (value.advisoryOnly !== true) {
|
|
34
|
+
throw new Error('LLM advisor assessment must be advisoryOnly=true.');
|
|
35
|
+
}
|
|
36
|
+
const validity = value.validity;
|
|
37
|
+
if (validity !== 'valid' && validity !== 'invalid') {
|
|
38
|
+
throw new Error('LLM advisor assessment validity must be valid or invalid.');
|
|
39
|
+
}
|
|
40
|
+
const confidence = value.confidence;
|
|
41
|
+
if (confidence !== 'low' && confidence !== 'medium' && confidence !== 'high') {
|
|
42
|
+
throw new Error('LLM advisor assessment confidence must be low, medium, or high.');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export function assertValidFanInEvidenceSet(value) {
|
|
46
|
+
const forbidden = firstForbiddenLifecycleField(value);
|
|
47
|
+
if (forbidden) {
|
|
48
|
+
throw new Error(`FanInEvidenceSet cannot carry lifecycle transition field ${forbidden}.`);
|
|
49
|
+
}
|
|
50
|
+
if (value.gateInputOnly !== true) {
|
|
51
|
+
throw new Error('FanInEvidenceSet must be gateInputOnly=true.');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function buildFanInEvidenceSet(input) {
|
|
55
|
+
assertValidFanInEvidenceSet({ ...input, gateInputOnly: true });
|
|
56
|
+
return {
|
|
57
|
+
contract: STAGE_TEAM_RUNTIME_CONTRACT_VERSION,
|
|
58
|
+
...input,
|
|
59
|
+
roleResultIds: sortedUnique(input.roleResultIds),
|
|
60
|
+
durableGapIds: sortedUnique(input.durableGapIds),
|
|
61
|
+
proposalRefs: sortedUnique(input.proposalRefs),
|
|
62
|
+
advisorAssessmentIds: sortedUnique(input.advisorAssessmentIds),
|
|
63
|
+
evidenceRefs: sortedUnique(input.evidenceRefs),
|
|
64
|
+
canonicalEvidenceRefs: sortedUnique(input.canonicalEvidenceRefs),
|
|
65
|
+
gateInputOnly: true
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export function describeStageTeamActivation(profile) {
|
|
69
|
+
const roles = activationRoles(profile);
|
|
70
|
+
return {
|
|
71
|
+
contract: STAGE_TEAM_RUNTIME_CONTRACT_VERSION,
|
|
72
|
+
profile,
|
|
73
|
+
requiredTeam: profile !== 'direct',
|
|
74
|
+
roles,
|
|
75
|
+
reason: activationReason(profile)
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function activationRoles(profile) {
|
|
79
|
+
switch (profile) {
|
|
80
|
+
case 'direct':
|
|
81
|
+
return [];
|
|
82
|
+
case 'compact':
|
|
83
|
+
return [activationRole('role.implementation-reviewer', true, false, 'Compact profile adds one independent reviewer for bounded risk.')];
|
|
84
|
+
case 'full':
|
|
85
|
+
return [
|
|
86
|
+
activationRole('role.norm-scout', true, true, 'Full profile checks project norms before stage output.'),
|
|
87
|
+
activationRole('role.implementation-reviewer', true, false, 'Full profile requires implementation or contract review.'),
|
|
88
|
+
activationRole('role.evidence-runner', true, false, 'Full profile requires evidence collection as gate input.')
|
|
89
|
+
];
|
|
90
|
+
case 'research':
|
|
91
|
+
return [
|
|
92
|
+
activationRole('role.norm-scout', true, true, 'Research profile gathers external and project norm context.'),
|
|
93
|
+
activationRole('role.uncertainty-reviewer', true, true, 'Research profile records unresolved ambiguity as advisory input.'),
|
|
94
|
+
activationRole('role.performance-planner', false, true, 'Research profile can add performance/token planning when relevant.')
|
|
95
|
+
];
|
|
96
|
+
case 'recover':
|
|
97
|
+
return [
|
|
98
|
+
activationRole('role.context-curator', true, true, 'Recover profile reconstructs trusted context.'),
|
|
99
|
+
activationRole('role.sync-risk-reviewer', true, false, 'Recover profile reviews shared-state/writeback risk.'),
|
|
100
|
+
activationRole('role.verification-designer', true, false, 'Recover profile rebuilds validation needs before retry.')
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function activationRole(roleId, required, advisory, reason) {
|
|
105
|
+
return { roleId, required, advisory, reason };
|
|
106
|
+
}
|
|
107
|
+
function activationReason(profile) {
|
|
108
|
+
switch (profile) {
|
|
109
|
+
case 'direct':
|
|
110
|
+
return 'Direct profile does not require team activation; deterministic checks and explicit artifacts remain sufficient.';
|
|
111
|
+
case 'compact':
|
|
112
|
+
return 'Compact profile activates a minimal independent role for moderate risk without slowing simple flows.';
|
|
113
|
+
case 'full':
|
|
114
|
+
return 'Full profile activates norm, review, and evidence roles for high-risk implementation paths.';
|
|
115
|
+
case 'research':
|
|
116
|
+
return 'Research profile activates context and uncertainty roles for decisions that need broader evidence.';
|
|
117
|
+
case 'recover':
|
|
118
|
+
return 'Recover profile activates context, sync-risk, and verification roles because prior workflow evidence is blocked or stale.';
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function isStageRoleResultKind(value) {
|
|
122
|
+
return value === 'evidence' || value === 'review' || value === 'gap' || value === 'proposal' || value === 'diagnostic' || value === 'gate_assessment';
|
|
123
|
+
}
|
|
124
|
+
function isStageRoleAuthorityCeiling(value) {
|
|
125
|
+
return value === 'advisory_only' || value === 'evidence_input' || value === 'proposal_input' || value === 'gate_input';
|
|
126
|
+
}
|
|
127
|
+
function firstForbiddenLifecycleField(value) {
|
|
128
|
+
if (!value || typeof value !== 'object') {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
for (const [key, child] of Object.entries(value)) {
|
|
132
|
+
if (FORBIDDEN_LIFECYCLE_FIELDS.has(key)) {
|
|
133
|
+
return key;
|
|
134
|
+
}
|
|
135
|
+
const nested = firstForbiddenLifecycleField(child);
|
|
136
|
+
if (nested) {
|
|
137
|
+
return nested;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
function sortedUnique(values) {
|
|
143
|
+
return [...new Set(values.filter(Boolean))].sort();
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=stage-team-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-team-runtime.js","sourceRoot":"","sources":["../../src/execution/stage-team-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAoHtE,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,0BAA0B;IAC1B,wBAAwB;IACxB,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0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
1
|
import { GOVERNANCE_POLICY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
-
export type GovernancePolicyOperation = 'background_executor' | 'wave_executor' | '
|
|
2
|
+
export type GovernancePolicyOperation = 'background_executor' | 'wave_executor' | 'destructive_git' | 'external_interaction' | 'cleanup';
|
|
3
3
|
export type GovernancePolicyDecisionStatus = 'allow' | 'block' | 'confirm';
|
|
4
4
|
export interface GovernancePolicy {
|
|
5
5
|
version: typeof GOVERNANCE_POLICY_CONTRACT_VERSION;
|
|
@@ -11,7 +11,7 @@ const BUILT_IN_GOVERNANCE_POLICY = {
|
|
|
11
11
|
maxWaveExecutors: 1
|
|
12
12
|
},
|
|
13
13
|
manualConfirmation: {
|
|
14
|
-
operations: ['
|
|
14
|
+
operations: ['destructive_git', 'external_interaction', 'cleanup'],
|
|
15
15
|
workerAdapters: ['manual-handoff-worker'],
|
|
16
16
|
riskTags: ['database', 'security', 'permission', 'external', 'destructive-git', 'data-loss']
|
|
17
17
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/governance/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EACnC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAyD7D,MAAM,0BAA0B,GAAqB;IACnD,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE;QACX,wBAAwB,EAAE,CAAC;QAC3B,gBAAgB,EAAE,CAAC;KACpB;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,CAAC,iBAAiB,EAAE,
|
|
1
|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AAC;YACpG,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,OAAO;QACX,CAAC,CAAC,OAAO,CAAC;IACZ,OAAO;QACL,OAAO,EAAE,kCAAkC;QAC3C,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM;QACN,OAAO,EAAE,MAAM,KAAK,OAAO;QAC3B,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC,SAAS,mCAAmC,CAAC;QACzG,MAAM;QACN,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,KAAa,EAAE,OAAe,EAAE,cAAsB;IAC7E,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC5C,CAAC;AAED,KAAK,UAAU,2BAA2B,CAAC,WAAmB;IAC5D,MAAM,UAAU,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC/C,kBAAkB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const SDD_INSTRUCTIONS_CONTRACT = "sdd-instructions-v1";
|
|
2
|
-
export type InstructionAction = 'overview' | 'init' | 'doctor' | 'update' | 'spec' | 'plan' | 'tasks' | 'verifies' | 'test' | 'do' | 'verify' | '
|
|
2
|
+
export type InstructionAction = 'overview' | 'init' | 'doctor' | 'update' | 'spec' | 'plan' | 'tasks' | 'verifies' | 'test' | 'do' | 'verify' | 'ship' | 'run-task' | 'verify-task';
|
|
3
3
|
export interface SddInstructionPayload {
|
|
4
4
|
contract: typeof SDD_INSTRUCTIONS_CONTRACT;
|
|
5
5
|
version: string;
|
|
@@ -2,27 +2,27 @@ import { SDD_VERSION } from './ai-tools.js';
|
|
|
2
2
|
export const SDD_INSTRUCTIONS_CONTRACT = 'sdd-instructions-v1';
|
|
3
3
|
const INSTRUCTION_PAYLOADS = {
|
|
4
4
|
overview: {
|
|
5
|
-
summary: 'Route natural-language SDD intent from branch/source status to task execution, agent evidence,
|
|
6
|
-
requiredCommands: ['sdd status', 'sdd lifecycle decide --from-text <text>', 'sdd doctor', 'sdd tasks inspect <task_id>', 'sdd do task <task_id>', 'sdd test
|
|
5
|
+
summary: 'Route natural-language SDD intent from branch/source status to task execution, agent evidence, strict verification-contract consumption, goal verification, truthAlignment, and release readiness while keeping CLI/core output as source of truth.',
|
|
6
|
+
requiredCommands: ['sdd status', 'sdd lifecycle decide --from-text <text>', 'sdd doctor', 'sdd tasks inspect <task_id>', 'sdd do task <task_id-or-task-text>', 'sdd test <validation_unit_id-or-validation_text> --branch <branch>', 'sdd test close --branch <branch> --target goal-verify --json', 'sdd ship close --branch <branch> --json', 'sdd instructions ship --json'],
|
|
7
7
|
allowedSideEffects: ['read .sdd state', 'read specs documents', 'read generated AI entries'],
|
|
8
|
-
forbiddenSideEffects: ['background write', 'worktree creation', 'auto commit', 'force push', '
|
|
8
|
+
forbiddenSideEffects: ['background write', 'worktree creation', 'auto commit', 'force push', 'publish or push release artifacts without explicit human confirmation'],
|
|
9
9
|
nextSteps: [
|
|
10
10
|
'Treat /sdd as a natural-language intent router, then run sdd status first to see branch/source context and the recommended next command; report only workflow state, blocker/current task, and next action unless the user asks for full detail.',
|
|
11
11
|
'Dynamic routing comes from CLI/core output; follow the recommended next command and do not infer dynamic state from generated markdown.',
|
|
12
|
-
'
|
|
13
|
-
'If
|
|
14
|
-
'If status
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
12
|
+
'Use /sdd:tasks as the user-visible bundle for tasks -> verifies, and /sdd:test as the user-visible bundle for test -> goal-verify; do not invent separate slash entries for internal substages.',
|
|
13
|
+
'If intent remains ambiguous after status, ask one clarifying question before spec/plan/tasks/do/test/ship work.',
|
|
14
|
+
'If status reports generated entry drift, missing config, compatibility drift, or projection drift, run sdd doctor and follow its current-run repair or rebuild recommendation before normal do/test/ship.',
|
|
15
|
+
'If status recommends a pending task, run sdd tasks inspect <task_id> and execute only the approved task boundary; scout/implementer/reviewer/validator participation should be recorded as stage evidence rather than hidden in the main chat.',
|
|
16
|
+
'For test, bind user intent to an accepted verify.md validation unit with sdd test <validation_unit_id-or-validation_text>; use task/batch/wave subcommands only for explicit low-level diagnostics or narrowed overrides.',
|
|
17
|
+
'After test closure is accepted, continue through /sdd:test with sdd test close --target goal-verify so runtime can record truthAlignment before ship readiness.'
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
init: {
|
|
21
|
-
summary: 'Initialize .sdd project configuration and managed AI tool entries for the current repository; workflow partition documents are entered through
|
|
22
|
-
requiredCommands: ['sdd init --ai claude-code', 'sdd status', '
|
|
23
|
-
allowedSideEffects: ['write .sdd/project.yml', '
|
|
24
|
-
forbiddenSideEffects: ['create workflow partition documents unless explicitly using
|
|
25
|
-
nextSteps: ['Run sdd init --ai claude-code.', 'Run sdd status to inspect current Git branch partition state and the recommended next command.', 'Use
|
|
21
|
+
summary: 'Initialize .sdd project configuration and managed AI tool entries for the current repository; workflow partition documents are entered through the spec stage, not init.',
|
|
22
|
+
requiredCommands: ['sdd init --ai claude-code', 'sdd status', 'sdd instructions spec --json', 'sdd doctor'],
|
|
23
|
+
allowedSideEffects: ['write .sdd/project.yml', 'initialize runtime.sqlite state', 'write managed generated AI entries'],
|
|
24
|
+
forbiddenSideEffects: ['create workflow partition documents unless explicitly using the spec stage or legacy --scaffold-docs', 'overwrite foreign AI entry files', 'background write', 'auto commit'],
|
|
25
|
+
nextSteps: ['Run sdd init --ai claude-code.', 'Run sdd status to inspect current Git branch partition state and the recommended next command.', 'Use the spec stage to create or refine specs/<partition>/spec.md; omitted --branch uses the current Git branch, explicit --branch uses the requested partition.', 'Run sdd doctor after initialization.']
|
|
26
26
|
},
|
|
27
27
|
doctor: {
|
|
28
28
|
summary: 'Check project config, scoped runtime evidence, generated AI entry drift, and deterministic recover/reconcile guidance.',
|
|
@@ -46,74 +46,67 @@ const INSTRUCTION_PAYLOADS = {
|
|
|
46
46
|
nextSteps: ['Resolve the workflow partition: omit --branch to use the current Git branch, or pass --branch <name> only when intentionally writing another partition.', 'Clarify user intent, objective/customer value, actors, scenarios, scope, and non-goals.', 'Run sdd lifecycle decide --from-text <text> when changes mention state-machine, concurrency, database, SQL, security, API/schema, CI/build, or external unknown risk.', 'Write acceptance criteria with stable IDs such as AC-1 and verification hints.', 'Record assumptions/dependencies, risks/hard gates, open questions, and lifecycle reference.', 'If this is a requirement change after plan/tasks/run work exists, update spec.md and let status expose stale downstream hashes before continuing.', 'Stop before technical design or implementation when requirement gaps remain.']
|
|
47
47
|
},
|
|
48
48
|
plan: {
|
|
49
|
-
summary: 'Refine specs/<partition>/plan.md as
|
|
50
|
-
requiredCommands: ['sdd status', 'read specs/<partition>/spec.md', '
|
|
51
|
-
allowedSideEffects: ['read project context', 'read spec document', 'write
|
|
52
|
-
forbiddenSideEffects: ['implement code', 'silently advance to tasks', 'bypass unresolved spec gaps'],
|
|
53
|
-
nextSteps: ['Read the approved spec and acceptance criteria plus the current spec hash from sdd status.', '
|
|
49
|
+
summary: 'Refine specs/<partition>/plan.md and .sdd/runs/<branch>/plan/*.md as agent-authored plan-stage evidence, then let runtime close validate refs/hashes/contracts into SQLite.',
|
|
50
|
+
requiredCommands: ['sdd status', 'read specs/<partition>/spec.md', 'write specs/<partition>/plan.md', 'write .sdd/runs/<branch>/plan/plan-review-vN.md', 'write .sdd/runs/<branch>/plan/plan-manager-vN.md', 'write .sdd/runs/<branch>/plan/plan-collaboration-contract-vN.md', 'sdd plan close --branch <branch> --json'],
|
|
51
|
+
allowedSideEffects: ['read project context', 'read spec document', 'write agent-authored plan-stage Markdown under specs/<branch>/ and .sdd/runs/<branch>/plan/'],
|
|
52
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'implement code', 'silently advance to tasks', 'bypass unresolved spec gaps'],
|
|
53
|
+
nextSteps: ['Read the approved spec and acceptance criteria plus the current normalized spec contract hash from sdd status.', 'Do not write based_on_* hash metadata into plan.md; accepted dependency edges belong to runtime close/accept projections.', 'Have planner/reviewer/plan-manager author plan-stage Markdown evidence under .sdd/runs/<branch>/plan/ including a StageCollaborationContract.', 'Run sdd plan close --branch <branch> --json; runtime must validate refs/frontmatter/contracts, compute hashes, and write only .sdd/runtime.sqlite.', 'Stop with explicit plan gaps and tasks readiness; do not let runtime create or repair Markdown.']
|
|
54
54
|
},
|
|
55
55
|
tasks: {
|
|
56
|
-
summary: '
|
|
57
|
-
requiredCommands: ['sdd status', 'read specs/<partition>/spec.md', 'read specs/<partition>/plan.md', 'sdd tasks format', 'write specs/<partition>/tasks.md', 'sdd tasks
|
|
58
|
-
allowedSideEffects: ['read spec and plan documents', 'write
|
|
59
|
-
forbiddenSideEffects: ['implement code', 'execute dependency waves', 'silently advance to do', 'turn tasks.md into project-management backlog'],
|
|
60
|
-
nextSteps: ['Read approved spec acceptance IDs, approved plan design sections, and the current plan hash from sdd status.', '
|
|
56
|
+
summary: 'Use /sdd:tasks as the user-visible bundle for tasks -> verifies: refine specs/<partition>/tasks.md and .sdd/runs/<branch>/tasks/*.md first, then continue through the same bundle when runtime handoff targets verifies.',
|
|
57
|
+
requiredCommands: ['sdd status', 'read specs/<partition>/spec.md', 'read specs/<partition>/plan.md', 'sdd tasks format', 'write specs/<partition>/tasks.md', 'write .sdd/runs/<branch>/tasks/tasks-review-vN.md', 'write .sdd/runs/<branch>/tasks/tasks-manager-vN.md', 'write .sdd/runs/<branch>/tasks/tasks-collaboration-contract-vN.md', 'sdd tasks close --branch <branch> --json', 'write specs/<partition>/verify.md', 'write .sdd/runs/<branch>/verifies/verifies-review-vN.md', 'write .sdd/runs/<branch>/verifies/verifies-manager-vN.md', 'write .sdd/runs/<branch>/verifies/verifies-collaboration-contract-vN.md', 'sdd tasks close --branch <branch> --target verifies --json'],
|
|
58
|
+
allowedSideEffects: ['read spec and plan documents', 'write agent-authored tasks-stage Markdown under specs/<branch>/ and .sdd/runs/<branch>/tasks/', 'write agent-authored verifies-stage Markdown under specs/<branch>/ and .sdd/runs/<branch>/verifies/ after a runtime handoff to verifies'],
|
|
59
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'write verify.md before tasks close produces a fresh verifies handoff', 'implement code', 'execute dependency waves', 'run validation commands', 'silently advance to do', 'turn tasks.md into project-management backlog'],
|
|
60
|
+
nextSteps: ['Read approved spec acceptance IDs, approved plan design sections, and the current normalized plan contract hash from sdd status.', 'Do not write based_on_* hash metadata into tasks.md; accepted dependency edges belong to runtime close/accept projections.', 'Run sdd tasks format to get the canonical block format.', 'Map every task to acceptance_refs and plan_refs where applicable.', 'Declare change_surface, implementation_wave, validation_batch, validation_timing, requires_verify_before_next, evidence expectations, and review gates before freezing tasks.', 'Have task-planner/reviewer/tasks-manager author .sdd/runs/<branch>/tasks/*.md evidence including a StageCollaborationContract.', 'Run sdd tasks close --branch <branch> --json; runtime must validate refs/frontmatter/contracts, compute hashes, and write only .sdd/runtime.sqlite.', 'If runtime/status targets verifies inside the tasks bundle, have verification-designer/reviewer/verifies-manager author specs/<branch>/verify.md plus .sdd/runs/<branch>/verifies/*.md evidence.', 'Continue with sdd tasks close --branch <branch> --target verifies --json; runtime must validate verifies refs/contracts and return the next legal route.']
|
|
61
61
|
},
|
|
62
62
|
verifies: {
|
|
63
|
-
summary: '
|
|
64
|
-
requiredCommands: ['sdd status', '
|
|
65
|
-
allowedSideEffects: ['read spec, plan, and tasks documents', 'write specs/<
|
|
66
|
-
forbiddenSideEffects: ['
|
|
67
|
-
nextSteps: ['Run sdd status and confirm tasks.md is current.', '
|
|
63
|
+
summary: 'Diagnostic/internal action for verifies-stage closure; normal users enter it through /sdd:tasks with target=verifies.',
|
|
64
|
+
requiredCommands: ['sdd status', 'read specs/<partition>/tasks.md', 'write specs/<partition>/verify.md', 'write .sdd/runs/<branch>/verifies/verifies-review-vN.md', 'write .sdd/runs/<branch>/verifies/verifies-manager-vN.md', 'write .sdd/runs/<branch>/verifies/verifies-collaboration-contract-vN.md', 'sdd tasks close --branch <branch> --target verifies --json'],
|
|
65
|
+
allowedSideEffects: ['read spec, plan, and tasks documents', 'write agent-authored verifies-stage Markdown under specs/<branch>/ and .sdd/runs/<branch>/verifies/'],
|
|
66
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'run validation commands', 'modify source files', 'auto commit'],
|
|
67
|
+
nextSteps: ['Run sdd status and confirm tasks.md is current.', 'Have verification-designer/reviewer/verifies-manager author verify.md plus .sdd/runs/<branch>/verifies/*.md evidence including a StageCollaborationContract.', 'Continue through sdd tasks close --branch <branch> --target verifies --json; runtime must validate refs/frontmatter/hashes/contracts and write only .sdd/runtime.sqlite.', 'Keep direct verifies-stage entry as diagnostic/recovery only, not the normal Phase 9 happy path.', 'Use accepted verify.md to guide later test evidence expectations; do not treat it as runtime-authored evidence.']
|
|
68
68
|
},
|
|
69
69
|
test: {
|
|
70
|
-
summary: '
|
|
71
|
-
requiredCommands: ['sdd status', 'sdd
|
|
72
|
-
allowedSideEffects: ['run declared validation commands', 'write
|
|
73
|
-
forbiddenSideEffects: ['modify source files outside
|
|
74
|
-
nextSteps: ['Run sdd status and resolve
|
|
70
|
+
summary: 'Use /sdd:test as the user-visible bundle for test -> goal-verify: bind validation intent to an accepted verify.md validation unit, close test-stage evidence, then continue through the same bundle so runtime records truthAlignment before ship.',
|
|
71
|
+
requiredCommands: ['sdd status', 'sdd instructions test --json', 'sdd test <validation_unit_id-or-validation_text> --branch <branch>', 'write .sdd/runs/<branch>/test/test-execution-vN.md', 'write .sdd/runs/<branch>/test/test-review-vN.md', 'write .sdd/runs/<branch>/test/test-manager-vN.md', 'write .sdd/runs/<branch>/test/test-collaboration-contract-vN.md', 'sdd test close --branch <branch> --json', 'write .sdd/runs/<branch>/goal-verify/goal-verification-vN.md', 'sdd test close --branch <branch> --target goal-verify --json'],
|
|
72
|
+
allowedSideEffects: ['run declared validation-unit commands', 'write agent-authored .sdd/runs/<branch>/test/*.md evidence', 'write agent-authored .sdd/runs/<branch>/goal-verify/*.md evidence after a runtime handoff to goal-verify', 'update runtime.sqlite validation and closure projections'],
|
|
73
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'modify source files outside validation command effects', 'author or refresh verify.md', 'auto commit', 'publish or push', 'treat command success alone as semantic PASS'],
|
|
74
|
+
nextSteps: ['Run sdd status and resolve the verify.md validation-unit boundary plus branch.', 'Confirm accepted verify.md exists for the selected branch; if missing or stale, return through the /sdd:tasks bundle with target=verifies.', 'Run the declared validation unit through sdd test <validation_unit_id-or-validation_text>; PASS command output stays in runtime read models by default, while failure/blocker diagnostics may retain scoped payload refs.', 'Use sdd test task|batch|wave only for explicit low-level diagnostics, replay, or narrowed override flags.', 'Have test-runner/reviewer/test-manager author .sdd/runs/<branch>/test/*.md evidence including a StageCollaborationContract.', 'Run sdd test close --branch <branch> --json; runtime validates evidence refs/contracts and writes only .sdd/runtime.sqlite.', 'If runtime/status targets goal-verify inside the test bundle, have goal-verifier/reviewer author .sdd/runs/<branch>/goal-verify/*.md evidence.', 'Continue with sdd test close --branch <branch> --target goal-verify --json; runtime records truthAlignment before ship readiness.']
|
|
75
75
|
},
|
|
76
76
|
do: {
|
|
77
|
-
summary: '
|
|
78
|
-
requiredCommands: ['sdd status', 'sdd instructions do --json', 'sdd tasks inspect <
|
|
79
|
-
allowedSideEffects: ['write
|
|
80
|
-
forbiddenSideEffects: ['background write', 'worktree creation', 'auto commit', 'expand beyond selected task boundary without checkpoint', 'mark missing evidence as PASS'],
|
|
81
|
-
nextSteps: ['Run sdd status
|
|
77
|
+
summary: '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.',
|
|
78
|
+
requiredCommands: ['sdd status', 'sdd instructions do --json', 'sdd tasks inspect <bound_task_id>', 'write/update source files within the bound task boundary', 'write .sdd/runs/<branch>/do/implementation-vN.md', 'write .sdd/runs/<branch>/do/code-review-vN.md', 'write .sdd/runs/<branch>/do/do-manager-vN.md', 'sdd do task <task_id-or-task-text> --branch <branch>'],
|
|
79
|
+
allowedSideEffects: ['modify files within selected task boundary', 'write agent-authored .sdd/runs/<branch>/do/*.md evidence files', 'update runtime.sqlite projections and run state'],
|
|
80
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'background write', 'worktree creation', 'auto commit', 'expand beyond selected task boundary without checkpoint', 'mark missing evidence as PASS'],
|
|
81
|
+
nextSteps: ['Run sdd status, then let CLI/core bind the user request or recommended next command to exactly one accepted task boundary; task id and accepted task title/text are equivalent when they bind to the same task.', 'If binding is ambiguous, missing, stale, or boundary-expanding, stop and follow the CLI nextAction instead of implementing.', 'Run sdd instructions do --json and sdd tasks inspect <bound_task_id>.', 'Restate only the bound task Boundary, blocking gaps, and validation commands before implementation.', 'Implement only within affected_files and capture changed file refs/hashes in .sdd/runs/<branch>/do/implementation-vN.md frontmatter.', 'Have code-reviewer write .sdd/runs/<branch>/do/code-review-vN.md against the implementation evidence hash, whether approved or blocked.', 'Have do-manager write .sdd/runs/<branch>/do/do-manager-vN.md as a closure request that references the reviewed implementation and review hash.', '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.', 'Report run id, final status, binding target, blocking gaps, accepted evidence refs, and next gate; for verification proceed to sdd test <validation_unit_id-or-validation_text> --branch <branch>.']
|
|
82
82
|
},
|
|
83
83
|
verify: {
|
|
84
|
-
summary: 'Run
|
|
85
|
-
requiredCommands: ['sdd status', 'sdd instructions verify --json', 'sdd
|
|
86
|
-
allowedSideEffects: ['write acceptance coverage
|
|
87
|
-
forbiddenSideEffects: ['auto commit', 'force push', 'auto-fix failures', '
|
|
88
|
-
nextSteps: ['Run
|
|
89
|
-
},
|
|
90
|
-
'sync-back': {
|
|
91
|
-
summary: 'Inspect and optionally apply the verified task completion proposal back into specs/<partition>/tasks.md with an explicit target change summary.',
|
|
92
|
-
requiredCommands: ['sdd status', 'sdd instructions sync-back --json', 'sdd sync-back inspect [<run_id>] --branch <branch> --task <task_id>', 'sdd sync-back apply [<run_id>] --branch <branch> --task <task_id> [--approved]'],
|
|
93
|
-
allowedSideEffects: ['read runtime.sqlite run state', 'read sync-back proposal artifact', 'read specs/<partition>/tasks.md', 'write specs/<partition>/tasks.md only during apply', 'update run sync_back state only during apply'],
|
|
94
|
-
forbiddenSideEffects: ['auto commit', 'force push', 'apply without inspect', 'apply confirm-required proposals without human approval', 'change source files outside tasks.md'],
|
|
95
|
-
nextSteps: ['Run sdd status and resolve exactly one task id plus workflow partition from the recommended command or user request.', 'Run sdd sync-back inspect --branch <branch> --task <task_id> first; pass an explicit run id only for replay, CI, or old-run inspection.', 'Report the inspect target update before asking for approval: target tasks file, task id, markdown status transition, proposal path, evidence artifacts, apply_policy, and policy reasons.', 'If apply_policy=direct and status=ready, run sdd sync-back apply --branch <branch> --task <task_id>; if approval_required=true, ask for explicit confirmation and then add --approved.', 'Explain that apply writes the task block status to completed, appends the sync-back implementation note from the proposal/evidence, marks the run sync_back state applied, and rebuilds the local run index.', 'After apply, report the updated task id, tasks.md path, applied flag, and sync_back state.']
|
|
84
|
+
summary: 'Run low-level task acceptance coverage from runtime-selected reviewer/validator evidence; `sdd test <validation_unit_id-or-validation_text>` is the primary runtime gate.',
|
|
85
|
+
requiredCommands: ['sdd status', 'sdd instructions verify --json', 'sdd verify task <task_id> [--branch <branch>] [--run <run_id>]'],
|
|
86
|
+
allowedSideEffects: ['write acceptance coverage runtime evidence', 'update runtime.sqlite diagnostic verification state'],
|
|
87
|
+
forbiddenSideEffects: ['auto commit', 'force push', 'auto-fix failures', 'mark completed with blocking validation gaps'],
|
|
88
|
+
nextSteps: ['Run goal-level verify without --run for the latest eligible partition/task run, unless inspecting an explicit run.', 'Use sdd test <validation_unit_id-or-validation_text> for primary lifecycle judgment.']
|
|
96
89
|
},
|
|
97
90
|
ship: {
|
|
98
|
-
summary: '
|
|
99
|
-
requiredCommands: ['sdd ship --
|
|
100
|
-
allowedSideEffects: ['read project status', 'read SDD documents and run evidence', 'write
|
|
101
|
-
forbiddenSideEffects: ['npm publish', 'git push', 'git tag', 'create GitHub release', 'force push', 'auto commit', 'skip failed gates', 'treat historical doctor debt as a release blocker unless it affects current run evidence'],
|
|
102
|
-
nextSteps: ['Run sdd
|
|
91
|
+
summary: 'Close ship readiness through agent-authored .sdd/runs/<branch>/ship/*.md evidence; optional release.md is ship-agent authored, not runtime-authored.',
|
|
92
|
+
requiredCommands: ['sdd status', 'sdd instructions ship --json', 'write .sdd/runs/<branch>/ship/ship-readiness-vN.md', 'write .sdd/runs/<branch>/ship/release-review-vN.md', 'write .sdd/runs/<branch>/ship/ship-manager-vN.md', 'write .sdd/runs/<branch>/ship/ship-collaboration-contract-vN.md', 'sdd ship close --branch <branch> --json', 'npm run build', 'npm pack --dry-run --json', 'git status'],
|
|
93
|
+
allowedSideEffects: ['read project status', 'read SDD documents and run evidence', 'write agent-authored .sdd/runs/<branch>/ship/*.md evidence', 'write optional agent-authored specs/<branch>/release.md', 'run local validation commands', 'record runtime ship projections in .sdd/runtime.sqlite'],
|
|
94
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'npm publish', 'git push', 'git tag', 'create GitHub release', 'force push', 'auto commit', 'skip failed gates', 'treat historical doctor debt as a release blocker unless it affects current run evidence'],
|
|
95
|
+
nextSteps: ['Run sdd status and confirm goal-verify has recorded aligned truthAlignment or validated reconciliation truth.', 'Have ship-manager/release agent author .sdd/runs/<branch>/ship/*.md evidence including a StageCollaborationContract; write specs/<branch>/release.md only as an explicit ship-agent artifact if needed.', 'Run sdd ship close --branch <branch> --json; runtime validates readiness refs/contracts/truthAlignment and writes only .sdd/runtime.sqlite.', 'Run package/build dry-run gates when preparing a real release.', 'Report PASS/BLOCKED by runtime ship readiness and local package checks.', 'Stop before npm publish, git push, git tag, or external release creation unless the user explicitly approves that separate action.']
|
|
103
96
|
},
|
|
104
97
|
'run-task': {
|
|
105
|
-
summary: '
|
|
106
|
-
requiredCommands: ['sdd tasks inspect <task_id>', 'sdd do task <task_id>'],
|
|
107
|
-
allowedSideEffects: ['write
|
|
108
|
-
forbiddenSideEffects: ['background write', 'worktree creation', 'auto commit'],
|
|
109
|
-
nextSteps: ['Inspect the task.', 'Run
|
|
98
|
+
summary: 'Compatibility entry for running one task through do-stage runtime closure.',
|
|
99
|
+
requiredCommands: ['sdd tasks inspect <task_id>', 'sdd do task <task_id> --branch <branch>'],
|
|
100
|
+
allowedSideEffects: ['write agent-authored .sdd/runs/<branch>/do/*.md evidence', 'update runtime.sqlite run state'],
|
|
101
|
+
forbiddenSideEffects: ['runtime-authored Markdown artifacts', 'background write', 'worktree creation', 'auto commit'],
|
|
102
|
+
nextSteps: ['Inspect the task.', 'Run do-stage closure through sdd do task with .sdd/runs/<branch>/do/*.md evidence.']
|
|
110
103
|
},
|
|
111
104
|
'verify-task': {
|
|
112
|
-
summary: 'Verify task acceptance coverage using
|
|
105
|
+
summary: 'Verify task acceptance coverage using runtime-selected evidence and partition-aware run resolution.',
|
|
113
106
|
requiredCommands: ['sdd verify task <task_id> [--branch <branch>] [--run <run_id>]'],
|
|
114
|
-
allowedSideEffects: ['write acceptance coverage
|
|
115
|
-
forbiddenSideEffects: ['auto commit', 'force push'
|
|
116
|
-
nextSteps: ['Run goal-level verify without --run for the latest eligible partition/task run, unless inspecting an explicit run.', '
|
|
107
|
+
allowedSideEffects: ['write acceptance coverage runtime evidence', 'update .sdd run state'],
|
|
108
|
+
forbiddenSideEffects: ['auto commit', 'force push'],
|
|
109
|
+
nextSteps: ['Run goal-level verify without --run for the latest eligible partition/task run, unless inspecting an explicit run.', 'Use sdd test task for primary lifecycle judgment.']
|
|
117
110
|
}
|
|
118
111
|
};
|
|
119
112
|
export function getSddInstructions(action) {
|
|
@@ -142,6 +135,6 @@ export function renderSddInstructions(payload) {
|
|
|
142
135
|
].join('\n');
|
|
143
136
|
}
|
|
144
137
|
function isInstructionAction(action) {
|
|
145
|
-
return action === 'overview' || action === 'init' || action === 'doctor' || action === 'update' || action === 'spec' || action === 'plan' || action === 'tasks' || action === 'verifies' || action === 'test' || action === 'do' || action === 'verify' || action === '
|
|
138
|
+
return action === 'overview' || action === 'init' || action === 'doctor' || action === 'update' || action === 'spec' || action === 'plan' || action === 'tasks' || action === 'verifies' || action === 'test' || action === 'do' || action === 'verify' || action === 'ship' || action === 'run-task' || action === 'verify-task';
|
|
146
139
|
}
|
|
147
140
|
//# sourceMappingURL=instructions.js.map
|