@cluesmith/codev 2.0.0-rc.3 → 2.0.0-rc.32

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 (307) hide show
  1. package/bin/porch.js +6 -35
  2. package/dashboard/dist/assets/index-CXwnJkPh.css +32 -0
  3. package/dashboard/dist/assets/index-D429K6qO.js +120 -0
  4. package/dashboard/dist/assets/index-D429K6qO.js.map +1 -0
  5. package/dashboard/dist/index.html +13 -0
  6. package/dist/agent-farm/cli.d.ts.map +1 -1
  7. package/dist/agent-farm/cli.js +74 -64
  8. package/dist/agent-farm/cli.js.map +1 -1
  9. package/dist/agent-farm/commands/architect.d.ts.map +1 -1
  10. package/dist/agent-farm/commands/architect.js +0 -2
  11. package/dist/agent-farm/commands/architect.js.map +1 -1
  12. package/dist/agent-farm/commands/attach.d.ts +13 -0
  13. package/dist/agent-farm/commands/attach.d.ts.map +1 -0
  14. package/dist/agent-farm/commands/attach.js +179 -0
  15. package/dist/agent-farm/commands/attach.js.map +1 -0
  16. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  17. package/dist/agent-farm/commands/cleanup.js +30 -3
  18. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  19. package/dist/agent-farm/commands/consult.js +1 -1
  20. package/dist/agent-farm/commands/consult.js.map +1 -1
  21. package/dist/agent-farm/commands/index.d.ts +2 -2
  22. package/dist/agent-farm/commands/index.d.ts.map +1 -1
  23. package/dist/agent-farm/commands/index.js +2 -2
  24. package/dist/agent-farm/commands/index.js.map +1 -1
  25. package/dist/agent-farm/commands/{util.d.ts → shell.d.ts} +5 -5
  26. package/dist/agent-farm/commands/shell.d.ts.map +1 -0
  27. package/dist/agent-farm/commands/{util.js → shell.js} +23 -36
  28. package/dist/agent-farm/commands/shell.js.map +1 -0
  29. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  30. package/dist/agent-farm/commands/spawn.js +455 -217
  31. package/dist/agent-farm/commands/spawn.js.map +1 -1
  32. package/dist/agent-farm/commands/start.d.ts.map +1 -1
  33. package/dist/agent-farm/commands/start.js +21 -74
  34. package/dist/agent-farm/commands/start.js.map +1 -1
  35. package/dist/agent-farm/commands/stop.d.ts.map +1 -1
  36. package/dist/agent-farm/commands/stop.js +79 -10
  37. package/dist/agent-farm/commands/stop.js.map +1 -1
  38. package/dist/agent-farm/commands/tower.d.ts.map +1 -1
  39. package/dist/agent-farm/commands/tower.js +2 -1
  40. package/dist/agent-farm/commands/tower.js.map +1 -1
  41. package/dist/agent-farm/db/index.d.ts.map +1 -1
  42. package/dist/agent-farm/db/index.js +15 -0
  43. package/dist/agent-farm/db/index.js.map +1 -1
  44. package/dist/agent-farm/db/schema.d.ts +1 -1
  45. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  46. package/dist/agent-farm/db/schema.js +6 -3
  47. package/dist/agent-farm/db/schema.js.map +1 -1
  48. package/dist/agent-farm/db/types.d.ts +3 -0
  49. package/dist/agent-farm/db/types.d.ts.map +1 -1
  50. package/dist/agent-farm/db/types.js +3 -0
  51. package/dist/agent-farm/db/types.js.map +1 -1
  52. package/dist/agent-farm/hq-connector.d.ts +2 -2
  53. package/dist/agent-farm/hq-connector.js +2 -2
  54. package/dist/agent-farm/servers/dashboard-server.js +408 -127
  55. package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
  56. package/dist/agent-farm/servers/tower-server.js +353 -16
  57. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  58. package/dist/agent-farm/state.d.ts +4 -10
  59. package/dist/agent-farm/state.d.ts.map +1 -1
  60. package/dist/agent-farm/state.js +30 -31
  61. package/dist/agent-farm/state.js.map +1 -1
  62. package/dist/agent-farm/types.d.ts +48 -0
  63. package/dist/agent-farm/types.d.ts.map +1 -1
  64. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  65. package/dist/agent-farm/utils/config.js +1 -0
  66. package/dist/agent-farm/utils/config.js.map +1 -1
  67. package/dist/agent-farm/utils/deps.d.ts.map +1 -1
  68. package/dist/agent-farm/utils/deps.js +0 -16
  69. package/dist/agent-farm/utils/deps.js.map +1 -1
  70. package/dist/agent-farm/utils/notifications.d.ts +30 -0
  71. package/dist/agent-farm/utils/notifications.d.ts.map +1 -0
  72. package/dist/agent-farm/utils/notifications.js +121 -0
  73. package/dist/agent-farm/utils/notifications.js.map +1 -0
  74. package/dist/agent-farm/utils/server-utils.d.ts +2 -1
  75. package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
  76. package/dist/agent-farm/utils/server-utils.js +11 -1
  77. package/dist/agent-farm/utils/server-utils.js.map +1 -1
  78. package/dist/agent-farm/utils/shell.d.ts +9 -22
  79. package/dist/agent-farm/utils/shell.d.ts.map +1 -1
  80. package/dist/agent-farm/utils/shell.js +34 -34
  81. package/dist/agent-farm/utils/shell.js.map +1 -1
  82. package/dist/agent-farm/utils/terminal-ports.d.ts +1 -1
  83. package/dist/agent-farm/utils/terminal-ports.js +1 -1
  84. package/dist/cli.d.ts.map +1 -1
  85. package/dist/cli.js +5 -54
  86. package/dist/cli.js.map +1 -1
  87. package/dist/commands/adopt.d.ts.map +1 -1
  88. package/dist/commands/adopt.js +20 -4
  89. package/dist/commands/adopt.js.map +1 -1
  90. package/dist/commands/consult/index.d.ts.map +1 -1
  91. package/dist/commands/consult/index.js +63 -3
  92. package/dist/commands/consult/index.js.map +1 -1
  93. package/dist/commands/doctor.d.ts.map +1 -1
  94. package/dist/commands/doctor.js +0 -15
  95. package/dist/commands/doctor.js.map +1 -1
  96. package/dist/commands/init.d.ts.map +1 -1
  97. package/dist/commands/init.js +18 -2
  98. package/dist/commands/init.js.map +1 -1
  99. package/dist/commands/porch/build-counter.d.ts +5 -0
  100. package/dist/commands/porch/build-counter.d.ts.map +1 -0
  101. package/dist/commands/porch/build-counter.js +5 -0
  102. package/dist/commands/porch/build-counter.js.map +1 -0
  103. package/dist/commands/porch/checks.d.ts +16 -29
  104. package/dist/commands/porch/checks.d.ts.map +1 -1
  105. package/dist/commands/porch/checks.js +90 -144
  106. package/dist/commands/porch/checks.js.map +1 -1
  107. package/dist/commands/porch/claude.d.ts +27 -0
  108. package/dist/commands/porch/claude.d.ts.map +1 -0
  109. package/dist/commands/porch/claude.js +107 -0
  110. package/dist/commands/porch/claude.js.map +1 -0
  111. package/dist/commands/porch/index.d.ts +21 -43
  112. package/dist/commands/porch/index.d.ts.map +1 -1
  113. package/dist/commands/porch/index.js +469 -753
  114. package/dist/commands/porch/index.js.map +1 -1
  115. package/dist/commands/porch/plan.d.ts +70 -0
  116. package/dist/commands/porch/plan.d.ts.map +1 -0
  117. package/dist/commands/porch/plan.js +190 -0
  118. package/dist/commands/porch/plan.js.map +1 -0
  119. package/dist/commands/porch/prompts.d.ts +19 -0
  120. package/dist/commands/porch/prompts.d.ts.map +1 -0
  121. package/dist/commands/porch/prompts.js +250 -0
  122. package/dist/commands/porch/prompts.js.map +1 -0
  123. package/dist/commands/porch/protocol.d.ts +59 -0
  124. package/dist/commands/porch/protocol.d.ts.map +1 -0
  125. package/dist/commands/porch/protocol.js +260 -0
  126. package/dist/commands/porch/protocol.js.map +1 -0
  127. package/dist/commands/porch/run.d.ts +40 -0
  128. package/dist/commands/porch/run.d.ts.map +1 -0
  129. package/dist/commands/porch/run.js +893 -0
  130. package/dist/commands/porch/run.js.map +1 -0
  131. package/dist/commands/porch/state.d.ts +23 -112
  132. package/dist/commands/porch/state.d.ts.map +1 -1
  133. package/dist/commands/porch/state.js +81 -685
  134. package/dist/commands/porch/state.js.map +1 -1
  135. package/dist/commands/porch/types.d.ts +72 -173
  136. package/dist/commands/porch/types.d.ts.map +1 -1
  137. package/dist/commands/porch/types.js +2 -1
  138. package/dist/commands/porch/types.js.map +1 -1
  139. package/dist/commands/update.d.ts.map +1 -1
  140. package/dist/commands/update.js +12 -0
  141. package/dist/commands/update.js.map +1 -1
  142. package/dist/lib/scaffold.d.ts +24 -0
  143. package/dist/lib/scaffold.d.ts.map +1 -1
  144. package/dist/lib/scaffold.js +78 -0
  145. package/dist/lib/scaffold.js.map +1 -1
  146. package/dist/terminal/index.d.ts +8 -0
  147. package/dist/terminal/index.d.ts.map +1 -0
  148. package/dist/terminal/index.js +5 -0
  149. package/dist/terminal/index.js.map +1 -0
  150. package/dist/terminal/pty-manager.d.ts +60 -0
  151. package/dist/terminal/pty-manager.d.ts.map +1 -0
  152. package/dist/terminal/pty-manager.js +334 -0
  153. package/dist/terminal/pty-manager.js.map +1 -0
  154. package/dist/terminal/pty-session.d.ts +79 -0
  155. package/dist/terminal/pty-session.d.ts.map +1 -0
  156. package/dist/terminal/pty-session.js +215 -0
  157. package/dist/terminal/pty-session.js.map +1 -0
  158. package/dist/terminal/ring-buffer.d.ts +27 -0
  159. package/dist/terminal/ring-buffer.d.ts.map +1 -0
  160. package/dist/terminal/ring-buffer.js +74 -0
  161. package/dist/terminal/ring-buffer.js.map +1 -0
  162. package/dist/terminal/ws-protocol.d.ts +27 -0
  163. package/dist/terminal/ws-protocol.d.ts.map +1 -0
  164. package/dist/terminal/ws-protocol.js +44 -0
  165. package/dist/terminal/ws-protocol.js.map +1 -0
  166. package/package.json +18 -3
  167. package/skeleton/DEPENDENCIES.md +3 -29
  168. package/skeleton/builders.md +1 -1
  169. package/skeleton/protocol-schema.json +282 -0
  170. package/skeleton/protocols/bugfix/builder-prompt.md +49 -0
  171. package/skeleton/protocols/bugfix/protocol.json +14 -2
  172. package/skeleton/protocols/experiment/builder-prompt.md +47 -0
  173. package/skeleton/protocols/experiment/protocol.json +101 -0
  174. package/skeleton/protocols/maintain/builder-prompt.md +41 -0
  175. package/skeleton/protocols/maintain/protocol.json +114 -0
  176. package/skeleton/protocols/protocol-schema.json +53 -0
  177. package/skeleton/protocols/spider/builder-prompt.md +53 -0
  178. package/skeleton/protocols/spider/prompts/implement.md +208 -0
  179. package/skeleton/protocols/spider/prompts/plan.md +214 -0
  180. package/skeleton/protocols/spider/prompts/review.md +217 -0
  181. package/skeleton/protocols/spider/prompts/specify.md +192 -0
  182. package/skeleton/protocols/spider/protocol.json +96 -148
  183. package/skeleton/protocols/spider/protocol.md +26 -16
  184. package/skeleton/protocols/spider/templates/plan.md +14 -0
  185. package/skeleton/protocols/tick/builder-prompt.md +51 -0
  186. package/skeleton/protocols/tick/protocol.json +7 -2
  187. package/skeleton/resources/commands/agent-farm.md +23 -41
  188. package/skeleton/resources/commands/overview.md +5 -5
  189. package/skeleton/resources/workflow-reference.md +2 -2
  190. package/skeleton/roles/architect.md +152 -315
  191. package/skeleton/roles/builder.md +109 -218
  192. package/skeleton/templates/cheatsheet.md +4 -2
  193. package/templates/dashboard/index.html +17 -43
  194. package/templates/dashboard/js/dialogs.js +7 -7
  195. package/templates/dashboard/js/files.js +2 -2
  196. package/templates/dashboard/js/main.js +3 -3
  197. package/templates/dashboard/js/projects.js +3 -3
  198. package/templates/dashboard/js/tabs.js +1 -1
  199. package/templates/dashboard/js/utils.js +22 -87
  200. package/templates/tower.html +474 -17
  201. package/dist/agent-farm/commands/kickoff.d.ts +0 -19
  202. package/dist/agent-farm/commands/kickoff.d.ts.map +0 -1
  203. package/dist/agent-farm/commands/kickoff.js +0 -323
  204. package/dist/agent-farm/commands/kickoff.js.map +0 -1
  205. package/dist/agent-farm/commands/rename.d.ts +0 -13
  206. package/dist/agent-farm/commands/rename.d.ts.map +0 -1
  207. package/dist/agent-farm/commands/rename.js +0 -33
  208. package/dist/agent-farm/commands/rename.js.map +0 -1
  209. package/dist/agent-farm/commands/tutorial.d.ts +0 -10
  210. package/dist/agent-farm/commands/tutorial.d.ts.map +0 -1
  211. package/dist/agent-farm/commands/tutorial.js +0 -49
  212. package/dist/agent-farm/commands/tutorial.js.map +0 -1
  213. package/dist/agent-farm/commands/util.d.ts.map +0 -1
  214. package/dist/agent-farm/commands/util.js.map +0 -1
  215. package/dist/agent-farm/tutorial/index.d.ts +0 -8
  216. package/dist/agent-farm/tutorial/index.d.ts.map +0 -1
  217. package/dist/agent-farm/tutorial/index.js +0 -8
  218. package/dist/agent-farm/tutorial/index.js.map +0 -1
  219. package/dist/agent-farm/tutorial/prompts.d.ts +0 -57
  220. package/dist/agent-farm/tutorial/prompts.d.ts.map +0 -1
  221. package/dist/agent-farm/tutorial/prompts.js +0 -147
  222. package/dist/agent-farm/tutorial/prompts.js.map +0 -1
  223. package/dist/agent-farm/tutorial/runner.d.ts +0 -52
  224. package/dist/agent-farm/tutorial/runner.d.ts.map +0 -1
  225. package/dist/agent-farm/tutorial/runner.js +0 -204
  226. package/dist/agent-farm/tutorial/runner.js.map +0 -1
  227. package/dist/agent-farm/tutorial/state.d.ts +0 -26
  228. package/dist/agent-farm/tutorial/state.d.ts.map +0 -1
  229. package/dist/agent-farm/tutorial/state.js +0 -89
  230. package/dist/agent-farm/tutorial/state.js.map +0 -1
  231. package/dist/agent-farm/tutorial/steps/first-spec.d.ts +0 -7
  232. package/dist/agent-farm/tutorial/steps/first-spec.d.ts.map +0 -1
  233. package/dist/agent-farm/tutorial/steps/first-spec.js +0 -136
  234. package/dist/agent-farm/tutorial/steps/first-spec.js.map +0 -1
  235. package/dist/agent-farm/tutorial/steps/implementation.d.ts +0 -7
  236. package/dist/agent-farm/tutorial/steps/implementation.d.ts.map +0 -1
  237. package/dist/agent-farm/tutorial/steps/implementation.js +0 -76
  238. package/dist/agent-farm/tutorial/steps/implementation.js.map +0 -1
  239. package/dist/agent-farm/tutorial/steps/index.d.ts +0 -10
  240. package/dist/agent-farm/tutorial/steps/index.d.ts.map +0 -1
  241. package/dist/agent-farm/tutorial/steps/index.js +0 -10
  242. package/dist/agent-farm/tutorial/steps/index.js.map +0 -1
  243. package/dist/agent-farm/tutorial/steps/planning.d.ts +0 -7
  244. package/dist/agent-farm/tutorial/steps/planning.d.ts.map +0 -1
  245. package/dist/agent-farm/tutorial/steps/planning.js +0 -143
  246. package/dist/agent-farm/tutorial/steps/planning.js.map +0 -1
  247. package/dist/agent-farm/tutorial/steps/review.d.ts +0 -7
  248. package/dist/agent-farm/tutorial/steps/review.d.ts.map +0 -1
  249. package/dist/agent-farm/tutorial/steps/review.js +0 -78
  250. package/dist/agent-farm/tutorial/steps/review.js.map +0 -1
  251. package/dist/agent-farm/tutorial/steps/setup.d.ts +0 -7
  252. package/dist/agent-farm/tutorial/steps/setup.d.ts.map +0 -1
  253. package/dist/agent-farm/tutorial/steps/setup.js +0 -126
  254. package/dist/agent-farm/tutorial/steps/setup.js.map +0 -1
  255. package/dist/agent-farm/tutorial/steps/welcome.d.ts +0 -7
  256. package/dist/agent-farm/tutorial/steps/welcome.d.ts.map +0 -1
  257. package/dist/agent-farm/tutorial/steps/welcome.js +0 -50
  258. package/dist/agent-farm/tutorial/steps/welcome.js.map +0 -1
  259. package/dist/commands/pcheck/cache.d.ts +0 -48
  260. package/dist/commands/pcheck/cache.d.ts.map +0 -1
  261. package/dist/commands/pcheck/cache.js +0 -170
  262. package/dist/commands/pcheck/cache.js.map +0 -1
  263. package/dist/commands/pcheck/evaluator.d.ts +0 -15
  264. package/dist/commands/pcheck/evaluator.d.ts.map +0 -1
  265. package/dist/commands/pcheck/evaluator.js +0 -246
  266. package/dist/commands/pcheck/evaluator.js.map +0 -1
  267. package/dist/commands/pcheck/index.d.ts +0 -12
  268. package/dist/commands/pcheck/index.d.ts.map +0 -1
  269. package/dist/commands/pcheck/index.js +0 -249
  270. package/dist/commands/pcheck/index.js.map +0 -1
  271. package/dist/commands/pcheck/parser.d.ts +0 -39
  272. package/dist/commands/pcheck/parser.d.ts.map +0 -1
  273. package/dist/commands/pcheck/parser.js +0 -155
  274. package/dist/commands/pcheck/parser.js.map +0 -1
  275. package/dist/commands/pcheck/types.d.ts +0 -82
  276. package/dist/commands/pcheck/types.d.ts.map +0 -1
  277. package/dist/commands/pcheck/types.js +0 -5
  278. package/dist/commands/pcheck/types.js.map +0 -1
  279. package/dist/commands/porch/consultation.d.ts +0 -56
  280. package/dist/commands/porch/consultation.d.ts.map +0 -1
  281. package/dist/commands/porch/consultation.js +0 -330
  282. package/dist/commands/porch/consultation.js.map +0 -1
  283. package/dist/commands/porch/notifications.d.ts +0 -99
  284. package/dist/commands/porch/notifications.d.ts.map +0 -1
  285. package/dist/commands/porch/notifications.js +0 -223
  286. package/dist/commands/porch/notifications.js.map +0 -1
  287. package/dist/commands/porch/plan-parser.d.ts +0 -38
  288. package/dist/commands/porch/plan-parser.d.ts.map +0 -1
  289. package/dist/commands/porch/plan-parser.js +0 -166
  290. package/dist/commands/porch/plan-parser.js.map +0 -1
  291. package/dist/commands/porch/protocol-loader.d.ts +0 -46
  292. package/dist/commands/porch/protocol-loader.d.ts.map +0 -1
  293. package/dist/commands/porch/protocol-loader.js +0 -249
  294. package/dist/commands/porch/protocol-loader.js.map +0 -1
  295. package/dist/commands/porch/signal-parser.d.ts +0 -88
  296. package/dist/commands/porch/signal-parser.d.ts.map +0 -1
  297. package/dist/commands/porch/signal-parser.js +0 -148
  298. package/dist/commands/porch/signal-parser.js.map +0 -1
  299. package/dist/commands/tower.d.ts +0 -16
  300. package/dist/commands/tower.d.ts.map +0 -1
  301. package/dist/commands/tower.js +0 -21
  302. package/dist/commands/tower.js.map +0 -1
  303. package/skeleton/porch/protocols/bugfix.json +0 -85
  304. package/skeleton/porch/protocols/spider.json +0 -135
  305. package/skeleton/porch/protocols/tick.json +0 -76
  306. package/templates/dashboard/css/activity.css +0 -151
  307. package/templates/dashboard/js/activity.js +0 -112
@@ -0,0 +1,217 @@
1
+ # REVIEW Phase Prompt
2
+
3
+ You are executing the **REVIEW** phase of the SPIDER protocol.
4
+
5
+ ## Your Goal
6
+
7
+ Perform a comprehensive review, document lessons learned, run final consultation, and prepare for PR submission.
8
+
9
+ ## CRITICAL: Final Consultation Before PR
10
+
11
+ The SPIDER protocol **requires** a final consultation with GPT-5 Codex AND Gemini Pro before submitting the PR. This ensures the complete implementation is reviewed.
12
+
13
+ ## Context
14
+
15
+ - **Project ID**: {{project_id}}
16
+ - **Project Title**: {{title}}
17
+ - **Current State**: {{current_state}}
18
+ - **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
19
+ - **Plan File**: `codev/plans/{{project_id}}-{{title}}.md`
20
+ - **Review File**: `codev/reviews/{{project_id}}-{{title}}.md`
21
+
22
+ ## Prerequisites
23
+
24
+ Before review, verify:
25
+ 1. All implementation phases are committed
26
+ 2. All tests are passing
27
+ 3. Build is passing
28
+ 4. Spec compliance verified for all phases
29
+
30
+ Verify commits: `git log --oneline | grep "[Spec {{project_id}}]"`
31
+
32
+ ## Process
33
+
34
+ ### 1. Comprehensive Review
35
+
36
+ Review the entire implementation:
37
+
38
+ **Code Quality**:
39
+ - Is the code readable and maintainable?
40
+ - Are there any code smells?
41
+ - Is error handling consistent?
42
+ - Are there any security concerns?
43
+
44
+ **Architecture**:
45
+ - Does the implementation fit well with existing code?
46
+ - Are there any architectural concerns?
47
+ - Is the design scalable if needed?
48
+
49
+ **Documentation**:
50
+ - Is code adequately commented where needed?
51
+ - Are public APIs documented?
52
+ - Is README updated if needed?
53
+
54
+ ### 2. Spec Comparison
55
+
56
+ Compare final implementation to original specification:
57
+
58
+ - What was delivered vs what was specified?
59
+ - Any deviations? Document why.
60
+ - All success criteria met?
61
+
62
+ ### 3. Create Review Document
63
+
64
+ Create `codev/reviews/{{project_id}}-{{title}}.md`:
65
+
66
+ ```markdown
67
+ # Review: {{title}}
68
+
69
+ ## Summary
70
+ Brief description of what was implemented.
71
+
72
+ ## Spec Compliance
73
+ - [x] Requirement 1: Implemented as specified
74
+ - [x] Requirement 2: Implemented with deviation (see below)
75
+ - [x] Requirement 3: Implemented as specified
76
+
77
+ ## Deviations from Plan
78
+ - **Phase X**: [What changed and why]
79
+
80
+ ## Lessons Learned
81
+
82
+ ### What Went Well
83
+ - [Positive observation 1]
84
+ - [Positive observation 2]
85
+
86
+ ### Challenges Encountered
87
+ - [Challenge 1]: [How it was resolved]
88
+ - [Challenge 2]: [How it was resolved]
89
+
90
+ ### What Would Be Done Differently
91
+ - [Insight 1]
92
+ - [Insight 2]
93
+
94
+ ### Methodology Improvements
95
+ - [Suggested improvement to SPIDER protocol]
96
+ - [Suggested improvement to tooling]
97
+
98
+ ## Technical Debt
99
+ - [Any shortcuts taken that should be addressed later]
100
+
101
+ ## Follow-up Items
102
+ - [Any items identified for future work]
103
+ ```
104
+
105
+ ### 4. Update Documentation
106
+
107
+ If needed, update:
108
+ - README.md (new features, changed behavior)
109
+ - API documentation
110
+ - Architecture documentation (`codev/resources/arch.md`)
111
+
112
+ ### 5. Final Verification
113
+
114
+ Before PR:
115
+ - [ ] All tests pass (use project-specific test command)
116
+ - [ ] Build passes (use project-specific build command)
117
+ - [ ] Lint passes (if configured)
118
+ - [ ] No uncommitted changes: `git status`
119
+ - [ ] Review document complete
120
+
121
+ ### 6. MANDATORY: Final Consultation (PR-Ready Review)
122
+
123
+ **Before creating the PR, run final consultation:**
124
+
125
+ ```bash
126
+ # Run consultations in parallel (REQUIRED)
127
+ consult --model gemini --type pr-ready spec {{project_id}} &
128
+ consult --model codex --type pr-ready spec {{project_id}} &
129
+ wait
130
+ ```
131
+
132
+ - Review ALL feedback from both models
133
+ - Address any final issues identified
134
+ - This is the last chance to catch problems before PR
135
+
136
+ ### 7. Create Pull Request
137
+
138
+ Prepare PR with:
139
+
140
+ **Title**: `[Spec {{project_id}}] {{title}}`
141
+
142
+ **Body**:
143
+ ```markdown
144
+ ## Summary
145
+ [Brief description of the implementation]
146
+
147
+ ## Changes
148
+ - [Change 1]
149
+ - [Change 2]
150
+
151
+ ## Testing
152
+ - All unit tests passing
153
+ - Integration tests added for [X]
154
+ - Manual testing completed for [Y]
155
+
156
+ ## Spec
157
+ Link: codev/specs/{{project_id}}-{{title}}.md
158
+
159
+ ## Review
160
+ Link: codev/reviews/{{project_id}}-{{title}}.md
161
+ ```
162
+
163
+ ## Output
164
+
165
+ - Review document at `codev/reviews/{{project_id}}-{{title}}.md`
166
+ - Updated documentation (if needed)
167
+ - Pull request ready for submission
168
+
169
+ ## Signals
170
+
171
+ Emit appropriate signals based on your progress:
172
+
173
+ - After review document is complete:
174
+ ```
175
+ <signal>REVIEW_COMPLETE</signal>
176
+ ```
177
+
178
+ - After PR is created:
179
+ ```
180
+ <signal>PR_CREATED</signal>
181
+ ```
182
+
183
+ - When ready for Architect review:
184
+ ```
185
+ <signal>PR_READY</signal>
186
+ ```
187
+
188
+ ## Important Notes
189
+
190
+ 1. **Final consultation is MANDATORY** - Cannot skip GPT-5 + Gemini reviews before PR
191
+ 2. **Be honest in lessons learned** - Future you will thank present you
192
+ 3. **Document deviations** - They're not failures, they're learnings
193
+ 4. **Update methodology** - If you found a better way, document it
194
+ 5. **Don't skip the checklist** - It catches last-minute issues
195
+ 6. **Clean PR description** - Makes review easier
196
+
197
+ ## What NOT to Do
198
+
199
+ - Don't skip final consultation (it's BLOCKING)
200
+ - Don't skip lessons learned ("nothing to report")
201
+ - Don't merge your own PR (Architect handles integration)
202
+ - Don't leave uncommitted changes
203
+ - Don't forget to update documentation
204
+ - Don't rush this phase - it's valuable for learning
205
+ - Don't use `git add .` or `git add -A` (security risk)
206
+
207
+ ## Review Prompts for Reflection
208
+
209
+ Ask yourself:
210
+ - What surprised me during implementation?
211
+ - Where did I spend the most time? Was it avoidable?
212
+ - What would have helped me go faster?
213
+ - Did the spec adequately describe what was needed?
214
+ - Did the plan phases make sense in hindsight?
215
+ - What tests caught issues? What tests were unnecessary?
216
+
217
+ Capture these reflections in the lessons learned section.
@@ -0,0 +1,192 @@
1
+ # SPECIFY Phase Prompt
2
+
3
+ You are executing the **SPECIFY** phase of the SPIDER protocol.
4
+
5
+ ## Your Goal
6
+
7
+ Create a comprehensive specification document that thoroughly explores the problem space and proposed solution.
8
+
9
+ ## Context
10
+
11
+ - **Project ID**: {{project_id}}
12
+ - **Project Title**: {{title}}
13
+ - **Current State**: {{current_state}}
14
+ - **Spec File**: `codev/specs/{{project_id}}-{{title}}.md`
15
+
16
+ ## CRITICAL: Multi-Agent Consultation is MANDATORY
17
+
18
+ The SPIDER protocol **requires** consultation with GPT-5 Codex AND Gemini Pro at specific checkpoints. This is BLOCKING - you cannot proceed without completing consultations.
19
+
20
+ ## Process
21
+
22
+ ### 0. Check for Existing Spec (ALWAYS DO THIS FIRST)
23
+
24
+ **Before asking ANY questions**, check if a spec already exists:
25
+
26
+ ```bash
27
+ ls codev/specs/{{project_id}}-*.md
28
+ ```
29
+
30
+ **If a spec file exists:**
31
+ 1. READ IT COMPLETELY - the answers to your questions are already there
32
+ 2. The spec author has already made the key decisions
33
+ 3. DO NOT ask clarifying questions - proceed directly to consultation
34
+ 4. Your job is to REVIEW and IMPROVE the existing spec, not rewrite it from scratch
35
+
36
+ **If no spec exists:** Proceed to Step 1 below.
37
+
38
+ ### 1. Clarifying Questions (ONLY IF NO SPEC EXISTS)
39
+
40
+ Before writing anything, ask clarifying questions to understand:
41
+ - What problem is being solved?
42
+ - Who are the stakeholders?
43
+ - What are the constraints?
44
+ - What's in scope vs out of scope?
45
+ - What does success look like?
46
+
47
+ If this is your first iteration AND no spec exists, ask these questions now and wait for answers.
48
+
49
+ **CRITICAL**: Do NOT ask questions if a spec already exists. The spec IS the answer.
50
+
51
+ **On subsequent iterations**: If questions were already answered, acknowledge the answers and proceed to the next step.
52
+
53
+ ### 2. Problem Analysis
54
+
55
+ Once you have answers, document:
56
+ - The problem being solved (clearly articulated)
57
+ - Current state vs desired state
58
+ - Stakeholders and their needs
59
+ - Assumptions and constraints
60
+
61
+ ### 3. Solution Exploration
62
+
63
+ Generate multiple solution approaches. For each:
64
+ - Technical design overview
65
+ - Trade-offs (pros/cons)
66
+ - Complexity assessment
67
+ - Risk assessment
68
+
69
+ ### 4. Open Questions
70
+
71
+ List uncertainties categorized as:
72
+ - **Critical** - blocks progress
73
+ - **Important** - affects design
74
+ - **Nice-to-know** - optimization
75
+
76
+ ### 5. Success Criteria
77
+
78
+ Define measurable acceptance criteria:
79
+ - Functional requirements (MUST, SHOULD, COULD)
80
+ - Non-functional requirements (performance, security)
81
+ - Test scenarios
82
+
83
+ ### 6. MANDATORY: First Consultation (After Draft)
84
+
85
+ After completing the initial spec draft:
86
+
87
+ ```bash
88
+ # Run consultations in parallel (REQUIRED)
89
+ consult --model gemini spec {{project_id}} &
90
+ consult --model codex spec {{project_id}} &
91
+ wait
92
+ ```
93
+
94
+ - Review ALL feedback from both models
95
+ - Update the spec with incorporated feedback
96
+ - Add a **Consultation Log** section documenting:
97
+ - Key feedback received
98
+ - Changes made in response
99
+ - Any feedback intentionally not incorporated (with reasoning)
100
+
101
+ ### 7. Human Review
102
+
103
+ After consultation feedback is incorporated:
104
+ - Present the spec for human review
105
+ - Wait for approval or change requests
106
+ - If changes requested, make them and proceed to Step 8
107
+
108
+ ### 8. MANDATORY: Second Consultation (After Human Feedback)
109
+
110
+ After incorporating human feedback:
111
+
112
+ ```bash
113
+ # Run consultations again (REQUIRED)
114
+ consult --model gemini spec {{project_id}} &
115
+ consult --model codex spec {{project_id}} &
116
+ wait
117
+ ```
118
+
119
+ - Update Consultation Log with new feedback
120
+ - Incorporate changes
121
+ - Prepare final spec for approval
122
+
123
+ ## Output
124
+
125
+ Create or update the specification file at `codev/specs/{{project_id}}-{{title}}.md`.
126
+
127
+ **IMPORTANT**: Keep spec/plan/review filenames in sync:
128
+ - Spec: `codev/specs/{{project_id}}-{{title}}.md`
129
+ - Plan: `codev/plans/{{project_id}}-{{title}}.md`
130
+ - Review: `codev/reviews/{{project_id}}-{{title}}.md`
131
+
132
+ Include a **Consultation Log** section in the spec documenting all consultation feedback.
133
+
134
+ ## Signals
135
+
136
+ Emit appropriate signals based on your progress:
137
+
138
+ - When waiting for clarifying question answers, **include your questions in the signal**:
139
+ ```
140
+ <signal type=AWAITING_INPUT>
141
+ Please answer these questions:
142
+ 1. What should the primary use case be - internal tooling or customer-facing?
143
+ 2. What are the key constraints we should consider?
144
+ 3. Who are the main stakeholders?
145
+ </signal>
146
+ ```
147
+
148
+ The content inside the signal tag is displayed prominently to the user.
149
+
150
+ - After completing the initial spec draft:
151
+ ```
152
+ <signal>SPEC_DRAFTED</signal>
153
+ ```
154
+
155
+ - After incorporating consultation feedback:
156
+ ```
157
+ <signal>CONSULTATION_INCORPORATED</signal>
158
+ ```
159
+
160
+ - After final spec is ready for human approval:
161
+ ```
162
+ <signal>SPEC_READY_FOR_APPROVAL</signal>
163
+ ```
164
+
165
+ ## Commit Cadence
166
+
167
+ Make commits at these milestones:
168
+ 1. `[Spec {{project_id}}] Initial specification draft`
169
+ 2. `[Spec {{project_id}}] Specification with multi-agent review`
170
+ 3. `[Spec {{project_id}}] Specification with user feedback`
171
+ 4. `[Spec {{project_id}}] Final approved specification`
172
+
173
+ **CRITICAL**: Never use `git add .` or `git add -A`. Always stage specific files:
174
+ ```bash
175
+ git add codev/specs/{{project_id}}-{{title}}.md
176
+ ```
177
+
178
+ ## Important Notes
179
+
180
+ 1. **Consultation is MANDATORY** - Cannot skip GPT-5 + Gemini reviews
181
+ 2. **Be thorough** - A good spec prevents implementation problems
182
+ 3. **Be specific** - Vague specs lead to wrong implementations
183
+ 4. **Include examples** - Concrete examples clarify intent
184
+ 5. **Document consultations** - Maintain the Consultation Log section
185
+
186
+ ## What NOT to Do
187
+
188
+ - Don't skip consultations (they are BLOCKING)
189
+ - Don't include implementation details (that's for the Plan phase)
190
+ - Don't estimate time (AI makes time estimates meaningless)
191
+ - Don't start coding (you're in Specify, not Implement)
192
+ - Don't use `git add .` or `git add -A` (security risk)