sdd-agent-platform 0.4.1 → 0.5.0
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 +24 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +84 -103
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +10 -6
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +7 -8
- 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 +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +374 -421
- 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 +7 -19
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +7 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +2 -12
- 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/doctor.js +1 -18
- 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 +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +83 -83
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +37 -80
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +58 -68
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js +461 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +21 -28
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +124 -40
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.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 +6 -13
- 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/plan-scout-domains.d.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +18 -18
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.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 +7 -7
- 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 +12 -27
- 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.js +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +2 -4
- 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 +383 -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/stage-route-binding.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +227 -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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +1 -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 +6 -0
- 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/model.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +7 -7
- 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 +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +2 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +1 -4
- 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 +0 -39
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +211 -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/artifact-depth.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +5 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +60 -22
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js.map +1 -0
- 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 +315 -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 +238 -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 +736 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +4018 -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.js +25 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +170 -18
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +597 -85
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +1 -242
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +1 -110
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +1 -496
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.d.ts +167 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js +377 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +329 -314
- 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 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +31 -0
- 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 +135 -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 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +1 -545
- 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 +5 -7
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +15 -55
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +1 -40
- 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/task-evidence-judgment.d.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js +521 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +247 -112
- 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/verify-contract.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +49 -72
- 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 +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +2 -7
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +0 -7
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +2 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +3 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +30 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +55 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +518 -36
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/package.json +6 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +238 -137
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +84 -103
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -189
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -222
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +302 -302
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +181 -181
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -231
- package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -99
- package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +314 -306
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +128 -120
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +265 -259
- package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -147
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +400 -445
- package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -30
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +305 -317
- package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -188
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -144
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -48
- package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -41
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -47
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -71
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -178
- package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -6
- package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -9
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +121 -115
- package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -183
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -23
- package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -58
- package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -14
- package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -90
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -124
- package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +104 -112
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +27 -27
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -84
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -252
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -330
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -128
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -300
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +627 -657
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -318
- package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -80
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +48 -49
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +195 -195
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +187 -187
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -305
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -97
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -453
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -225
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -132
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -436
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -102
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -271
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -231
- package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +57 -57
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -175
- package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +80 -49
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +38 -81
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -174
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -373
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -29
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -146
- 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 +255 -263
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/contracts.ts +179 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/kernel.ts +522 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -50
- package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +331 -342
- package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +243 -243
- package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +152 -153
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/phase9-lifecycle-graph.test.ts +103 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -222
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -160
- package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +426 -426
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +230 -146
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +142 -142
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +253 -253
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +302 -309
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -246
- package/node_modules/@sdd-agent-platform/core/src/registries/plan-scout-domains.ts +89 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -119
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +454 -429
- package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -37
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -135
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -132
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -144
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -42
- package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +98 -97
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -63
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -233
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +251 -266
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -203
- package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +327 -327
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +388 -388
- package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -154
- package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -33
- package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -100
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +356 -356
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +428 -428
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -73
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +189 -191
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +464 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +124 -124
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -123
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +273 -0
- package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -170
- package/node_modules/@sdd-agent-platform/core/src/router.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +126 -118
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -27
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +172 -172
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -109
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +252 -230
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +52 -52
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +356 -356
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -70
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -406
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +198 -206
- 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 +8 -8
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +60 -63
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +257 -296
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +140 -152
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +66 -68
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +253 -176
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +101 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +314 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.test.ts +380 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.ts +207 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -207
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -95
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -39
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +467 -401
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +738 -694
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -81
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/spec-manager-contracts.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +435 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +316 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2964 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5856 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -40
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -209
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +360 -352
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -288
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +651 -625
- package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +489 -489
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1981 -1175
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -232
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -307
- package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.test.ts +141 -0
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.ts +566 -0
- package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -193
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +413 -398
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +102 -70
- package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -2
- 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 +174 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +137 -181
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +455 -494
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.test.ts → task-evidence-judgment.test.ts} +261 -335
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.ts → task-evidence-judgment.ts} +619 -648
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1190 -1032
- 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.ts +513 -513
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +334 -358
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -112
- package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +190 -196
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +169 -171
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +136 -143
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +135 -137
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +153 -155
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +111 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +95 -95
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -32
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +114 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +184 -156
- 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 +970 -464
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +967 -363
- 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 +2 -2
- package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -130
- package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -269
- package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -150
- package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -15
- package/package.json +2 -2
- package/packages/cli/dist/args.js +1 -1
- package/packages/cli/dist/args.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/evidence.js.map +1 -0
- package/packages/cli/dist/commands/execution.js +126 -0
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/instructions.d.ts +1 -1
- package/packages/cli/dist/commands/instructions.js +15 -1
- package/packages/cli/dist/commands/instructions.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +70 -1
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +12 -1
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +66 -0
- package/packages/cli/dist/commands/stage-close.js +524 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +8 -1
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/dispatch.js +6 -31
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +153 -158
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +51 -2
- 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 +84 -103
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +10 -6
- package/packages/core/dist/config/init-project.js +7 -8
- 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 +0 -1
- package/packages/core/dist/config/starter-documents.js +374 -421
- 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 +7 -19
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/contracts.d.ts +7 -1
- package/packages/core/dist/contracts.js +6 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +2 -12
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +1 -18
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +1 -1
- package/packages/core/dist/evidence/lookup.js +1 -1
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/packages/core/dist/evidence-runtime/coordination.js +110 -0
- package/packages/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/packages/core/dist/execution/host-invocation.js +83 -83
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +37 -80
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.js +58 -68
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/packages/core/dist/lifecycle-graph/contracts.js +7 -0
- package/packages/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/packages/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/packages/core/dist/lifecycle-graph/kernel.js +461 -0
- package/packages/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/packages/core/dist/lifecycle-graph.d.ts +2 -0
- package/packages/core/dist/lifecycle-graph.js +3 -0
- package/packages/core/dist/lifecycle-graph.js.map +1 -0
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.js +21 -28
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +124 -40
- package/packages/core/dist/registries/agent-registry.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 +6 -13
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/plan-scout-domains.d.ts +13 -0
- package/packages/core/dist/registries/plan-scout-domains.js +76 -0
- package/packages/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/packages/core/dist/registries/skill-capabilities.js +7 -7
- package/packages/core/dist/registries/skill-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +6 -6
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.d.ts +1 -1
- package/packages/core/dist/registries/workflow-gates.js +18 -18
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/consumer-diagnostics.js +2 -1
- package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +7 -7
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +12 -27
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.js +6 -6
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +1 -1
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/routing.js +2 -4
- 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 +383 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +227 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +1 -0
- package/packages/core/dist/router.js +1 -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 +6 -0
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +20 -0
- package/packages/core/dist/run-state/run-state.js +7 -7
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +1 -2
- package/packages/core/dist/run-state/task-evidence.js +2 -9
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/runtime-analysis/build.js +1 -4
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +0 -39
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +10 -0
- package/packages/core/dist/runtime-paths.js +65 -0
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +211 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/packages/core/dist/sdd-docs/task-parser.d.ts +5 -1
- package/packages/core/dist/sdd-docs/task-parser.js +60 -22
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-rendering.js +2 -2
- package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/packages/core/dist/spec-entry.js +40 -0
- package/packages/core/dist/spec-entry.js.map +1 -0
- package/packages/core/dist/spec-manager-contracts.d.ts +12 -0
- package/packages/core/dist/spec-manager-contracts.js +2 -0
- package/packages/core/dist/spec-manager-contracts.js.map +1 -0
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +315 -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 +238 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +736 -0
- package/packages/core/dist/stage-collaboration.js +4018 -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.js +25 -1
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +170 -18
- package/packages/core/dist/storage/runtime-store.js +597 -85
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/sync-back/apply.d.ts +1 -17
- package/packages/core/dist/sync-back/apply.js +1 -242
- package/packages/core/dist/sync-back/apply.js.map +1 -1
- package/packages/core/dist/sync-back/inspect.d.ts +1 -110
- package/packages/core/dist/sync-back/inspect.js +1 -496
- package/packages/core/dist/sync-back/inspect.js.map +1 -1
- package/packages/core/dist/sync-back.d.ts +1 -2
- package/packages/core/dist/sync-back.js +1 -2
- package/packages/core/dist/sync-back.js.map +1 -1
- package/packages/core/dist/task-execution-contract.d.ts +167 -0
- package/packages/core/dist/task-execution-contract.js +377 -0
- package/packages/core/dist/task-execution-contract.js.map +1 -0
- package/packages/core/dist/test-support/fixtures.js +329 -314
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -0
- package/packages/core/dist/test-support/run-state.js +31 -0
- 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 +135 -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 -49
- package/packages/core/dist/verification/goal-verify.js +1 -545
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +5 -7
- package/packages/core/dist/verification/rendering.js +15 -55
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.js +1 -40
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/task-evidence-judgment.d.ts +49 -0
- package/packages/core/dist/verification/task-evidence-judgment.js +521 -0
- package/packages/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/packages/core/dist/verification/test-runtime.d.ts +12 -2
- package/packages/core/dist/verification/test-runtime.js +247 -112
- 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/verify-contract.d.ts +1 -1
- package/packages/core/dist/verification/verify-contract.js +49 -72
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +3 -3
- package/packages/core/dist/verification.js +2 -2
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +2 -7
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +0 -7
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +2 -4
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +3 -5
- package/packages/core/dist/workflow-state/latest-eligible-run.js +30 -4
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +55 -5
- package/packages/core/dist/workflow-state/resolve.js +518 -36
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/package.json +6 -3
- package/tsconfig.build.json +6 -7
- 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/src/sync-back/apply.ts +0 -270
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +0 -255
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +0 -439
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +0 -341
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +0 -204
- package/packages/cli/dist/commands/lifecycle.d.ts +0 -6
- package/packages/cli/dist/commands/lifecycle.js +0 -112
- package/packages/cli/dist/commands/lifecycle.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/commands/test.d.ts +0 -6
- package/packages/cli/dist/commands/test.js +0 -195
- package/packages/cli/dist/commands/test.js.map +0 -1
- package/packages/cli/dist/commands/verifies.d.ts +0 -6
- package/packages/cli/dist/commands/verifies.js +0 -85
- package/packages/cli/dist/commands/verifies.js.map +0 -1
- package/packages/cli/dist/commands/verify.d.ts +0 -6
- package/packages/cli/dist/commands/verify.js +0 -134
- package/packages/cli/dist/commands/verify.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
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { branchToSafePartition, normalizePortablePath } from './path-safety.js';
|
|
5
|
+
import { hashDocumentContent } from './sdd-docs/document-hashes.js';
|
|
6
|
+
import { listRuntimeProjections, readRuntimeProjectionEnvelope, recordRuntimeProjectionEnvelope, runtimeProjectionStaleness } from './storage/runtime-store.js';
|
|
7
|
+
import { NEXT_INTENT_PROJECTION_TYPE, TASK_ORCHESTRATION_PROJECTION_TYPE, VALIDATION_UNIT_PROJECTION_TYPE, WORKFLOW_CURRENT_STATE_PROJECTION_TYPE } from './workflow-state/runtime-projections.js';
|
|
8
|
+
import { DIAGNOSTIC_PROJECTION_TYPE, EVIDENCE_SELECTION_PROJECTION_TYPE, LIFECYCLE_GRAPH_INSTANCE_PROJECTION_TYPE, LIFECYCLE_ROUTE_PROJECTION_TYPE, STAGE_WORK_ORDER_PROJECTION_TYPE } from './lifecycle-graph.js';
|
|
9
|
+
export const RUNTIME_PROJECTION_P0_CONTRACT_VERSION = 'phase9.19-runtime-sqlite-contract-projection-p0-v1';
|
|
10
|
+
export const RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE = 'phase9_19_ref_hash_registry';
|
|
11
|
+
export const RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION = 'phase9.19-ref-hash-registry-v1';
|
|
12
|
+
export const STAGE_ROUTE_BINDING_PROJECTION_TYPE = 'phase9_18_stage_route_binding';
|
|
13
|
+
export const STAGE_ROUTE_BINDING_PRODUCER_VERSION = 'phase9.18-stage-route-binding-v1';
|
|
14
|
+
export const TRUTH_RECONCILIATION_PROJECTION_TYPE = 'phase9_21_truth_reconciliation';
|
|
15
|
+
export const RUNTIME_PROJECTION_P0_INVENTORY = [
|
|
16
|
+
inventoryItem('lifecycleDecisions', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Lifecycle/risk authority created only by /sdd or /sdd:spec.', ['router', 'stage-close', 'status', 'doctor']),
|
|
17
|
+
inventoryItem('riskSignals', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Risk signal snapshot and lifecycle policy output for routing and gates.', ['router', 'workflow-gate', 'status']),
|
|
18
|
+
inventoryItem('stageRuns', 'sqlite', 'projections:phase8_stage_run', 'Runtime-owned stage run state and terminal health.', ['status', 'stage-close', 'ship']),
|
|
19
|
+
inventoryItem('stageHandoffs', 'sqlite', 'projections:phase8_workflow_handoff', 'Runtime handoff packet between completed stages and next runtime stage.', ['status', 'stage-close']),
|
|
20
|
+
inventoryItem('gates', 'sqlite', 'workflow_gate_decisions', 'Hard gate decisions and policy outcomes.', ['workflow-gate', 'status', 'ship']),
|
|
21
|
+
inventoryItem('gapBlockers', 'sqlite', 'durable_gaps', 'Mutable gap/blocker lifecycle with runtime status authority.', ['doctor', 'status', 'stage-close']),
|
|
22
|
+
inventoryItem('evidenceItems', 'sqlite-ref-hash-only', 'stage_artifacts/artifact_payloads', 'Agent-authored Markdown evidence registered by ref, hash, contract, producer, and status.', ['workflow-gate', 'stage-close', 'doctor']),
|
|
23
|
+
inventoryItem('evidenceSets', 'sqlite-ref-hash-only', 'evidence_sets/evidence_set_items', 'Accepted evidence sets selected by refs and digests, not Markdown bodies.', ['workflow-gate', 'ship', 'status']),
|
|
24
|
+
inventoryItem('selectionPointers', 'sqlite', 'selection_pointers', 'Active accepted evidence pointer for downstream consumers.', ['workflow-gate', 'latest-eligible-run', 'ship']),
|
|
25
|
+
inventoryItem('workflowCurrentState', 'sqlite-projection', `projections:${WORKFLOW_CURRENT_STATE_PROJECTION_TYPE}`, 'Runtime-owned lifecycle, task, and validation-unit current state projection.', ['status', 'router', 'ai-tool-entry']),
|
|
26
|
+
inventoryItem('taskOrchestration', 'sqlite-projection', `projections:${TASK_ORCHESTRATION_PROJECTION_TYPE}`, 'Parsed task orchestration read model with task-level hashes, dependencies, validation unit binding, and capability signals.', ['status', 'do-manager', 'tasks-manager']),
|
|
27
|
+
inventoryItem('validationUnits', 'sqlite-projection', `projections:${VALIDATION_UNIT_PROJECTION_TYPE}`, 'Runtime validation-unit read model derived from verify contracts and task orchestration.', ['status', 'test-manager', 'workflow-gate']),
|
|
28
|
+
inventoryItem('truthAlignment', 'sqlite', 'projections:phase9_12_truth_alignment', 'Goal-verify truth alignment projection for ship readiness.', ['ship', 'status']),
|
|
29
|
+
inventoryItem('truthReconciliation', 'sqlite', `projections:${TRUTH_RECONCILIATION_PROJECTION_TYPE}`, 'Owner-stage reconciliation decision slot for minimal rerun frontier.', ['orchestrator', 'status', 'ship']),
|
|
30
|
+
inventoryItem('stageRouteBindings', 'sqlite', `projections:${STAGE_ROUTE_BINDING_PROJECTION_TYPE}`, 'Stage-local command input binding to an accepted runtime target.', ['router', 'status']),
|
|
31
|
+
inventoryItem('nextIntent', 'sqlite-projection', `projections:${NEXT_INTENT_PROJECTION_TYPE}`, 'Advisory runtime next-action read model; execution still checks readiness and gates.', ['status', 'ai-tool-entry']),
|
|
32
|
+
inventoryItem('lifecycleGraphInstances', 'sqlite-projection', `projections:${LIFECYCLE_GRAPH_INSTANCE_PROJECTION_TYPE}`, 'Runtime-owned lifecycle graph instance derived from active lifecycle risk authority.', ['status', 'instructions', 'doctor', 'router', 'stage-close']),
|
|
33
|
+
inventoryItem('lifecycleRoutes', 'sqlite-projection', `projections:${LIFECYCLE_ROUTE_PROJECTION_TYPE}`, 'Graph-owned legal next action and blocker route projection.', ['status', 'instructions', 'doctor', 'router']),
|
|
34
|
+
inventoryItem('stageWorkOrders', 'sqlite-projection', `projections:${STAGE_WORK_ORDER_PROJECTION_TYPE}`, 'Stage-local work order schemas, required refs, and closure commands.', ['instructions', 'stage-close', 'do-manager', 'test-manager']),
|
|
35
|
+
inventoryItem('evidenceSelections', 'sqlite-projection', `projections:${EVIDENCE_SELECTION_PROJECTION_TYPE}`, 'Runtime-selected evidence obligations and selected accepted refs.', ['status', 'stage-close', 'workflow-gate', 'doctor']),
|
|
36
|
+
inventoryItem('diagnosticProjections', 'sqlite-projection', `projections:${DIAGNOSTIC_PROJECTION_TYPE}`, 'Blocker-specific diagnostics and recovery commands for lifecycle graph consumers.', ['doctor', 'status', 'instructions', 'router']),
|
|
37
|
+
inventoryItem('auditEvents', 'sqlite', 'events/activities', 'Append-only runtime events and activity records for auditability.', ['doctor', 'run-inspect'])
|
|
38
|
+
];
|
|
39
|
+
export const RUNTIME_PROJECTION_P0_PROJECTION_TYPES = [
|
|
40
|
+
'phase8_lifecycle_risk_decision',
|
|
41
|
+
'phase8_stage_run',
|
|
42
|
+
'phase8_workflow_handoff',
|
|
43
|
+
'phase9_12_truth_alignment',
|
|
44
|
+
TRUTH_RECONCILIATION_PROJECTION_TYPE,
|
|
45
|
+
STAGE_ROUTE_BINDING_PROJECTION_TYPE,
|
|
46
|
+
WORKFLOW_CURRENT_STATE_PROJECTION_TYPE,
|
|
47
|
+
TASK_ORCHESTRATION_PROJECTION_TYPE,
|
|
48
|
+
VALIDATION_UNIT_PROJECTION_TYPE,
|
|
49
|
+
NEXT_INTENT_PROJECTION_TYPE,
|
|
50
|
+
LIFECYCLE_GRAPH_INSTANCE_PROJECTION_TYPE,
|
|
51
|
+
LIFECYCLE_ROUTE_PROJECTION_TYPE,
|
|
52
|
+
STAGE_WORK_ORDER_PROJECTION_TYPE,
|
|
53
|
+
EVIDENCE_SELECTION_PROJECTION_TYPE,
|
|
54
|
+
DIAGNOSTIC_PROJECTION_TYPE,
|
|
55
|
+
RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE
|
|
56
|
+
];
|
|
57
|
+
export async function inspectRuntimeProjectionP0(projectRoot, branch) {
|
|
58
|
+
const partition = branchToSafePartition(branch);
|
|
59
|
+
const projections = await listRuntimeProjections(projectRoot, [...RUNTIME_PROJECTION_P0_PROJECTION_TYPES]);
|
|
60
|
+
const projectionCounts = Object.fromEntries(RUNTIME_PROJECTION_P0_PROJECTION_TYPES.map((projectionType) => [projectionType, projections.filter((projection) => projection.projectionType === projectionType).length]));
|
|
61
|
+
const envelope = await readRuntimeRefHashRegistryProjection(projectRoot, partition);
|
|
62
|
+
const refHashRegistry = await inspectRefHashRegistry(projectRoot, partition, envelope);
|
|
63
|
+
const status = refHashRegistry.status === 'blocked' ? 'blocked' : envelope ? 'pass' : 'warn';
|
|
64
|
+
const reasons = runtimeProjectionP0Reasons(status, refHashRegistry.reasons);
|
|
65
|
+
return {
|
|
66
|
+
contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
|
|
67
|
+
branch: partition,
|
|
68
|
+
status,
|
|
69
|
+
inventory: [...RUNTIME_PROJECTION_P0_INVENTORY],
|
|
70
|
+
projectionCounts,
|
|
71
|
+
refHashRegistry,
|
|
72
|
+
reasons
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export async function recordRuntimeRefHashRegistryProjection(projectRoot, input) {
|
|
76
|
+
const branch = branchToSafePartition(input.branch);
|
|
77
|
+
const refs = await inspectRuntimeRefFreshness(projectRoot, input.refs);
|
|
78
|
+
const staleRefs = refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
|
|
79
|
+
const projection = {
|
|
80
|
+
contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
|
|
81
|
+
branch,
|
|
82
|
+
refs,
|
|
83
|
+
status: staleRefs.length === 0 ? 'fresh' : 'blocked',
|
|
84
|
+
staleRefs,
|
|
85
|
+
reasons: refHashRegistryReasons(staleRefs, refs)
|
|
86
|
+
};
|
|
87
|
+
return recordRuntimeProjectionEnvelope(projectRoot, {
|
|
88
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
89
|
+
scopeKey: runtimeRefHashRegistryScopeKey(branch),
|
|
90
|
+
inputHash: runtimeProjectionStableHash(projection),
|
|
91
|
+
producer: 'phase9.19-runtime-projection-p0',
|
|
92
|
+
producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION,
|
|
93
|
+
generatedAt: input.generatedAt,
|
|
94
|
+
payload: projection
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export async function readRuntimeRefHashRegistryProjection(projectRoot, branch) {
|
|
98
|
+
return readRuntimeProjectionEnvelope(projectRoot, RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE, runtimeRefHashRegistryScopeKey(branchToSafePartition(branch)));
|
|
99
|
+
}
|
|
100
|
+
export async function inspectRuntimeRefFreshness(projectRoot, refs) {
|
|
101
|
+
return Promise.all(refs.map((ref) => inspectRuntimeRef(projectRoot, ref)));
|
|
102
|
+
}
|
|
103
|
+
export function runtimeRefHashRegistryScopeKey(branch) {
|
|
104
|
+
return [branchToSafePartition(branch), 'ref-hash-registry'].join(':');
|
|
105
|
+
}
|
|
106
|
+
export function runtimeProjectionStableHash(value) {
|
|
107
|
+
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
108
|
+
}
|
|
109
|
+
async function inspectRefHashRegistry(projectRoot, branch, envelope) {
|
|
110
|
+
if (!envelope) {
|
|
111
|
+
return {
|
|
112
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
113
|
+
envelopeStaleness: 'unknown',
|
|
114
|
+
status: 'missing',
|
|
115
|
+
staleRefs: [],
|
|
116
|
+
reasons: ['Runtime ref/hash registry projection is missing; register accepted Markdown refs before relying on freshness diagnostics.']
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const currentRefs = await inspectRuntimeRefFreshness(projectRoot, envelope.payload.refs.map((entry) => entry.ref));
|
|
120
|
+
const staleRefs = currentRefs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
|
|
121
|
+
const currentProjection = {
|
|
122
|
+
...envelope.payload,
|
|
123
|
+
refs: currentRefs,
|
|
124
|
+
status: staleRefs.length === 0 ? 'fresh' : 'blocked',
|
|
125
|
+
staleRefs,
|
|
126
|
+
reasons: refHashRegistryReasons(staleRefs, currentRefs)
|
|
127
|
+
};
|
|
128
|
+
return {
|
|
129
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
130
|
+
envelopeStaleness: runtimeProjectionStaleness(envelope, {
|
|
131
|
+
inputHash: runtimeProjectionStableHash(currentProjection),
|
|
132
|
+
producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION
|
|
133
|
+
}),
|
|
134
|
+
status: currentProjection.status,
|
|
135
|
+
staleRefs,
|
|
136
|
+
reasons: currentProjection.reasons
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
async function inspectRuntimeRef(projectRoot, ref) {
|
|
140
|
+
const normalizedRef = normalizePortablePath(ref.ref);
|
|
141
|
+
if (!isFileBackedRef(ref)) {
|
|
142
|
+
return freshness(ref, normalizedRef, null, null, 'not_file_backed', `Runtime ref kind ${ref.kind} is not file-backed.`);
|
|
143
|
+
}
|
|
144
|
+
if (!ref.hash) {
|
|
145
|
+
return freshness(ref, normalizedRef, null, null, 'unhashed', `File-backed ref ${ref.ref} has no expected hash.`);
|
|
146
|
+
}
|
|
147
|
+
const safePath = safeProjectRelativePath(projectRoot, normalizedRef);
|
|
148
|
+
if (!safePath) {
|
|
149
|
+
return freshness(ref, normalizedRef, ref.hash, null, 'unsafe', `File-backed ref ${ref.ref} is not a safe project-relative path.`);
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const currentHash = hashDocumentContent(await readFile(safePath, 'utf8'));
|
|
153
|
+
return hashMatches(ref.hash, currentHash)
|
|
154
|
+
? freshness(ref, normalizedRef, ref.hash, currentHash, 'fresh', `File-backed ref ${normalizedRef} is fresh.`)
|
|
155
|
+
: freshness(ref, normalizedRef, ref.hash, currentHash, 'stale', `File-backed ref ${normalizedRef} hash is stale: expected ${ref.hash}, actual ${currentHash}.`);
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (isMissingFileError(error)) {
|
|
159
|
+
return freshness(ref, normalizedRef, ref.hash, null, 'missing', `File-backed ref ${normalizedRef} is missing.`);
|
|
160
|
+
}
|
|
161
|
+
throw error;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function inventoryItem(key, storage, primitive, responsibility, consumers) {
|
|
165
|
+
return { key, storage, primitive, writer: 'runtime', responsibility, consumers, markdownBodyAuthority: false };
|
|
166
|
+
}
|
|
167
|
+
function runtimeProjectionP0Reasons(status, refHashReasons) {
|
|
168
|
+
if (status === 'blocked') {
|
|
169
|
+
return refHashReasons;
|
|
170
|
+
}
|
|
171
|
+
if (status === 'warn') {
|
|
172
|
+
return ['Runtime projection P0 inventory is available; ref/hash freshness registry has not been recorded yet.'];
|
|
173
|
+
}
|
|
174
|
+
return ['Runtime projection P0 inventory is available and registered file-backed refs are fresh.'];
|
|
175
|
+
}
|
|
176
|
+
function refHashRegistryReasons(staleRefs, refs) {
|
|
177
|
+
if (staleRefs.length === 0) {
|
|
178
|
+
return ['Registered file-backed refs are fresh; non-file-backed refs remain metadata-only.'];
|
|
179
|
+
}
|
|
180
|
+
return refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.reason);
|
|
181
|
+
}
|
|
182
|
+
function blocksRefHashRegistry(status) {
|
|
183
|
+
return status === 'stale' || status === 'missing' || status === 'unhashed' || status === 'unsafe';
|
|
184
|
+
}
|
|
185
|
+
function isFileBackedRef(ref) {
|
|
186
|
+
if (ref.kind === 'document' || ref.kind === 'artifact' || ref.kind === 'evidence') {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
return /^(specs|runs)\//.test(normalizePortablePath(ref.ref));
|
|
190
|
+
}
|
|
191
|
+
function safeProjectRelativePath(projectRoot, normalizedRef) {
|
|
192
|
+
if (path.isAbsolute(normalizedRef) || normalizedRef.startsWith('../') || normalizedRef === '..') {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
const projectPath = path.resolve(projectRoot);
|
|
196
|
+
const absolutePath = path.resolve(projectPath, normalizedRef);
|
|
197
|
+
return absolutePath === projectPath || absolutePath.startsWith(`${projectPath}${path.sep}`) ? absolutePath : null;
|
|
198
|
+
}
|
|
199
|
+
function freshness(ref, normalizedRef, expectedHash, currentHash, status, reason) {
|
|
200
|
+
return { ref: { ...ref, ref: normalizedRef }, normalizedRef, expectedHash, currentHash, status, reason };
|
|
201
|
+
}
|
|
202
|
+
function hashMatches(expected, actual) {
|
|
203
|
+
return expected.replace(/^sha256:/, '') === actual.replace(/^sha256:/, '');
|
|
204
|
+
}
|
|
205
|
+
function isMissingFileError(error) {
|
|
206
|
+
if (!error || typeof error !== 'object') {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
return 'code' in error && error.code === 'ENOENT';
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=runtime-projection-p0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-projection-p0.js","sourceRoot":"","sources":["../src/runtime-projection-p0.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,0BAA0B,EAA6C,MAAM,4BAA4B,CAAC;AAC3M,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,+BAA+B,EAC/B,sCAAsC,EACvC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,wCAAwC,EACxC,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,sCAAsC,GAAG,oDAA6D,CAAC;AACpH,MAAM,CAAC,MAAM,yCAAyC,GAAG,6BAA6B,CAAC;AACvF,MAAM,CAAC,MAAM,0CAA0C,GAAG,gCAAgC,CAAC;AAC3F,MAAM,CAAC,MAAM,mCAAmC,GAAG,+BAA+B,CAAC;AACnF,MAAM,CAAC,MAAM,oCAAoC,GAAG,kCAAkC,CA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AAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,IAAI,KAAK,IAAK,KAA4B,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ArtifactDepthStage = 'spec' | 'plan' | 'tasks';
|
|
2
|
+
export type ArtifactDepthIssueSeverity = 'blocker' | 'warning' | 'advisory';
|
|
3
|
+
export interface ArtifactDepthIssue {
|
|
4
|
+
stage: ArtifactDepthStage;
|
|
5
|
+
severity: ArtifactDepthIssueSeverity;
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
repair: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function evaluateSpecArtifactDepth(content: string): ArtifactDepthIssue[];
|
|
11
|
+
export declare function evaluatePlanArtifactDepth(content: string): ArtifactDepthIssue[];
|
|
12
|
+
export declare function evaluateTasksArtifactDepth(content: string): ArtifactDepthIssue[];
|
|
13
|
+
export declare function formatArtifactDepthIssues(issues: ArtifactDepthIssue[]): string[];
|
|
14
|
+
export declare function formatArtifactDepthBlockingIssues(issues: ArtifactDepthIssue[]): string[];
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
export function evaluateSpecArtifactDepth(content) {
|
|
2
|
+
const problem = extractMarkdownSection(content, 'Problem Reframing / Intent Discovery') ?? '';
|
|
3
|
+
const requirements = extractMarkdownSection(content, 'Requirements') ?? '';
|
|
4
|
+
const acceptance = extractMarkdownSection(content, 'Acceptance Criteria / Evidence Targets') ?? '';
|
|
5
|
+
const definitions = extractMarkdownSection(content, 'Definitions / Rules') ?? '';
|
|
6
|
+
const ambiguity = extractMarkdownSection(content, 'Open Questions / Ambiguity Ledger') ?? '';
|
|
7
|
+
const closeEvidence = extractMarkdownSection(content, 'Close Quality Evidence') ?? '';
|
|
8
|
+
const issues = [];
|
|
9
|
+
if (!/surface request/i.test(problem) || !/reframed problem/i.test(problem) || !/inferred real intent|real intent/i.test(problem)) {
|
|
10
|
+
issues.push(issue('spec', 'spec.too_thin.problem_reframing_missing', 'spec lacks problem reframing depth', 'Rewrite Problem Reframing / Intent Discovery with surface request, reframed problem, inferred intent, and observable success.', 'advisory'));
|
|
11
|
+
}
|
|
12
|
+
if (!/\bREQ-\d+\b/i.test(requirements) || !/reasoning|basis|source|constraint|because|why|rule|invariant|domain/i.test(`${requirements}\n${definitions}`)) {
|
|
13
|
+
issues.push(issue('spec', 'spec.too_thin.domain_rules_missing', 'spec requirements are not tied to domain rules or scope boundaries', 'Add requirement reasoning, source basis, domain rules, invariants, and scope boundaries before plan.', 'advisory'));
|
|
14
|
+
}
|
|
15
|
+
if (!/\bAC-\d+\b/i.test(acceptance) || !/evidence target/i.test(acceptance) || !/REQ-\d+/i.test(acceptance)) {
|
|
16
|
+
issues.push(issue('spec', 'spec.too_thin.acceptance_evidence_missing', 'spec acceptance criteria lack evidence targets tied to requirements', 'Add evidence targets for each core acceptance criterion and map them to requirement IDs.', 'warning'));
|
|
17
|
+
}
|
|
18
|
+
if (!/blocking user decisions?|blocking before plan|no blocking/i.test(ambiguity) || !/researchable|resolved by scout|scout|safe assumptions?|assumptions?|deferred/i.test(ambiguity)) {
|
|
19
|
+
issues.push(issue('spec', 'spec.ambiguity.unrouted', 'spec ambiguity is not explicitly routed', 'Classify uncertainty into researchable gaps, blocking user decisions, assumptions, and deferred items.', 'warning'));
|
|
20
|
+
}
|
|
21
|
+
if (closeEvidence && !/downstream_business_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
22
|
+
issues.push(issue('spec', 'spec.downstream_guesswork.plan_would_rediscover_requirements', 'spec leaves downstream business guesswork for plan', 'Either resolve business guesswork in spec or route it as a blocking user decision before close.', 'blocker'));
|
|
23
|
+
}
|
|
24
|
+
return issues;
|
|
25
|
+
}
|
|
26
|
+
export function evaluatePlanArtifactDepth(content) {
|
|
27
|
+
const implementationMap = extractMarkdownSection(content, 'Current Implementation Map') ?? '';
|
|
28
|
+
const interfaceDesign = extractMarkdownSection(content, 'Interface / API / Schema Design') ?? '';
|
|
29
|
+
const stateDesign = extractMarkdownSection(content, 'State / Data / Concurrency Design') ?? '';
|
|
30
|
+
const validationStrategy = extractMarkdownSection(content, 'Validation Strategy') ?? '';
|
|
31
|
+
const riskControls = extractMarkdownSection(content, 'Risk Controls') ?? '';
|
|
32
|
+
const closeEvidence = extractMarkdownSection(content, 'Plan Close Quality Evidence') ?? '';
|
|
33
|
+
const issues = [];
|
|
34
|
+
if (!hasConcreteImplementationSurface(implementationMap)) {
|
|
35
|
+
issues.push(issue('plan', 'plan.too_thin.current_implementation_facts_not_reasoned', 'plan lacks reasoned current implementation facts', 'Connect observed files/classes/data facts to design implications, ownership, reuse/change/do-not-reuse decisions, or scout gaps.', 'advisory'));
|
|
36
|
+
}
|
|
37
|
+
if (!hasApiShape(interfaceDesign)) {
|
|
38
|
+
issues.push(issue('plan', 'plan.too_thin.api_shape_not_decided', 'plan API/interface shape is undecided', 'Specify request/query fields, response DTO/VO shape, error behavior, pagination, and owner surface where applicable.', 'warning'));
|
|
39
|
+
}
|
|
40
|
+
if (!hasSqlOrDataMappingDepth(interfaceDesign, stateDesign)) {
|
|
41
|
+
issues.push(issue('plan', 'plan.too_thin.sql_mapping_missing_join_keys', 'plan SQL/data mapping lacks executable depth', 'Name source fields, join keys, grouping/distinct rules, mapper ownership, date/status filters, or justify non-applicability.', 'warning'));
|
|
42
|
+
}
|
|
43
|
+
if (!hasScenarioValidationMatrix(validationStrategy, riskControls)) {
|
|
44
|
+
issues.push(issue('plan', 'plan.too_thin.validation_not_scenario_level', 'plan validation is not scenario-level', 'Add scenario rows with input/user action, expected API/UI/SQL result, evidence command/manual check, proves, and does-not-prove.', 'warning'));
|
|
45
|
+
}
|
|
46
|
+
if (looksDenseButShallow(implementationMap, interfaceDesign, riskControls)) {
|
|
47
|
+
issues.push(issue('plan', 'plan.dense_but_shallow.code_facts_not_connected_to_decisions', 'plan is dense but code/data facts are not connected to decisions', 'For each important fact, state the design implication, selected decision, rejected alternative, and risk control.', 'warning'));
|
|
48
|
+
}
|
|
49
|
+
if (leaksDesignDecisionToImplementation(interfaceDesign, stateDesign)) {
|
|
50
|
+
issues.push(issue('plan', 'plan.downstream_guesswork.tasks_or_execute_would_redesign', 'plan leaks design decisions to implementation', 'Resolve API/SQL/data decisions in plan before tasks or execute consume the design.', 'blocker'));
|
|
51
|
+
}
|
|
52
|
+
if (closeEvidence && !/downstream_design_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
53
|
+
issues.push(issue('plan', 'plan.downstream_guesswork.tasks_or_execute_would_redesign', 'plan leaves design guesswork for tasks or execute', 'Resolve or explicitly route design guesswork before tasks consume the plan.', 'blocker'));
|
|
54
|
+
}
|
|
55
|
+
return issues;
|
|
56
|
+
}
|
|
57
|
+
export function evaluateTasksArtifactDepth(content) {
|
|
58
|
+
const splitBasis = extractMarkdownSection(content, ['Split Basis', 'Task Split Basis', 'Work Unit Split Basis']) ?? '';
|
|
59
|
+
const implementationTasks = extractMarkdownSection(content, ['Implementation Tasks', 'Implementation Work Units', 'Implementation Task Units']) ?? '';
|
|
60
|
+
const validationTasks = extractMarkdownSection(content, ['Validation Tasks', 'Validation Work Units', 'Validation Task Units']) ?? '';
|
|
61
|
+
const dependencies = extractMarkdownSection(content, ['Task Dependencies and Handoff', 'Dependencies and Validation Handoff', 'Task Dependency and Validation Handoff']) ?? '';
|
|
62
|
+
const openQuestions = extractMarkdownSection(content, ['Open Execution Questions', 'Open Questions', 'Execution Questions']) ?? '';
|
|
63
|
+
const closeEvidence = extractMarkdownSection(content, ['Tasks Close Quality Evidence', 'Close Quality Evidence']) ?? '';
|
|
64
|
+
const issues = [];
|
|
65
|
+
if (!/why this task exists|work-unit context|plan decision|design part|must not reinterpret|risk/i.test(implementationTasks)) {
|
|
66
|
+
issues.push(issue('tasks', 'tasks.too_thin.work_unit_context_missing', 'implementation tasks lack work-unit context', 'Explain which plan decision each task implements, why the boundary exists, and what execute must not reinterpret.', 'warning'));
|
|
67
|
+
}
|
|
68
|
+
if (!/validationHandoff\s*:/i.test(implementationTasks)) {
|
|
69
|
+
issues.push(issue('tasks', 'tasks.parser.missing_validation_handoff', 'implementation tasks lack validation handoff metadata', 'Add validationHandoff metadata from each implementation task to later validation task IDs.', 'blocker'));
|
|
70
|
+
}
|
|
71
|
+
if (!/validatesImplementationTasks\s*:/i.test(validationTasks) && !/validates_implementation_tasks\s*:/i.test(validationTasks)) {
|
|
72
|
+
issues.push(issue('tasks', 'tasks.parser.missing_validates_implementation_tasks', 'validation tasks lack implementation task refs', 'Add validatesImplementationTasks metadata to each validation task.', 'blocker'));
|
|
73
|
+
}
|
|
74
|
+
if (!/expected result|pass criteria|evidence is enough|does not prove|acceptance checks|manual inspection|test/i.test(validationTasks)) {
|
|
75
|
+
issues.push(issue('tasks', 'tasks.validation.expected_result_missing', 'validation tasks lack expected results', 'Add expected result, sufficient evidence, and does-not-prove notes for validation tasks.', 'warning'));
|
|
76
|
+
}
|
|
77
|
+
if (!/failure routing|failure route|return to|plan repair|spec\/user decision|environment diagnostic|tasks repair/i.test(`${validationTasks}\n${openQuestions}`)) {
|
|
78
|
+
issues.push(issue('tasks', 'tasks.failure_route.missing', 'tasks lack failure routes', 'Add failure routes to implementation task, tasks repair, plan repair, spec/user decision, or environment diagnostic.', 'blocker'));
|
|
79
|
+
}
|
|
80
|
+
if (isOversizedExecutionSlice(implementationTasks) && !hasExecutionSliceDecision(`${splitBasis}\n${implementationTasks}\n${dependencies}`)) {
|
|
81
|
+
issues.push(issue('tasks', 'tasks.review.split_adjudication_missing', 'tasks contain a broad execution slice without recorded tasks-stage split adjudication', 'Have task-reviewer flag the slice and tasks-manager either split it or record why the rollback unit stays together with an internal execution order before close.', 'warning'));
|
|
82
|
+
}
|
|
83
|
+
if (/rollback unit/i.test(implementationTasks) && /parallel/i.test(dependencies) && !/rollback boundary|reverted together|shared rollback|separate rollback|rollback units? stay separate|rollback-separated/i.test(dependencies)) {
|
|
84
|
+
issues.push(issue('tasks', 'tasks.boundary.rollback_unit_torn', 'tasks parallelism may tear rollback units', 'Explain rollback boundaries and why parallel tasks do not modify the same rollback unit unsafely.', 'blocker'));
|
|
85
|
+
}
|
|
86
|
+
if (/execute (?:will|should|must) decide|decide in execute|tbd in execute|implementation will determine|finalize during execute|确定|待实现时确定/i.test(`${implementationTasks}\n${openQuestions}`)) {
|
|
87
|
+
issues.push(issue('tasks', 'tasks.plan_repair.design_guesswork_leaked_to_execute', 'tasks leak design guesswork into execute', 'Route unresolved SQL/API/data design decisions back to plan before execute.', 'blocker'));
|
|
88
|
+
}
|
|
89
|
+
if (closeEvidence && !/downstream_execution_guesswork_remaining\s*:\s*\[\s*\]/i.test(closeEvidence)) {
|
|
90
|
+
issues.push(issue('tasks', 'tasks.plan_repair.design_guesswork_leaked_to_execute', 'tasks leave execution guesswork unresolved', 'Resolve execution guesswork in tasks or route it to tasks/plan/spec repair before close.', 'blocker'));
|
|
91
|
+
}
|
|
92
|
+
return issues;
|
|
93
|
+
}
|
|
94
|
+
export function formatArtifactDepthIssues(issues) {
|
|
95
|
+
return issues.map((item) => `${item.severity}:${item.code}: ${item.message}. ${item.repair}`);
|
|
96
|
+
}
|
|
97
|
+
export function formatArtifactDepthBlockingIssues(issues) {
|
|
98
|
+
return formatArtifactDepthIssues(issues.filter((item) => item.severity === 'blocker'));
|
|
99
|
+
}
|
|
100
|
+
function issue(stage, code, message, repair, severity = 'warning') {
|
|
101
|
+
return { stage, severity, code, message, repair };
|
|
102
|
+
}
|
|
103
|
+
function hasConcreteImplementationSurface(section) {
|
|
104
|
+
if (/scout gap|needs scout|unresolved gap|not applicable|no existing surface/i.test(section)) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
const namedSurfaces = section.match(/\b[A-Z][A-Za-z0-9_]*(?:Controller|Service|ServiceImpl|Mapper|Repository|Entity|DTO|VO|Request|Response|Component|Page|Config|Test)\b/g) ?? [];
|
|
108
|
+
const fileRefs = section.match(/`[^`]+\.(?:ts|tsx|js|jsx|java|kt|go|py|rs|xml|sql|jsp|vue|md)`/g) ?? [];
|
|
109
|
+
return namedSurfaces.length + fileRefs.length >= 2 && /reuse|change|do-not-reuse|do not reuse|owner|ownership|convention|boundary|surface|implication|decision|because|therefore/i.test(section);
|
|
110
|
+
}
|
|
111
|
+
function hasApiShape(section) {
|
|
112
|
+
if (/not applicable|no interface|no api|no schema/i.test(section) && /because|checked|reason/i.test(section)) {
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
if (/TypeScript function contract|runtime-store projection schema|projection schema|function contract/i.test(section) && /field|schema|ref|hash|status|owner/i.test(section)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
return /\b(query|request|response|DTO|VO|endpoint|controller|service|mapper|分页|权限|错误|响应包装)\b/i.test(section)
|
|
119
|
+
&& /\b(field|default|required|optional|error|pagination|shape|字段|参数|返回|错误|分页)\b/i.test(section)
|
|
120
|
+
&& (section.match(/`[^`]+`/g) ?? []).length >= 4;
|
|
121
|
+
}
|
|
122
|
+
function hasSqlOrDataMappingDepth(interfaceDesign, stateDesign) {
|
|
123
|
+
const combined = `${interfaceDesign}\n${stateDesign}`;
|
|
124
|
+
if (/not applicable|no sql|no database|no data mapping/i.test(combined) && /because|checked|reason/i.test(combined)) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
if (/runtime-store projection schema|projection state|projection persistence|runtime projection/i.test(combined) && /ref|hash|scopeKey|projectionType|status|rollback/i.test(combined)) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
const requiresSqlDepth = /\b(SQL|MyBatis|mapper XML|database|table|column|join|aggregate|distinct|source field|表|字段|聚合|分组|去重)\b/i.test(combined);
|
|
131
|
+
if (!requiresSqlDepth) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
return /\b(join key|join keys|foreign key|primary key|source field|mapper owner|grouping|distinct|pagination|filter|status filter|date range|关联键|主键|外键|来源字段|分组|去重|分页|过滤)\b/i.test(combined)
|
|
135
|
+
&& (combined.match(/`[^`]+`/g) ?? []).length >= 5;
|
|
136
|
+
}
|
|
137
|
+
function hasScenarioValidationMatrix(validationStrategy, riskControls) {
|
|
138
|
+
const combined = `${validationStrategy}\n${riskControls}`;
|
|
139
|
+
const hasScenario = /scenario|input data|user action|expected|proves|does not prove|场景|输入|预期|证明/i.test(combined);
|
|
140
|
+
const hasEvidence = /command|evidence|manual|test|api|ui|sql|hook|artifact|证据|检查/i.test(combined);
|
|
141
|
+
const hasRiskLink = /risk|impact|control|validation hook|task-stage constraint|风险|影响|控制/i.test(combined);
|
|
142
|
+
return hasScenario && hasEvidence && hasRiskLink;
|
|
143
|
+
}
|
|
144
|
+
function looksDenseButShallow(...sections) {
|
|
145
|
+
const text = sections.join('\n');
|
|
146
|
+
const lineCount = text.split(/\r?\n/).filter((line) => line.trim().length > 0).length;
|
|
147
|
+
const factCount = (text.match(/`[^`]+`|\b[A-Z][A-Za-z0-9_]*(?:Controller|Service|Mapper|Entity|DTO|VO|Request|Response)\b/g) ?? []).length;
|
|
148
|
+
const reasoningCount = (text.match(/because|therefore|implies|decision|tradeoff|risk control|validation hook|why|so that|因此|所以|取舍|决策|风险控制/g) ?? []).length;
|
|
149
|
+
return lineCount >= 12 && factCount >= 8 && reasoningCount < 3;
|
|
150
|
+
}
|
|
151
|
+
function leaksDesignDecisionToImplementation(...sections) {
|
|
152
|
+
return /implementation will determine|finali[sz](?:e|ed) during implementation|decide in implementation|implementation phase will decide|execute (?:will|should|must) decide|decide in execute|tbd in execute|待实现时确定|执行时确定/i.test(sections.join('\n'));
|
|
153
|
+
}
|
|
154
|
+
function isOversizedExecutionSlice(section) {
|
|
155
|
+
const codeBlocks = (section.match(/```sdd-task/g) ?? []).length;
|
|
156
|
+
const touchedAreas = (section.match(/affectedAreas\s*:|affected_files\s*:|Allowed code changes|Allowed files|Controller|Service|Mapper|DTO|VO|XML|SQL|UI|JSP|Vue|React/gi) ?? []).length;
|
|
157
|
+
return codeBlocks <= 2 && touchedAreas >= 8;
|
|
158
|
+
}
|
|
159
|
+
function hasExecutionSliceDecision(section) {
|
|
160
|
+
return /execution slice|split rationale|split chain|split from|work-unit boundary|keep together|single rollback unit|sequence|internal order|ordered steps|step order|rollback unit|rollback boundary|tasks-manager|task manager|reviewed split|split decision|裁决|不拆分|保留|内部顺序|执行顺序|回滚单元/i.test(section);
|
|
161
|
+
}
|
|
162
|
+
function extractMarkdownSection(content, section) {
|
|
163
|
+
for (const sectionName of Array.isArray(section) ? section : [section]) {
|
|
164
|
+
const escaped = escapeRegex(sectionName).replace(/\s+/g, '\\s+');
|
|
165
|
+
const match = new RegExp(`^##\\s+(?:\\d+(?:\\.\\d+)*\\.?\\s+)?${escaped}\\s*$`, 'im').exec(content);
|
|
166
|
+
if (!match) {
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const start = match.index + match[0].length;
|
|
170
|
+
const rest = content.slice(start);
|
|
171
|
+
const next = /^##\s+/im.exec(rest);
|
|
172
|
+
return (next ? rest.slice(0, next.index) : rest).trim();
|
|
173
|
+
}
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
function escapeRegex(value) {
|
|
177
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=artifact-depth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-depth.js","sourceRoot":"","sources":["../../src/sdd-docs/artifact-depth.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,yBAAyB,CAAC,OAAe;IACvD,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,EAAE,sCAAsC,CAAC,IAAI,EAAE,CAAC;IAC9F,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,EAAE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,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export type SddTaskStatus = 'pending' | 'in_progress' | 'completed' | 'blocked' | 'deferred' | 'unknown';
|
|
2
|
-
export type SddChangeSurface = 'frontend_only' | 'backend_only' | 'full_stack' | 'docs_only' | 'config_only' | 'unknown';
|
|
2
|
+
export type SddChangeSurface = 'frontend_only' | 'backend_only' | 'full_stack' | 'docs_only' | 'config_only' | 'cli_only' | 'unknown';
|
|
3
3
|
export type SddValidationTiming = 'task_end' | 'batch_end' | 'wave_end';
|
|
4
4
|
export type SddGapSeverity = 'blocking' | 'warning';
|
|
5
5
|
export type SddGapType = 'Document Gap' | 'Task Gap' | 'Dependency Gap';
|
|
6
|
+
export type SddTaskClass = 'implementation' | 'validation';
|
|
6
7
|
export interface SddTaskSourceLocation {
|
|
7
8
|
filePath: string;
|
|
8
9
|
heading: string | null;
|
|
@@ -19,12 +20,15 @@ export interface SddTask {
|
|
|
19
20
|
title: string | null;
|
|
20
21
|
status: SddTaskStatus;
|
|
21
22
|
wave: number | null;
|
|
23
|
+
taskClass: SddTaskClass | null;
|
|
24
|
+
unitType: string | null;
|
|
22
25
|
implementationWave: string | null;
|
|
23
26
|
validationBatch: string | null;
|
|
24
27
|
validationTiming: SddValidationTiming;
|
|
25
28
|
requiresVerifyBeforeNext: boolean;
|
|
26
29
|
changeSurface: SddChangeSurface;
|
|
27
30
|
dependsOn: string[];
|
|
31
|
+
validationHandoff: string[];
|
|
28
32
|
affectedFiles: string[];
|
|
29
33
|
validation: string[];
|
|
30
34
|
validationCommands: SddValidationCommand[];
|