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.
Files changed (698) hide show
  1. package/README.md +24 -28
  2. package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +84 -103
  3. package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
  4. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +10 -6
  5. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +7 -8
  6. package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
  7. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
  8. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
  9. package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
  10. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +0 -1
  11. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +374 -421
  12. package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
  13. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
  14. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +7 -19
  15. package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
  16. package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +7 -1
  17. package/node_modules/@sdd-agent-platform/core/dist/contracts.js +6 -0
  18. package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
  19. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +2 -12
  20. package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
  21. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +1 -18
  22. package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
  23. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +1 -1
  24. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +1 -1
  25. package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
  26. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -1
  27. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js +110 -0
  28. package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js.map +1 -0
  29. package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +83 -83
  30. package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
  31. package/node_modules/@sdd-agent-platform/core/dist/instructions.js +37 -80
  32. package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
  33. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +58 -68
  34. package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
  35. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.d.ts +159 -0
  36. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js +7 -0
  37. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js.map +1 -0
  38. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.d.ts +16 -0
  39. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js +461 -0
  40. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js.map +1 -0
  41. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.d.ts +2 -0
  42. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js +3 -0
  43. package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js.map +1 -0
  44. package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
  45. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +21 -28
  46. package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
  47. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +124 -40
  48. package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
  49. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
  50. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +6 -13
  51. package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
  52. package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.d.ts +13 -0
  53. package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js +76 -0
  54. package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js.map +1 -0
  55. package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +7 -7
  56. package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -1
  57. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +6 -6
  58. package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
  59. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +1 -1
  60. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +18 -18
  61. package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
  62. package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +2 -1
  63. package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js.map +1 -1
  64. package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
  65. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +7 -7
  66. package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
  67. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +12 -27
  68. package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
  69. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +6 -6
  70. package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
  71. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +1 -1
  72. package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
  73. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +2 -4
  74. package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
  75. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
  76. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +383 -0
  77. package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
  78. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
  79. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +227 -0
  80. package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
  81. package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +1 -0
  82. package/node_modules/@sdd-agent-platform/core/dist/router.js +1 -0
  83. package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
  84. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
  85. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +6 -0
  86. package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
  87. package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +20 -0
  88. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +7 -7
  89. package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
  90. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +1 -2
  91. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +2 -9
  92. package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
  93. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
  94. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
  95. package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
  96. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +1 -4
  97. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
  98. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +0 -39
  99. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
  100. package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
  101. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
  102. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
  103. package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
  104. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
  105. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +211 -0
  106. package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
  107. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
  108. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js +179 -0
  109. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js.map +1 -0
  110. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +5 -1
  111. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +60 -22
  112. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
  113. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +2 -2
  114. package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -1
  115. package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js +40 -0
  116. package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js.map +1 -0
  117. package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.d.ts +12 -0
  118. package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js +2 -0
  119. package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js.map +1 -0
  120. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
  121. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +315 -0
  122. package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
  123. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
  124. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +238 -0
  125. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
  126. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +736 -0
  127. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +4018 -0
  128. package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
  129. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
  130. package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
  131. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +25 -1
  132. package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
  133. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +170 -18
  134. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +597 -85
  135. package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
  136. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +1 -17
  137. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +1 -242
  138. package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -1
  139. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +1 -110
  140. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +1 -496
  141. package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -1
  142. package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +1 -2
  143. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +1 -2
  144. package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -1
  145. package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.d.ts +167 -0
  146. package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js +377 -0
  147. package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js.map +1 -0
  148. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +329 -314
  149. package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
  150. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -0
  151. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +31 -0
  152. package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
  153. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
  154. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +135 -0
  155. package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
  156. package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
  157. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -49
  158. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +1 -545
  159. package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
  160. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +5 -7
  161. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +15 -55
  162. package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
  163. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +1 -40
  164. package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
  165. package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.d.ts +49 -0
  166. package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js +521 -0
  167. package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js.map +1 -0
  168. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +12 -2
  169. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +247 -112
  170. package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
  171. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
  172. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
  173. package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
  174. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +1 -1
  175. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +49 -72
  176. package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
  177. package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +3 -3
  178. package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -2
  179. package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
  180. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +2 -7
  181. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
  182. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +0 -7
  183. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
  184. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +2 -4
  185. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
  186. package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +3 -5
  187. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +30 -4
  188. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
  189. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
  190. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
  191. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
  192. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
  193. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
  194. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
  195. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
  196. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
  197. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
  198. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +55 -5
  199. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +518 -36
  200. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
  201. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
  202. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
  203. package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
  204. package/node_modules/@sdd-agent-platform/core/package.json +6 -3
  205. package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +238 -137
  206. package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +84 -103
  207. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -189
  208. package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -222
  209. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -28
  210. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +302 -302
  211. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +181 -181
  212. package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -231
  213. package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -99
  214. package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -4
  215. package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -79
  216. package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -1
  217. package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +314 -306
  218. package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +128 -120
  219. package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +265 -259
  220. package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -147
  221. package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +400 -445
  222. package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -30
  223. package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +305 -317
  224. package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -45
  225. package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -188
  226. package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -144
  227. package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -48
  228. package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -41
  229. package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -47
  230. package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -71
  231. package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -178
  232. package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -2
  233. package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -6
  234. package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -13
  235. package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -9
  236. package/node_modules/@sdd-agent-platform/core/src/contracts.ts +121 -115
  237. package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -183
  238. package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -23
  239. package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -58
  240. package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -14
  241. package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -90
  242. package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -124
  243. package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -26
  244. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -28
  245. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +104 -112
  246. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +27 -27
  247. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -84
  248. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -252
  249. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -330
  250. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -79
  251. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -128
  252. package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -300
  253. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +627 -657
  254. package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -318
  255. package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -13
  256. package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -11
  257. package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -2
  258. package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -80
  259. package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +48 -49
  260. package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -1
  261. package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +195 -195
  262. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +187 -187
  263. package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -305
  264. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -97
  265. package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -453
  266. package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -225
  267. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -132
  268. package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -436
  269. package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -102
  270. package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -271
  271. package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +111 -111
  272. package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -231
  273. package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -5
  274. package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +57 -57
  275. package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -175
  276. package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -1
  277. package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +80 -49
  278. package/node_modules/@sdd-agent-platform/core/src/instructions.ts +38 -81
  279. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -174
  280. package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -373
  281. package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -29
  282. package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -146
  283. package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
  284. package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +255 -263
  285. package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/contracts.ts +179 -0
  286. package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/kernel.ts +522 -0
  287. package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph.ts +2 -0
  288. package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -4
  289. package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -50
  290. package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -2
  291. package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +331 -342
  292. package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -22
  293. package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +243 -243
  294. package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +152 -153
  295. package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +277 -277
  296. package/node_modules/@sdd-agent-platform/core/src/phase9-lifecycle-graph.test.ts +103 -0
  297. package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +88 -88
  298. package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -222
  299. package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +79 -79
  300. package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -160
  301. package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -2
  302. package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +426 -426
  303. package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +230 -146
  304. package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +142 -142
  305. package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +253 -253
  306. package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +302 -309
  307. package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -246
  308. package/node_modules/@sdd-agent-platform/core/src/registries/plan-scout-domains.ts +89 -0
  309. package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -119
  310. package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +454 -429
  311. package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -37
  312. package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -135
  313. package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -132
  314. package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -144
  315. package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -111
  316. package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -42
  317. package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +98 -97
  318. package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -63
  319. package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -233
  320. package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +251 -266
  321. package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -203
  322. package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -5
  323. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +327 -327
  324. package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +388 -388
  325. package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -154
  326. package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -33
  327. package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -100
  328. package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +356 -356
  329. package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +428 -428
  330. package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +2 -2
  331. package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -73
  332. package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +189 -191
  333. package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +464 -0
  334. package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +124 -124
  335. package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -123
  336. package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +277 -277
  337. package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +273 -0
  338. package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -170
  339. package/node_modules/@sdd-agent-platform/core/src/router.ts +5 -4
  340. package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +126 -118
  341. package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -27
  342. package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +172 -172
  343. package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -109
  344. package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +252 -230
  345. package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +52 -52
  346. package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +356 -356
  347. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -70
  348. package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -406
  349. package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +198 -206
  350. package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
  351. package/node_modules/@sdd-agent-platform/core/src/run-state.ts +8 -8
  352. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +60 -63
  353. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +257 -296
  354. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +140 -152
  355. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +66 -68
  356. package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +2 -2
  357. package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +253 -176
  358. package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +101 -0
  359. package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +314 -0
  360. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.test.ts +380 -0
  361. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.ts +207 -0
  362. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -111
  363. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -207
  364. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -95
  365. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -39
  366. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +467 -401
  367. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +738 -694
  368. package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -81
  369. package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -5
  370. package/node_modules/@sdd-agent-platform/core/src/spec-manager-contracts.ts +13 -0
  371. package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +435 -0
  372. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +316 -0
  373. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2964 -0
  374. package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5856 -0
  375. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -40
  376. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -209
  377. package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +360 -352
  378. package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -2
  379. package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -288
  380. package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +651 -625
  381. package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -2
  382. package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -10
  383. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +489 -489
  384. package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1981 -1175
  385. package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -45
  386. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -232
  387. package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -307
  388. package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -2
  389. package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.test.ts +141 -0
  390. package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.ts +566 -0
  391. package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -193
  392. package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +413 -398
  393. package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +102 -70
  394. package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -2
  395. package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
  396. package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +174 -0
  397. package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +137 -181
  398. package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -77
  399. package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -77
  400. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +455 -494
  401. package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.test.ts → task-evidence-judgment.test.ts} +261 -335
  402. package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.ts → task-evidence-judgment.ts} +619 -648
  403. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1190 -1032
  404. package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
  405. package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -513
  406. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +334 -358
  407. package/node_modules/@sdd-agent-platform/core/src/verification.ts +8 -8
  408. package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -26
  409. package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -88
  410. package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -112
  411. package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -2
  412. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +190 -196
  413. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +169 -171
  414. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +136 -143
  415. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +135 -137
  416. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +153 -155
  417. package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +111 -114
  418. package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +95 -95
  419. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -32
  420. package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +114 -114
  421. package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +184 -156
  422. package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
  423. package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
  424. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
  425. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +970 -464
  426. package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +967 -363
  427. package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
  428. package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +2 -2
  429. package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -130
  430. package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -269
  431. package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -150
  432. package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -2
  433. package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -15
  434. package/package.json +2 -2
  435. package/packages/cli/dist/args.js +1 -1
  436. package/packages/cli/dist/args.js.map +1 -1
  437. package/packages/cli/dist/commands/context.js +1 -1
  438. package/packages/cli/dist/commands/context.js.map +1 -1
  439. package/packages/cli/dist/commands/evidence.js.map +1 -0
  440. package/packages/cli/dist/commands/execution.js +126 -0
  441. package/packages/cli/dist/commands/execution.js.map +1 -1
  442. package/packages/cli/dist/commands/instructions.d.ts +1 -1
  443. package/packages/cli/dist/commands/instructions.js +15 -1
  444. package/packages/cli/dist/commands/instructions.js.map +1 -1
  445. package/packages/cli/dist/commands/registry/runtime.js +70 -1
  446. package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
  447. package/packages/cli/dist/commands/run.js +12 -1
  448. package/packages/cli/dist/commands/run.js.map +1 -1
  449. package/packages/cli/dist/commands/stage-close.d.ts +66 -0
  450. package/packages/cli/dist/commands/stage-close.js +524 -0
  451. package/packages/cli/dist/commands/stage-close.js.map +1 -0
  452. package/packages/cli/dist/commands/status.js +8 -1
  453. package/packages/cli/dist/commands/status.js.map +1 -1
  454. package/packages/cli/dist/commands/tasks.js.map +1 -1
  455. package/packages/cli/dist/dispatch.js +6 -31
  456. package/packages/cli/dist/dispatch.js.map +1 -1
  457. package/packages/cli/dist/help.js +153 -158
  458. package/packages/cli/dist/help.js.map +1 -1
  459. package/packages/cli/dist/renderers/workflow.d.ts +51 -2
  460. package/packages/cli/dist/renderers/workflow.js.map +1 -1
  461. package/packages/cli/dist/skill-import-args.d.ts +10 -0
  462. package/packages/cli/dist/skill-import-args.js +47 -0
  463. package/packages/cli/dist/skill-import-args.js.map +1 -0
  464. package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
  465. package/packages/cli/package.json +2 -2
  466. package/packages/core/dist/ai-tools.js +84 -103
  467. package/packages/core/dist/ai-tools.js.map +1 -1
  468. package/packages/core/dist/config/init-project.d.ts +10 -6
  469. package/packages/core/dist/config/init-project.js +7 -8
  470. package/packages/core/dist/config/init-project.js.map +1 -1
  471. package/packages/core/dist/config/project-config.d.ts +3 -1
  472. package/packages/core/dist/config/project-config.js +7 -3
  473. package/packages/core/dist/config/project-config.js.map +1 -1
  474. package/packages/core/dist/config/starter-documents.d.ts +0 -1
  475. package/packages/core/dist/config/starter-documents.js +374 -421
  476. package/packages/core/dist/config/starter-documents.js.map +1 -1
  477. package/packages/core/dist/context/build-package.d.ts +1 -1
  478. package/packages/core/dist/context/build-package.js +7 -19
  479. package/packages/core/dist/context/build-package.js.map +1 -1
  480. package/packages/core/dist/contracts.d.ts +7 -1
  481. package/packages/core/dist/contracts.js +6 -0
  482. package/packages/core/dist/contracts.js.map +1 -1
  483. package/packages/core/dist/doctor/checks/document-chain.js +2 -12
  484. package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
  485. package/packages/core/dist/doctor/doctor.js +1 -18
  486. package/packages/core/dist/doctor/doctor.js.map +1 -1
  487. package/packages/core/dist/evidence/lookup.d.ts +1 -1
  488. package/packages/core/dist/evidence/lookup.js +1 -1
  489. package/packages/core/dist/evidence/lookup.js.map +1 -1
  490. package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -1
  491. package/packages/core/dist/evidence-runtime/coordination.js +110 -0
  492. package/packages/core/dist/evidence-runtime/coordination.js.map +1 -0
  493. package/packages/core/dist/execution/host-invocation.js +83 -83
  494. package/packages/core/dist/instructions.d.ts +1 -1
  495. package/packages/core/dist/instructions.js +37 -80
  496. package/packages/core/dist/instructions.js.map +1 -1
  497. package/packages/core/dist/lifecycle/ship.js +58 -68
  498. package/packages/core/dist/lifecycle/ship.js.map +1 -1
  499. package/packages/core/dist/lifecycle-graph/contracts.d.ts +159 -0
  500. package/packages/core/dist/lifecycle-graph/contracts.js +7 -0
  501. package/packages/core/dist/lifecycle-graph/contracts.js.map +1 -0
  502. package/packages/core/dist/lifecycle-graph/kernel.d.ts +16 -0
  503. package/packages/core/dist/lifecycle-graph/kernel.js +461 -0
  504. package/packages/core/dist/lifecycle-graph/kernel.js.map +1 -0
  505. package/packages/core/dist/lifecycle-graph.d.ts +2 -0
  506. package/packages/core/dist/lifecycle-graph.js +3 -0
  507. package/packages/core/dist/lifecycle-graph.js.map +1 -0
  508. package/packages/core/dist/orchestration/contracts.d.ts +1 -1
  509. package/packages/core/dist/orchestration/runtime.js +21 -28
  510. package/packages/core/dist/orchestration/runtime.js.map +1 -1
  511. package/packages/core/dist/registries/agent-registry.js +124 -40
  512. package/packages/core/dist/registries/agent-registry.js.map +1 -1
  513. package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
  514. package/packages/core/dist/registries/command-team-runtime.js +6 -13
  515. package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
  516. package/packages/core/dist/registries/plan-scout-domains.d.ts +13 -0
  517. package/packages/core/dist/registries/plan-scout-domains.js +76 -0
  518. package/packages/core/dist/registries/plan-scout-domains.js.map +1 -0
  519. package/packages/core/dist/registries/skill-capabilities.js +7 -7
  520. package/packages/core/dist/registries/skill-capabilities.js.map +1 -1
  521. package/packages/core/dist/registries/tool-capabilities.js +6 -6
  522. package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
  523. package/packages/core/dist/registries/workflow-gates.d.ts +1 -1
  524. package/packages/core/dist/registries/workflow-gates.js +18 -18
  525. package/packages/core/dist/registries/workflow-gates.js.map +1 -1
  526. package/packages/core/dist/risk/consumer-diagnostics.js +2 -1
  527. package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -1
  528. package/packages/core/dist/risk/contracts.d.ts +2 -2
  529. package/packages/core/dist/risk/kernel.js +7 -7
  530. package/packages/core/dist/risk/kernel.js.map +1 -1
  531. package/packages/core/dist/risk/legacy-adapters.js +12 -27
  532. package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
  533. package/packages/core/dist/risk/workflow-gates.js +6 -6
  534. package/packages/core/dist/risk/workflow-gates.js.map +1 -1
  535. package/packages/core/dist/router/agent-runtime-config.js +1 -1
  536. package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
  537. package/packages/core/dist/router/routing.js +2 -4
  538. package/packages/core/dist/router/routing.js.map +1 -1
  539. package/packages/core/dist/router/runtime-import.d.ts +28 -0
  540. package/packages/core/dist/router/runtime-import.js +383 -0
  541. package/packages/core/dist/router/runtime-import.js.map +1 -0
  542. package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
  543. package/packages/core/dist/router/stage-route-binding.js +227 -0
  544. package/packages/core/dist/router/stage-route-binding.js.map +1 -0
  545. package/packages/core/dist/router.d.ts +1 -0
  546. package/packages/core/dist/router.js +1 -0
  547. package/packages/core/dist/router.js.map +1 -1
  548. package/packages/core/dist/run-state/artifacts.d.ts +16 -0
  549. package/packages/core/dist/run-state/artifacts.js +6 -0
  550. package/packages/core/dist/run-state/artifacts.js.map +1 -1
  551. package/packages/core/dist/run-state/model.d.ts +20 -0
  552. package/packages/core/dist/run-state/run-state.js +7 -7
  553. package/packages/core/dist/run-state/run-state.js.map +1 -1
  554. package/packages/core/dist/run-state/task-evidence.d.ts +1 -2
  555. package/packages/core/dist/run-state/task-evidence.js +2 -9
  556. package/packages/core/dist/run-state/task-evidence.js.map +1 -1
  557. package/packages/core/dist/run-state/timing.d.ts +8 -0
  558. package/packages/core/dist/run-state/timing.js +131 -0
  559. package/packages/core/dist/run-state/timing.js.map +1 -0
  560. package/packages/core/dist/runtime-analysis/build.js +1 -4
  561. package/packages/core/dist/runtime-analysis/build.js.map +1 -1
  562. package/packages/core/dist/runtime-analysis/findings.js +0 -39
  563. package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
  564. package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
  565. package/packages/core/dist/runtime-paths.d.ts +10 -0
  566. package/packages/core/dist/runtime-paths.js +65 -0
  567. package/packages/core/dist/runtime-paths.js.map +1 -1
  568. package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
  569. package/packages/core/dist/runtime-projection-p0.js +211 -0
  570. package/packages/core/dist/runtime-projection-p0.js.map +1 -0
  571. package/packages/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
  572. package/packages/core/dist/sdd-docs/artifact-depth.js +179 -0
  573. package/packages/core/dist/sdd-docs/artifact-depth.js.map +1 -0
  574. package/packages/core/dist/sdd-docs/task-parser.d.ts +5 -1
  575. package/packages/core/dist/sdd-docs/task-parser.js +60 -22
  576. package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
  577. package/packages/core/dist/sdd-docs/task-rendering.js +2 -2
  578. package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -1
  579. package/packages/core/dist/spec-entry.js +40 -0
  580. package/packages/core/dist/spec-entry.js.map +1 -0
  581. package/packages/core/dist/spec-manager-contracts.d.ts +12 -0
  582. package/packages/core/dist/spec-manager-contracts.js +2 -0
  583. package/packages/core/dist/spec-manager-contracts.js.map +1 -0
  584. package/packages/core/dist/stage-artifacts.d.ts +55 -0
  585. package/packages/core/dist/stage-artifacts.js +315 -0
  586. package/packages/core/dist/stage-artifacts.js.map +1 -0
  587. package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
  588. package/packages/core/dist/stage-collaboration-contracts.js +238 -0
  589. package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
  590. package/packages/core/dist/stage-collaboration.d.ts +736 -0
  591. package/packages/core/dist/stage-collaboration.js +4018 -0
  592. package/packages/core/dist/stage-collaboration.js.map +1 -0
  593. package/packages/core/dist/stage-runtime/runtime.js +8 -1
  594. package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
  595. package/packages/core/dist/status/project-status.js +25 -1
  596. package/packages/core/dist/status/project-status.js.map +1 -1
  597. package/packages/core/dist/storage/runtime-store.d.ts +170 -18
  598. package/packages/core/dist/storage/runtime-store.js +597 -85
  599. package/packages/core/dist/storage/runtime-store.js.map +1 -1
  600. package/packages/core/dist/sync-back/apply.d.ts +1 -17
  601. package/packages/core/dist/sync-back/apply.js +1 -242
  602. package/packages/core/dist/sync-back/apply.js.map +1 -1
  603. package/packages/core/dist/sync-back/inspect.d.ts +1 -110
  604. package/packages/core/dist/sync-back/inspect.js +1 -496
  605. package/packages/core/dist/sync-back/inspect.js.map +1 -1
  606. package/packages/core/dist/sync-back.d.ts +1 -2
  607. package/packages/core/dist/sync-back.js +1 -2
  608. package/packages/core/dist/sync-back.js.map +1 -1
  609. package/packages/core/dist/task-execution-contract.d.ts +167 -0
  610. package/packages/core/dist/task-execution-contract.js +377 -0
  611. package/packages/core/dist/task-execution-contract.js.map +1 -0
  612. package/packages/core/dist/test-support/fixtures.js +329 -314
  613. package/packages/core/dist/test-support/fixtures.js.map +1 -1
  614. package/packages/core/dist/test-support/run-state.d.ts +1 -0
  615. package/packages/core/dist/test-support/run-state.js +31 -0
  616. package/packages/core/dist/test-support/run-state.js.map +1 -1
  617. package/packages/core/dist/truth-reconciliation.d.ts +44 -0
  618. package/packages/core/dist/truth-reconciliation.js +135 -0
  619. package/packages/core/dist/truth-reconciliation.js.map +1 -0
  620. package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
  621. package/packages/core/dist/verification/goal-verify.d.ts +0 -49
  622. package/packages/core/dist/verification/goal-verify.js +1 -545
  623. package/packages/core/dist/verification/goal-verify.js.map +1 -1
  624. package/packages/core/dist/verification/rendering.d.ts +5 -7
  625. package/packages/core/dist/verification/rendering.js +15 -55
  626. package/packages/core/dist/verification/rendering.js.map +1 -1
  627. package/packages/core/dist/verification/single-task-loop.js +1 -40
  628. package/packages/core/dist/verification/single-task-loop.js.map +1 -1
  629. package/packages/core/dist/verification/task-evidence-judgment.d.ts +49 -0
  630. package/packages/core/dist/verification/task-evidence-judgment.js +521 -0
  631. package/packages/core/dist/verification/task-evidence-judgment.js.map +1 -0
  632. package/packages/core/dist/verification/test-runtime.d.ts +12 -2
  633. package/packages/core/dist/verification/test-runtime.js +247 -112
  634. package/packages/core/dist/verification/test-runtime.js.map +1 -1
  635. package/packages/core/dist/verification/validation-cache.d.ts +26 -0
  636. package/packages/core/dist/verification/validation-cache.js +73 -0
  637. package/packages/core/dist/verification/validation-cache.js.map +1 -0
  638. package/packages/core/dist/verification/verify-contract.d.ts +1 -1
  639. package/packages/core/dist/verification/verify-contract.js +49 -72
  640. package/packages/core/dist/verification/verify-contract.js.map +1 -1
  641. package/packages/core/dist/verification.d.ts +3 -3
  642. package/packages/core/dist/verification.js +2 -2
  643. package/packages/core/dist/verification.js.map +1 -1
  644. package/packages/core/dist/workflow-gate/evidence-packet.js +2 -7
  645. package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
  646. package/packages/core/dist/workflow-gate/hard-checks.js +0 -7
  647. package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
  648. package/packages/core/dist/workflow-gate/policy.js +2 -4
  649. package/packages/core/dist/workflow-gate/policy.js.map +1 -1
  650. package/packages/core/dist/workflow-gate/types.d.ts +3 -5
  651. package/packages/core/dist/workflow-state/latest-eligible-run.js +30 -4
  652. package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
  653. package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
  654. package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
  655. package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
  656. package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
  657. package/packages/core/dist/workflow-state/repair-contract.js +63 -0
  658. package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
  659. package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
  660. package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
  661. package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
  662. package/packages/core/dist/workflow-state/resolve.d.ts +55 -5
  663. package/packages/core/dist/workflow-state/resolve.js +518 -36
  664. package/packages/core/dist/workflow-state/resolve.js.map +1 -1
  665. package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
  666. package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
  667. package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
  668. package/packages/core/package.json +6 -3
  669. package/tsconfig.build.json +6 -7
  670. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
  671. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
  672. package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
  673. package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -270
  674. package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
  675. package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
  676. package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
  677. package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +0 -255
  678. package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +0 -439
  679. package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +0 -341
  680. package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +0 -204
  681. package/packages/cli/dist/commands/lifecycle.d.ts +0 -6
  682. package/packages/cli/dist/commands/lifecycle.js +0 -112
  683. package/packages/cli/dist/commands/lifecycle.js.map +0 -1
  684. package/packages/cli/dist/commands/sync-back.d.ts +0 -6
  685. package/packages/cli/dist/commands/sync-back.js +0 -82
  686. package/packages/cli/dist/commands/sync-back.js.map +0 -1
  687. package/packages/cli/dist/commands/test.d.ts +0 -6
  688. package/packages/cli/dist/commands/test.js +0 -195
  689. package/packages/cli/dist/commands/test.js.map +0 -1
  690. package/packages/cli/dist/commands/verifies.d.ts +0 -6
  691. package/packages/cli/dist/commands/verifies.js +0 -85
  692. package/packages/cli/dist/commands/verifies.js.map +0 -1
  693. package/packages/cli/dist/commands/verify.d.ts +0 -6
  694. package/packages/cli/dist/commands/verify.js +0 -134
  695. package/packages/cli/dist/commands/verify.js.map +0 -1
  696. package/packages/core/dist/doctor/render.d.ts +0 -2
  697. package/packages/core/dist/doctor/render.js +0 -44
  698. package/packages/core/dist/doctor/render.js.map +0 -1
@@ -1,441 +1,394 @@
1
- import { hashDocumentContent, hashTasksContract } from '../sdd-docs/document-hashes.js';
2
1
  function usesChineseInitDocs(value) {
3
2
  return value === 'zh-CN';
4
3
  }
5
4
  export function renderInitSpecDocument(branch, timestamp, docsLanguage) {
6
5
  const zh = usesChineseInitDocs(docsLanguage);
7
6
  const title = zh ? '# Spec: Project Onboarding / 项目入门' : '# Spec: Project Onboarding';
8
- const objectiveLines = zh ? `- User value: 仓库在第一个真实变更前已有可见的 SDD 入口。
9
- - Business value: 待补充;请替换为第一个真实功能或变更目标。
10
- - Engineering value: semantic documents、runtime config 与托管 AI entries 已安全初始化。
11
- - Observable success: \`sdd status --branch ${branch}\` 报告 spec、plan、tasks 均已存在。` : `- User value: the repository has a visible SDD entrypoint before the first real change.
12
- - Business value: pending; replace with the first real feature/change objective.
13
- - Engineering value: semantic documents, runtime config, and managed AI entries are initialized safely.
14
- - Observable success: \`sdd status --branch ${branch}\` reports spec, plan, and tasks as present.`;
15
- const problemIntent = zh
16
- ? '此项目已初始化 SDD。请在实现前用第一个真实功能或变更请求替换这份 onboarding spec。'
17
- : 'This project has been initialized for SDD. Replace this onboarding spec with the first real feature or change request before implementation.';
18
- const actorRow = zh
19
- ? '| repository maintainer | 安全的 SDD 起点 | 还没有写入项目专属的 SDD 请求 |'
20
- : '| repository maintainer | a safe SDD starting point | no project-specific SDD request has been written yet |';
21
- const story = zh
22
- ? 'As a repository maintainer, I want starter SDD documents, so that the first real change can be captured as requirements、design 与 executable tasks。'
23
- : 'As a repository maintainer, I want starter SDD documents, so that the first real change can be captured as requirements, design, and executable tasks.';
24
- return `---
25
- template: sdd-init-onboarding-spec-v1
26
- version: 1.4.0
27
- contract: sdd-spec-doc-v1
28
- sdd_managed_starter: true
29
- ---
30
-
31
- ${title}
32
-
33
- ## 0. Metadata
34
-
35
- - spec_id: \`onboarding\`
36
- - branch: \`${branch}\`
37
- - lifecycle_profile: \`direct\`
38
- - source_request: \`Created by sdd init\`
39
- - status: \`draft\`
40
- - created_at: \`${timestamp}\`
41
- - updated_at: \`${timestamp}\`
42
-
43
- ## 1. Objective / Customer Value
44
-
45
- ${objectiveLines}
46
-
47
- ## 2. Problem / Intent
48
-
49
- ${problemIntent}
50
-
51
- ## 3. Users / Actors
52
-
53
- | Actor | Need / Expectation | Current Pain |
54
- |---|---|---|
55
- ${actorRow}
56
-
57
- ## 4. User Stories / Scenarios
58
-
59
- ### Story US-1
60
-
61
- ${story}
62
-
63
- ### Scenario S1: initialized repository
64
-
65
- - Given: \`sdd init\` has run for branch \`${branch}\`.
66
- - When: the maintainer runs \`sdd status --branch ${branch}\`.
67
- - Then: the CLI reports starter spec, plan, and tasks documents as present.
68
-
69
- ## 5. Scope
70
-
71
- ### In Scope
72
-
73
- - Confirm the project is initialized.
74
- - Replace onboarding placeholders with a real spec, plan, and tasks when ready.
75
-
76
- ### Out of Scope
77
-
78
- - Running background agents.
79
- - Creating worktrees.
80
- - Applying sync-back without explicit user approval.
81
-
82
- ## 6. Requirements
83
-
84
- ### Functional Requirements
85
-
86
- | ID | Requirement | Priority | Source |
87
- |---|---|---|---|
88
- | FR-1 | \`sdd init\` creates the SDD runtime config and starter semantic documents. | Must | init |
89
- | FR-2 | \`sdd status --branch ${branch}\` can inspect the initialized branch without missing document gaps. | Must | status |
90
-
91
- ### Non-functional Requirements
92
-
93
- | ID | Requirement | Priority | Source |
94
- |---|---|---|---|
95
- | NFR-1 | Initialization must not overwrite user-authored SDD documents unless force is explicitly requested. | Must | safety |
96
-
97
- ## 7. Acceptance Criteria
98
-
99
- | ID | Acceptance | Verification Hint | Priority |
100
- |---|---|---|---|
101
- | AC-1 | \`sdd status --branch ${branch}\` reports all three semantic documents as present. | CLI status | Must |
102
- | AC-2 | Existing user-authored semantic documents are preserved by default. | init preserve behavior | Must |
103
-
104
- ## 8. Assumptions / Dependencies
105
-
106
- | Item | Description | Impact if Wrong |
107
- |---|---|---|
108
- | first real request pending | onboarding docs are placeholders | implementation must not start from this scaffold |
109
-
110
- ## 9. Risks / Hard Gates
111
-
112
- | Risk | Why it matters | Required Handling |
113
- |---|---|---|
114
- | scaffold mistaken for approved spec | could authorize vague implementation | replace with a real requirement contract before coding |
115
-
116
- ## 10. Open Questions
117
-
118
- | ID | Question | Owner | Required Before |
119
- |---|---|---|---|
120
- | Q-1 | What is the first real feature or change request? | user | plan |
121
-
122
- ## 11. Lifecycle Decision Reference
123
-
124
- - decision_artifact: \`pending\`
125
- - canonical_model: \`docs/architecture/lifecycle-decision-model.md\`
126
- - recommended_profile: \`direct\`
127
- - risk_signals: []
128
- - autonomy_ceiling: \`direct_execution_allowed\`
7
+ const reframing = zh
8
+ ? `Surface request: 初始化 SDD。\nReframed problem: 仓库需要一个安全可见的 SDD 入口,但这不是可执行产品需求。\nInferred intent: 在第一个真实变更前建立 spec/plan/tasks 的语义边界。\nObservable success: \`sdd status --branch ${branch}\` 能看到 starter documents,且后续实现不会把 onboarding scaffold 当作批准需求。`
9
+ : `Surface request: initialize SDD.\nReframed problem: the repository needs a safe visible SDD entrypoint, but this is not an executable product requirement.\nInferred intent: establish semantic boundaries for spec, plan, and tasks before the first real change.\nObservable success: \`sdd status --branch ${branch}\` can see starter documents, and later implementation does not treat this onboarding scaffold as approved requirements.`;
10
+ const unchanged = zh
11
+ ? '不会授权实现代码、迁移、测试执行、发布或长期 backlog;第一个真实请求必须替换本 starter spec。'
12
+ : 'This does not authorize implementation code, migrations, validation execution, release, or a long-lived backlog; the first real request must replace this starter spec.';
13
+ const openQuestion = zh
14
+ ? '第一个真实功能或变更请求是什么?'
15
+ : 'What is the first real feature or change request?';
16
+ return `---
17
+ template: sdd-init-onboarding-spec-v3
18
+ version: 3.0.0
19
+ contract: sdd-spec-doc-v3
20
+ sdd_managed_starter: true
21
+ ---
22
+
23
+ ${title}
24
+
25
+ ## 0. Metadata
26
+
27
+ - spec_id: \`onboarding\`
28
+ - branch: \`${branch}\`
29
+ - source_request: \`Created by sdd init\`
30
+ - status: \`draft\`
31
+ - created_at: \`${timestamp}\`
32
+ - updated_at: \`${timestamp}\`
33
+
34
+ ## 1. Problem Reframing / Intent Discovery
35
+
36
+ ${reframing}
37
+
38
+ ## 2. Change Delta
39
+
40
+ | Area | Before | After | Unchanged |
41
+ |---|---|---|---|
42
+ | SDD entry | no starter semantic documents | starter spec/plan/tasks/verify exist for \`${branch}\` | ${unchanged} |
43
+
44
+ ## 3. Users / Actors
45
+
46
+ | Actor | Need / Expectation | Current Pain |
47
+ |---|---|---|
48
+ | repository maintainer | ${zh ? '安全可见的 SDD 入口' : 'safe visible SDD entrypoint'} | ${zh ? '还没有项目专属 SDD 请求' : 'no project-specific SDD request has been written yet'} |
49
+
50
+ ## 4. Scope
51
+
52
+ ### In Scope
53
+
54
+ - Confirm the project is initialized with visible starter semantic documents.
55
+ - Replace onboarding placeholders with a real spec, plan, and tasks before implementation.
56
+
57
+ ### Out of Scope
58
+
59
+ - Implementation code, migrations, validation execution, release, commits, worktrees, or background agents.
60
+ - Long-term backlog management.
61
+
62
+ ## 5. Requirements
63
+
64
+ | ID | Requirement | Priority | Source |
65
+ |---|---|---|---|
66
+ | FR-1 | \`sdd init\` creates runtime config and starter semantic documents. | Must | init |
67
+ | FR-2 | \`sdd status --branch ${branch}\` can inspect the initialized branch without missing document gaps. | Must | status |
68
+
69
+ ## 6. Acceptance Criteria
70
+
71
+ | ID | Acceptance | Evidence Target | Priority |
72
+ |---|---|---|---|
73
+ | AC-1 | \`sdd status --branch ${branch}\` reports starter spec, plan, and tasks documents as present. | CLI status output | Must |
74
+ | AC-2 | Existing user-authored semantic documents are preserved unless force is explicitly requested. | init preserve behavior | Must |
75
+
76
+ ## 7. Non-goals / Invariants
77
+
78
+ - Do not treat onboarding as approval for product implementation.
79
+ - Do not infer a technical solution from this starter document.
80
+ - Keep runtime truth in runtime close/state; this Markdown remains a starter semantic artifact until replaced and accepted.
81
+
82
+ ## 8. Open Questions / Ambiguity Ledger
83
+
84
+ | ID | Type | Question / Assumption | Route |
85
+ |---|---|---|---|
86
+ | Q-1 | blocking user decision | ${openQuestion} | replace this spec before plan |
87
+ | A-1 | assumption | starter docs are placeholders only | keep explicit in plan/tasks |
88
+ | D-1 | deferred to plan/tasks | concrete implementation surfaces and validation coverage | plan/tasks after real spec |
89
+
90
+ ## 9. Close Quality Evidence
91
+
92
+ - problem_reframed: \`yes\`
93
+ - change_delta_defined: \`starter initialization only\`
94
+ - unchanged_behavior_defined: \`yes\`
95
+ - blocking_user_decisions_listed: \`yes\`
96
+ - ready_for_plan: \`false until replaced by a real request\`
129
97
  `;
130
98
  }
131
99
  export function renderInitPlanDocument(branch, timestamp, docsLanguage) {
132
100
  const zh = usesChineseInitDocs(docsLanguage);
133
101
  const title = zh ? '# Plan: Project Onboarding / 项目入门' : '# Plan: Project Onboarding';
134
- const background = zh
135
- ? '在实现开始前,请用第一个真实功能或变更请求的业务背景与技术背景替换这份 starter plan'
136
- : 'Replace this starter plan with the business and technical context for the first real feature or change request before implementation begins.';
137
- const goals = zh
138
- ? '- Goals: 写明本次变更必须交付的结果。\n- Non-goals: 写明防止范围蔓延的边界。'
139
- : '- Goals: replace with the outcomes this change must deliver.\n- Non-goals: replace with boundaries that prevent scope creep.';
140
- const currentState = zh
141
- ? '描述当前流程、代码区域、state/data/API 行为以及已知约束。'
142
- : 'Describe the current flow, code areas, state/data/API behavior, and known constraints.';
143
- const targetDesign = zh
144
- ? '描述已选择的技术方案,以及它为什么是从 spec 到 implementation 最安全的 task-ready 路径。'
145
- : 'Describe the selected technical solution and why it is the safest task-ready path from spec to implementation.';
146
- return `---
147
- template: sdd-init-onboarding-plan-v1
148
- version: 1.4.0
149
- contract: sdd-plan-doc-v1
150
- sdd_managed_starter: true
151
- ---
152
-
153
- ${title}
154
-
155
- ## Metadata
156
-
157
- - spec_id: \`onboarding\`
158
- - plan_id: \`onboarding\`
159
- - branch: \`${branch}\`
160
- - created_at: \`${timestamp}\`
161
- - updated_at: \`${timestamp}\`
162
-
163
- ## 0.1 Requirement Trace
164
-
165
- | Spec Item | Plan Section | Design Response |
166
- |---|---|---|
167
- | AC-1 | §13 Validation Plan | onboarding status check maps to validation evidence |
168
- | AC-2 | §14 Task Breakdown Rationale | starter task boundary protects user-authored documents |
169
-
170
- ## 1. Background / Context
171
-
172
- ${background}
173
-
174
- ## 2. Goals and Non-goals
175
-
176
- ${goals}
177
-
178
- ## 3. Current State Analysis
179
-
180
- ${currentState}
181
-
182
- ## 4. Target Design Overview
183
-
184
- ${targetDesign}
185
-
186
- ## 5. Architecture / Component Design
187
-
188
- Use PlantUML when component impact is non-trivial.
189
-
190
- \`\`\`plantuml
191
- @startuml
192
- title Component Impact
193
- component \"Existing Module\" as Existing
194
- component \"Changed Module\" as Changed
195
- database \"Data Store\" as DB
196
- Existing --> Changed : call / event
197
- Changed --> DB : read / write
198
- @enduml
199
- \`\`\`
200
-
201
- ## 6. Interaction / Sequence Design
202
-
203
- Add a PlantUML sequence or activity diagram when cross-component flow, async work, or concurrency matters.
204
-
205
- ## 7. State / Data Design
206
-
207
- Describe state machines, data model changes, persistence, idempotency, and migration/rollback impact.
208
-
209
- ## 8. Interface / API / Schema Design
210
-
211
- Describe API, DTO, event, contract, or schema compatibility impact. Write \`None\` only after checking.
212
-
213
- ## 9. Concurrency / Transaction / Consistency Design
214
-
215
- Describe transaction boundaries, locking/idempotency/retry behavior, and consistency guarantees when relevant.
216
-
217
- ## 10. Key Design Decisions
218
-
219
- | Decision | Reason | Tradeoff | Rejected alternatives |
220
- |---|---|---|---|
221
- | Replace with decision | Replace with reason | Replace with tradeoff | Replace with alternatives |
222
-
223
- ## 11. Risk Control
224
-
225
- | Risk | Impact | Control |
226
- |---|---|---|
227
- | Replace with risk | Replace with impact | Replace with mitigation |
228
-
229
- ## 12. Compatibility / Rollout / Rollback
230
-
231
- Describe compatibility, rollout, feature flag/manual gate if needed, and rollback strategy.
232
-
233
- ## 13. Validation Plan
234
-
235
- | Acceptance | Validation Method | Command / Evidence |
236
- |---|---|---|
237
- | AC-1 | Manual/automated check | \`<command or artifact>\` |
238
-
239
- ## 14. Task Breakdown Rationale
240
-
241
- Explain why \`specs/${branch}/tasks.md\` should be split into the planned task boundaries.
242
-
243
- ## 15. Gaps / Assumptions
244
-
245
- - Gap or assumption.
246
-
247
- ## 16. Risk-driven Plan Requirements
248
-
249
- - state-machine risk: include state/data design and a PlantUML state diagram.
250
- - concurrency risk: include sequence/activity diagram plus transaction/consistency design.
251
- - database risk: include data, transaction, migration, and rollback design.
252
- - api_schema risk: include interface/schema compatibility design.
253
- - security/sql risk: include explicit risk controls.
254
-
255
- ## Phase Gate Checkpoint
256
-
257
- - ready_for_tasks: \`true | false\`
258
- - blockers: []
259
- - required_user_decisions: []
102
+ const strategy = zh
103
+ ? '这是一份轻量 starter plan,占位用途是说明 plan 阶段必须在真实 spec 之后给出 grounded technical design,而不是直接授权实现或填满强合约表单。'
104
+ : 'This is a lightweight starter plan. Its placeholder purpose is to show that plan must provide grounded technical design after a real spec, not directly authorize implementation or fill a heavy contract form.';
105
+ const boundary = zh
106
+ ? 'starter docs 是一个文档替换 rollback unit;不要把 spec、plan、tasks 分成互相覆盖的执行任务。'
107
+ : 'starter docs are one document-replacement rollback unit; do not split spec, plan, and tasks into execution tasks that overwrite each other.';
108
+ return `---
109
+ template: sdd-init-onboarding-plan-v3
110
+ version: 3.0.0
111
+ contract: sdd-plan-doc-v3
112
+ sdd_managed_starter: true
113
+ ---
114
+
115
+ ${title}
116
+
117
+ ## 0. Metadata
118
+
119
+ - spec_id: \`onboarding\`
120
+ - plan_id: \`onboarding\`
121
+ - branch: \`${branch}\`
122
+ - status: \`draft\`
123
+ - created_at: \`${timestamp}\`
124
+ - updated_at: \`${timestamp}\`
125
+
126
+ ## 1. Upstream Contract Trace
127
+
128
+ | Spec Source | Plan Response | Notes |
129
+ |---|---|---|
130
+ | FR-1 / FR-2 | starter initialization route | replace with real trace before implementation |
131
+ | AC-1 / AC-2 | status and preserve checks | starter evidence only |
132
+
133
+ ## 2. Planning Problem / Strategy Framing
134
+
135
+ ${strategy}
136
+
137
+ ## 3. Current State Analysis
138
+
139
+ - The repository has SDD scaffolding but no accepted real change request.
140
+ - Current spec/plan/tasks are onboarding placeholders.
141
+ - Runtime close remains the authority for accepted stage artifacts.
142
+
143
+ ## 4. Target Design Overview
144
+
145
+ Replace onboarding documents with project-specific spec, plan, and tasks before execution. The target plan must describe implementation surfaces, state/data/API impact, rollback, and validation coverage for the real request.
146
+
147
+ ## 5. Change Topology / Responsibility Boundaries
148
+
149
+ | Boundary | Owner | Write Surface | Rollback Unit |
150
+ |---|---|---|---|
151
+ | onboarding document replacement | SDD editor | \`specs/${branch}/spec.md\`, \`specs/${branch}/plan.md\`, \`specs/${branch}/tasks.md\` | onboarding-documents |
152
+
153
+ ${boundary}
154
+
155
+ ## 6. Interface / API / Schema Impact
156
+
157
+ None for the starter scaffold. Re-evaluate after the first real spec.
158
+
159
+ ## 7. State / Data / Migration Impact
160
+
161
+ None for the starter scaffold. Re-evaluate after the first real spec.
162
+
163
+ ## 8. Validation Strategy
164
+
165
+ | Acceptance | Validation Method | Evidence |
166
+ |---|---|---|
167
+ | AC-1 | \`sdd status --branch ${branch}\` | document visibility status |
168
+ | AC-2 | preserve/force behavior | init behavior or focused test |
169
+
170
+ ## 9. Risk Control
171
+
172
+ | Risk | Impact | Control |
173
+ |---|---|---|
174
+ | starter mistaken for implementation plan | vague work enters execute | require replacement spec/plan/tasks before implementation |
175
+ | split creates overlapping writers | rollback confusion | keep onboarding replacement as one rollback unit |
176
+
177
+ ## 10. Rollback Strategy
178
+
179
+ Restore starter documents or replace all semantic documents coherently with reviewed real branch documents.
180
+
181
+ ## 11. Implementation Notes
182
+
183
+ Do not implement source code from this plan. This plan only explains how to replace onboarding placeholders safely.
184
+
185
+ ## 12. Open Plan Questions
186
+
187
+ - What is the first real feature or change request?
188
+ - Which implementation surfaces does the real request touch?
189
+ - Which validation evidence will close the real acceptance criteria?
190
+
191
+ ## 13. Task-stage Constraints
192
+
193
+ Forbidden: task IDs, task lists, execution waves, dependency graph, \`workType\`, \`executionLane\`, \`sdd-task\` blocks, implementation checklist.
194
+
195
+ Tasks stage should create exactly the executable work-unit orchestration needed after a real plan exists. It must preserve writable ownership and rollback boundaries.
196
+
197
+ ## 14. Close Quality Evidence
198
+
199
+ - implementation strategy contract: \`starter only\`
200
+ - upstream trace checked: \`starter\`
201
+ - writable ownership risk noted: \`yes\`
202
+ - ready_for_tasks: \`false until replaced by a real plan\`
260
203
  `;
261
204
  }
262
205
  export function renderInitTasksDocument(branch, timestamp, docsLanguage) {
263
206
  const zh = usesChineseInitDocs(docsLanguage);
264
207
  const title = zh ? '# Tasks: Project Onboarding / 项目入门' : '# Tasks: Project Onboarding';
265
208
  const boundary = zh
266
- ? 'Allowed scope 仅限于把 starter onboarding scaffold 替换为项目专属的 SDD requirements、plan 和 tasks'
267
- : 'Allowed scope is limited to replacing this starter onboarding scaffold with project-specific SDD requirements, plan, and tasks.';
268
- const implementationNotes = zh
269
- ? ' \`sdd init\` 创建,用作安全的 onboarding placeholder。开始真实 implementation 前必须替换。'
270
- : 'Created by \`sdd init\` as a safe onboarding placeholder. Replace before real implementation.';
271
- return `---
272
- template: sdd-init-onboarding-tasks-v1
273
- version: 1.4.0
274
- contract: sdd-tasks-doc-v1
275
- sdd_managed_starter: true
276
- ---
277
-
278
- ${title}
279
-
280
- ## 0. Metadata
281
-
282
- - tasks_id: \`onboarding\`
283
- - spec_id: \`onboarding\`
284
- - plan_id: \`onboarding\`
285
- - branch: \`${branch}\`
286
- - lifecycle_profile: \`direct\`
287
- - status: \`draft\`
288
- - created_at: \`${timestamp}\`
289
- - updated_at: \`${timestamp}\`
290
-
291
- ## 1. Delivery Map
292
-
293
- | Task | Spec Acceptance | Plan Section | Boundary Reason |
294
- |---|---|---|---|
295
- | ONBOARDING-1 | AC-1, AC-2 | §13 Validation Plan, §14 Task Breakdown Rationale | replace placeholders before real implementation |
296
-
297
- ## 2. Wave Plan
298
-
299
- | Wave | Tasks | Gate |
300
- |---|---|---|
301
- | 1 | ONBOARDING-1 | user provides the first real feature/change request |
302
-
303
- ## 3. Task List
304
-
305
- ### ONBOARDING-1: Replace starter SDD documents with the first real task
306
-
307
- \`\`\`sdd-task
308
- id: ONBOARDING-1
309
- status: pending
310
- wave: 1
311
- depends_on: []
312
- acceptance_refs:
313
- - AC-1
314
- - AC-2
315
- plan_refs:
316
- - "§13 Validation Plan"
317
- - "§14 Task Breakdown Rationale"
318
- affected_files:
319
- - specs/${branch}/spec.md
320
- - specs/${branch}/plan.md
321
- - specs/${branch}/tasks.md
322
- validation:
323
- - sdd status --branch ${branch}
324
- risk: []
325
- agent_fit:
326
- - scout
327
- - planner
328
- - spec-reviewer
329
- allowed_agents:
330
- - scout
331
- - planner
332
- - spec-reviewer
333
- required_artifacts: []
334
- verification_availability:
335
- - inspect:sdd status --branch ${branch}
336
- autonomy: direct_execution_allowed
337
- \`\`\`
338
-
339
- #### Boundary
340
-
341
- ${boundary}
342
-
343
- Forbidden scope:
344
-
345
- - Do not create worktrees.
346
- - Do not start background agents.
347
- - Do not commit changes.
348
- - Do not apply sync-back automatically.
349
-
350
- #### Acceptance
351
-
352
- - AC-1: \`specs/${branch}/spec.md\` becomes a real requirement contract with objective, actors/scenarios, scoped requirements, AC IDs, assumptions/dependencies, and risk gates.
353
- - AC-2: \`specs/${branch}/plan.md\` maps spec acceptance to a task-ready technical solution document with risk-driven design sections and validation evidence.
354
- - AC-3: \`specs/${branch}/tasks.md\` maps acceptance/design refs to executable task blocks with boundary, agent/artifact/verification/autonomy fields, Definition of Done, and evidence expectations.
355
-
356
- #### Definition of Done
357
-
358
- - Starter placeholders are replaced by a real request.
359
- - Every task maps to spec acceptance refs.
360
- - High-risk tasks define required artifacts and reviewer/validator expectations.
361
- - \`sdd status --branch ${branch}\` reports no blocking document or task parser gaps.
362
-
363
- #### Evidence Expectations
364
-
365
- | Artifact | Expected Content |
366
- |---|---|
367
- | spec document | requirement contract with AC IDs |
368
- | plan document | technical solution with requirement trace and validation matrix |
369
- | tasks document | execution/evidence contract with task boundary and refs |
370
-
371
- #### Implementation Notes
372
-
373
- ${implementationNotes}
374
-
375
- ## 4. Dependency Notes
376
-
377
- - Single starter task only.
378
- - The \`wave: 1\` field is present only because the current parser requires a positive wave value; it must not be interpreted as permission to run background agents or multi-wave orchestration.
379
-
380
- ## 5. Phase Gate Checkpoint
381
-
382
- - ready_for_implementation: \`false\`
383
- - blockers:
384
- - Replace onboarding placeholders with real project requirements before implementation.
385
- - required_user_decisions:
386
- - Confirm the first real feature/change request.
387
- `;
388
- }
389
- export function renderInitVerifyDocument(branch, timestamp, docsLanguage, tasksContent) {
390
- const zh = usesChineseInitDocs(docsLanguage);
391
- const title = zh ? '# Verify: Project Onboarding / 项目入门' : '# Verify: Project Onboarding';
392
- const purpose = zh
393
- ? '这份 verify.md 是从 starter tasks 派生的 verification guidance,不是 runtime evidence,也不替代 `sdd test task|batch|wave` 产生的验证证据。'
394
- : 'This verify.md is task-derived verification guidance, not runtime evidence, and it does not replace validation evidence produced by `sdd test task|batch|wave`.';
395
- const availability = zh
396
- ? '在替换真实 spec/plan/tasks 前,只能检查 onboarding scaffold 是否仍然可见且未被误当作已批准实现。'
397
- : 'Before replacing the real spec/plan/tasks, verification can only inspect that the onboarding scaffold is visible and not mistaken for approved implementation.';
398
- const tasksContractHash = hashTasksContract(tasksContent) ?? 'missing';
399
- const tasksHash = hashDocumentContent(tasksContent);
400
- return `---
401
- template: sdd-init-onboarding-verify-v1
402
- version: 1.4.0
403
- contract: sdd-verify-doc-v1
404
- sdd_managed_starter: true
405
- branch: ${branch}
406
- based_on_tasks_contract_hash: ${tasksContractHash}
407
- based_on_tasks_hash: ${tasksHash}
408
- author_role: verification-designer
409
- independent_from_roles:
410
- - task-planner
411
- - implementer
412
- created_at: ${timestamp}
413
- updated_at: ${timestamp}
414
- ---
415
-
416
- ${title}
417
-
418
- ## 1. Purpose
419
-
420
- ${purpose}
421
-
422
- ## 2. Task Verification Matrix
423
-
424
- | Task | Acceptance refs | Validation commands | Required artifacts | Verification availability |
425
- |---|---|---|---|---|
426
- | ONBOARDING-1 | AC-1<br>AC-2 | sdd status --branch ${branch}<br>sdd test task ONBOARDING-1 --branch ${branch} | none | ${availability} |
427
-
428
- ## 3. Verification Rules
429
-
430
- - This starter verify contract does not authorize source changes, validation execution, runtime mutation, sync-back, commit, push, publish, or release.
431
- - Replace starter spec, plan, tasks, and verify documents with a real branch contract before implementation.
432
- - Runtime PASS is judged by \`sdd test task <task_id> --branch ${branch}\`, \`sdd test batch <batch_id> --branch ${branch}\`, or \`sdd test wave --branch ${branch}\` consuming the current verify contract; low-level verify remains available for compatibility diagnostics.
433
- - Re-run \`sdd verifies write --branch ${branch} --force\` only after reviewing changed task expectations.
434
-
435
- ## 4. Out of Scope
436
-
437
- - This document is not evidence in \`.sdd/runtime.sqlite\`.
438
- - This document is not a release, ship, or sync-back approval.
209
+ ? 'Allowed scope 仅限于把 starter onboarding scaffold 替换为项目专属的 SDD spec、plan 和 tasks;不得直接进入实现。'
210
+ : 'Allowed scope is limited to replacing this starter onboarding scaffold with project-specific SDD spec, plan, and tasks; do not proceed directly to implementation.';
211
+ const completionEvidence = zh
212
+ ? '更新后的 spec.md、plan.md、tasks.md diff,以及 `sdd status --branch ${branch}` 输出。'
213
+ : 'Updated spec.md, plan.md, tasks.md diff plus `sdd status --branch ${branch}` output.';
214
+ return `---
215
+ template: sdd-init-onboarding-tasks-v3
216
+ version: 3.0.0
217
+ contract: sdd-tasks-doc-v3
218
+ sdd_managed_starter: true
219
+ ---
220
+
221
+ ${title}
222
+
223
+ ## 0. Metadata
224
+
225
+ - tasks_id: \`onboarding\`
226
+ - spec_id: \`onboarding\`
227
+ - plan_id: \`onboarding\`
228
+ - branch: \`${branch}\`
229
+ - status: \`draft\`
230
+ - created_at: \`${timestamp}\`
231
+ - updated_at: \`${timestamp}\`
232
+ - produced_by: \`sdd init\`
233
+
234
+ ## 1. Projection Inputs
235
+
236
+ | Upstream Source | Accepted Ref / Hash | Projected Meaning |
237
+ |---|---|---|
238
+ | \`specs/${branch}/spec.md\` | \`starter\` | starter onboarding problem and non-implementation boundary |
239
+ | \`specs/${branch}/plan.md\` | \`starter\` | replace placeholders coherently before execute |
240
+
241
+ ## 2. Projection and Split Strategy
242
+
243
+ - Projection rule: synthesize the starter spec/plan into one docs-only replacement task; do not copy the starter documents into the task body.
244
+ - Primary split axis: \`single onboarding replacement unit\`
245
+ - Split rationale: spec、plan、tasks placeholders must be replaced coherently before execute receives real implementation context.
246
+ - Merge rationale: splitting starter replacement can leave downstream stages with misleading partial context.
247
+ - Out of scope: implementation code, validation execution, worktrees, commits, sync-back, release.
248
+
249
+ ## 3. Change Boundary / Rollback Map
250
+
251
+ | Change Surface / Domain Area | Primary Task | Other Touches | Boundary / Rollback Note |
252
+ |---|---|---|---|
253
+ | project SDD starter documents | \`ONBOARDING-1\` | \`None\` | replace the three starter docs together or restore them together |
254
+
255
+ No task overlap is allowed in this starter scaffold.
256
+
257
+ ## 4. Execution Topology
258
+
259
+ | Wave | Tasks | Purpose | Dependency Gate |
260
+ |---|---|---|---|
261
+ | 1 | \`ONBOARDING-1\` | replace placeholders with real SDD documents | user provides the first real feature/change request |
262
+
263
+ ## 5. Work Units
264
+
265
+ ### ONBOARDING-1: Replace starter SDD documents with the first real request
266
+
267
+ #### Execution Signal
268
+
269
+ - Task kind: \`docs\`
270
+ - Primary lane: \`docs\`
271
+ - Supporting lanes: \`none\`
272
+ - Execute mode: \`document\`
273
+
274
+
275
+ #### Task Projection
276
+
277
+ - Outcome this task contributes to: the project has real spec、plan、tasks documents before any execute work starts.
278
+ - Current state: starter onboarding documents describe placeholders only.
279
+ - Target state: the first real request is projected into project-specific spec、plan、tasks documents.
280
+ - Plan decision to preserve: starter replacement is one coherent docs rollback unit, not implementation authorization.
281
+
282
+ #### Change Boundary
283
+
284
+ Allowed:
285
+
286
+ - replace \`specs/${branch}/spec.md\`
287
+ - replace \`specs/${branch}/plan.md\`
288
+ - replace \`specs/${branch}/tasks.md\`
289
+
290
+ Out of scope:
291
+
292
+ - source code changes
293
+ - validation command execution
294
+ - commits, release, sync-back, or worktree operations
295
+
296
+ Overlap / rollback note:
297
+
298
+ - ${boundary}
299
+
300
+ #### Implementation Direction
301
+
302
+ Use the user's first real feature or change request to replace the starter documents. The replacement tasks.md should project the accepted spec/plan meaning into execute-ready task briefs, not paste upstream text or expose platform schema as the main content.
303
+
304
+ - Start from: the user's first real feature or change request and the starter documents under \`specs/${branch}/\`.
305
+ - Change sequence:
306
+ 1. Replace starter spec with the real problem and acceptance meaning.
307
+ 2. Replace starter plan with the real implementation strategy and boundaries.
308
+ 3. Replace starter tasks with execute-ready task projections from the accepted spec/plan.
309
+ - Preserve: docs-only onboarding; no implementation authorization before real tasks are accepted.
310
+ - Avoid: source code changes, validation execution, commits, release, sync-back, or worktree operations.
311
+
312
+ #### Execute Readiness Check
313
+
314
+ After reading this task alone, execute should know:
315
+
316
+ - Where to start: \`specs/${branch}/spec.md\`, \`specs/${branch}/plan.md\`, and \`specs/${branch}/tasks.md\`.
317
+ - What to change first: replace the starter spec with the first real request.
318
+ - What behavior must change: placeholder SDD documents become project-specific accepted documents.
319
+ - What must not change: source code and release state stay untouched.
320
+ - How to know this task is complete: ${completionEvidence}
321
+
322
+ #### Runtime Anchors
323
+
324
+ \`\`\`sdd-task
325
+ id: ONBOARDING-1
326
+ status: pending
327
+ workType: docs
328
+ executionLane: docs
329
+ wave: 1
330
+ dependencies: []
331
+ primaryWritableOwnership:
332
+ - specs/${branch}/spec.md
333
+ - specs/${branch}/plan.md
334
+ - specs/${branch}/tasks.md
335
+ touches:
336
+ - specs/${branch}/spec.md
337
+ - specs/${branch}/plan.md
338
+ - specs/${branch}/tasks.md
339
+ completionEvidence:
340
+ - ${completionEvidence}
341
+ failureRoute: tasks-revise
342
+ \`\`\`
343
+
344
+ #### Completion Evidence
345
+
346
+ ${completionEvidence}
347
+
348
+ #### Validation Handoff
349
+
350
+ - Covered by: \`sdd status --branch ${branch}\`
351
+ - That validation must prove: the replacement documents are visible to runtime status.
352
+ - If validation fails:
353
+ - revisit this task when: one of the starter documents was not replaced coherently.
354
+ - revise tasks when: the starter replacement boundary is no longer docs-only.
355
+ - revise plan/spec when: the first real request lacks enough problem or strategy context.
356
+
357
+ ## 6. Dependency / Ordering Rationale
358
+
359
+ - \`ONBOARDING-1\` is the only starter task.
360
+ - The onboarding docs are one rollback unit because partial replacement can leave misleading downstream context.
361
+
362
+ ## 7. Validation / Acceptance Coverage
363
+
364
+ | Projected Acceptance / Risk | Covered By | Coverage Meaning | Notes |
365
+ |---|---|---|---|
366
+ | starter documents are replaced coherently | \`ONBOARDING-1\`, \`sdd status --branch ${branch}\` | task | starter document visibility only |
367
+
368
+ This starter task has completion evidence but no independent product acceptance validation.
369
+
370
+ ## 8. Failure Routing / Repair Policy
371
+
372
+ | Failure Type | Route | Reason |
373
+ |---|---|---|
374
+ | placeholder replacement incomplete | \`tasks-revise\` | starter task boundary is still docs-only |
375
+ | first real request unclear | \`spec-revise\` | accepted spec must define the real problem before planning |
376
+ | design boundary missing | \`plan-revise\` | accepted plan must define executable surfaces before task execution |
377
+
378
+ ## 9. Open Execution Questions
379
+
380
+ - What is the first real feature or change request?
381
+ - Which docs language should the project use for long-lived SDD prose?
382
+
383
+ ## 10. Tasks Close Quality Evidence
384
+
385
+ - accepted spec ref/hash checked: \`starter\`
386
+ - accepted plan ref/hash checked: \`starter\`
387
+ - task projection synthesizes starter spec/plan meaning: \`yes — docs-only replacement\`
388
+ - change boundaries and rollback map reviewed: \`yes — one onboarding rollback unit\`
389
+ - completion evidence defined: \`yes\`
390
+ - validation handoff mapped: \`yes — status visibility only\`
391
+ - task-review-agent verdict: \`not run for init scaffold\`
439
392
  `;
440
393
  }
441
394
  //# sourceMappingURL=starter-documents.js.map