@aperant/framework 0.13.0 → 0.16.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/CHANGELOG.md +106 -0
  2. package/README.md +1 -1
  3. package/agents/apt-pr-review-crossplatform.md +189 -0
  4. package/agents/apt-pr-review-i18n.md +190 -0
  5. package/dist/cli/commands/audit-branch-current.d.mts +27 -5
  6. package/dist/cli/commands/audit-branch-current.d.mts.map +1 -1
  7. package/dist/cli/commands/audit-branch-current.mjs +3 -3
  8. package/dist/cli/commands/audit-branch-current.mjs.map +1 -1
  9. package/dist/cli/commands/event.d.mts.map +1 -1
  10. package/dist/cli/commands/event.mjs +6 -4
  11. package/dist/cli/commands/event.mjs.map +1 -1
  12. package/dist/cli/commands/fan-out.d.mts.map +1 -1
  13. package/dist/cli/commands/fan-out.mjs +3 -1
  14. package/dist/cli/commands/fan-out.mjs.map +1 -1
  15. package/dist/cli/commands/features-audit.d.mts.map +1 -1
  16. package/dist/cli/commands/features-audit.mjs +6 -1
  17. package/dist/cli/commands/features-audit.mjs.map +1 -1
  18. package/dist/cli/commands/followups.d.mts +5 -0
  19. package/dist/cli/commands/followups.d.mts.map +1 -0
  20. package/dist/cli/commands/followups.mjs +266 -0
  21. package/dist/cli/commands/followups.mjs.map +1 -0
  22. package/dist/cli/commands/health-check.d.mts.map +1 -1
  23. package/dist/cli/commands/health-check.mjs +3 -1
  24. package/dist/cli/commands/health-check.mjs.map +1 -1
  25. package/dist/cli/commands/init.d.mts.map +1 -1
  26. package/dist/cli/commands/init.mjs +30 -1
  27. package/dist/cli/commands/init.mjs.map +1 -1
  28. package/dist/cli/commands/merge-detect.d.mts +29 -0
  29. package/dist/cli/commands/merge-detect.d.mts.map +1 -0
  30. package/dist/cli/commands/merge-detect.mjs +196 -0
  31. package/dist/cli/commands/merge-detect.mjs.map +1 -0
  32. package/dist/cli/commands/merge-integrate.d.mts +28 -0
  33. package/dist/cli/commands/merge-integrate.d.mts.map +1 -0
  34. package/dist/cli/commands/merge-integrate.mjs +383 -0
  35. package/dist/cli/commands/merge-integrate.mjs.map +1 -0
  36. package/dist/cli/commands/pr-review/detect-specialists.d.mts +58 -0
  37. package/dist/cli/commands/pr-review/detect-specialists.d.mts.map +1 -0
  38. package/dist/cli/commands/pr-review/detect-specialists.mjs +984 -0
  39. package/dist/cli/commands/pr-review/detect-specialists.mjs.map +1 -0
  40. package/dist/cli/commands/pr-review.d.mts.map +1 -1
  41. package/dist/cli/commands/pr-review.mjs +11 -2
  42. package/dist/cli/commands/pr-review.mjs.map +1 -1
  43. package/dist/cli/commands/precompact-hook.d.mts.map +1 -1
  44. package/dist/cli/commands/precompact-hook.mjs +10 -6
  45. package/dist/cli/commands/precompact-hook.mjs.map +1 -1
  46. package/dist/cli/commands/roadmap.d.mts.map +1 -1
  47. package/dist/cli/commands/roadmap.mjs +24 -11
  48. package/dist/cli/commands/roadmap.mjs.map +1 -1
  49. package/dist/cli/commands/seed.d.mts.map +1 -1
  50. package/dist/cli/commands/seed.mjs +3 -1
  51. package/dist/cli/commands/seed.mjs.map +1 -1
  52. package/dist/cli/commands/state.d.mts.map +1 -1
  53. package/dist/cli/commands/state.mjs +9 -3
  54. package/dist/cli/commands/state.mjs.map +1 -1
  55. package/dist/cli/commands/statusline.d.mts.map +1 -1
  56. package/dist/cli/commands/statusline.mjs +5 -1
  57. package/dist/cli/commands/statusline.mjs.map +1 -1
  58. package/dist/cli/commands/task.d.mts.map +1 -1
  59. package/dist/cli/commands/task.mjs +126 -23
  60. package/dist/cli/commands/task.mjs.map +1 -1
  61. package/dist/cli/commands/worktree.d.mts +1 -1
  62. package/dist/cli/commands/worktree.d.mts.map +1 -1
  63. package/dist/cli/commands/worktree.mjs +282 -83
  64. package/dist/cli/commands/worktree.mjs.map +1 -1
  65. package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
  66. package/dist/cli/config/post-merge-sweep.mjs +3 -2
  67. package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
  68. package/dist/cli/config/share-policy.d.mts +3 -1
  69. package/dist/cli/config/share-policy.d.mts.map +1 -1
  70. package/dist/cli/config/share-policy.mjs +16 -3
  71. package/dist/cli/config/share-policy.mjs.map +1 -1
  72. package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
  73. package/dist/cli/config/upgrade-gitignore.mjs +27 -5
  74. package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
  75. package/dist/cli/consistency/parse-qa.mjs +12 -1
  76. package/dist/cli/consistency/parse-qa.mjs.map +1 -1
  77. package/dist/cli/consistency/parse-review.d.mts +23 -0
  78. package/dist/cli/consistency/parse-review.d.mts.map +1 -1
  79. package/dist/cli/consistency/parse-review.mjs +36 -0
  80. package/dist/cli/consistency/parse-review.mjs.map +1 -1
  81. package/dist/cli/consistency/parse-spec.d.mts +16 -0
  82. package/dist/cli/consistency/parse-spec.d.mts.map +1 -1
  83. package/dist/cli/consistency/parse-spec.mjs +44 -0
  84. package/dist/cli/consistency/parse-spec.mjs.map +1 -1
  85. package/dist/cli/coordination/agent-identity.d.mts +5 -2
  86. package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
  87. package/dist/cli/coordination/agent-identity.mjs +6 -4
  88. package/dist/cli/coordination/agent-identity.mjs.map +1 -1
  89. package/dist/cli/coordination/store.d.mts +1 -1
  90. package/dist/cli/dispatch.d.mts.map +1 -1
  91. package/dist/cli/dispatch.mjs +4 -0
  92. package/dist/cli/dispatch.mjs.map +1 -1
  93. package/dist/cli/followups/derive.d.mts +63 -0
  94. package/dist/cli/followups/derive.d.mts.map +1 -0
  95. package/dist/cli/followups/derive.mjs +115 -0
  96. package/dist/cli/followups/derive.mjs.map +1 -0
  97. package/dist/cli/followups/schema.d.mts +165 -0
  98. package/dist/cli/followups/schema.d.mts.map +1 -0
  99. package/dist/cli/followups/schema.mjs +251 -0
  100. package/dist/cli/followups/schema.mjs.map +1 -0
  101. package/dist/cli/gate/context.d.mts +1 -1
  102. package/dist/cli/gate/gates/followups-adjudicated.d.mts +69 -0
  103. package/dist/cli/gate/gates/followups-adjudicated.d.mts.map +1 -0
  104. package/dist/cli/gate/gates/followups-adjudicated.mjs +141 -0
  105. package/dist/cli/gate/gates/followups-adjudicated.mjs.map +1 -0
  106. package/dist/cli/gate/gates/index.mjs +1 -0
  107. package/dist/cli/gate/gates/index.mjs.map +1 -1
  108. package/dist/cli/git/materialize-env.d.mts +39 -0
  109. package/dist/cli/git/materialize-env.d.mts.map +1 -0
  110. package/dist/cli/git/materialize-env.mjs +217 -0
  111. package/dist/cli/git/materialize-env.mjs.map +1 -0
  112. package/dist/cli/help.d.mts.map +1 -1
  113. package/dist/cli/help.mjs +9 -1
  114. package/dist/cli/help.mjs.map +1 -1
  115. package/dist/cli/install/legacy-paths.d.mts.map +1 -1
  116. package/dist/cli/install/legacy-paths.mjs +5 -0
  117. package/dist/cli/install/legacy-paths.mjs.map +1 -1
  118. package/dist/cli/roadmap/lifecycle.d.mts.map +1 -1
  119. package/dist/cli/roadmap/lifecycle.mjs +4 -1
  120. package/dist/cli/roadmap/lifecycle.mjs.map +1 -1
  121. package/dist/cli/task/ids.d.mts +9 -0
  122. package/dist/cli/task/ids.d.mts.map +1 -1
  123. package/dist/cli/task/ids.mjs +9 -0
  124. package/dist/cli/task/ids.mjs.map +1 -1
  125. package/dist/cli/task/index-md.d.mts +5 -0
  126. package/dist/cli/task/index-md.d.mts.map +1 -1
  127. package/dist/cli/task/index-md.mjs +12 -4
  128. package/dist/cli/task/index-md.mjs.map +1 -1
  129. package/dist/cli/util/io.d.mts +6 -0
  130. package/dist/cli/util/io.d.mts.map +1 -1
  131. package/dist/cli/util/io.mjs +16 -1
  132. package/dist/cli/util/io.mjs.map +1 -1
  133. package/dist/cli/util/project.d.mts +7 -2
  134. package/dist/cli/util/project.d.mts.map +1 -1
  135. package/dist/cli/util/project.mjs +11 -14
  136. package/dist/cli/util/project.mjs.map +1 -1
  137. package/dist/cli/util/state-paths.d.mts +19 -0
  138. package/dist/cli/util/state-paths.d.mts.map +1 -0
  139. package/dist/cli/util/state-paths.mjs +45 -0
  140. package/dist/cli/util/state-paths.mjs.map +1 -0
  141. package/dist/plugin/.claude-plugin/plugin.json +4 -1
  142. package/dist/plugin/agents/apt-pr-review-crossplatform.md +189 -0
  143. package/dist/plugin/agents/apt-pr-review-i18n.md +190 -0
  144. package/dist/plugin/skills/apt/SKILL.md +9 -3
  145. package/dist/plugin/skills/apt-close-task/SKILL.md +48 -0
  146. package/dist/plugin/skills/apt-debug/SKILL.md +19 -9
  147. package/dist/plugin/skills/apt-execute/SKILL.md +3 -1
  148. package/dist/plugin/skills/apt-fan-out/SKILL.md +65 -1
  149. package/dist/plugin/skills/apt-merge-conflict-resolution/SKILL.md +227 -0
  150. package/dist/plugin/skills/apt-pr-review/SCHEMA.md +4 -2
  151. package/dist/plugin/skills/apt-pr-review/SKILL.md +117 -29
  152. package/dist/plugin/skills/apt-quick/SKILL.md +24 -1
  153. package/dist/plugin/skills/apt-review/SKILL.md +6 -0
  154. package/dist/plugin/skills/apt-run/SKILL.md +1 -1
  155. package/dist/plugin/skills/apt-setup/SKILL.md +21 -3
  156. package/dist/plugin/skills/apt-ship/SKILL.md +32 -11
  157. package/dist/plugin/skills/apt-terminal/SKILL.md +8 -0
  158. package/dist/plugin/skills/apt-triage/SKILL.md +4 -0
  159. package/dist/plugin/skills/apt-verify/SKILL.md +24 -0
  160. package/dist/plugin/skills/apt-watch-ci/SKILL.md +3 -1
  161. package/dist/types/config.d.ts +33 -0
  162. package/dist/types/config.d.ts.map +1 -1
  163. package/package.json +1 -1
  164. package/prompts/conductor-framework-context.md +1 -1
  165. package/prompts/github/pr_crossplatform_agent.md +283 -0
  166. package/prompts/github/pr_i18n_agent.md +279 -0
  167. package/prompts/inbox-clarification.md +18 -11
  168. package/skills/apt/SKILL.md +9 -3
  169. package/skills/apt-close-task/SKILL.md +48 -0
  170. package/skills/apt-debug/SKILL.md +19 -9
  171. package/skills/apt-execute/SKILL.md +3 -1
  172. package/skills/apt-fan-out/SKILL.md +65 -1
  173. package/skills/apt-merge-conflict-resolution/SKILL.md +227 -0
  174. package/skills/apt-pr-review/SCHEMA.md +4 -2
  175. package/skills/apt-pr-review/SKILL.md +117 -29
  176. package/skills/apt-quick/SKILL.md +24 -1
  177. package/skills/apt-review/SKILL.md +6 -0
  178. package/skills/apt-run/SKILL.md +1 -1
  179. package/skills/apt-setup/SKILL.md +21 -3
  180. package/skills/apt-ship/SKILL.md +32 -11
  181. package/skills/apt-terminal/SKILL.md +8 -0
  182. package/skills/apt-triage/SKILL.md +4 -0
  183. package/skills/apt-verify/SKILL.md +24 -0
  184. package/skills/apt-watch-ci/SKILL.md +3 -1
  185. package/src/cli/commands/audit-branch-current.mjs +3 -3
  186. package/src/cli/commands/event.mjs +6 -4
  187. package/src/cli/commands/fan-out.mjs +3 -1
  188. package/src/cli/commands/features-audit.mjs +6 -1
  189. package/src/cli/commands/followups.mjs +303 -0
  190. package/src/cli/commands/health-check.mjs +3 -1
  191. package/src/cli/commands/init.mjs +29 -0
  192. package/src/cli/commands/merge-detect.mjs +203 -0
  193. package/src/cli/commands/merge-integrate.mjs +392 -0
  194. package/src/cli/commands/pr-review/__fixtures__/android-strings/app/src/main/res/values-fr/strings.xml +3 -0
  195. package/src/cli/commands/pr-review/__fixtures__/babel-js/package.json +4 -0
  196. package/src/cli/commands/pr-review/__fixtures__/c-ifdef/src/main.c +4 -0
  197. package/src/cli/commands/pr-review/__fixtures__/ci-matrix/.github/workflows/ci.yml +10 -0
  198. package/src/cli/commands/pr-review/__fixtures__/cmake-win/CMakeLists.txt +5 -0
  199. package/src/cli/commands/pr-review/__fixtures__/diffs/add-arb.patch +9 -0
  200. package/src/cli/commands/pr-review/__fixtures__/diffs/ci-single-os-dep.patch +13 -0
  201. package/src/cli/commands/pr-review/__fixtures__/diffs/ci-single-os-list-item-dep.patch +17 -0
  202. package/src/cli/commands/pr-review/__fixtures__/diffs/lone-weak-t.patch +8 -0
  203. package/src/cli/commands/pr-review/__fixtures__/diffs/monorepo-b.patch +7 -0
  204. package/src/cli/commands/pr-review/__fixtures__/diffs/two-weak-xpl.patch +12 -0
  205. package/src/cli/commands/pr-review/__fixtures__/dropped-underscore/src/app.js +2 -0
  206. package/src/cli/commands/pr-review/__fixtures__/electron-app/package.json +4 -0
  207. package/src/cli/commands/pr-review/__fixtures__/i18n-locale-file/src/locales/fr.json +1 -0
  208. package/src/cli/commands/pr-review/__fixtures__/monorepo/packages/a/locales/fr.json +1 -0
  209. package/src/cli/commands/pr-review/__fixtures__/monorepo/packages/b/src/index.ts +1 -0
  210. package/src/cli/commands/pr-review/__fixtures__/py-babel/pyproject.toml +3 -0
  211. package/src/cli/commands/pr-review/__fixtures__/qt-i18n-dir/i18n/app_fr.ts +11 -0
  212. package/src/cli/commands/pr-review/__fixtures__/rust-cli/Cargo.toml +7 -0
  213. package/src/cli/commands/pr-review/__fixtures__/rust-cli/src/main.rs +1 -0
  214. package/src/cli/commands/pr-review/__fixtures__/ts-dir/ts/foo.ts +3 -0
  215. package/src/cli/commands/pr-review/detect-specialists.mjs +1029 -0
  216. package/src/cli/commands/pr-review.mjs +12 -2
  217. package/src/cli/commands/precompact-hook.mjs +10 -6
  218. package/src/cli/commands/roadmap.mjs +24 -11
  219. package/src/cli/commands/seed.mjs +3 -1
  220. package/src/cli/commands/state.mjs +9 -3
  221. package/src/cli/commands/statusline.mjs +5 -1
  222. package/src/cli/commands/task.mjs +135 -23
  223. package/src/cli/commands/worktree.mjs +298 -81
  224. package/src/cli/config/post-merge-sweep.mjs +3 -2
  225. package/src/cli/config/share-policy.mjs +16 -3
  226. package/src/cli/config/upgrade-gitignore.mjs +27 -5
  227. package/src/cli/consistency/parse-qa.mjs +11 -1
  228. package/src/cli/consistency/parse-review.mjs +36 -0
  229. package/src/cli/consistency/parse-spec.mjs +43 -0
  230. package/src/cli/coordination/agent-identity.mjs +6 -4
  231. package/src/cli/dispatch.mjs +4 -0
  232. package/src/cli/followups/derive.mjs +123 -0
  233. package/src/cli/followups/schema.mjs +264 -0
  234. package/src/cli/gate/gates/followups-adjudicated.mjs +158 -0
  235. package/src/cli/gate/gates/index.mjs +1 -0
  236. package/src/cli/git/materialize-env.mjs +212 -0
  237. package/src/cli/help.mjs +9 -1
  238. package/src/cli/install/legacy-paths.mjs +5 -0
  239. package/src/cli/roadmap/lifecycle.mjs +4 -1
  240. package/src/cli/task/ids.mjs +9 -0
  241. package/src/cli/task/index-md.mjs +12 -4
  242. package/src/cli/util/io.mjs +15 -1
  243. package/src/cli/util/project.mjs +11 -14
  244. package/src/cli/util/state-paths.mjs +45 -0
  245. package/prompts/followup_planner.md +0 -399
@@ -1,399 +0,0 @@
1
- ## YOUR ROLE - FOLLOW-UP PLANNER AGENT
2
-
3
- You are continuing work on a **COMPLETED spec** that needs additional functionality. The user has requested a follow-up task to extend the existing implementation. Your job is to ADD new subtasks to the existing implementation plan, NOT replace it.
4
-
5
- **Key Principle**: Extend, don't replace. All existing subtasks and their statuses must be preserved.
6
-
7
- ---
8
-
9
- ## WHY FOLLOW-UP PLANNING?
10
-
11
- The user has completed a build but wants to iterate. Instead of creating a new spec, they want to:
12
- 1. Leverage the existing context, patterns, and documentation
13
- 2. Build on top of what's already implemented
14
- 3. Continue in the same workspace and branch
15
-
16
- Your job is to create new subtasks that extend the current implementation.
17
-
18
- ---
19
-
20
- ## PHASE 0: LOAD EXISTING CONTEXT (MANDATORY)
21
-
22
- **CRITICAL**: You have access to rich context from the completed build. USE IT.
23
-
24
- ### 0.1: Read the Follow-Up Request
25
-
26
- ```bash
27
- cat FOLLOWUP_REQUEST.md
28
- ```
29
-
30
- This contains what the user wants to add. Parse it carefully.
31
-
32
- ### 0.2: Read the Project Specification
33
-
34
- ```bash
35
- cat spec.md
36
- ```
37
-
38
- Understand what was already built, the patterns used, and the scope.
39
-
40
- ### 0.3: Read the Implementation Plan
41
-
42
- ```bash
43
- cat implementation_plan.json
44
- ```
45
-
46
- This is critical. Note:
47
- - Current phases and their IDs
48
- - All existing subtasks and their statuses
49
- - The workflow type
50
- - The services involved
51
-
52
- ### 0.4: Read Context and Patterns
53
-
54
- ```bash
55
- cat context.json
56
- cat project_index.json 2>/dev/null || echo "No project index"
57
- ```
58
-
59
- Understand:
60
- - Files that were modified
61
- - Patterns to follow
62
- - Tech stack and conventions
63
-
64
- ### 0.5: Read Memory (If Available)
65
-
66
- ```bash
67
- # Check for session memory from previous builds
68
- ls memory/ 2>/dev/null && cat memory/patterns.md 2>/dev/null
69
- cat memory/gotchas.md 2>/dev/null
70
- ```
71
-
72
- Learn from past sessions - what worked, what to avoid.
73
-
74
- ---
75
-
76
- ## PHASE 1: ANALYZE THE FOLLOW-UP REQUEST
77
-
78
- Before adding subtasks, understand what's being asked:
79
-
80
- ### 1.1: Categorize the Request
81
-
82
- Is this:
83
- - **Extension**: Adding new features to existing functionality
84
- - **Enhancement**: Improving existing implementation
85
- - **Integration**: Connecting to new services/systems
86
- - **Refinement**: Polish, edge cases, error handling
87
-
88
- ### 1.2: Identify Dependencies
89
-
90
- The new work likely depends on what's already built. Check:
91
- - Which existing subtasks/phases are prerequisites?
92
- - Are there files that need modification vs. creation?
93
- - Does this require running existing services?
94
-
95
- ### 1.3: Scope Assessment
96
-
97
- Estimate:
98
- - How many new subtasks are needed?
99
- - Which service(s) are affected?
100
- - Can this be done in one phase or multiple?
101
-
102
- ---
103
-
104
- ## PHASE 2: CREATE NEW PHASE(S)
105
-
106
- Add new phase(s) to the existing implementation plan.
107
-
108
- ### Phase Numbering Rules
109
-
110
- **CRITICAL**: Phase numbers must continue from where the existing plan left off.
111
-
112
- If existing plan has phases 1-4:
113
- - New phase starts at 5 (`"phase": 5`)
114
- - Next phase would be 6, etc.
115
-
116
- ### Phase Structure
117
-
118
- ```json
119
- {
120
- "phase": [NEXT_PHASE_NUMBER],
121
- "name": "Follow-Up: [Brief Name]",
122
- "type": "followup",
123
- "description": "[What this phase accomplishes from the follow-up request]",
124
- "depends_on": [PREVIOUS_PHASE_NUMBERS],
125
- "parallel_safe": false,
126
- "subtasks": [
127
- {
128
- "id": "subtask-[PHASE]-1",
129
- "description": "[Specific task]",
130
- "service": "[service-name]",
131
- "files_to_modify": ["[existing-file-1.py]"],
132
- "files_to_create": ["[new-file.py]"],
133
- "patterns_from": ["[reference-file.py]"],
134
- "verification": {
135
- "type": "command|api|browser|manual",
136
- "command": "[verification command]",
137
- "expected": "[expected output]"
138
- },
139
- "status": "pending",
140
- "implementation_notes": "[Specific guidance for this subtask]"
141
- }
142
- ]
143
- }
144
- ```
145
-
146
- ### Subtask Guidelines
147
-
148
- 1. **Build on existing work** - Reference files created in earlier subtasks
149
- 2. **Follow established patterns** - Use the same code style and conventions
150
- 3. **Small scope** - Each subtask should take 1-3 files max
151
- 4. **Clear verification** - Every subtask must have a way to verify it works
152
- 5. **Preserve context** - Use patterns_from to point to relevant existing files
153
-
154
- ---
155
-
156
- ## PHASE 3: UPDATE implementation_plan.json
157
-
158
- ### Update Rules
159
-
160
- 1. **PRESERVE all existing phases and subtasks** - Do not modify them
161
- 2. **ADD new phase(s)** to the `phases` array
162
- 3. **UPDATE summary** with new totals
163
- 4. **UPDATE status** to "in_progress" (was "complete")
164
-
165
- ### Update Command
166
-
167
- Read the existing plan, add new phases, write back:
168
-
169
- ```bash
170
- # Read existing plan
171
- cat implementation_plan.json
172
-
173
- # After analyzing, create the updated plan with new phases appended
174
- # Use proper JSON formatting with indent=2
175
- ```
176
-
177
- When writing the updated plan:
178
-
179
- ```json
180
- {
181
- "feature": "[Keep existing]",
182
- "workflow_type": "[Keep existing]",
183
- "workflow_rationale": "[Keep existing]",
184
- "services_involved": "[Keep existing]",
185
- "phases": [
186
- // ALL EXISTING PHASES - DO NOT MODIFY
187
- {
188
- "phase": 1,
189
- "name": "...",
190
- "subtasks": [
191
- // All existing subtasks with their current statuses
192
- ]
193
- },
194
- // ... all other existing phases ...
195
-
196
- // NEW PHASE(S) APPENDED HERE
197
- {
198
- "phase": [NEXT_NUMBER],
199
- "name": "Follow-Up: [Name]",
200
- "type": "followup",
201
- "description": "[From follow-up request]",
202
- "depends_on": [PREVIOUS_PHASES],
203
- "parallel_safe": false,
204
- "subtasks": [
205
- // New subtasks with status: "pending"
206
- ]
207
- }
208
- ],
209
- "final_acceptance": [
210
- // Keep existing criteria
211
- // Add new criteria for follow-up work
212
- ],
213
- "summary": {
214
- "total_phases": [UPDATED_COUNT],
215
- "total_subtasks": [UPDATED_COUNT],
216
- "services_involved": ["..."],
217
- "parallelism": {
218
- // Update if needed
219
- }
220
- },
221
- "qa_acceptance": {
222
- // Keep existing, add new tests if needed
223
- },
224
- "qa_signoff": null, // Reset for new validation
225
- "created_at": "[Keep original]",
226
- "updated_at": "[NEW_TIMESTAMP]",
227
- "status": "in_progress",
228
- "planStatus": "in_progress"
229
- }
230
- ```
231
-
232
- ---
233
-
234
- ## PHASE 4: UPDATE build-progress.txt
235
-
236
- Append to the existing progress file:
237
-
238
- ```
239
- === FOLLOW-UP PLANNING SESSION ===
240
- Date: [Current Date/Time]
241
-
242
- Follow-Up Request:
243
- [Summary of FOLLOWUP_REQUEST.md]
244
-
245
- Changes Made:
246
- - Added Phase [N]: [Name]
247
- - New subtasks: [count]
248
- - Files affected: [list]
249
-
250
- Updated Plan:
251
- - Total phases: [old] -> [new]
252
- - Total subtasks: [old] -> [new]
253
- - Status: complete -> in_progress
254
-
255
- Next Steps:
256
- Run `python auto-claude/run.py --spec [SPEC_NUMBER]` to continue with new subtasks.
257
-
258
- === END FOLLOW-UP PLANNING ===
259
- ```
260
-
261
- ---
262
-
263
- ## PHASE 5: SIGNAL COMPLETION
264
-
265
- After updating the plan:
266
-
267
- ```
268
- === FOLLOW-UP PLANNING COMPLETE ===
269
-
270
- Added: [N] new phase(s), [M] new subtasks
271
- Status: Plan updated from 'complete' to 'in_progress'
272
-
273
- Next pending subtask: [subtask-id]
274
-
275
- To continue building:
276
- python auto-claude/run.py --spec [SPEC_NUMBER]
277
-
278
- === END SESSION ===
279
- ```
280
-
281
- ---
282
-
283
- ## CRITICAL RULES
284
-
285
- 1. **NEVER delete existing phases or subtasks** - Only append
286
- 2. **NEVER change status of completed subtasks** - They stay completed
287
- 3. **ALWAYS increment phase numbers** - Continue the sequence
288
- 4. **ALWAYS set new subtasks to "pending"** - They haven't been worked on
289
- 5. **ALWAYS update summary totals** - Reflect the true state
290
- 6. **ALWAYS set status back to "in_progress"** - This triggers the coder agent
291
-
292
- ---
293
-
294
- ## COMMON FOLLOW-UP PATTERNS
295
-
296
- ### Pattern: Adding a Feature to Existing Service
297
-
298
- ```json
299
- {
300
- "phase": 5,
301
- "name": "Follow-Up: Add [Feature]",
302
- "depends_on": [4], // Depends on all previous phases
303
- "subtasks": [
304
- {
305
- "id": "subtask-5-1",
306
- "description": "Add [feature] to existing [component]",
307
- "files_to_modify": ["[file-from-phase-2.py]"], // Reference earlier work
308
- "patterns_from": ["[file-from-phase-2.py]"] // Use same patterns
309
- }
310
- ]
311
- }
312
- ```
313
-
314
- ### Pattern: Adding Tests for Existing Implementation
315
-
316
- ```json
317
- {
318
- "phase": 5,
319
- "name": "Follow-Up: Add Test Coverage",
320
- "depends_on": [4],
321
- "subtasks": [
322
- {
323
- "id": "subtask-5-1",
324
- "description": "Add unit tests for [component]",
325
- "files_to_create": ["tests/test_[component].py"],
326
- "patterns_from": ["tests/test_existing.py"]
327
- }
328
- ]
329
- }
330
- ```
331
-
332
- ### Pattern: Extending API with New Endpoints
333
-
334
- ```json
335
- {
336
- "phase": 5,
337
- "name": "Follow-Up: Add [Endpoint] API",
338
- "depends_on": [1, 2], // Depends on backend phases
339
- "subtasks": [
340
- {
341
- "id": "subtask-5-1",
342
- "description": "Add [endpoint] route",
343
- "files_to_modify": ["routes/api.py"], // Existing routes file
344
- "patterns_from": ["routes/api.py"] // Follow existing patterns
345
- }
346
- ]
347
- }
348
- ```
349
-
350
- ---
351
-
352
- ## ERROR RECOVERY
353
-
354
- ### If implementation_plan.json is Missing
355
-
356
- ```
357
- ERROR: Cannot perform follow-up - no implementation_plan.json found.
358
-
359
- This spec has never been built. Please run:
360
- python auto-claude/run.py --spec [NUMBER]
361
-
362
- Follow-up is only available for completed specs.
363
- ```
364
-
365
- ### If Spec is Not Complete
366
-
367
- ```
368
- ERROR: Spec is not complete. Cannot add follow-up work.
369
-
370
- Current status: [status]
371
- Pending subtasks: [count]
372
-
373
- Please complete the current build first:
374
- python auto-claude/run.py --spec [NUMBER]
375
-
376
- Then run --followup after all subtasks are complete.
377
- ```
378
-
379
- ### If FOLLOWUP_REQUEST.md is Missing
380
-
381
- ```
382
- ERROR: No follow-up request found.
383
-
384
- Expected: FOLLOWUP_REQUEST.md in spec directory
385
-
386
- The --followup command should create this file before running the planner.
387
- ```
388
-
389
- ---
390
-
391
- ## BEGIN
392
-
393
- 1. Read FOLLOWUP_REQUEST.md to understand what to add
394
- 2. Read implementation_plan.json to understand current state
395
- 3. Read spec.md and context.json for patterns
396
- 4. Create new phase(s) with appropriate subtasks
397
- 5. Update implementation_plan.json (append, don't replace)
398
- 6. Update build-progress.txt
399
- 7. Signal completion