@arimakouyou/spec-workflow-mcp 2.2.7

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 (472) hide show
  1. package/.claude-plugin/.mcp.json +8 -0
  2. package/.claude-plugin/agents/code-simplifier.md +80 -0
  3. package/.claude-plugin/agents/integ-test-auditor.md +91 -0
  4. package/.claude-plugin/agents/integ-test-worker.md +73 -0
  5. package/.claude-plugin/agents/parallel-worker.md +136 -0
  6. package/.claude-plugin/agents/review-worker.md +279 -0
  7. package/.claude-plugin/agents/unit-test-engineer.md +148 -0
  8. package/.claude-plugin/agents/wave-harness-worker.md +158 -0
  9. package/.claude-plugin/hooks/hooks.json +16 -0
  10. package/.claude-plugin/hooks/tasks-read-guard.sh +17 -0
  11. package/.claude-plugin/marketplace.json +33 -0
  12. package/.claude-plugin/plugin.json +11 -0
  13. package/.claude-plugin/rules/axum.md +154 -0
  14. package/.claude-plugin/rules/cargo-toml.md +63 -0
  15. package/.claude-plugin/rules/context7.md +17 -0
  16. package/.claude-plugin/rules/design-conformance.md +82 -0
  17. package/.claude-plugin/rules/design-principles.md +53 -0
  18. package/.claude-plugin/rules/diesel.md +176 -0
  19. package/.claude-plugin/rules/feedback-loop.md +33 -0
  20. package/.claude-plugin/rules/leptos.md +319 -0
  21. package/.claude-plugin/rules/project-architecture.md +134 -0
  22. package/.claude-plugin/rules/quality-checks.md +265 -0
  23. package/.claude-plugin/rules/rust-style.md +242 -0
  24. package/.claude-plugin/rules/security.md +67 -0
  25. package/.claude-plugin/rules/spec-workflow-enforcement.md +47 -0
  26. package/.claude-plugin/rules/valkey.md +167 -0
  27. package/.claude-plugin/skills/integration-test/SKILL.md +230 -0
  28. package/.claude-plugin/skills/integration-test/references/auditor-prompt.md +78 -0
  29. package/.claude-plugin/skills/integration-test/references/external-api-mock.md +98 -0
  30. package/.claude-plugin/skills/integration-test/references/fixture-catalog.md +155 -0
  31. package/.claude-plugin/skills/integration-test/references/parallel-execution.md +124 -0
  32. package/.claude-plugin/skills/integration-test/references/quality-gate.md +80 -0
  33. package/.claude-plugin/skills/integration-test/references/test-case-design.md +88 -0
  34. package/.claude-plugin/skills/integration-test/references/test-patterns.md +215 -0
  35. package/.claude-plugin/skills/integration-test/references/whiteboard-template.md +81 -0
  36. package/.claude-plugin/skills/integration-test/references/worker-prompt.md +70 -0
  37. package/.claude-plugin/skills/knowhow-capture/SKILL.md +143 -0
  38. package/.claude-plugin/skills/phase-review-team/SKILL.md +380 -0
  39. package/.claude-plugin/skills/spec-design/SKILL.md +282 -0
  40. package/.claude-plugin/skills/spec-e2e-implement/SKILL.md +259 -0
  41. package/.claude-plugin/skills/spec-impl-code/SKILL.md +101 -0
  42. package/.claude-plugin/skills/spec-impl-review/SKILL.md +115 -0
  43. package/.claude-plugin/skills/spec-impl-test-run/SKILL.md +98 -0
  44. package/.claude-plugin/skills/spec-impl-test-write/SKILL.md +121 -0
  45. package/.claude-plugin/skills/spec-implement/SKILL.md +822 -0
  46. package/.claude-plugin/skills/spec-requirements/SKILL.md +130 -0
  47. package/.claude-plugin/skills/spec-review/SKILL.md +274 -0
  48. package/.claude-plugin/skills/spec-tasks/SKILL.md +372 -0
  49. package/.claude-plugin/skills/spec-test-design/SKILL.md +233 -0
  50. package/.claude-plugin/skills/tdd-skills/SKILL.md +95 -0
  51. package/.claude-plugin/skills/tdd-skills/references/advanced-techniques.md +49 -0
  52. package/.claude-plugin/skills/tdd-skills/references/green-strategies.md +70 -0
  53. package/.claude-plugin/skills/tdd-skills/references/tdd-and-design.md +48 -0
  54. package/.claude-plugin/skills/tdd-skills/references/test-design.md +43 -0
  55. package/.claude-plugin/skills/tdd-skills/references/test-doubles.md +53 -0
  56. package/.claude-plugin/skills/tdd-skills/references/test-patterns.md +40 -0
  57. package/.claude-plugin/skills/tdd-skills-rust/SKILL.md +128 -0
  58. package/.claude-plugin/skills/tdd-skills-rust/references/advanced-techniques.md +205 -0
  59. package/.claude-plugin/skills/tdd-skills-rust/references/green-strategies.md +166 -0
  60. package/.claude-plugin/skills/tdd-skills-rust/references/tdd-and-design.md +215 -0
  61. package/.claude-plugin/skills/tdd-skills-rust/references/test-design.md +128 -0
  62. package/.claude-plugin/skills/tdd-skills-rust/references/test-doubles.md +208 -0
  63. package/.claude-plugin/skills/tdd-skills-rust/references/test-patterns.md +223 -0
  64. package/.claude-plugin/with-dashboard/.mcp.json +8 -0
  65. package/.claude-plugin/with-dashboard/plugin.json +10 -0
  66. package/CHANGELOG.md +1007 -0
  67. package/LICENSE +674 -0
  68. package/README.ja.md +380 -0
  69. package/README.md +437 -0
  70. package/dist/__tests__/config.test.d.ts +2 -0
  71. package/dist/__tests__/config.test.d.ts.map +1 -0
  72. package/dist/__tests__/config.test.js +264 -0
  73. package/dist/__tests__/config.test.js.map +1 -0
  74. package/dist/__tests__/index-args.test.d.ts +2 -0
  75. package/dist/__tests__/index-args.test.d.ts.map +1 -0
  76. package/dist/__tests__/index-args.test.js +43 -0
  77. package/dist/__tests__/index-args.test.js.map +1 -0
  78. package/dist/__tests__/index-entrypoint.test.d.ts +2 -0
  79. package/dist/__tests__/index-entrypoint.test.d.ts.map +1 -0
  80. package/dist/__tests__/index-entrypoint.test.js +23 -0
  81. package/dist/__tests__/index-entrypoint.test.js.map +1 -0
  82. package/dist/config.d.ts +26 -0
  83. package/dist/config.d.ts.map +1 -0
  84. package/dist/config.js +188 -0
  85. package/dist/config.js.map +1 -0
  86. package/dist/core/__tests__/git-utils.test.d.ts +2 -0
  87. package/dist/core/__tests__/git-utils.test.d.ts.map +1 -0
  88. package/dist/core/__tests__/git-utils.test.js +179 -0
  89. package/dist/core/__tests__/git-utils.test.js.map +1 -0
  90. package/dist/core/__tests__/mdx-validator.test.d.ts +2 -0
  91. package/dist/core/__tests__/mdx-validator.test.d.ts.map +1 -0
  92. package/dist/core/__tests__/mdx-validator.test.js +42 -0
  93. package/dist/core/__tests__/mdx-validator.test.js.map +1 -0
  94. package/dist/core/__tests__/path-utils.test.d.ts +2 -0
  95. package/dist/core/__tests__/path-utils.test.d.ts.map +1 -0
  96. package/dist/core/__tests__/path-utils.test.js +342 -0
  97. package/dist/core/__tests__/path-utils.test.js.map +1 -0
  98. package/dist/core/__tests__/project-registry.test.d.ts +2 -0
  99. package/dist/core/__tests__/project-registry.test.d.ts.map +1 -0
  100. package/dist/core/__tests__/project-registry.test.js +62 -0
  101. package/dist/core/__tests__/project-registry.test.js.map +1 -0
  102. package/dist/core/__tests__/security-utils.test.d.ts +2 -0
  103. package/dist/core/__tests__/security-utils.test.d.ts.map +1 -0
  104. package/dist/core/__tests__/security-utils.test.js +657 -0
  105. package/dist/core/__tests__/security-utils.test.js.map +1 -0
  106. package/dist/core/__tests__/task-parser.test.d.ts +2 -0
  107. package/dist/core/__tests__/task-parser.test.d.ts.map +1 -0
  108. package/dist/core/__tests__/task-parser.test.js +222 -0
  109. package/dist/core/__tests__/task-parser.test.js.map +1 -0
  110. package/dist/core/__tests__/task-validator.test.d.ts +2 -0
  111. package/dist/core/__tests__/task-validator.test.d.ts.map +1 -0
  112. package/dist/core/__tests__/task-validator.test.js +308 -0
  113. package/dist/core/__tests__/task-validator.test.js.map +1 -0
  114. package/dist/core/archive-service.d.ts +10 -0
  115. package/dist/core/archive-service.d.ts.map +1 -0
  116. package/dist/core/archive-service.js +99 -0
  117. package/dist/core/archive-service.js.map +1 -0
  118. package/dist/core/dashboard-session.d.ts +49 -0
  119. package/dist/core/dashboard-session.d.ts.map +1 -0
  120. package/dist/core/dashboard-session.js +132 -0
  121. package/dist/core/dashboard-session.js.map +1 -0
  122. package/dist/core/git-utils.d.ts +25 -0
  123. package/dist/core/git-utils.d.ts.map +1 -0
  124. package/dist/core/git-utils.js +87 -0
  125. package/dist/core/git-utils.js.map +1 -0
  126. package/dist/core/global-dir.d.ts +44 -0
  127. package/dist/core/global-dir.d.ts.map +1 -0
  128. package/dist/core/global-dir.js +74 -0
  129. package/dist/core/global-dir.js.map +1 -0
  130. package/dist/core/implementation-log-migrator.d.ts +41 -0
  131. package/dist/core/implementation-log-migrator.d.ts.map +1 -0
  132. package/dist/core/implementation-log-migrator.js +258 -0
  133. package/dist/core/implementation-log-migrator.js.map +1 -0
  134. package/dist/core/mdx-validator.d.ts +14 -0
  135. package/dist/core/mdx-validator.d.ts.map +1 -0
  136. package/dist/core/mdx-validator.js +34 -0
  137. package/dist/core/mdx-validator.js.map +1 -0
  138. package/dist/core/parser.d.ts +11 -0
  139. package/dist/core/parser.d.ts.map +1 -0
  140. package/dist/core/parser.js +128 -0
  141. package/dist/core/parser.js.map +1 -0
  142. package/dist/core/path-utils.d.ts +68 -0
  143. package/dist/core/path-utils.d.ts.map +1 -0
  144. package/dist/core/path-utils.js +302 -0
  145. package/dist/core/path-utils.js.map +1 -0
  146. package/dist/core/project-registry.d.ts +94 -0
  147. package/dist/core/project-registry.d.ts.map +1 -0
  148. package/dist/core/project-registry.js +297 -0
  149. package/dist/core/project-registry.js.map +1 -0
  150. package/dist/core/security-utils.d.ts +99 -0
  151. package/dist/core/security-utils.d.ts.map +1 -0
  152. package/dist/core/security-utils.js +275 -0
  153. package/dist/core/security-utils.js.map +1 -0
  154. package/dist/core/task-parser.d.ts +90 -0
  155. package/dist/core/task-parser.d.ts.map +1 -0
  156. package/dist/core/task-parser.js +477 -0
  157. package/dist/core/task-parser.js.map +1 -0
  158. package/dist/core/task-validator.d.ts +37 -0
  159. package/dist/core/task-validator.d.ts.map +1 -0
  160. package/dist/core/task-validator.js +499 -0
  161. package/dist/core/task-validator.js.map +1 -0
  162. package/dist/core/workspace-initializer.d.ts +16 -0
  163. package/dist/core/workspace-initializer.d.ts.map +1 -0
  164. package/dist/core/workspace-initializer.js +168 -0
  165. package/dist/core/workspace-initializer.js.map +1 -0
  166. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts +2 -0
  167. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.d.ts.map +1 -0
  168. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js +78 -0
  169. package/dist/dashboard/__tests__/approval-storage-path-resolution.test.js.map +1 -0
  170. package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts +2 -0
  171. package/dist/dashboard/__tests__/multi-server-approvals-content.test.d.ts.map +1 -0
  172. package/dist/dashboard/__tests__/multi-server-approvals-content.test.js +115 -0
  173. package/dist/dashboard/__tests__/multi-server-approvals-content.test.js.map +1 -0
  174. package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts +2 -0
  175. package/dist/dashboard/__tests__/watcher-error-handling.test.d.ts.map +1 -0
  176. package/dist/dashboard/__tests__/watcher-error-handling.test.js +118 -0
  177. package/dist/dashboard/__tests__/watcher-error-handling.test.js.map +1 -0
  178. package/dist/dashboard/approval-storage.d.ts +139 -0
  179. package/dist/dashboard/approval-storage.d.ts.map +1 -0
  180. package/dist/dashboard/approval-storage.js +608 -0
  181. package/dist/dashboard/approval-storage.js.map +1 -0
  182. package/dist/dashboard/execution-history-manager.d.ts +52 -0
  183. package/dist/dashboard/execution-history-manager.d.ts.map +1 -0
  184. package/dist/dashboard/execution-history-manager.js +161 -0
  185. package/dist/dashboard/execution-history-manager.js.map +1 -0
  186. package/dist/dashboard/implementation-log-manager.d.ts +97 -0
  187. package/dist/dashboard/implementation-log-manager.d.ts.map +1 -0
  188. package/dist/dashboard/implementation-log-manager.js +617 -0
  189. package/dist/dashboard/implementation-log-manager.js.map +1 -0
  190. package/dist/dashboard/job-scheduler.d.ts +91 -0
  191. package/dist/dashboard/job-scheduler.d.ts.map +1 -0
  192. package/dist/dashboard/job-scheduler.js +321 -0
  193. package/dist/dashboard/job-scheduler.js.map +1 -0
  194. package/dist/dashboard/multi-server.d.ts +42 -0
  195. package/dist/dashboard/multi-server.d.ts.map +1 -0
  196. package/dist/dashboard/multi-server.js +1460 -0
  197. package/dist/dashboard/multi-server.js.map +1 -0
  198. package/dist/dashboard/parser.d.ts +18 -0
  199. package/dist/dashboard/parser.d.ts.map +1 -0
  200. package/dist/dashboard/parser.js +269 -0
  201. package/dist/dashboard/parser.js.map +1 -0
  202. package/dist/dashboard/project-manager.d.ts +82 -0
  203. package/dist/dashboard/project-manager.d.ts.map +1 -0
  204. package/dist/dashboard/project-manager.js +257 -0
  205. package/dist/dashboard/project-manager.js.map +1 -0
  206. package/dist/dashboard/public/assets/Inter-Bold-CD3Pr7BX.woff2 +0 -0
  207. package/dist/dashboard/public/assets/Inter-Medium-B_8v_WHh.woff2 +0 -0
  208. package/dist/dashboard/public/assets/Inter-Regular-DRVdRqcI.woff2 +0 -0
  209. package/dist/dashboard/public/assets/Inter-SemiBold-CtskMddL.woff2 +0 -0
  210. package/dist/dashboard/public/assets/JetBrainsMono-Bold-D4WEaHbo.woff2 +0 -0
  211. package/dist/dashboard/public/assets/JetBrainsMono-Medium-3S3k2nMz.woff2 +0 -0
  212. package/dist/dashboard/public/assets/JetBrainsMono-Regular-BQaDgvhP.woff2 +0 -0
  213. package/dist/dashboard/public/assets/Tableau10-B-NsZVaP.js +1 -0
  214. package/dist/dashboard/public/assets/apl-B4CMkyY2.js +1 -0
  215. package/dist/dashboard/public/assets/arc-a5wW942W.js +1 -0
  216. package/dist/dashboard/public/assets/array-BKyUJesY.js +1 -0
  217. package/dist/dashboard/public/assets/asciiarmor-Df11BRmG.js +1 -0
  218. package/dist/dashboard/public/assets/asn1-EdZsLKOL.js +1 -0
  219. package/dist/dashboard/public/assets/asterisk-B-8jnY81.js +1 -0
  220. package/dist/dashboard/public/assets/blockDiagram-c4efeb88-CvjTuK-w.js +118 -0
  221. package/dist/dashboard/public/assets/brainfuck-C4LP7Hcl.js +1 -0
  222. package/dist/dashboard/public/assets/c4Diagram-c83219d4-NwVQo5kf.js +10 -0
  223. package/dist/dashboard/public/assets/channel-Bi16YZhk.js +1 -0
  224. package/dist/dashboard/public/assets/classDiagram-beda092f-BmSeXDdU.js +2 -0
  225. package/dist/dashboard/public/assets/classDiagram-v2-2358418a-D7GvvuPr.js +2 -0
  226. package/dist/dashboard/public/assets/clike-B9uivgTg.js +1 -0
  227. package/dist/dashboard/public/assets/clojure-BMjYHr_A.js +1 -0
  228. package/dist/dashboard/public/assets/clone-BpKTiq7P.js +1 -0
  229. package/dist/dashboard/public/assets/cmake-BQqOBYOt.js +1 -0
  230. package/dist/dashboard/public/assets/cobol-CWcv1MsR.js +1 -0
  231. package/dist/dashboard/public/assets/coffeescript-S37ZYGWr.js +1 -0
  232. package/dist/dashboard/public/assets/commonlisp-DBKNyK5s.js +1 -0
  233. package/dist/dashboard/public/assets/createText-1719965b-qASbqHUP.js +7 -0
  234. package/dist/dashboard/public/assets/crystal-SjHAIU92.js +1 -0
  235. package/dist/dashboard/public/assets/css-BnMrqG3P.js +1 -0
  236. package/dist/dashboard/public/assets/cypher-C_CwsFkJ.js +1 -0
  237. package/dist/dashboard/public/assets/d-pRatUO7H.js +1 -0
  238. package/dist/dashboard/public/assets/diff-DbItnlRl.js +1 -0
  239. package/dist/dashboard/public/assets/dockerfile-BKs6k2Af.js +1 -0
  240. package/dist/dashboard/public/assets/dtd-DF_7sFjM.js +1 -0
  241. package/dist/dashboard/public/assets/dylan-DwRh75JA.js +1 -0
  242. package/dist/dashboard/public/assets/ebnf-CDyGwa7X.js +1 -0
  243. package/dist/dashboard/public/assets/ecl-Cabwm37j.js +1 -0
  244. package/dist/dashboard/public/assets/edges-96097737-BItTSnH7.js +4 -0
  245. package/dist/dashboard/public/assets/eiffel-CnydiIhH.js +1 -0
  246. package/dist/dashboard/public/assets/elm-vLlmbW-K.js +1 -0
  247. package/dist/dashboard/public/assets/erDiagram-0228fc6a-DT224olg.js +51 -0
  248. package/dist/dashboard/public/assets/erlang-BNw1qcRV.js +1 -0
  249. package/dist/dashboard/public/assets/factor-kuTfRLto.js +1 -0
  250. package/dist/dashboard/public/assets/fcl-Kvtd6kyn.js +1 -0
  251. package/dist/dashboard/public/assets/flowDb-c6c81e3f-D9_ukKtv.js +10 -0
  252. package/dist/dashboard/public/assets/flowDiagram-50d868cf-CylE8siG.js +4 -0
  253. package/dist/dashboard/public/assets/flowDiagram-v2-4f6560a1-B2O3JN7Y.js +1 -0
  254. package/dist/dashboard/public/assets/flowchart-elk-definition-6af322e1-BCaqFKf3.js +139 -0
  255. package/dist/dashboard/public/assets/forth-Ffai-XNe.js +1 -0
  256. package/dist/dashboard/public/assets/fortran-DYz_wnZ1.js +1 -0
  257. package/dist/dashboard/public/assets/ganttDiagram-a2739b55-WQUL1QW_.js +257 -0
  258. package/dist/dashboard/public/assets/gas-Bneqetm1.js +1 -0
  259. package/dist/dashboard/public/assets/gherkin-heZmZLOM.js +1 -0
  260. package/dist/dashboard/public/assets/gitGraphDiagram-82fe8481-CttZrdmr.js +70 -0
  261. package/dist/dashboard/public/assets/graph-Ch-rVueN.js +1 -0
  262. package/dist/dashboard/public/assets/groovy-D9Dt4D0W.js +1 -0
  263. package/dist/dashboard/public/assets/haskell-Cw1EW3IL.js +1 -0
  264. package/dist/dashboard/public/assets/haxe-H-WmDvRZ.js +1 -0
  265. package/dist/dashboard/public/assets/http-DBlCnlav.js +1 -0
  266. package/dist/dashboard/public/assets/idl-BEugSyMb.js +1 -0
  267. package/dist/dashboard/public/assets/index--kbPpDKv.js +1 -0
  268. package/dist/dashboard/public/assets/index-3scDwWm6.js +1 -0
  269. package/dist/dashboard/public/assets/index-5325376f-BL2zVOJU.js +1 -0
  270. package/dist/dashboard/public/assets/index-BZdjbO25.js +1 -0
  271. package/dist/dashboard/public/assets/index-BmA_batZ.js +1 -0
  272. package/dist/dashboard/public/assets/index-Bu0u99kF.js +2 -0
  273. package/dist/dashboard/public/assets/index-Ch-lr7F4.js +1 -0
  274. package/dist/dashboard/public/assets/index-ClgWbdoq.js +1 -0
  275. package/dist/dashboard/public/assets/index-CzLwOMQ_.js +3 -0
  276. package/dist/dashboard/public/assets/index-DAOEjGO7.js +1 -0
  277. package/dist/dashboard/public/assets/index-DXqf0B9c.js +1 -0
  278. package/dist/dashboard/public/assets/index-DegWdR16.js +1 -0
  279. package/dist/dashboard/public/assets/index-DiHyYGim.js +1 -0
  280. package/dist/dashboard/public/assets/index-DlZtG7I5.js +1 -0
  281. package/dist/dashboard/public/assets/index-DmhGE2M8.js +1 -0
  282. package/dist/dashboard/public/assets/index-QEGvld4x.js +1 -0
  283. package/dist/dashboard/public/assets/index-RfZPGAJu.js +1 -0
  284. package/dist/dashboard/public/assets/index-UybBj_7u.js +319 -0
  285. package/dist/dashboard/public/assets/index-bVekzPnl.js +7 -0
  286. package/dist/dashboard/public/assets/index-f5bysQzW.css +1 -0
  287. package/dist/dashboard/public/assets/infoDiagram-8eee0895-DjzkkE3o.js +7 -0
  288. package/dist/dashboard/public/assets/init-Gi6I4Gst.js +1 -0
  289. package/dist/dashboard/public/assets/javascript-iXu5QeM3.js +1 -0
  290. package/dist/dashboard/public/assets/journeyDiagram-c64418c1-CxPZkNdB.js +139 -0
  291. package/dist/dashboard/public/assets/julia-DuME0IfC.js +1 -0
  292. package/dist/dashboard/public/assets/katex-XbL3y5x-.js +261 -0
  293. package/dist/dashboard/public/assets/layout-DX7DNTRm.js +1 -0
  294. package/dist/dashboard/public/assets/line-DfvpmKOn.js +1 -0
  295. package/dist/dashboard/public/assets/linear-gQbBPHO5.js +1 -0
  296. package/dist/dashboard/public/assets/livescript-BwQOo05w.js +1 -0
  297. package/dist/dashboard/public/assets/lua-BgMRiT3U.js +1 -0
  298. package/dist/dashboard/public/assets/mathematica-DTrFuWx2.js +1 -0
  299. package/dist/dashboard/public/assets/mbox-CNhZ1qSd.js +1 -0
  300. package/dist/dashboard/public/assets/mindmap-definition-8da855dc-CNxmpyG6.js +415 -0
  301. package/dist/dashboard/public/assets/mirc-CjQqDB4T.js +1 -0
  302. package/dist/dashboard/public/assets/mllike-CXdrOF99.js +1 -0
  303. package/dist/dashboard/public/assets/modelica-Dc1JOy9r.js +1 -0
  304. package/dist/dashboard/public/assets/mscgen-BA5vi2Kp.js +1 -0
  305. package/dist/dashboard/public/assets/mumps-BT43cFF4.js +1 -0
  306. package/dist/dashboard/public/assets/nginx-DdIZxoE0.js +1 -0
  307. package/dist/dashboard/public/assets/nsis-LdVXkNf5.js +1 -0
  308. package/dist/dashboard/public/assets/ntriples-BfvgReVJ.js +1 -0
  309. package/dist/dashboard/public/assets/octave-Ck1zUtKM.js +1 -0
  310. package/dist/dashboard/public/assets/ordinal-Cboi1Yqb.js +1 -0
  311. package/dist/dashboard/public/assets/oz-BzwKVEFT.js +1 -0
  312. package/dist/dashboard/public/assets/pascal--L3eBynH.js +1 -0
  313. package/dist/dashboard/public/assets/path-CbwjOpE9.js +1 -0
  314. package/dist/dashboard/public/assets/perl-CdXCOZ3F.js +1 -0
  315. package/dist/dashboard/public/assets/pieDiagram-a8764435-D-xy_NSA.js +35 -0
  316. package/dist/dashboard/public/assets/pig-CevX1Tat.js +1 -0
  317. package/dist/dashboard/public/assets/powershell-CFHJl5sT.js +1 -0
  318. package/dist/dashboard/public/assets/properties-C78fOPTZ.js +1 -0
  319. package/dist/dashboard/public/assets/protobuf-ChK-085T.js +1 -0
  320. package/dist/dashboard/public/assets/pug-DeIclll2.js +1 -0
  321. package/dist/dashboard/public/assets/puppet-DMA9R1ak.js +1 -0
  322. package/dist/dashboard/public/assets/python-BuPzkPfP.js +1 -0
  323. package/dist/dashboard/public/assets/q-pXgVlZs6.js +1 -0
  324. package/dist/dashboard/public/assets/quadrantDiagram-1e28029f-BoL2wzz0.js +7 -0
  325. package/dist/dashboard/public/assets/r-B6wPVr8A.js +1 -0
  326. package/dist/dashboard/public/assets/requirementDiagram-08caed73-BujFz0q1.js +52 -0
  327. package/dist/dashboard/public/assets/rpm-CTu-6PCP.js +1 -0
  328. package/dist/dashboard/public/assets/ruby-B2Rjki9n.js +1 -0
  329. package/dist/dashboard/public/assets/sankeyDiagram-a04cb91d-D03_NARm.js +8 -0
  330. package/dist/dashboard/public/assets/sas-B4kiWyti.js +1 -0
  331. package/dist/dashboard/public/assets/scheme-C41bIUwD.js +1 -0
  332. package/dist/dashboard/public/assets/sequenceDiagram-c5b8d532-B65eFcaT.js +122 -0
  333. package/dist/dashboard/public/assets/shell-CjFT_Tl9.js +1 -0
  334. package/dist/dashboard/public/assets/sieve-C3Gn_uJK.js +1 -0
  335. package/dist/dashboard/public/assets/simple-mode-GW_nhZxv.js +1 -0
  336. package/dist/dashboard/public/assets/smalltalk-CnHTOXQT.js +1 -0
  337. package/dist/dashboard/public/assets/solr-DehyRSwq.js +1 -0
  338. package/dist/dashboard/public/assets/sparql-DkYu6x3z.js +1 -0
  339. package/dist/dashboard/public/assets/spreadsheet-BCZA_wO0.js +1 -0
  340. package/dist/dashboard/public/assets/sql-D0XecflT.js +1 -0
  341. package/dist/dashboard/public/assets/stateDiagram-1ecb1508-BDbqu0Vl.js +1 -0
  342. package/dist/dashboard/public/assets/stateDiagram-v2-c2b004d7-CBHvk4b8.js +1 -0
  343. package/dist/dashboard/public/assets/stex-C3f8Ysf7.js +1 -0
  344. package/dist/dashboard/public/assets/styles-b4e223ce-CELsPqaO.js +160 -0
  345. package/dist/dashboard/public/assets/styles-ca3715f6-BRqMqT6F.js +207 -0
  346. package/dist/dashboard/public/assets/styles-d45a18b0-e8N-oLPy.js +116 -0
  347. package/dist/dashboard/public/assets/stylus-B533Al4x.js +1 -0
  348. package/dist/dashboard/public/assets/svgDrawCommon-b86b1483-vNDtmQc-.js +1 -0
  349. package/dist/dashboard/public/assets/swift-BzpIVaGY.js +1 -0
  350. package/dist/dashboard/public/assets/tcl-DVfN8rqt.js +1 -0
  351. package/dist/dashboard/public/assets/textile-CnDTJFAw.js +1 -0
  352. package/dist/dashboard/public/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  353. package/dist/dashboard/public/assets/tiki-DGYXhP31.js +1 -0
  354. package/dist/dashboard/public/assets/timeline-definition-faaaa080-Dh2_A5VU.js +61 -0
  355. package/dist/dashboard/public/assets/toml-Bm5Em-hy.js +1 -0
  356. package/dist/dashboard/public/assets/troff-wAsdV37c.js +1 -0
  357. package/dist/dashboard/public/assets/ttcn-CfJYG6tj.js +1 -0
  358. package/dist/dashboard/public/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  359. package/dist/dashboard/public/assets/turtle-B1tBg_DP.js +1 -0
  360. package/dist/dashboard/public/assets/vb-CmGdzxic.js +1 -0
  361. package/dist/dashboard/public/assets/vbscript-BuJXcnF6.js +1 -0
  362. package/dist/dashboard/public/assets/velocity-D8B20fx6.js +1 -0
  363. package/dist/dashboard/public/assets/verilog-C6RDOZhf.js +1 -0
  364. package/dist/dashboard/public/assets/vhdl-lSbBsy5d.js +1 -0
  365. package/dist/dashboard/public/assets/webidl-ZXfAyPTL.js +1 -0
  366. package/dist/dashboard/public/assets/xquery-DzFWVndE.js +1 -0
  367. package/dist/dashboard/public/assets/xychartDiagram-f5964ef8-B76v1AVF.js +7 -0
  368. package/dist/dashboard/public/assets/yacas-BJ4BC0dw.js +1 -0
  369. package/dist/dashboard/public/assets/z80-Hz9HOZM7.js +1 -0
  370. package/dist/dashboard/public/claude-icon-dark.svg +1 -0
  371. package/dist/dashboard/public/claude-icon.svg +1 -0
  372. package/dist/dashboard/public/index.html +16 -0
  373. package/dist/dashboard/settings-manager.d.ts +47 -0
  374. package/dist/dashboard/settings-manager.d.ts.map +1 -0
  375. package/dist/dashboard/settings-manager.js +180 -0
  376. package/dist/dashboard/settings-manager.js.map +1 -0
  377. package/dist/dashboard/utils.d.ts +31 -0
  378. package/dist/dashboard/utils.d.ts.map +1 -0
  379. package/dist/dashboard/utils.js +102 -0
  380. package/dist/dashboard/utils.js.map +1 -0
  381. package/dist/dashboard/watcher.d.ts +32 -0
  382. package/dist/dashboard/watcher.d.ts.map +1 -0
  383. package/dist/dashboard/watcher.js +173 -0
  384. package/dist/dashboard/watcher.js.map +1 -0
  385. package/dist/index.d.ts +13 -0
  386. package/dist/index.d.ts.map +1 -0
  387. package/dist/index.js +380 -0
  388. package/dist/index.js.map +1 -0
  389. package/dist/markdown/templates/design-template.md +126 -0
  390. package/dist/markdown/templates/product-template.md +51 -0
  391. package/dist/markdown/templates/requirements-template.md +50 -0
  392. package/dist/markdown/templates/structure-template.md +145 -0
  393. package/dist/markdown/templates/tasks-template.md +100 -0
  394. package/dist/markdown/templates/tech-template.md +99 -0
  395. package/dist/markdown/templates/test-design-template.md +221 -0
  396. package/dist/prompts/create-spec.d.ts +3 -0
  397. package/dist/prompts/create-spec.d.ts.map +1 -0
  398. package/dist/prompts/create-spec.js +97 -0
  399. package/dist/prompts/create-spec.js.map +1 -0
  400. package/dist/prompts/create-steering-doc.d.ts +3 -0
  401. package/dist/prompts/create-steering-doc.d.ts.map +1 -0
  402. package/dist/prompts/create-steering-doc.js +75 -0
  403. package/dist/prompts/create-steering-doc.js.map +1 -0
  404. package/dist/prompts/implement-task.d.ts +3 -0
  405. package/dist/prompts/implement-task.d.ts.map +1 -0
  406. package/dist/prompts/implement-task.js +174 -0
  407. package/dist/prompts/implement-task.js.map +1 -0
  408. package/dist/prompts/index.d.ts +20 -0
  409. package/dist/prompts/index.d.ts.map +1 -0
  410. package/dist/prompts/index.js +103 -0
  411. package/dist/prompts/index.js.map +1 -0
  412. package/dist/prompts/inject-spec-workflow-guide.d.ts +3 -0
  413. package/dist/prompts/inject-spec-workflow-guide.d.ts.map +1 -0
  414. package/dist/prompts/inject-spec-workflow-guide.js +60 -0
  415. package/dist/prompts/inject-spec-workflow-guide.js.map +1 -0
  416. package/dist/prompts/inject-steering-guide.d.ts +3 -0
  417. package/dist/prompts/inject-steering-guide.d.ts.map +1 -0
  418. package/dist/prompts/inject-steering-guide.js +64 -0
  419. package/dist/prompts/inject-steering-guide.js.map +1 -0
  420. package/dist/prompts/refresh-tasks.d.ts +3 -0
  421. package/dist/prompts/refresh-tasks.d.ts.map +1 -0
  422. package/dist/prompts/refresh-tasks.js +237 -0
  423. package/dist/prompts/refresh-tasks.js.map +1 -0
  424. package/dist/prompts/spec-status.d.ts +3 -0
  425. package/dist/prompts/spec-status.d.ts.map +1 -0
  426. package/dist/prompts/spec-status.js +77 -0
  427. package/dist/prompts/spec-status.js.map +1 -0
  428. package/dist/prompts/types.d.ts +13 -0
  429. package/dist/prompts/types.d.ts.map +1 -0
  430. package/dist/prompts/types.js +2 -0
  431. package/dist/prompts/types.js.map +1 -0
  432. package/dist/server.d.ts +17 -0
  433. package/dist/server.d.ts.map +1 -0
  434. package/dist/server.js +175 -0
  435. package/dist/server.js.map +1 -0
  436. package/dist/tools/__tests__/log-implementation-review-process.test.d.ts +2 -0
  437. package/dist/tools/__tests__/log-implementation-review-process.test.d.ts.map +1 -0
  438. package/dist/tools/__tests__/log-implementation-review-process.test.js +190 -0
  439. package/dist/tools/__tests__/log-implementation-review-process.test.js.map +1 -0
  440. package/dist/tools/__tests__/projectPath.test.d.ts +2 -0
  441. package/dist/tools/__tests__/projectPath.test.d.ts.map +1 -0
  442. package/dist/tools/__tests__/projectPath.test.js +187 -0
  443. package/dist/tools/__tests__/projectPath.test.js.map +1 -0
  444. package/dist/tools/approvals.d.ts +14 -0
  445. package/dist/tools/approvals.d.ts.map +1 -0
  446. package/dist/tools/approvals.js +505 -0
  447. package/dist/tools/approvals.js.map +1 -0
  448. package/dist/tools/index.d.ts +5 -0
  449. package/dist/tools/index.d.ts.map +1 -0
  450. package/dist/tools/index.js +52 -0
  451. package/dist/tools/index.js.map +1 -0
  452. package/dist/tools/log-implementation.d.ts +5 -0
  453. package/dist/tools/log-implementation.d.ts.map +1 -0
  454. package/dist/tools/log-implementation.js +498 -0
  455. package/dist/tools/log-implementation.js.map +1 -0
  456. package/dist/tools/spec-status.d.ts +5 -0
  457. package/dist/tools/spec-status.d.ts.map +1 -0
  458. package/dist/tools/spec-status.js +192 -0
  459. package/dist/tools/spec-status.js.map +1 -0
  460. package/dist/tools/spec-workflow-guide.d.ts +5 -0
  461. package/dist/tools/spec-workflow-guide.d.ts.map +1 -0
  462. package/dist/tools/spec-workflow-guide.js +116 -0
  463. package/dist/tools/spec-workflow-guide.js.map +1 -0
  464. package/dist/tools/steering-guide.d.ts +5 -0
  465. package/dist/tools/steering-guide.d.ts.map +1 -0
  466. package/dist/tools/steering-guide.js +192 -0
  467. package/dist/tools/steering-guide.js.map +1 -0
  468. package/dist/types.d.ts +183 -0
  469. package/dist/types.d.ts.map +1 -0
  470. package/dist/types.js +13 -0
  471. package/dist/types.js.map +1 -0
  472. package/package.json +106 -0
@@ -0,0 +1,822 @@
1
+ ---
2
+ name: spec-implement
3
+ description: "Phase 5 of spec-driven development: implement tasks from an approved tasks.md document using TDD (Red-Green-Refactor). ONLY use this skill when ALL FOUR spec documents exist: requirements.md, design.md, test-design.md, AND tasks.md. Use this skill when the user explicitly requests to start implementation, code a specific task ID, or continue implementation of an existing spec. Triggers on: 'implement task', 'start coding', 'work on task 3', 'implement spec X', 'continue implementation', '/spec-implement'. DO NOT trigger on general 'implement X' requests unless spec documents exist."
4
+ ---
5
+
6
+ # Spec Implementation (Phase 5) — TDD Orchestrator
7
+
8
+ Execute tasks systematically from the approved tasks.md using a **TDD-driven workflow**. Each task follows the cycle: Start → Discover → Read Guidance → **TDD Implementation (parallel-worker)** → **UT Quality Verification** → **Code Review + Commit (review-worker)** → Log → Complete.
9
+
10
+ ## ⛔ Orchestrator Prohibited Actions (ABSOLUTE RULES)
11
+
12
+ You executing this skill are the **orchestrator**, not the **implementer**. Strictly follow these rules:
13
+
14
+ | Prohibited | Reason |
15
+ |-----------|--------|
16
+ | **Do not write code yourself** | Implementation must always be delegated to `parallel-worker` |
17
+ | **Do not write tests yourself** | The initial TDD tests (RED phase) are `parallel-worker`'s responsibility. Adding supplemental tests is `unit-test-engineer`'s responsibility |
18
+ | **Do not run git commit yourself** | Commits must always be delegated to `review-worker` |
19
+ | **Do not skip agent calls** | Each step's agent call cannot be skipped |
20
+
21
+ **For any reason whatsoever (e.g., "it's a simple task", "I can do it myself"), do not skip agent calls.**
22
+
23
+ The orchestrator's sole responsibilities:
24
+ 1. Read tasks.md and identify the next task
25
+ 2. Call agents with the correct prompts
26
+ 3. Receive agent completion reports and hand off to the next agent
27
+ 4. Call log-implementation
28
+ 5. Update task status in tasks.md
29
+
30
+ ## Prerequisites Check (MANDATORY — DO NOT SKIP)
31
+
32
+ Before doing anything else, verify all prerequisite files exist:
33
+
34
+ 1. Check `.spec-workflow/specs/{spec-name}/requirements.md` exists
35
+ 2. Check `.spec-workflow/specs/{spec-name}/design.md` exists
36
+ 3. Check `.spec-workflow/specs/{spec-name}/test-design.md` exists
37
+ 4. Check `.spec-workflow/specs/{spec-name}/tasks.md` exists
38
+
39
+ If ANY file is missing — **STOP immediately. Do NOT start implementing.**
40
+
41
+ | Missing File | Required Skill |
42
+ |-------------|---------------|
43
+ | requirements.md | `/spec-requirements` |
44
+ | design.md | `/spec-design` |
45
+ | test-design.md | `/spec-test-design` |
46
+ | tasks.md | `/spec-tasks` |
47
+
48
+ Tell the user: "Cannot start implementation because {filename} does not exist. Please run {skill-name} first." Then exit this skill.
49
+
50
+ ---
51
+
52
+ Tasks must be approved and cleaned up (Phases 1-4 complete). If not, use `/spec-tasks` first.
53
+
54
+ ## Inputs
55
+
56
+ - **spec name** (kebab-case, e.g., `user-authentication`)
57
+ - **task ID** (optional — if not provided, pick the next pending `[ ]` task)
58
+
59
+ ## Task Cycle
60
+
61
+ Repeat for each wave:
62
+
63
+ ### 1. Start the Wave
64
+
65
+ Parse `.spec-workflow/specs/{spec-name}/tasks.md` and compute execution waves based on `_DependsOn:` dependencies:
66
+
67
+ 1. Parse tasks.md to identify Phase structure and `_DependsOn:` metadata
68
+ 2. Compute execution waves using topological sort — tasks with no unresolved dependencies form a wave. During this computation, explicitly detect dependency cycles (cases where the `_DependsOn:` graph is not a DAG).
69
+ - If any cycle is detected, **STOP execution immediately**. Do not start any wave.
70
+ - Inform the user that `.spec-workflow/specs/{spec-name}/tasks.md` contains cyclic `_DependsOn:` references. Clearly request that they open `tasks.md`, fix the `_DependsOn:` graph so that it becomes acyclic (DAG), and then rerun `/spec-implement`.
71
+ - Do not attempt to auto-resolve, ignore, or partially execute around cyclic dependencies; always escalate to the user for manual correction.
72
+ 3. The **next pending wave** is the first wave (in Phase order) containing at least one `[ ]` task
73
+
74
+ **Single-task wave**: If the wave contains only one task, process it as before (sequential flow).
75
+
76
+ **Multi-task wave**: If the wave contains multiple tasks, process them in parallel:
77
+ - Mark ALL tasks in the wave from `[ ]` to `[-]` in tasks.md
78
+ - Prepare worktrees for all tasks (step 3.7)
79
+ - Launch parallel-workers simultaneously (step 4)
80
+
81
+ > Note: multi-task wave では、複数タスクが同時に `[-]`(進行中)になることは **意図された正常な動作** です。これは `implement-task` プロンプト等の「Only one task should be in-progress at a time」ガイダンスの明示的な例外です。
82
+
83
+ **Wave 計算時の PhaseReview 除外**: `_PhaseReview: true` のタスクは wave 計算から常に除外する。PhaseReview はフェーズ内の全通常タスク完了後に単独で処理する。
84
+
85
+ **No `_DependsOn:` metadata**: If no tasks in the Phase have `_DependsOn:`, all non-PhaseReview tasks form Wave 0 and are processed as a single multi-task wave in **parallel**. Mark them from `[ ]` to `[-]` together, following the same multi-task wave rules described above.
86
+
87
+ **Multi-task wave の per-task 処理**: wave 内の各タスクは、steps 3-8(worktree 作成 → parallel-worker → UT検証 → review-worker → log → merge/cleanup → mark `[x]`)を**タスクごとに独立して**実行する。各タスクは専用の worktree/branch で作業し、完了時に個別にマージする。wave 内の全タスクが完了(または失敗)した後に次の wave に進む。
88
+
89
+ ### 2. Discover Existing Work
90
+
91
+ Before writing any code, search implementation logs to understand what's already been built. This prevents duplicate endpoints, reimplemented components, and broken integrations.
92
+
93
+ Implementation logs live in: `.spec-workflow/specs/{spec-name}/Implementation Logs/`
94
+
95
+ **Search with grep** (fast, recommended):
96
+ ```bash
97
+ grep -r "GET\|POST\|PUT\|DELETE" ".spec-workflow/specs/{spec-name}/Implementation Logs/"
98
+ grep -r "component\|Component" ".spec-workflow/specs/{spec-name}/Implementation Logs/"
99
+ grep -r "function\|class" ".spec-workflow/specs/{spec-name}/Implementation Logs/"
100
+ grep -r "integration\|dataFlow" ".spec-workflow/specs/{spec-name}/Implementation Logs/"
101
+ ```
102
+
103
+ **Or read markdown files directly** to examine specific log entries.
104
+
105
+ Search at least 2-3 different terms to discover comprehensively. If you find existing code that does what your task needs, reuse it instead of recreating.
106
+
107
+ ### 3. Read Task Guidance
108
+
109
+ Look at the task's `_Prompt` field for structured guidance:
110
+ - **Role**: The developer persona to adopt
111
+ - **Task**: What to build, with context references
112
+ - **Restrictions**: Constraints and things to avoid
113
+ - **_Leverage**: Existing files to reuse
114
+ - **_Requirements**: Which requirements this implements
115
+ - **Success**: How to know you're done
116
+
117
+ ### 3.5 Phase Review Tasks
118
+
119
+ If the task has `_PhaseReview: true_`, **skip the TDD cycle (steps 4-5)** and instead:
120
+
121
+ #### 3.5.1 Run Tests
122
+
123
+ ```bash
124
+ cargo test --quiet
125
+ ```
126
+
127
+ - **All pass** → proceed to 3.5.2
128
+ - **Failures** → analyze the failing test errors and identify the root cause task:
129
+ - **Root cause is a task within the current Phase** → revert the root cause task from `[x]` to `[-]`, and revert the PhaseReview task from `[-]` to `[ ]`. Re-run the root cause task from step 4.
130
+ - **Root cause is a task from a prior Phase** → escalate to the user (prior Phase fix is needed, impact scope must be assessed)
131
+
132
+ #### 3.5.1.5 Integration Verification (統合検証)
133
+
134
+ ユニットテスト通過後、Phase の成果物が統合レベルで動作することを検証する。
135
+ コマンド定義は `quality-checks.md` の「Integration Verification」セクションを参照。
136
+
137
+ **Step A: プロジェクトタイプ検出**
138
+
139
+ | 検出条件 | タイプ |
140
+ |----------|--------|
141
+ | `Cargo.toml` に `[package.metadata.leptos]` | Leptos フルスタック |
142
+ | `Cargo.toml` に `axum` / `actix-web` / `rocket` 依存 | Rust API |
143
+ | `package.json` 存在 | Node.js |
144
+ | いずれにも該当しない | Generic(ビルドのみ検証) |
145
+
146
+ **Step B: ビルド検証(必須)**
147
+
148
+ 成果物のビルドが成功することを確認する。コマンドはプロジェクトタイプに応じて `quality-checks.md` を参照。
149
+
150
+ **Step C: 統合テスト実行(テストが存在する場合のみ)**
151
+
152
+ `tests/integration*` ディレクトリまたは同等のテストファイルが存在する場合に実行。存在しない場合は SKIP。
153
+
154
+ **Step D: スモークテスト(API プロジェクトのみ)**
155
+
156
+ サーバを一時起動し、ヘルスチェックエンドポイントへの疎通を確認する。外部依存(DB等)で起動不可の場合は SKIP + ログ記録。
157
+
158
+ **結果判定:**
159
+
160
+ | 結果 | アクション |
161
+ |------|----------|
162
+ | PASS | 3.5.2 Expert Team Review に進む |
163
+ | FAIL (ビルド) | ビルドエラーを分析、根本原因タスクを特定。Phase 内タスク → `[x]` を `[-]` に戻して差し戻し、PhaseReview を `[ ]` に戻す。根本原因タスクの step 4 から再実行 |
164
+ | FAIL (統合テスト) | 失敗テストを分析、根本原因タスク特定。Phase 内タスク → 差し戻し、前 Phase → ユーザーエスカレート |
165
+ | FAIL (スモーク) | 起動ログを分析し根本原因特定、差し戻し |
166
+ | SKIP (環境依存) | ログに SKIP 理由を記録し、3.5.2 に進む。Expert Team Review で補完 |
167
+
168
+ 統合検証の結果(各ステップの PASS/FAIL/SKIP)は、3.5.2 の Expert Team Review に入力として渡すこと。
169
+
170
+ #### 3.5.2 Expert Team Review (multi-perspective review)
171
+
172
+ Phase 完了時は、コミット前に専門家チームによる多角的コードレビューを実施する。詳細は `/phase-review-team` スキルを参照。
173
+
174
+ **チーム編成(5名を並列起動):**
175
+
176
+ | Role | Perspective |
177
+ |------|-------------|
178
+ | 実装担当 | 仕様書にある機能を網羅しているか、仕様を逸脱していないか |
179
+ | セキュリティ担当1 | 認証、認可、データ漏洩 |
180
+ | セキュリティ担当2 | OWASP TOP 10、最新の CVE |
181
+ | パフォーマンス担当 | ボトルネック、計算量、リソース効率 |
182
+ | 品質・保守性担当 | テストカバレッジ、読みやすさ、命名規則、DRY 原則 |
183
+
184
+ **手順:**
185
+
186
+ 1. 5名の専門家を Agent tool で **並列** 起動(プロンプト詳細は `/phase-review-team` スキルを参照)
187
+ 2. 各担当は独立して調査し、具体的な問題箇所と改善案を報告
188
+ 3. リーダー(オーケストレーター)は各報告を統合し、優先度付き最終レポートを作成
189
+ 4. レポートを `.spec-workflow/specs/{spec-name}/reviews/phase-{phase-number}-review.md` に保存
190
+
191
+ **Verdict に基づく分岐:**
192
+
193
+ | Verdict | Condition | Action |
194
+ |---------|-----------|--------|
195
+ | **PASS** | P0 = 0, P1 = 0 | 3.5.3 に進む(review-worker にコミットを委譲) |
196
+ | **NEEDS_REWORK** | P0 = 0, P1 > 0 | P1 の発見事項を parallel-worker に差し戻し。修正後、変更箇所のみ再レビュー(最大2回) |
197
+ | **BLOCK** | P0 > 0 | ユーザーにエスカレート |
198
+
199
+ #### 3.5.3 Code Review + Commit (delegate to review-worker)
200
+
201
+ Expert Team Review で PASS 後、PhaseReview 専用の Worktree を作成し、review-worker にコミットを委譲する:
202
+
203
+ ```bash
204
+ # PhaseReview 専用 Worktree を作成
205
+ WORKTREE_PATH=".worktrees/{spec-name}/phase-review-{phase-number}"
206
+ BRANCH="review/{spec-name}/phase-{phase-number}"
207
+
208
+ if git worktree list | grep -q "$WORKTREE_PATH"; then
209
+ echo "Reusing existing worktree: $WORKTREE_PATH"
210
+ else
211
+ git worktree add "$WORKTREE_PATH" -b "$BRANCH"
212
+ echo "Created new worktree: $WORKTREE_PATH (branch: $BRANCH)"
213
+ fi
214
+ ```
215
+
216
+ ```javascript
217
+ Agent({
218
+ subagent_type: "review-worker",
219
+ description: "Phase review: final commit",
220
+ prompt: `⚠️ INDEPENDENT REVIEW REQUIRED ⚠️
221
+ Expert team review has already been completed, but you MUST perform your own independent review.
222
+ Previous review results are reference only — your job is to find problems, not confirm prior approval.
223
+
224
+ As a phase review, please perform a final review and commit all files changed in the current Phase.
225
+
226
+ Project path: {project-path}
227
+ Spec name: {spec-name}
228
+ Phase: {phase-number}
229
+ Worktree path: {WORKTREE_PATH}
230
+ Branch: {BRANCH}
231
+ Changed files: {all files changed in this phase}
232
+
233
+ **Important**: Always run \`cd {WORKTREE_PATH}\` before reviewing and committing.
234
+
235
+ Integration Verification Results (from step 3.5.1.5):
236
+ - Build: {integration-verification.build}
237
+ - Integration Tests: {integration-verification.integration-tests}
238
+ - Smoke Test: {integration-verification.smoke-test}
239
+
240
+ Expert team review report: .spec-workflow/specs/{spec-name}/reviews/phase-{phase-number}-review.md (reference only).
241
+ Focus on final quality checks (rustfmt, clippy, tests) and commit.
242
+ Review across all aspects (A–F) and report review_action as commit / rework / escalate.
243
+ Include integration-verification results in your completion report.
244
+ The commit message should summarize the Phase's deliverables.`
245
+ })
246
+ ```
247
+
248
+ - **review_action: commit** → proceed to 3.5.4
249
+ - **review_action: rework** → follow the normal rework flow (identify the root cause task and send it back to that task's parallel-worker)
250
+ - **review_action: escalate** → follow the normal escalate flow
251
+
252
+ #### 3.5.4 Complete
253
+
254
+ review-worker has committed. Merge the PhaseReview worktree and clean up:
255
+
256
+ ```bash
257
+ # Merge PhaseReview worktree branch
258
+ git merge --no-ff "$BRANCH" -m "merge: integrate phase-{phase-number} review"
259
+
260
+ # Remove the worktree
261
+ git worktree remove "$WORKTREE_PATH"
262
+ git branch -d "$BRANCH"
263
+ ```
264
+
265
+ Proceed to step 7 (Log).
266
+
267
+ ### 3.6 TDD Skip Tasks
268
+
269
+ If the task has `_TDDSkip: true_` (tasks that cannot be tested such as project initialization, Dockerfile, migrations, etc.), **skip the TDD cycle (step 4) and UT quality verification (step 5)** and instead:
270
+
271
+ 1. Instruct parallel-worker to implement directly without TDD (add `_TDDSkip: true, so skip the TDD cycle and perform direct implementation + quality checks only` to the prompt)
272
+ 2. After parallel-worker completes, skip step 5 (UT) and step 5.5 (code-simplifier) and proceed to step 6 (review-worker)
273
+ 3. review-worker reviews across all aspects as usual (but skip category E: final test verification)
274
+
275
+ ### 3.7 Prepare Worktrees
276
+
277
+ Prepare a git worktree for each task in the wave. This allows parallel-worker and review-worker to work safely in independent working directories without affecting the orchestrator's main branch.
278
+
279
+ **For multi-task waves**: Create worktrees for ALL tasks in the wave before launching any parallel-workers.
280
+
281
+ ```bash
282
+ WORKTREE_PATH=".worktrees/{spec-name}/{task-id}"
283
+ BRANCH="impl/{spec-name}/{task-id}"
284
+
285
+ # Check for existing worktree (reuse during rework cycle)
286
+ if git worktree list | grep -q "$WORKTREE_PATH"; then
287
+ echo "Reusing existing worktree: $WORKTREE_PATH (branch: $BRANCH)"
288
+ else
289
+ git worktree add "$WORKTREE_PATH" -b "$BRANCH"
290
+ echo "Created new worktree: $WORKTREE_PATH (branch: $BRANCH)"
291
+ fi
292
+ ```
293
+
294
+ Retain `WORKTREE_PATH` and `BRANCH` as variables and pass them to the agent prompts in steps 4 and 6.
295
+
296
+ ### 4. TDD Implementation (parallel-worker) [AGENT CALL REQUIRED]
297
+
298
+ > ⛔ **Do not write code yourself. Always call the `parallel-worker` agent.**
299
+
300
+ Delegate the entire TDD cycle (Red → Green → Refactor + quality checks) to the `parallel-worker` agent. parallel-worker only implements; **it does not git commit** (that is review-worker's responsibility).
301
+
302
+ **Wave parallel execution**: For multi-task waves, launch ALL parallel-worker agents **simultaneously** in a single message with multiple Agent tool calls. Each agent works in its own isolated worktree. Wait for all agents to complete before proceeding to step 5.
303
+
304
+ ```javascript
305
+ Agent({
306
+ subagent_type: "parallel-worker",
307
+ description: "TDD: Red-Green-Refactor implementation",
308
+ prompt: `Implement the following task using TDD (Red→Green→Refactor).
309
+
310
+ Project path: {project-path}
311
+ Spec name: {spec-name}
312
+ Task ID: {task-id}
313
+ Worktree path: {WORKTREE_PATH}
314
+ Branch: {BRANCH}
315
+ Task prompt:
316
+ {paste the full _Prompt content here}
317
+
318
+ Test focus areas: {_TestFocus content from task, if available}
319
+ Leverage files: {_Leverage file paths from task}
320
+ Design doc path: {project-path}/.spec-workflow/specs/{spec-name}/design.md
321
+ Test design doc path: {project-path}/.spec-workflow/specs/{spec-name}/test-design.md
322
+
323
+ **Important**: Always start by running `cd {WORKTREE_PATH}` before beginning implementation. Changes directly in the main repository are prohibited.
324
+
325
+ Steps:
326
+ 1. RED: Write failing tests (see /spec-impl-test-write skill)
327
+ 2. Confirm all tests fail by running them
328
+ 3. GREEN: Write the minimum code to make the tests pass (see /spec-impl-code skill)
329
+ 4. Confirm all tests pass by running them (retry up to 3 times on failure)
330
+ 5. REFACTOR: Clean up the code (see /spec-impl-review skill)
331
+ 6. Confirm all tests still pass after refactoring
332
+ 7. Run quality checks (rustfmt + clippy + cargo test)
333
+
334
+ Include the following in the completion report:
335
+ - tests: pass|fail
336
+ - rustfmt: pass|fail
337
+ - clippy: pass|fail
338
+ - test_file_paths: list of test files
339
+ - implementation_file_paths: list of implementation files
340
+ - changed_files: list of all changed files`
341
+ })
342
+ ```
343
+
344
+ Capture from the result: **status**, **test_file_paths**, **implementation_file_paths**, **changed_files**.
345
+
346
+ Branch based on parallel-worker's `status`:
347
+
348
+ - **status: completed** → proceed to step 5
349
+ - **status: retry_exhausted** → parallel-worker has stopped after exhausting retries. Report the following to the user:
350
+ - Which phase (RED/GREEN/REFACTOR/quality_check) failed
351
+ - The last error message
352
+ - Files partially created
353
+
354
+ User decision: fix manually and resume / skip the task and move on / revisit the design
355
+
356
+ **Resume flow (after user decision):**
357
+
358
+ | Choice | Steps |
359
+ |--------|-------|
360
+ | **Fix manually and resume** | After the user manually fixes files inside `{WORKTREE_PATH}`, resume from step 5 (UT). Do not reset the rework counter (carry over the cumulative count) |
361
+ | **Skip the task** | Append `<!-- BLOCKED: {reason} -->` as a comment to the relevant task row in tasks.md, revert `[-]` to `[ ]`, and proceed to the next `[ ]` task |
362
+ | **Revisit the design** | Follow the same flow as `review_action: escalate` (user decides whether to adjust within the design.md scope or do a Phase Reset) |
363
+
364
+ ### 5. Unit Test Quality Verification [AGENT CALL REQUIRED]
365
+
366
+ > ⛔ **Do not add tests yourself. Always call the `unit-test-engineer` agent.**
367
+
368
+ > **Language note**: `unit-test-engineer` is specialized for Rust. For non-Rust projects (Node.js, Python, etc.), skip this step or use a `general-purpose` subagent with the same test quality criteria (Happy Path / Boundary Values / Error Handling / Edge Cases coverage).
369
+
370
+ Verify the quality of tests written during the TDD cycle and supplement any missing test perspectives. TDD is "a development method that writes tests first to drive implementation"; this step independently verifies the quality of the implemented code.
371
+
372
+ Pass the implementation files to the `unit-test-engineer` agent and have it confirm coverage of required test perspectives (happy path, boundary values, exception handling, edge cases).
373
+
374
+ ```javascript
375
+ Agent({
376
+ subagent_type: "unit-test-engineer",
377
+ description: "UT: Verify test quality",
378
+ prompt: `Verify the unit test quality for the following implementation files.
379
+
380
+ Worktree path: {WORKTREE_PATH}
381
+ Implementation files: {implementation_file_paths from step 4}
382
+ Existing test files: {test_file_paths from step 4}
383
+ Test focus areas: {_TestFocus content from task, if available}
384
+
385
+ **Important**: Always run \`cd {WORKTREE_PATH}\` before starting work. All file paths are relative to the worktree.
386
+
387
+ Check against required test perspectives (happy path, boundary values, exception handling, edge cases)
388
+ and add any missing test cases.
389
+ Be careful not to duplicate existing tests.
390
+ If Test focus areas are specified, prioritize those verification points.
391
+
392
+ The completion report must include:
393
+ - ut_action: added (tests were added) | verified_sufficient (no additions needed, already sufficient)
394
+ - added_tests: list of added test function names (if added)
395
+ - added_to_files: list of modified test files (if added)
396
+ - coverage_summary: happy path: N cases, boundary values: N cases (+M added), exception handling: N cases (+M added), edge cases: N cases (+M added)`
397
+ })
398
+ ```
399
+
400
+ Capture from the result: **ut_action**, **added_tests**, **added_to_files**, **coverage_summary**.
401
+
402
+ - `ut_action: added` → run the tests, confirm all pass, and pass the additional info to step 5.5
403
+ - `ut_action: verified_sufficient` → proceed directly to step 5.5
404
+
405
+ ### 5.5. Code Simplification (code-simplifier) [AGENT CALL REQUIRED]
406
+
407
+ > ⛔ **Do not clean up code yourself. Always call the `code-simplifier` agent.**
408
+
409
+ After TDD and UT verification are complete, improve code clarity and maintainability while preserving functionality.
410
+ The output of `code-simplifier` is comprehensively reviewed by the subsequent step 6 (review-worker), so no dedicated review step is added.
411
+
412
+ ```javascript
413
+ Agent({
414
+ subagent_type: "code-simplifier",
415
+ description: "Simplify: improve clarity without changing behavior",
416
+ prompt: `Simplify and refine the following implementation files while preserving functionality.
417
+
418
+ Worktree path: {WORKTREE_PATH}
419
+ Implementation files: {implementation_file_paths from step 4}
420
+ Test files: {test_file_paths from step 4 + added_to_files from step 5}
421
+
422
+ **Important**: Always run cd {WORKTREE_PATH} before starting work.
423
+
424
+ After completing, run cargo test to confirm all tests pass.
425
+ The completion report must include:
426
+ - simplify_result: simplified (changes made) | no_change (no changes)
427
+ - changed_files: list of changed files (if simplified)
428
+ - test_result: pass | fail`
429
+ })
430
+ ```
431
+
432
+ Capture from the result: **simplify_result**, **changed_files** (if simplified), **test_result**.
433
+
434
+ - `test_result: pass` → proceed to step 6 (pass `changed_files`)
435
+ - `test_result: fail` → roll back only the files in `changed_files` using `git restore -- {changed_files}`, then proceed to step 6 (record as `simplify_result: reverted`)
436
+ - `simplify_result: no_change` → proceed directly to step 6
437
+
438
+ ### 6. Code Review + Commit (review-worker) [AGENT CALL REQUIRED]
439
+
440
+ > ⛔ **Do not commit yourself. Always call the `review-worker` agent.**
441
+
442
+ Delegate code review and commit to the `review-worker` agent. Separating implementation (parallel-worker) and review (review-worker) responsibilities ensures quality.
443
+
444
+ ```javascript
445
+ Agent({
446
+ subagent_type: "review-worker",
447
+ description: "Review and commit",
448
+ prompt: `⚠️ INDEPENDENT REVIEW REQUIRED ⚠️
449
+ This code has passed through parallel-worker (TDD), unit-test-engineer, and code-simplifier.
450
+ However, you MUST NOT assume it is correct because previous steps reported success.
451
+ Previous results are provided as reference ONLY — your independent, critical review is mandatory.
452
+ Treat this as if you are seeing the code for the first time. Your job is to find problems, not confirm success.
453
+
454
+ Review the following changes and commit if they meet quality standards.
455
+
456
+ Project path: {project-path}
457
+ Spec name: {spec-name}
458
+ Task ID: {task-id}
459
+ Worktree path: {WORKTREE_PATH}
460
+ Branch: {BRANCH}
461
+ Changed files: {changed_files from step 4 + added_to_files from step 5 + changed_files from step 5.5}
462
+ Task prompt: {paste the full _Prompt content here}
463
+
464
+ **Important**: Always run `cd {WORKTREE_PATH}` before reviewing and committing.
465
+
466
+ Previous step results (reference only — do not let these bias your review):
467
+ UT quality verification results (step 5):
468
+ - ut_action: {ut_action from step 5}
469
+ - added_tests: {added_tests from step 5}
470
+ - coverage_summary: {coverage_summary from step 5}
471
+
472
+ Simplification results (step 5.5):
473
+ - simplify_result: {simplify_result from step 5.5} (one of: simplified / no_change / reverted)
474
+ - changed_files: {changed_files from step 5.5 (only if simplified)}
475
+
476
+ Notes:
477
+ - Tests listed in added_tests have already been quality-verified by unit-test-engineer.
478
+ In category E (final test verification), do not flag these tests as "insufficient".
479
+ However, style, naming, and sensitive data checks should be performed as usual.
480
+ - Files with simplify_result: simplified have been confirmed by code-simplifier to preserve functionality and pass tests.
481
+ In category A (style), evaluate the simplified code as the final form.
482
+
483
+ ## Review Checklist (各カテゴリの具体的な確認項目)
484
+ 以下の各質問に対して、具体的な回答を observations に記録すること:
485
+
486
+ **A: Style** — 命名は意図を正確に表現しているか? プロジェクト既存コードとスタイルは一貫しているか?
487
+ **B: Design** — unwrap() を不適切に使用していないか? 各関数は単一責任か? 依存方向は正しいか?
488
+ **C: Security** — 外部入力はバリデーションされているか? レスポンスに内部情報が漏洩していないか? SQL はクエリビルダー経由か?
489
+ **D: Spec** — _Prompt の Success 基準を1つずつ確認し、各基準の充足/不足を明示すること
490
+ **E: Tests** — テストは実装と同期しているか? 値の検証(is_ok() だけでなく具体値の確認)があるか?
491
+ **F: Design Conformance** — design.md に未定義のフィールド/エンドポイントが追加されていないか?
492
+
493
+ ⚠️ 各カテゴリの observations を完了レポートに必ず含めること。
494
+ 「問題なし」の場合でも、何を確認して問題なしと判断したかを記載する。
495
+ review_action が commit であっても observations と auto_fixed は必須。
496
+ report review_action as one of: commit / rework / escalate.`
497
+ })
498
+ ```
499
+
500
+ The orchestrator branches based on review-worker's `review_action`:
501
+
502
+ #### review_action: commit (all aspects pass)
503
+ → proceed to step 7
504
+
505
+ #### review_action: rework (findings in B:design / C:security / E:tests)
506
+
507
+ Send back to parallel-worker with the review-worker's `findings`:
508
+
509
+ **Worktree handling**: In a rework cycle, **reuse the same worktree** created in step 3.7. Do not create a new worktree. The `git worktree list` check in step 3.7 ensures this.
510
+
511
+ ```javascript
512
+ Agent({
513
+ subagent_type: "parallel-worker",
514
+ description: "Rework: fix review findings ({N}/3)",
515
+ prompt: `The review found the following issues. Please fix them.
516
+
517
+ Project path: {project-path}
518
+ Spec name: {spec-name}
519
+ Task ID: {task-id}
520
+ Worktree path: {WORKTREE_PATH}
521
+ Branch: {BRANCH}
522
+
523
+ **Important**: Always run `cd {WORKTREE_PATH}` before making fixes.
524
+
525
+ rework_attempt: {N} / 3 (maximum 3 times)
526
+
527
+ Findings:
528
+ {findings from review-worker}
529
+
530
+ Note: This is rework attempt {N}. The maximum is 3; if unresolved after 3 attempts, the issue will be escalated to the user.
531
+ Fix all findings at once. On the final attempt (3/3), avoid large-scale changes and choose the minimum fix that will pass review.
532
+
533
+ After fixing, run quality checks (rustfmt + clippy + cargo test) to confirm all pass.
534
+ Include changed_files in the completion report.`
535
+ })
536
+ ```
537
+
538
+ The orchestrator manages the rework_attempt counter. After the fix, re-run step 5 (UT quality verification) → step 6 (review). **The rework → re-review cycle has a maximum of 3 times**. If unresolved after 3 times, report to the user with the remaining findings.
539
+
540
+ **Counter scope:**
541
+ - The counter resets **per task** (per task-id)
542
+ - Tasks with `_PhaseReview: true` also allow up to 3 reworks
543
+ - When a review rework occurs during PhaseReview, identify the root cause task and fix it, but that fix also consumes the rework counter (recorded as the PhaseReview's rework_attempt)
544
+ - After resuming from a manual fix following `retry_exhausted`, carry over the counter without resetting it
545
+
546
+ #### review_action: escalate (D:spec mismatch, F:design conformance violation)
547
+
548
+ A mismatch with the approved design.md or a specification interpretation discrepancy has been detected. Present review-worker's `findings` to the user and ask for a decision.
549
+
550
+ **Important: Do not modify design.md during the implementation phase.** If design changes are needed, discard all implementation so far and redo from Phase 2 (spec-design). Therefore, escalate responses are limited to "adjust the implementation within the scope of design.md".
551
+
552
+ **Response flow:**
553
+
554
+ 1. Present findings to the user and confirm **how to adjust within the scope of design.md**
555
+ 2. Append the user's response to the `_Prompt`'s Restrictions for the relevant task:
556
+ ```
557
+ Example addition to _Prompt:
558
+ Restrictions: ... | [escalate response] review-worker finding: Use UserDto instead of UserDetailDto. last_login_at is not defined in design.md and must not be included
559
+ ```
560
+ 3. Send back to parallel-worker as a rework (switch from escalate to rework)
561
+ 4. After the fix, re-run step 5 (UT) → step 6 (review)
562
+
563
+ The same cycle limit as rework (maximum 3 times) applies. If unresolved after 3 times, it is likely that the design itself has a problem, so propose redoing from Phase 2 to the user.
564
+
565
+ ### 7. Log Implementation (MANDATORY)
566
+
567
+ Call the `log-implementation` MCP tool BEFORE marking the task complete. A task without a log is not complete — this is the most commonly skipped step.
568
+
569
+ Required fields:
570
+ - `specName`: The spec name
571
+ - `taskId`: The task ID you just completed
572
+ - `summary`: Clear description of what was implemented (1-2 sentences)
573
+ - `filesModified`: List of files you edited
574
+ - `filesCreated`: List of new files — **include test files**
575
+ - `statistics`: `{ linesAdded: number, linesRemoved: number }`
576
+ - `artifacts` (REQUIRED — include only applicable categories. Pass an empty object `{}` if the implementation has no applicable content):
577
+ - `apiEndpoints`: API routes created/modified (method, path, purpose). For request/response details, refer to design.md
578
+ - `dbMigrations`: Migration names and tables created
579
+ - `models`: Names and locations of Models / DTOs created or modified
580
+ - `integrations`: Connections to external services (only if applicable)
581
+ - `reviewProcess` (optional — only record if review-worker was executed. Review results from steps 4–6):
582
+ - `reworkCount`: Number of reworks (use `0` if committed on the first attempt)
583
+ - `reviewOutcome`: Final result — `"commit"` or `"escalated"`
584
+ - `findings`: Only include if reworkCount > 0. Record of each review attempt:
585
+ ```json
586
+ "reviewProcess": {
587
+ "reworkCount": 2,
588
+ "reviewOutcome": "commit",
589
+ "findings": [
590
+ {
591
+ "attempt": 1,
592
+ "categories": ["B:design", "C:security"],
593
+ "summary": "UserRepo not using AppError. Raw string concatenation in SQL query",
594
+ "action": "rework"
595
+ },
596
+ {
597
+ "attempt": 2,
598
+ "categories": ["B:design"],
599
+ "summary": "Repository method return type does not match design.md",
600
+ "action": "rework"
601
+ },
602
+ {
603
+ "attempt": 3,
604
+ "categories": [],
605
+ "summary": "All aspects passed",
606
+ "action": "commit"
607
+ }
608
+ ]
609
+ }
610
+ ```
611
+ - `observations` (optional — review-worker のレビュー観察ログ。tool schema には未定義の拡張フィールド。review-worker の完了レポートの `observations` キーに対応):
612
+ ```json
613
+ "observations": {
614
+ "style": "checked-ok: 命名規則準拠、create_user/UserDto 等",
615
+ "design": "checked-ok: AppError 変換あり、unwrap() なし",
616
+ "security": "checked-ok: クエリビルダー使用、入力バリデーションあり",
617
+ "spec_compliance": "checked-ok: Success 基準3項目すべて充足",
618
+ "test_quality": "checked-ok: 値の具体的検証あり、境界値テストあり",
619
+ "design_conformance": "checked-ok: design.md 定義外の追加なし"
620
+ }
621
+ ```
622
+ - `auto_fixed` (optional — tool schema には未定義の拡張フィールド。review-worker の完了レポートの `auto_fixed` キーをそのまま記録する): 自動修正した Minor 問題のリスト(0件の場合は空配列 `[]`):
623
+ ```json
624
+ "auto_fixed": [
625
+ { "category": "A:style", "file": "src/handler.rs:45", "description": "unwrap() を map_err() に修正" }
626
+ ]
627
+ ```
628
+ - If reworkCount is 0 (passed on first attempt), `findings` may be omitted. `observations` and `auto_fixed` are optional extension fields (not in tool schema) but recommended for traceability. オーケストレーターは review-worker から受け取った完了レポートの `auto_fixed` 配列をそのまま記録すること:
629
+ ```json
630
+ "reviewProcess": {
631
+ "reworkCount": 0,
632
+ "reviewOutcome": "commit",
633
+ "observations": { "style": "checked-ok: ...", "design": "checked-ok: ...", ... },
634
+ "auto_fixed": []
635
+ }
636
+ ```
637
+
638
+ **If log-implementation fails:**
639
+ - Do not mark the task as `[x]` (completion without a log is incomplete)
640
+ - Report the error to the user and confirm whether to record the log manually or retry
641
+ - If the MCP tool itself is unavailable: Creating a markdown file manually in the `.spec-workflow/specs/{spec-name}/Implementation Logs/` directory is an acceptable alternative
642
+
643
+ ### 8. Complete the Task
644
+
645
+ Only after `log-implementation` returns success:
646
+ - Verify all success criteria from the `_Prompt` are met
647
+ - Edit tasks.md: Change `[-]` to `[x]`
648
+
649
+ #### Worktree Merge and Cleanup
650
+
651
+ After review-worker commits, integrate the worktree branch into the main branch and clean up:
652
+
653
+ ```bash
654
+ # Merge the worktree commits into the main branch
655
+ git merge --no-ff "$BRANCH" -m "merge: integrate implementation of {task-id}"
656
+
657
+ # Remove the worktree
658
+ git worktree remove "$WORKTREE_PATH"
659
+ git branch -d "$BRANCH"
660
+ ```
661
+
662
+ Then move to the next pending wave and repeat.
663
+
664
+ ### 9. Final E2E Gate (全Phase完了後)
665
+
666
+ 全 Phase の実装が完了した後(最後の PhaseReview タスクが `[x]` になった後)、最終的な E2E ゲートを実行する。
667
+ これは個別 Phase の統合検証(3.5.1.5)とは異なり、**全成果物を統合した最終確認**である。
668
+
669
+ #### 9.1 トリガー条件
670
+
671
+ tasks.md 内の全タスク(PhaseReview 含む)が `[x]` になった時点で自動的に開始する。
672
+
673
+ #### 9.2 検証ステップ
674
+
675
+ コマンド定義は `quality-checks.md` の「Integration Verification」セクションを参照。
676
+
677
+ **Step 1: フルビルド検証**
678
+
679
+ プロジェクト全体のクリーンビルドが成功することを確認する。
680
+
681
+ ```bash
682
+ # Rust
683
+ cargo build
684
+
685
+ # Leptos
686
+ cargo leptos build
687
+
688
+ # Node.js
689
+ npm run build
690
+ ```
691
+
692
+ **Step 2: 全テスト実行**
693
+
694
+ ユニットテスト + 統合テストの全件を実行する。
695
+
696
+ ```bash
697
+ # Rust
698
+ cargo test --quiet
699
+
700
+ # Node.js
701
+ npm test
702
+ ```
703
+
704
+ **Step 3: 統合テスト実行**
705
+
706
+ 統合テストが存在する場合、明示的に統合テストのみを実行する。
707
+
708
+ ```bash
709
+ # Rust
710
+ cargo test --tests --quiet
711
+
712
+ # Node.js
713
+ npm run test:integration
714
+ ```
715
+
716
+ **Step 4: フルスモークテスト(API プロジェクトのみ)**
717
+
718
+ Phase Review のスモークテスト(Step D)と同様の手順だが、ヘルスチェックに加えて、
719
+ design.md に定義された主要エンドポイントのレスポンス確認も行う。
720
+
721
+ - ヘルスチェック: `/health`, `/api/health`, `/healthz` への GET リクエスト
722
+ - 主要エンドポイント: design.md の API 定義から GET エンドポイントを抽出し、ステータスコードを確認
723
+ - 認証が必要なエンドポイントは 401 が返ることを確認(認証なしで 200 が返る場合はセキュリティ問題)
724
+ - 認証不要なエンドポイントは 200 または 404(データなし)が返ることを確認
725
+
726
+ **Step 5: E2E テスト実行(コンテナベース — test-design.md 仕様準拠)**
727
+
728
+ test-design.md の E2E 仕様に基づくテストが存在する場合に実行する(`/spec-e2e-implement` で作成されたテスト)。
729
+
730
+ ```bash
731
+ # テスト用コンテナ起動
732
+ if [ -f docker-compose.test.yml ]; then
733
+ docker-compose -f docker-compose.test.yml up -d
734
+ # ヘルスチェック待機(最大60秒)
735
+ fi
736
+ ```
737
+
738
+ | ランナー | 検出条件 | コマンド |
739
+ |---------|----------|---------|
740
+ | Playwright | `playwright.config.ts` 存在 | `npx playwright test` |
741
+ | Rust E2E | `tests/e2e/` ディレクトリ存在 | `cargo test --tests --quiet` |
742
+ | Node.js E2E | `package.json` に `test:e2e` | `npm run test:e2e` |
743
+
744
+ ```bash
745
+ # テスト用コンテナ停止・クリーンアップ
746
+ if [ -f docker-compose.test.yml ]; then
747
+ docker-compose -f docker-compose.test.yml down -v
748
+ fi
749
+ ```
750
+
751
+ E2E テストが存在しない(上記の検出条件をいずれも満たさない)場合は SKIP として扱う。
752
+
753
+ #### 9.3 結果判定
754
+
755
+ | 結果 | アクション |
756
+ |------|----------|
757
+ | **PASS** | 全検証クリア → 実装完了をユーザーに報告。`spec-status` ツールで最終ステータスを表示 |
758
+ | **FAIL** | 失敗箇所を分析し、該当 Phase・タスクを特定。タスクを `[x]` から `[-]` に戻し、該当タスクの step 4 から再実行。PhaseReview も `[ ]` に戻す |
759
+ | **SKIP (環境依存)** | ユーザーに手動検証を依頼。SKIP した検証項目と理由を明示的にリストし、ユーザーが自分で確認できるコマンドを提示する |
760
+
761
+ #### 9.4 最終レポート
762
+
763
+ Final E2E Gate の結果を `.spec-workflow/specs/{spec-name}/reviews/final-e2e-gate.md` に保存する。
764
+
765
+ ```markdown
766
+ # Final E2E Gate Report
767
+
768
+ ## Spec: {spec-name}
769
+ ## Date: {date}
770
+
771
+ ## Results
772
+ | Step | Result | Details |
773
+ |------|--------|---------|
774
+ | Build | PASS/FAIL/SKIP | {details} |
775
+ | All Tests | PASS/FAIL/SKIP | {N} passed, {M} failed |
776
+ | Integration Tests | PASS/FAIL/SKIP | {N} passed, {M} failed |
777
+ | Smoke Test | PASS/FAIL/SKIP | {details} |
778
+ | E2E Tests | PASS/FAIL/SKIP | {N} passed, {M} failed |
779
+
780
+ ## Verdict: PASS / FAIL / PARTIAL (SKIP あり)
781
+
782
+ ## Notes
783
+ {SKIP の理由、手動検証が必要な項目等}
784
+ ```
785
+
786
+ #### Wave Failure Handling
787
+
788
+ When processing a multi-task wave, if any task results in `retry_exhausted`:
789
+ 1. **Continue executing** remaining tasks in the wave — do not abort the entire wave
790
+ 2. After all tasks in the wave complete/fail, report a summary to the user:
791
+ - Succeeded: [task-ids]
792
+ - Failed: [task-ids with reasons]
793
+ 3. Tasks in subsequent waves that depend on a failed task (via `_DependsOn:`):
794
+ - Add `<!-- BLOCKED: dependency {failed-task-id} failed -->` comment to the task line and ensure its checkbox state is `- [ ]` (do not change the checkbox token itself)
795
+ - Skip these tasks in subsequent waves
796
+ 4. Tasks in subsequent waves with **no dependency** on failed tasks:
797
+ - Continue execution normally in the next wave
798
+
799
+ ## Monitoring Progress
800
+
801
+ Use the `spec-status` MCP tool at any time to check overall progress, task counts, and approval status.
802
+
803
+ ## Rules
804
+
805
+ ### ⛔ Orchestrator Prohibited Rules (Highest Priority)
806
+ - **Do not write code** — implementation is for parallel-worker only
807
+ - **Do not write tests** — tests are also for parallel-worker only
808
+ - **Do not run git commit** — commits are for review-worker only
809
+ - **Do not skip agent calls** — "it's simple" or "I can do it myself" are not valid reasons
810
+ - **Agent calls for steps 4/5/6 are required** — no exceptions
811
+
812
+ ### General Rules
813
+ - **Do not use a whiteboard** — the whiteboard is exclusively for workflows that run multiple workers in parallel (e.g., wave-harness). Wave-based parallel execution in spec-implement uses independent worktrees instead. Do not pass `Whiteboard path` to parallel-worker / review-worker.
814
+ - Feature names use kebab-case
815
+ - One **wave** in-progress at a time (multiple tasks within a wave may be in-progress simultaneously)
816
+ - Always search implementation logs before coding (step 2)
817
+ - Follow TDD: tests first (RED), then implementation (GREEN), then refactor (REFACTOR)
818
+ - **Implementation (parallel-worker) and review (review-worker) are separate agents** — parallel-worker does not commit, review-worker does not implement
819
+ - Always call log-implementation before marking a task `[x]` (step 7)
820
+ - Include test files in `filesCreated` when logging
821
+ - A task marked `[x]` without a log is incomplete
822
+ - If you encounter blockers, document them and move to another task