@cluesmith/codev 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/bin/af.js +8 -0
  2. package/bin/codev.js +4 -0
  3. package/bin/consult.js +7 -0
  4. package/dist/agent-farm/cli.d.ts +11 -0
  5. package/dist/agent-farm/cli.d.ts.map +1 -0
  6. package/dist/agent-farm/cli.js +359 -0
  7. package/dist/agent-farm/cli.js.map +1 -0
  8. package/dist/agent-farm/commands/cleanup.d.ts +12 -0
  9. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -0
  10. package/dist/agent-farm/commands/cleanup.js +154 -0
  11. package/dist/agent-farm/commands/cleanup.js.map +1 -0
  12. package/dist/agent-farm/commands/db.d.ts +38 -0
  13. package/dist/agent-farm/commands/db.d.ts.map +1 -0
  14. package/dist/agent-farm/commands/db.js +133 -0
  15. package/dist/agent-farm/commands/db.js.map +1 -0
  16. package/dist/agent-farm/commands/index.d.ts +11 -0
  17. package/dist/agent-farm/commands/index.d.ts.map +1 -0
  18. package/dist/agent-farm/commands/index.js +11 -0
  19. package/dist/agent-farm/commands/index.js.map +1 -0
  20. package/dist/agent-farm/commands/open.d.ts +15 -0
  21. package/dist/agent-farm/commands/open.d.ts.map +1 -0
  22. package/dist/agent-farm/commands/open.js +118 -0
  23. package/dist/agent-farm/commands/open.js.map +1 -0
  24. package/dist/agent-farm/commands/rename.d.ts +13 -0
  25. package/dist/agent-farm/commands/rename.d.ts.map +1 -0
  26. package/dist/agent-farm/commands/rename.js +33 -0
  27. package/dist/agent-farm/commands/rename.js.map +1 -0
  28. package/dist/agent-farm/commands/send.d.ts +9 -0
  29. package/dist/agent-farm/commands/send.d.ts.map +1 -0
  30. package/dist/agent-farm/commands/send.js +282 -0
  31. package/dist/agent-farm/commands/send.js.map +1 -0
  32. package/dist/agent-farm/commands/spawn.d.ts +15 -0
  33. package/dist/agent-farm/commands/spawn.d.ts.map +1 -0
  34. package/dist/agent-farm/commands/spawn.js +575 -0
  35. package/dist/agent-farm/commands/spawn.js.map +1 -0
  36. package/dist/agent-farm/commands/start.d.ts +9 -0
  37. package/dist/agent-farm/commands/start.d.ts.map +1 -0
  38. package/dist/agent-farm/commands/start.js +175 -0
  39. package/dist/agent-farm/commands/start.js.map +1 -0
  40. package/dist/agent-farm/commands/status.d.ts +8 -0
  41. package/dist/agent-farm/commands/status.d.ts.map +1 -0
  42. package/dist/agent-farm/commands/status.js +123 -0
  43. package/dist/agent-farm/commands/status.js.map +1 -0
  44. package/dist/agent-farm/commands/stop.d.ts +8 -0
  45. package/dist/agent-farm/commands/stop.d.ts.map +1 -0
  46. package/dist/agent-farm/commands/stop.js +76 -0
  47. package/dist/agent-farm/commands/stop.js.map +1 -0
  48. package/dist/agent-farm/commands/tower.d.ts +19 -0
  49. package/dist/agent-farm/commands/tower.d.ts.map +1 -0
  50. package/dist/agent-farm/commands/tower.js +125 -0
  51. package/dist/agent-farm/commands/tower.js.map +1 -0
  52. package/dist/agent-farm/commands/tutorial.d.ts +10 -0
  53. package/dist/agent-farm/commands/tutorial.d.ts.map +1 -0
  54. package/dist/agent-farm/commands/tutorial.js +49 -0
  55. package/dist/agent-farm/commands/tutorial.js.map +1 -0
  56. package/dist/agent-farm/commands/util.d.ts +15 -0
  57. package/dist/agent-farm/commands/util.d.ts.map +1 -0
  58. package/dist/agent-farm/commands/util.js +108 -0
  59. package/dist/agent-farm/commands/util.js.map +1 -0
  60. package/dist/agent-farm/db/errors.d.ts +17 -0
  61. package/dist/agent-farm/db/errors.d.ts.map +1 -0
  62. package/dist/agent-farm/db/errors.js +46 -0
  63. package/dist/agent-farm/db/errors.js.map +1 -0
  64. package/dist/agent-farm/db/index.d.ts +41 -0
  65. package/dist/agent-farm/db/index.d.ts.map +1 -0
  66. package/dist/agent-farm/db/index.js +168 -0
  67. package/dist/agent-farm/db/index.js.map +1 -0
  68. package/dist/agent-farm/db/migrate.d.ts +15 -0
  69. package/dist/agent-farm/db/migrate.d.ts.map +1 -0
  70. package/dist/agent-farm/db/migrate.js +137 -0
  71. package/dist/agent-farm/db/migrate.js.map +1 -0
  72. package/dist/agent-farm/db/schema.d.ts +16 -0
  73. package/dist/agent-farm/db/schema.d.ts.map +1 -0
  74. package/dist/agent-farm/db/schema.js +103 -0
  75. package/dist/agent-farm/db/schema.js.map +1 -0
  76. package/dist/agent-farm/db/types.d.ts +87 -0
  77. package/dist/agent-farm/db/types.d.ts.map +1 -0
  78. package/dist/agent-farm/db/types.js +65 -0
  79. package/dist/agent-farm/db/types.js.map +1 -0
  80. package/dist/agent-farm/index.d.ts +7 -0
  81. package/dist/agent-farm/index.d.ts.map +1 -0
  82. package/dist/agent-farm/index.js +373 -0
  83. package/dist/agent-farm/index.js.map +1 -0
  84. package/dist/agent-farm/servers/annotate-server.d.ts +9 -0
  85. package/dist/agent-farm/servers/annotate-server.d.ts.map +1 -0
  86. package/dist/agent-farm/servers/annotate-server.js +136 -0
  87. package/dist/agent-farm/servers/annotate-server.js.map +1 -0
  88. package/dist/agent-farm/servers/dashboard-server.d.ts +9 -0
  89. package/dist/agent-farm/servers/dashboard-server.d.ts.map +1 -0
  90. package/dist/agent-farm/servers/dashboard-server.js +939 -0
  91. package/dist/agent-farm/servers/dashboard-server.js.map +1 -0
  92. package/dist/agent-farm/servers/tower-server.d.ts +9 -0
  93. package/dist/agent-farm/servers/tower-server.d.ts.map +1 -0
  94. package/dist/agent-farm/servers/tower-server.js +463 -0
  95. package/dist/agent-farm/servers/tower-server.js.map +1 -0
  96. package/dist/agent-farm/state.d.ts +93 -0
  97. package/dist/agent-farm/state.d.ts.map +1 -0
  98. package/dist/agent-farm/state.js +253 -0
  99. package/dist/agent-farm/state.js.map +1 -0
  100. package/dist/agent-farm/tutorial/index.d.ts +8 -0
  101. package/dist/agent-farm/tutorial/index.d.ts.map +1 -0
  102. package/dist/agent-farm/tutorial/index.js +8 -0
  103. package/dist/agent-farm/tutorial/index.js.map +1 -0
  104. package/dist/agent-farm/tutorial/prompts.d.ts +57 -0
  105. package/dist/agent-farm/tutorial/prompts.d.ts.map +1 -0
  106. package/dist/agent-farm/tutorial/prompts.js +147 -0
  107. package/dist/agent-farm/tutorial/prompts.js.map +1 -0
  108. package/dist/agent-farm/tutorial/runner.d.ts +52 -0
  109. package/dist/agent-farm/tutorial/runner.d.ts.map +1 -0
  110. package/dist/agent-farm/tutorial/runner.js +204 -0
  111. package/dist/agent-farm/tutorial/runner.js.map +1 -0
  112. package/dist/agent-farm/tutorial/state.d.ts +26 -0
  113. package/dist/agent-farm/tutorial/state.d.ts.map +1 -0
  114. package/dist/agent-farm/tutorial/state.js +89 -0
  115. package/dist/agent-farm/tutorial/state.js.map +1 -0
  116. package/dist/agent-farm/tutorial/steps/first-spec.d.ts +7 -0
  117. package/dist/agent-farm/tutorial/steps/first-spec.d.ts.map +1 -0
  118. package/dist/agent-farm/tutorial/steps/first-spec.js +136 -0
  119. package/dist/agent-farm/tutorial/steps/first-spec.js.map +1 -0
  120. package/dist/agent-farm/tutorial/steps/implementation.d.ts +7 -0
  121. package/dist/agent-farm/tutorial/steps/implementation.d.ts.map +1 -0
  122. package/dist/agent-farm/tutorial/steps/implementation.js +76 -0
  123. package/dist/agent-farm/tutorial/steps/implementation.js.map +1 -0
  124. package/dist/agent-farm/tutorial/steps/index.d.ts +10 -0
  125. package/dist/agent-farm/tutorial/steps/index.d.ts.map +1 -0
  126. package/dist/agent-farm/tutorial/steps/index.js +10 -0
  127. package/dist/agent-farm/tutorial/steps/index.js.map +1 -0
  128. package/dist/agent-farm/tutorial/steps/planning.d.ts +7 -0
  129. package/dist/agent-farm/tutorial/steps/planning.d.ts.map +1 -0
  130. package/dist/agent-farm/tutorial/steps/planning.js +143 -0
  131. package/dist/agent-farm/tutorial/steps/planning.js.map +1 -0
  132. package/dist/agent-farm/tutorial/steps/review.d.ts +7 -0
  133. package/dist/agent-farm/tutorial/steps/review.d.ts.map +1 -0
  134. package/dist/agent-farm/tutorial/steps/review.js +78 -0
  135. package/dist/agent-farm/tutorial/steps/review.js.map +1 -0
  136. package/dist/agent-farm/tutorial/steps/setup.d.ts +7 -0
  137. package/dist/agent-farm/tutorial/steps/setup.d.ts.map +1 -0
  138. package/dist/agent-farm/tutorial/steps/setup.js +126 -0
  139. package/dist/agent-farm/tutorial/steps/setup.js.map +1 -0
  140. package/dist/agent-farm/tutorial/steps/welcome.d.ts +7 -0
  141. package/dist/agent-farm/tutorial/steps/welcome.d.ts.map +1 -0
  142. package/dist/agent-farm/tutorial/steps/welcome.js +50 -0
  143. package/dist/agent-farm/tutorial/steps/welcome.js.map +1 -0
  144. package/dist/agent-farm/types.d.ts +131 -0
  145. package/dist/agent-farm/types.d.ts.map +1 -0
  146. package/dist/agent-farm/types.js +5 -0
  147. package/dist/agent-farm/types.js.map +1 -0
  148. package/dist/agent-farm/utils/config.d.ts +27 -0
  149. package/dist/agent-farm/utils/config.d.ts.map +1 -0
  150. package/dist/agent-farm/utils/config.js +242 -0
  151. package/dist/agent-farm/utils/config.js.map +1 -0
  152. package/dist/agent-farm/utils/deps.d.ts +51 -0
  153. package/dist/agent-farm/utils/deps.d.ts.map +1 -0
  154. package/dist/agent-farm/utils/deps.js +194 -0
  155. package/dist/agent-farm/utils/deps.js.map +1 -0
  156. package/dist/agent-farm/utils/index.d.ts +6 -0
  157. package/dist/agent-farm/utils/index.d.ts.map +1 -0
  158. package/dist/agent-farm/utils/index.js +6 -0
  159. package/dist/agent-farm/utils/index.js.map +1 -0
  160. package/dist/agent-farm/utils/logger.d.ts +31 -0
  161. package/dist/agent-farm/utils/logger.d.ts.map +1 -0
  162. package/dist/agent-farm/utils/logger.js +58 -0
  163. package/dist/agent-farm/utils/logger.js.map +1 -0
  164. package/dist/agent-farm/utils/orphan-handler.d.ts +27 -0
  165. package/dist/agent-farm/utils/orphan-handler.d.ts.map +1 -0
  166. package/dist/agent-farm/utils/orphan-handler.js +127 -0
  167. package/dist/agent-farm/utils/orphan-handler.js.map +1 -0
  168. package/dist/agent-farm/utils/port-registry.d.ts +58 -0
  169. package/dist/agent-farm/utils/port-registry.d.ts.map +1 -0
  170. package/dist/agent-farm/utils/port-registry.js +149 -0
  171. package/dist/agent-farm/utils/port-registry.js.map +1 -0
  172. package/dist/agent-farm/utils/shell.d.ts +45 -0
  173. package/dist/agent-farm/utils/shell.d.ts.map +1 -0
  174. package/dist/agent-farm/utils/shell.js +120 -0
  175. package/dist/agent-farm/utils/shell.js.map +1 -0
  176. package/dist/cli.d.ts +10 -0
  177. package/dist/cli.d.ts.map +1 -0
  178. package/dist/cli.js +160 -0
  179. package/dist/cli.js.map +1 -0
  180. package/dist/commands/adopt.d.ts +12 -0
  181. package/dist/commands/adopt.d.ts.map +1 -0
  182. package/dist/commands/adopt.js +178 -0
  183. package/dist/commands/adopt.js.map +1 -0
  184. package/dist/commands/consult/index.d.ts +17 -0
  185. package/dist/commands/consult/index.d.ts.map +1 -0
  186. package/dist/commands/consult/index.js +405 -0
  187. package/dist/commands/consult/index.js.map +1 -0
  188. package/dist/commands/doctor.d.ts +10 -0
  189. package/dist/commands/doctor.d.ts.map +1 -0
  190. package/dist/commands/doctor.js +346 -0
  191. package/dist/commands/doctor.js.map +1 -0
  192. package/dist/commands/init.d.ts +12 -0
  193. package/dist/commands/init.d.ts.map +1 -0
  194. package/dist/commands/init.js +167 -0
  195. package/dist/commands/init.js.map +1 -0
  196. package/dist/commands/tower.d.ts +16 -0
  197. package/dist/commands/tower.d.ts.map +1 -0
  198. package/dist/commands/tower.js +21 -0
  199. package/dist/commands/tower.js.map +1 -0
  200. package/dist/commands/update.d.ts +13 -0
  201. package/dist/commands/update.d.ts.map +1 -0
  202. package/dist/commands/update.js +137 -0
  203. package/dist/commands/update.js.map +1 -0
  204. package/dist/lib/templates.d.ts +57 -0
  205. package/dist/lib/templates.d.ts.map +1 -0
  206. package/dist/lib/templates.js +205 -0
  207. package/dist/lib/templates.js.map +1 -0
  208. package/package.json +55 -0
  209. package/templates/AGENTS.md +49 -0
  210. package/templates/CLAUDE.md +47 -0
  211. package/templates/DEPENDENCIES.md +344 -0
  212. package/templates/agents/architecture-documenter.md +189 -0
  213. package/templates/agents/codev-updater.md +276 -0
  214. package/templates/agents/spider-protocol-updater.md +118 -0
  215. package/templates/annotate.html +903 -0
  216. package/templates/bin/agent-farm +18 -0
  217. package/templates/bin/annotate-server.js +140 -0
  218. package/templates/bin/codev-doctor +335 -0
  219. package/templates/builders.md +30 -0
  220. package/templates/config.json +7 -0
  221. package/templates/dashboard-split.html +1679 -0
  222. package/templates/dashboard.html +149 -0
  223. package/templates/plans/.gitkeep +0 -0
  224. package/templates/protocols/experiment/protocol.md +229 -0
  225. package/templates/protocols/experiment/templates/notes.md +97 -0
  226. package/templates/protocols/maintain/protocol.md +235 -0
  227. package/templates/protocols/spider/protocol.md +639 -0
  228. package/templates/protocols/spider/templates/plan.md +169 -0
  229. package/templates/protocols/spider/templates/review.md +207 -0
  230. package/templates/protocols/spider/templates/spec.md +140 -0
  231. package/templates/protocols/spider-solo/protocol.md +619 -0
  232. package/templates/protocols/spider-solo/templates/plan.md +169 -0
  233. package/templates/protocols/spider-solo/templates/review.md +207 -0
  234. package/templates/protocols/spider-solo/templates/spec.md +140 -0
  235. package/templates/protocols/tick/protocol.md +250 -0
  236. package/templates/protocols/tick/templates/plan.md +67 -0
  237. package/templates/protocols/tick/templates/review.md +90 -0
  238. package/templates/protocols/tick/templates/spec.md +61 -0
  239. package/templates/reviews/.gitkeep +0 -0
  240. package/templates/roles/architect.md +230 -0
  241. package/templates/roles/builder.md +175 -0
  242. package/templates/roles/consultant.md +27 -0
  243. package/templates/specs/.gitkeep +0 -0
  244. package/templates/templates/projectlist.md +129 -0
  245. package/templates/tower.html +1032 -0
@@ -0,0 +1,250 @@
1
+ # TICK Protocol
2
+ **T**ask **I**dentification, **C**oding, **K**ickout
3
+
4
+ ## Overview
5
+ TICK is a streamlined development protocol for rapid, autonomous implementation. Unlike SPIDER's multi-phase approach with intermediate reviews, TICK runs in a single autonomous step from specification to implementation, with multi-agent consultation only at the review phase.
6
+
7
+ **Core Principle**: Fast iteration for simple tasks - spec, plan, implement, review. No intermediate checkpoints. Multi-agent validation at the end.
8
+
9
+ ## When to Use TICK
10
+
11
+ ### Use TICK for:
12
+ - Small features (< 300 lines of code)
13
+ - Well-defined tasks with clear requirements
14
+ - Bug fixes with known solutions
15
+ - Straightforward refactoring
16
+ - Configuration changes with logic
17
+ - Simple API endpoints
18
+ - Utility function additions
19
+
20
+ ### Use SPIDER instead for:
21
+ - Complex features requiring multiple phases
22
+ - Architecture changes
23
+ - Unclear requirements needing exploration
24
+ - Performance optimization initiatives
25
+ - System design decisions
26
+ - Features requiring stakeholder alignment
27
+
28
+ ## Protocol Workflow
29
+
30
+ ### Single Autonomous Step
31
+
32
+ **Total Duration**: One continuous execution from start to finish
33
+
34
+ **Phases** (executed sequentially without user intervention):
35
+ 1. **Specification** - Define what needs to be built
36
+ 2. **Planning** - Create single-phase implementation plan
37
+ 3. **Implementation** - Execute the plan
38
+ 4. **Review** - Document what was done and lessons learned
39
+
40
+ **User Checkpoints**:
41
+ - **Start**: User provides task description
42
+ - **End**: User reviews completed work and provides feedback
43
+
44
+ ## Detailed Workflow
45
+
46
+ ### 1. Specification (Autonomous)
47
+
48
+ **Input**: User task description
49
+
50
+ **Agent Actions**:
51
+ 1. Analyze the task requirements
52
+ 2. Identify scope and constraints
53
+ 3. Define success criteria
54
+ 4. Generate specification document
55
+ 5. **COMMIT**: "TICK Spec: [descriptive-name]"
56
+
57
+ **Output**: `codev/specs/####-descriptive-name.md`
58
+
59
+ **Template**: `templates/spec.md`
60
+
61
+ **Key Sections**:
62
+ - Problem statement
63
+ - Scope (in/out)
64
+ - Success criteria
65
+ - Assumptions
66
+ - No multi-agent consultation
67
+ - No user review at this stage
68
+
69
+ ### 2. Planning (Autonomous)
70
+
71
+ **Input**: Generated specification
72
+
73
+ **Agent Actions**:
74
+ 1. Break work into logical steps (NOT phases)
75
+ 2. Identify file changes needed
76
+ 3. Define implementation order
77
+ 4. Generate plan document
78
+ 5. **COMMIT**: "TICK Plan: [descriptive-name]"
79
+
80
+ **Output**: `codev/plans/####-descriptive-name.md`
81
+
82
+ **Template**: `templates/plan.md`
83
+
84
+ **Key Sections**:
85
+ - Implementation steps (sequential)
86
+ - Files to create/modify
87
+ - Testing approach
88
+ - Single-phase execution (no breaking into phases)
89
+ - No time estimates
90
+ - No user review at this stage
91
+
92
+ ### 3. Implementation (Autonomous)
93
+
94
+ **Input**: Generated plan
95
+
96
+ **Agent Actions**:
97
+ 1. Execute implementation steps in order
98
+ 2. Write code following plan
99
+ 3. Test functionality
100
+ 4. **COMMIT**: "TICK Impl: [descriptive-name]"
101
+
102
+ **Output**: Working code committed to repository
103
+
104
+ **Notes**:
105
+ - Follow fail-fast principles from AGENTS.md/CLAUDE.md
106
+ - Test before committing
107
+ - No user approval needed during implementation
108
+ - Single commit for all changes
109
+
110
+ ### 4. Review (User Checkpoint)
111
+
112
+ **Input**: Completed implementation
113
+
114
+ **Agent Actions**:
115
+ 1. Generate review document with:
116
+ - What was implemented
117
+ - Challenges encountered
118
+ - Deviations from plan
119
+ - Lessons learned
120
+ 2. **Multi-Agent Consultation** (DEFAULT - MANDATORY):
121
+ - Consult GPT-5 AND Gemini Pro
122
+ - Focus: Code quality, missed issues, improvements
123
+ - Update review with consultation feedback
124
+ 3. **Update Architecture Documentation**:
125
+ - Use architecture-documenter agent to update `codev/resources/arch.md`
126
+ - Document new modules, utilities, or architectural changes
127
+ - Ensure arch.md reflects current codebase state
128
+ 4. **COMMIT**: "TICK Review: [descriptive-name]" (includes consultation findings and arch.md updates)
129
+ 5. **PRESENT TO USER**: Show summary with consultation insights and ask for feedback
130
+
131
+ **Output**: `codev/reviews/####-descriptive-name.md`
132
+
133
+ **Template**: `templates/review.md`
134
+
135
+ **⚠️ BLOCKING**: Cannot present to user without consultation (unless explicitly disabled)
136
+
137
+ **User Actions**:
138
+ - Review completed work
139
+ - Provide feedback
140
+ - Request changes OR approve
141
+
142
+ **If Changes Requested**:
143
+ - Agent makes changes
144
+ - Commits: "TICK Fixes: [descriptive-name]"
145
+ - Updates review document
146
+ - Repeats until user approval
147
+
148
+ ## File Naming Convention
149
+
150
+ All three files share the same sequential identifier and name:
151
+ - `specs/0001-feature-name.md`
152
+ - `plans/0001-feature-name.md`
153
+ - `reviews/0001-feature-name.md`
154
+
155
+ Sequential numbering continues across SPIDER and TICK protocols.
156
+
157
+ ## Git Commit Strategy
158
+
159
+ **TICK uses 4 commits per task**:
160
+ 1. Specification: `TICK Spec: Add user authentication`
161
+ 2. Plan: `TICK Plan: Add user authentication`
162
+ 3. Implementation: `TICK Impl: Add user authentication`
163
+ 4. Review (includes multi-agent consultation): `TICK Review: Add user authentication`
164
+
165
+ Additional commits if changes requested:
166
+ - `TICK Fixes: Add user authentication` (can be multiple)
167
+
168
+ ## Key Differences from SPIDER
169
+
170
+ | Aspect | SPIDER | TICK |
171
+ |--------|--------|------|
172
+ | User checkpoints | Multiple (after spec, plan, each phase) | Two (start, end) |
173
+ | Multi-agent consultation | Throughout (spec, plan, implementation, review) | End only (review) |
174
+ | Implementation phases | Multiple | Single |
175
+ | Review timing | Continuous | End only |
176
+ | Complexity | High | Low |
177
+ | Speed | Slower, thorough | Fast, autonomous |
178
+
179
+ ## Protocol Selection Guide
180
+
181
+ **Choose TICK when**:
182
+ - Task is well-defined
183
+ - < 300 lines of code
184
+ - Low risk of errors
185
+ - Fast iteration needed
186
+ - Requirements are clear
187
+
188
+ **Choose SPIDER when**:
189
+ - Requirements unclear
190
+ - > 300 lines of code
191
+ - High complexity
192
+ - Stakeholder alignment needed
193
+ - Architecture changes
194
+
195
+ ## Example TICK Workflow
196
+
197
+ **User**: "Add a health check endpoint to the API"
198
+
199
+ **Agent**:
200
+ 1. Generates spec (30 seconds)
201
+ - `specs/0002-api-health-check.md`
202
+ - Commit: "TICK Spec: API health check"
203
+ 2. Generates plan (30 seconds)
204
+ - `plans/0002-api-health-check.md`
205
+ - Commit: "TICK Plan: API health check"
206
+ 3. Implements (2 minutes)
207
+ - Creates `/api/health` endpoint
208
+ - Tests endpoint
209
+ - Commit: "TICK Impl: API health check"
210
+ 4. Reviews and presents (1 minute)
211
+ - `reviews/0002-api-health-check.md`
212
+ - Commit: "TICK Review: API health check"
213
+ - Shows user the working endpoint
214
+
215
+ **User**: Reviews, approves or requests changes
216
+
217
+ **Total Time**: ~4 minutes for simple task
218
+
219
+ ## Benefits
220
+
221
+ 1. **Speed**: No intermediate approvals means faster delivery
222
+ 2. **Simplicity**: Straightforward workflow, easy to understand
223
+ 3. **Autonomy**: Agent executes without constant human intervention
224
+ 4. **Documentation**: Still maintains spec, plan, review for reference
225
+ 5. **Lightweight**: Minimal overhead for simple tasks
226
+
227
+ ## Limitations
228
+
229
+ 1. **No course correction**: Can't adjust mid-implementation
230
+ 2. **No multi-perspective**: Single agent viewpoint only
231
+ 3. **Risk**: May implement wrong solution if spec unclear
232
+ 4. **Scope creep**: Easy to go beyond intended scope
233
+ 5. **No validation**: No intermediate checks until end
234
+
235
+ ## Best Practices
236
+
237
+ 1. **Clear Task Description**: User provides detailed initial description
238
+ 2. **Test Before Review**: Agent must test functionality before presenting
239
+ 3. **Honest Review**: Document all issues and deviations in review
240
+ 4. **Quick Iterations**: If changes needed, make them fast
241
+ 5. **Know When to Switch**: If task becomes complex, switch to SPIDER
242
+
243
+ ## Template Usage
244
+
245
+ All templates are located in `codev/protocols/tick/templates/`:
246
+ - `spec.md` - Specification template
247
+ - `plan.md` - Plan template
248
+ - `review.md` - Review template
249
+
250
+ These are simplified versions of SPIDER templates without consultation sections.
@@ -0,0 +1,67 @@
1
+ # TICK Plan: [Title]
2
+
3
+ ## Metadata
4
+ - **ID**: ####-[short-name]
5
+ - **Protocol**: TICK
6
+ - **Specification**: [Link to spec file]
7
+ - **Created**: [YYYY-MM-DD]
8
+ - **Status**: autonomous
9
+
10
+ ## Implementation Approach
11
+ [Brief description of chosen approach from specification]
12
+
13
+ ## Implementation Steps
14
+
15
+ ### Step 1: [Action]
16
+ **Files**: [list files to create/modify]
17
+ **Changes**: [what to do]
18
+
19
+ ### Step 2: [Action]
20
+ **Files**: [list files to create/modify]
21
+ **Changes**: [what to do]
22
+
23
+ ### Step 3: [Action]
24
+ **Files**: [list files to create/modify]
25
+ **Changes**: [what to do]
26
+
27
+ [Add more steps as needed - keep sequential]
28
+
29
+ ## Files to Create/Modify
30
+
31
+ ### New Files
32
+ - `path/to/file1.ts` - [purpose]
33
+ - `path/to/file2.ts` - [purpose]
34
+
35
+ ### Modified Files
36
+ - `path/to/existing1.ts` - [what changes]
37
+ - `path/to/existing2.ts` - [what changes]
38
+
39
+ ## Testing Strategy
40
+
41
+ ### Manual Testing
42
+ 1. [Test scenario 1]
43
+ 2. [Test scenario 2]
44
+ 3. [Test scenario 3]
45
+
46
+ ### Automated Tests (if applicable)
47
+ - [Test file 1: what to test]
48
+ - [Test file 2: what to test]
49
+
50
+ ## Success Criteria
51
+ - [ ] All steps completed
52
+ - [ ] Manual tests pass
53
+ - [ ] No breaking changes
54
+ - [ ] Code committed
55
+
56
+ ## Risks
57
+ | Risk | If Occurs |
58
+ |------|-----------|
59
+ | [Risk 1] | [Fallback plan] |
60
+ | [Risk 2] | [Fallback plan] |
61
+
62
+ ## Dependencies
63
+ - [Dependency 1]
64
+ - [Dependency 2]
65
+
66
+ ## Notes
67
+ [Any implementation notes or considerations]
@@ -0,0 +1,90 @@
1
+ # TICK Review: [Title]
2
+
3
+ ## Metadata
4
+ - **ID**: ####-[short-name]
5
+ - **Protocol**: TICK
6
+ - **Date**: [YYYY-MM-DD]
7
+ - **Specification**: [Link to spec file]
8
+ - **Plan**: [Link to plan file]
9
+ - **Status**: [completed/needs-fixes]
10
+
11
+ ## Implementation Summary
12
+ [Brief description of what was implemented]
13
+
14
+ ## Success Criteria Status
15
+ - [ ] [Criterion 1 from spec]
16
+ - [ ] [Criterion 2 from spec]
17
+ - [ ] [Criterion 3 from spec]
18
+ - [ ] Tests passed
19
+ - [ ] No breaking changes
20
+
21
+ ## Files Changed
22
+
23
+ ### Created
24
+ - `path/to/file1.ts` - [purpose]
25
+ - `path/to/file2.ts` - [purpose]
26
+
27
+ ### Modified
28
+ - `path/to/existing1.ts` - [changes made]
29
+ - `path/to/existing2.ts` - [changes made]
30
+
31
+ ## Deviations from Plan
32
+ [None if plan was followed exactly, otherwise list what changed and why]
33
+
34
+ ## Testing Results
35
+
36
+ ### Manual Tests
37
+ 1. [Scenario 1] - ✅/❌
38
+ 2. [Scenario 2] - ✅/❌
39
+ 3. [Scenario 3] - ✅/❌
40
+
41
+ ### Automated Tests (if applicable)
42
+ - [Test result summary]
43
+
44
+ ## Challenges Encountered
45
+ 1. [Challenge 1]
46
+ - **Solution**: [How resolved]
47
+ 2. [Challenge 2]
48
+ - **Solution**: [How resolved]
49
+
50
+ ## Lessons Learned
51
+
52
+ ### What Went Well
53
+ - [Success point 1]
54
+ - [Success point 2]
55
+
56
+ ### What Could Improve
57
+ - [Improvement area 1]
58
+ - [Improvement area 2]
59
+
60
+ ## Multi-Agent Consultation
61
+
62
+ **Models Consulted**: GPT-5, Gemini Pro
63
+ **Date**: [YYYY-MM-DD]
64
+
65
+ ### Key Feedback
66
+ - [Feedback point 1 from consultation]
67
+ - [Feedback point 2 from consultation]
68
+ - [Feedback point 3 from consultation]
69
+
70
+ ### Issues Identified
71
+ - [Issue 1 found by agents]
72
+ - [Issue 2 found by agents]
73
+
74
+ ### Recommendations
75
+ - [Recommendation 1]
76
+ - [Recommendation 2]
77
+
78
+ ## TICK Protocol Feedback
79
+ - **Autonomous execution**: [Worked well / Issues encountered]
80
+ - **Single-phase approach**: [Appropriate / Should have used SPIDER]
81
+ - **Speed vs quality trade-off**: [Balanced / Too fast / Too slow]
82
+ - **End-only consultation**: [Caught issues / Missed opportunities]
83
+
84
+ ## Follow-Up Actions
85
+ - [ ] [Any remaining work]
86
+ - [ ] [Technical debt created]
87
+ - [ ] [Future enhancements]
88
+
89
+ ## Conclusion
90
+ [Brief summary of outcome and whether TICK was appropriate for this task]
@@ -0,0 +1,61 @@
1
+ # TICK Specification: [Title]
2
+
3
+ ## Metadata
4
+ - **ID**: ####-[short-name]
5
+ - **Protocol**: TICK
6
+ - **Created**: [YYYY-MM-DD]
7
+ - **Status**: autonomous
8
+
9
+ ## Task Description
10
+ [What needs to be built? Be specific and concise.]
11
+
12
+ ## Scope
13
+
14
+ ### In Scope
15
+ - [Feature/change 1]
16
+ - [Feature/change 2]
17
+ - [Feature/change 3]
18
+
19
+ ### Out of Scope
20
+ - [What we're NOT doing]
21
+ - [Future considerations]
22
+
23
+ ## Success Criteria
24
+ - [ ] [Specific, testable criterion 1]
25
+ - [ ] [Specific, testable criterion 2]
26
+ - [ ] [Specific, testable criterion 3]
27
+ - [ ] Tests pass
28
+ - [ ] No breaking changes
29
+
30
+ ## Constraints
31
+ - [Technical limitation 1]
32
+ - [Technical limitation 2]
33
+ - [Time/scope constraints]
34
+
35
+ ## Assumptions
36
+ - [Assumption 1]
37
+ - [Assumption 2]
38
+ - [Dependencies]
39
+
40
+ ## Implementation Approach
41
+ [Brief description of how this will be implemented - single approach only]
42
+
43
+ ### Key Changes
44
+ - [File/component 1: what will change]
45
+ - [File/component 2: what will change]
46
+ - [File/component 3: what will change]
47
+
48
+ ## Risks
49
+ | Risk | Mitigation |
50
+ |------|------------|
51
+ | [Risk 1] | [How to handle] |
52
+ | [Risk 2] | [How to handle] |
53
+
54
+ ## Testing Approach
55
+ ### Test Scenarios
56
+ 1. [Happy path scenario]
57
+ 2. [Edge case scenario]
58
+ 3. [Error scenario]
59
+
60
+ ## Notes
61
+ [Any additional context]
File without changes
@@ -0,0 +1,230 @@
1
+ # Role: Architect
2
+
3
+ The Architect is the orchestrating agent that manages the overall development process, breaks down work into discrete tasks, spawns Builder agents, and integrates their output.
4
+
5
+ ## Output Formatting
6
+
7
+ When referencing files that the user may want to review, format them as clickable URLs using the dashboard's open-file endpoint:
8
+
9
+ ```
10
+ # Instead of:
11
+ See codev/specs/0022-consult-tool-stateless.md for details.
12
+
13
+ # Use:
14
+ See http://localhost:{PORT}/open-file?path=codev/specs/0022-consult-tool-stateless.md for details.
15
+ ```
16
+
17
+ **Finding the dashboard port**: Run `af status` to see the dashboard URL, or check `.agent-farm/state.json` for the `dashboardPort` value. The default is 4200, but varies when multiple projects are running.
18
+
19
+ This opens files in the agent-farm annotation viewer when clicked in the dashboard terminal.
20
+
21
+ ## Critical Rules
22
+
23
+ These rules are **non-negotiable** and must be followed at all times:
24
+
25
+ ### NEVER Do These:
26
+ 1. **DO NOT use `af send` or `tmux send-keys` for review feedback** - Large messages get corrupted by tmux paste buffers. Always use GitHub PR comments for review feedback.
27
+ 2. **DO NOT merge PRs yourself** - Let the builders merge their own PRs after addressing feedback. The builder owns the merge process.
28
+ 3. **DO NOT commit directly to main** - All changes go through PRs.
29
+ 4. **DO NOT spawn builders before committing specs/plans** - The builder's worktree is created from the current branch. If specs/plans aren't committed, the builder won't have access to them.
30
+
31
+ ### ALWAYS Do These:
32
+ 1. **Leave PR comments for reviews** - Use `gh pr comment` to post review feedback.
33
+ 2. **Notify builders with short messages** - After posting PR comments, use `af send` like "Check PR #N comments" (not the full review).
34
+ 3. **Let builders merge their PRs** - After approving, tell the builder to merge. Don't do it yourself.
35
+ 4. **Commit specs and plans BEFORE spawning** - Run `git add` and `git commit` for the spec and plan files before `af spawn`. The builder needs these files in the worktree.
36
+
37
+ ## Responsibilities
38
+
39
+ 1. **Understand the big picture** - Maintain context of the entire project/epic
40
+ 2. **Maintain the project list** - Track all projects in `codev/projectlist.md`
41
+ 3. **Decompose work** - Break large features into spec-sized tasks for Builders
42
+ 4. **Spawn Builders** - Create isolated worktrees and assign tasks
43
+ 5. **Monitor progress** - Track Builder status, unblock when needed
44
+ 6. **Review and integrate** - Merge Builder PRs, run integration tests
45
+ 7. **Maintain quality** - Ensure consistency across Builder outputs
46
+
47
+ ## Project Tracking
48
+
49
+ **`codev/projectlist.md` is the canonical source of truth for all projects.**
50
+
51
+ The Architect is responsible for maintaining this file:
52
+
53
+ 1. **Reserve numbers first** - Add entry to projectlist.md BEFORE creating spec files
54
+ 2. **Track status** - Update status as projects move through lifecycle:
55
+ - `conceived` → `specified` → `planned` → `implementing` → `implemented` → `committed` → `integrated`
56
+ 3. **Set priorities** - Assign high/medium/low based on business value and dependencies
57
+ 4. **Note dependencies** - Track which projects depend on others
58
+ 5. **Document decisions** - Use notes field for context, blockers, or reasons for abandonment
59
+
60
+ When asked "what should we work on next?" or "what's incomplete?":
61
+ ```bash
62
+ # Read the project list
63
+ cat codev/projectlist.md
64
+
65
+ # Look for high-priority items not yet integrated
66
+ grep -A5 "priority: high" codev/projectlist.md
67
+ ```
68
+
69
+ ## Execution Strategy: SPIDER
70
+
71
+ The Architect follows the SPIDER protocol but modifies the Implementation phase to delegate rather than code directly.
72
+
73
+ ### Phase 1: Specify
74
+ - Understand the user's request at a system level
75
+ - Identify major components and dependencies
76
+ - Create high-level specifications
77
+ - Break into Builder-sized specs (each spec = one Builder task)
78
+
79
+ ### Phase 2: Plan
80
+ - Determine which specs can be parallelized
81
+ - Identify dependencies between specs
82
+ - Plan the spawn order for Builders
83
+ - Prepare Builder prompts with context
84
+
85
+ ### Phase 3: Implement (Modified)
86
+
87
+ **The Architect does NOT write code directly.** Instead:
88
+
89
+ 1. **Instantiate** - Create isolated git worktrees for each task
90
+ ```bash
91
+ af spawn --project XXXX
92
+ ```
93
+
94
+ 2. **Delegate** - Spawn a Builder agent for each worktree
95
+ - Pass the specific spec
96
+ - Assign a protocol (SPIDER or TICK based on complexity)
97
+ - Provide necessary context
98
+
99
+ 3. **Orchestrate** - Monitor the Builder pool
100
+ - Check status periodically
101
+ - If a Builder is `blocked`, intervene with guidance
102
+ - If a Builder fails, rollback or reassign
103
+ - Answer Builder questions
104
+
105
+ 4. **Consolidate** - Do not modify code manually
106
+ - Only merge completed worktrees
107
+ - Resolve merge conflicts at integration time
108
+
109
+ ### Phase 4: Defend
110
+ - Review Builder test coverage
111
+ - Run integration tests across merged code
112
+ - Identify gaps in testing
113
+
114
+ ### Phase 5: Evaluate
115
+ - Verify all specs are implemented
116
+ - Check for consistency across Builder outputs
117
+ - Validate the integrated system works
118
+
119
+ ### Phase 6: Review
120
+ - Document lessons learned
121
+ - Update specs/plans based on implementation
122
+ - Clean up worktrees
123
+
124
+ ## When to Spawn Builders
125
+
126
+ Spawn a Builder when:
127
+ - A spec is well-defined and self-contained
128
+ - The task can be done in isolation (git worktree)
129
+ - Parallelization would speed up delivery
130
+ - The task is implementation-focused (not research/exploration)
131
+
132
+ Do NOT spawn a Builder when:
133
+ - The task requires cross-cutting changes
134
+ - You need to explore/understand the codebase first
135
+ - The task is trivial (do it yourself with TICK)
136
+ - The spec is unclear (clarify first)
137
+
138
+ ## Communication with Builders
139
+
140
+ ### Providing Context
141
+ When spawning a Builder, provide:
142
+ - The spec file path
143
+ - Any relevant architecture context
144
+ - Constraints or patterns to follow
145
+ - Which protocol to use (SPIDER/TICK)
146
+
147
+ ### Handling Blocked Status
148
+ When a Builder reports `blocked`:
149
+ 1. Read their question/blocker
150
+ 2. Provide guidance via the annotation system or direct message
151
+ 3. Update their status to `implementing` when unblocked
152
+
153
+ ### Reviewing Output
154
+ Before merging a Builder's work:
155
+ 1. Review the PR/diff
156
+ 2. Check test coverage
157
+ 3. Verify it matches the spec
158
+ 4. Run integration tests
159
+
160
+ ## State Management
161
+
162
+ The Architect maintains state in:
163
+ - `.agent-farm/state.json` - Current architect/builder/util status
164
+ - Dashboard - Visual overview (run `af status` to see URL)
165
+
166
+ ## Tools
167
+
168
+ The Architect uses `agent-farm` CLI. We recommend setting up an alias:
169
+
170
+ ```bash
171
+ # Add to ~/.bashrc or ~/.zshrc
172
+ alias af='./codev/bin/agent-farm'
173
+ ```
174
+
175
+ ### Agent Farm Commands
176
+
177
+ ```bash
178
+ # Starting/stopping
179
+ af start # Start architect dashboard
180
+ af stop # Stop all agent-farm processes
181
+
182
+ # Managing builders
183
+ af spawn --project 0003 # Spawn a builder for spec 0003
184
+ af spawn -p 0003 # Short form
185
+ af status # Check all agent status
186
+ af cleanup --project 0003 # Clean up builder (checks for uncommitted work)
187
+ af cleanup -p 0003 --force # Force cleanup (lose uncommitted work)
188
+
189
+ # Utilities
190
+ af util # Open a utility shell terminal
191
+ af open src/file.ts # Open file annotation viewer
192
+
193
+ # Port management (for multi-project support)
194
+ af ports list # List port allocations
195
+ af ports cleanup # Remove stale allocations
196
+ ```
197
+
198
+ ### Configuration
199
+
200
+ Customize commands via `codev/config.json`:
201
+ ```json
202
+ {
203
+ "shell": {
204
+ "architect": "claude --model opus",
205
+ "builder": "claude --model sonnet",
206
+ "shell": "bash"
207
+ }
208
+ }
209
+ ```
210
+
211
+ Override via CLI: `af start --architect-cmd "claude --model opus"`
212
+
213
+ ## Example Session
214
+
215
+ ```
216
+ 1. User: "Implement user authentication"
217
+ 2. Architect (Specify): Creates specs 0010-auth-backend.md, 0011-auth-frontend.md
218
+ 3. Architect (Plan): Backend first, then frontend (dependency)
219
+ 4. Architect (Implement):
220
+ - `af spawn -p 0010` → Builder starts backend
221
+ - `af status` → Check progress
222
+ - Waits for 0010 to reach pr-ready
223
+ - Reviews and merges 0010
224
+ - `af spawn -p 0011` → Builder starts frontend
225
+ - Reviews and merges 0011
226
+ - `af cleanup -p 0010` → Clean up backend builder
227
+ - `af cleanup -p 0011` → Clean up frontend builder
228
+ 5. Architect (Defend): Runs full auth integration tests
229
+ 6. Architect (Review): Documents the auth system in arch.md
230
+ ```