@howlil/ez-agents 2.0.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 (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +845 -0
  3. package/README.zh-CN.md +702 -0
  4. package/agents/ez-codebase-mapper.md +770 -0
  5. package/agents/ez-debugger.md +1255 -0
  6. package/agents/ez-executor.md +487 -0
  7. package/agents/ez-integration-checker.md +443 -0
  8. package/agents/ez-nyquist-auditor.md +176 -0
  9. package/agents/ez-phase-researcher.md +553 -0
  10. package/agents/ez-plan-checker.md +706 -0
  11. package/agents/ez-planner.md +1307 -0
  12. package/agents/ez-project-researcher.md +629 -0
  13. package/agents/ez-research-synthesizer.md +247 -0
  14. package/agents/ez-roadmapper.md +650 -0
  15. package/agents/ez-ui-auditor.md +441 -0
  16. package/agents/ez-ui-checker.md +302 -0
  17. package/agents/ez-ui-researcher.md +355 -0
  18. package/agents/ez-verifier.md +579 -0
  19. package/bin/install.js +2862 -0
  20. package/bin/update.js +214 -0
  21. package/commands/ez/add-phase.md +43 -0
  22. package/commands/ez/add-tests.md +41 -0
  23. package/commands/ez/add-todo.md +47 -0
  24. package/commands/ez/audit-milestone.md +36 -0
  25. package/commands/ez/autonomous.md +41 -0
  26. package/commands/ez/check-todos.md +45 -0
  27. package/commands/ez/cleanup.md +18 -0
  28. package/commands/ez/complete-milestone.md +136 -0
  29. package/commands/ez/debug.md +168 -0
  30. package/commands/ez/discuss-phase.md +90 -0
  31. package/commands/ez/execute-phase.md +41 -0
  32. package/commands/ez/health.md +22 -0
  33. package/commands/ez/help.md +22 -0
  34. package/commands/ez/insert-phase.md +32 -0
  35. package/commands/ez/join-discord.md +18 -0
  36. package/commands/ez/list-phase-assumptions.md +46 -0
  37. package/commands/ez/map-codebase.md +71 -0
  38. package/commands/ez/new-milestone.md +44 -0
  39. package/commands/ez/new-project.md +42 -0
  40. package/commands/ez/pause-work.md +38 -0
  41. package/commands/ez/plan-milestone-gaps.md +34 -0
  42. package/commands/ez/plan-phase.md +45 -0
  43. package/commands/ez/progress.md +24 -0
  44. package/commands/ez/quick.md +45 -0
  45. package/commands/ez/reapply-patches.md +124 -0
  46. package/commands/ez/remove-phase.md +31 -0
  47. package/commands/ez/research-phase.md +190 -0
  48. package/commands/ez/resume-work.md +40 -0
  49. package/commands/ez/set-profile.md +34 -0
  50. package/commands/ez/settings.md +36 -0
  51. package/commands/ez/stats.md +18 -0
  52. package/commands/ez/ui-phase.md +34 -0
  53. package/commands/ez/ui-review.md +32 -0
  54. package/commands/ez/update.md +37 -0
  55. package/commands/ez/validate-phase.md +35 -0
  56. package/commands/ez/verify-work.md +38 -0
  57. package/get-shit-done/bin/ez-tools.cjs +598 -0
  58. package/get-shit-done/bin/lib/assistant-adapter.cjs +205 -0
  59. package/get-shit-done/bin/lib/audit-exec.cjs +150 -0
  60. package/get-shit-done/bin/lib/auth.cjs +175 -0
  61. package/get-shit-done/bin/lib/circuit-breaker.cjs +118 -0
  62. package/get-shit-done/bin/lib/commands.cjs +666 -0
  63. package/get-shit-done/bin/lib/config.cjs +183 -0
  64. package/get-shit-done/bin/lib/core.cjs +495 -0
  65. package/get-shit-done/bin/lib/file-lock.cjs +236 -0
  66. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  67. package/get-shit-done/bin/lib/fs-utils.cjs +153 -0
  68. package/get-shit-done/bin/lib/git-utils.cjs +203 -0
  69. package/get-shit-done/bin/lib/health-check.cjs +163 -0
  70. package/get-shit-done/bin/lib/index.cjs +113 -0
  71. package/get-shit-done/bin/lib/init.cjs +710 -0
  72. package/get-shit-done/bin/lib/logger.cjs +117 -0
  73. package/get-shit-done/bin/lib/milestone.cjs +241 -0
  74. package/get-shit-done/bin/lib/model-provider.cjs +146 -0
  75. package/get-shit-done/bin/lib/phase.cjs +908 -0
  76. package/get-shit-done/bin/lib/retry.cjs +119 -0
  77. package/get-shit-done/bin/lib/roadmap.cjs +305 -0
  78. package/get-shit-done/bin/lib/safe-exec.cjs +128 -0
  79. package/get-shit-done/bin/lib/safe-path.cjs +130 -0
  80. package/get-shit-done/bin/lib/state.cjs +721 -0
  81. package/get-shit-done/bin/lib/temp-file.cjs +239 -0
  82. package/get-shit-done/bin/lib/template.cjs +222 -0
  83. package/get-shit-done/bin/lib/test-file-lock.cjs +112 -0
  84. package/get-shit-done/bin/lib/test-graceful.cjs +93 -0
  85. package/get-shit-done/bin/lib/test-logger.cjs +60 -0
  86. package/get-shit-done/bin/lib/test-safe-exec.cjs +38 -0
  87. package/get-shit-done/bin/lib/test-safe-path.cjs +33 -0
  88. package/get-shit-done/bin/lib/test-temp-file.cjs +125 -0
  89. package/get-shit-done/bin/lib/timeout-exec.cjs +62 -0
  90. package/get-shit-done/bin/lib/verify.cjs +820 -0
  91. package/get-shit-done/references/checkpoints.md +776 -0
  92. package/get-shit-done/references/continuation-format.md +249 -0
  93. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  94. package/get-shit-done/references/git-integration.md +248 -0
  95. package/get-shit-done/references/git-planning-commit.md +38 -0
  96. package/get-shit-done/references/model-profile-resolution.md +34 -0
  97. package/get-shit-done/references/model-profiles.md +93 -0
  98. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  99. package/get-shit-done/references/planning-config.md +200 -0
  100. package/get-shit-done/references/questioning.md +162 -0
  101. package/get-shit-done/references/tdd.md +263 -0
  102. package/get-shit-done/references/ui-brand.md +160 -0
  103. package/get-shit-done/references/verification-patterns.md +612 -0
  104. package/get-shit-done/templates/DEBUG.md +164 -0
  105. package/get-shit-done/templates/UAT.md +247 -0
  106. package/get-shit-done/templates/UI-SPEC.md +100 -0
  107. package/get-shit-done/templates/VALIDATION.md +76 -0
  108. package/get-shit-done/templates/codebase/architecture.md +255 -0
  109. package/get-shit-done/templates/codebase/concerns.md +310 -0
  110. package/get-shit-done/templates/codebase/conventions.md +307 -0
  111. package/get-shit-done/templates/codebase/integrations.md +280 -0
  112. package/get-shit-done/templates/codebase/stack.md +186 -0
  113. package/get-shit-done/templates/codebase/structure.md +285 -0
  114. package/get-shit-done/templates/codebase/testing.md +480 -0
  115. package/get-shit-done/templates/config.json +37 -0
  116. package/get-shit-done/templates/context.md +352 -0
  117. package/get-shit-done/templates/continue-here.md +78 -0
  118. package/get-shit-done/templates/copilot-instructions.md +7 -0
  119. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  120. package/get-shit-done/templates/discovery.md +146 -0
  121. package/get-shit-done/templates/milestone-archive.md +123 -0
  122. package/get-shit-done/templates/milestone.md +115 -0
  123. package/get-shit-done/templates/phase-prompt.md +610 -0
  124. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  125. package/get-shit-done/templates/project.md +184 -0
  126. package/get-shit-done/templates/requirements.md +231 -0
  127. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  128. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  129. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  130. package/get-shit-done/templates/research-project/STACK.md +120 -0
  131. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  132. package/get-shit-done/templates/research.md +552 -0
  133. package/get-shit-done/templates/retrospective.md +54 -0
  134. package/get-shit-done/templates/roadmap.md +202 -0
  135. package/get-shit-done/templates/state.md +176 -0
  136. package/get-shit-done/templates/summary-complex.md +59 -0
  137. package/get-shit-done/templates/summary-minimal.md +41 -0
  138. package/get-shit-done/templates/summary-standard.md +48 -0
  139. package/get-shit-done/templates/summary.md +248 -0
  140. package/get-shit-done/templates/user-setup.md +311 -0
  141. package/get-shit-done/templates/verification-report.md +322 -0
  142. package/get-shit-done/workflows/add-phase.md +112 -0
  143. package/get-shit-done/workflows/add-tests.md +351 -0
  144. package/get-shit-done/workflows/add-todo.md +158 -0
  145. package/get-shit-done/workflows/audit-milestone.md +332 -0
  146. package/get-shit-done/workflows/autonomous.md +743 -0
  147. package/get-shit-done/workflows/check-todos.md +177 -0
  148. package/get-shit-done/workflows/cleanup.md +152 -0
  149. package/get-shit-done/workflows/complete-milestone.md +766 -0
  150. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  151. package/get-shit-done/workflows/discovery-phase.md +289 -0
  152. package/get-shit-done/workflows/discuss-phase.md +762 -0
  153. package/get-shit-done/workflows/execute-phase.md +468 -0
  154. package/get-shit-done/workflows/execute-plan.md +483 -0
  155. package/get-shit-done/workflows/health.md +159 -0
  156. package/get-shit-done/workflows/help.md +492 -0
  157. package/get-shit-done/workflows/insert-phase.md +130 -0
  158. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  159. package/get-shit-done/workflows/map-codebase.md +316 -0
  160. package/get-shit-done/workflows/new-milestone.md +384 -0
  161. package/get-shit-done/workflows/new-project.md +1111 -0
  162. package/get-shit-done/workflows/node-repair.md +92 -0
  163. package/get-shit-done/workflows/pause-work.md +122 -0
  164. package/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  165. package/get-shit-done/workflows/plan-phase.md +651 -0
  166. package/get-shit-done/workflows/progress.md +382 -0
  167. package/get-shit-done/workflows/quick.md +610 -0
  168. package/get-shit-done/workflows/remove-phase.md +155 -0
  169. package/get-shit-done/workflows/research-phase.md +74 -0
  170. package/get-shit-done/workflows/resume-project.md +307 -0
  171. package/get-shit-done/workflows/set-profile.md +81 -0
  172. package/get-shit-done/workflows/settings.md +242 -0
  173. package/get-shit-done/workflows/stats.md +57 -0
  174. package/get-shit-done/workflows/transition.md +544 -0
  175. package/get-shit-done/workflows/ui-phase.md +290 -0
  176. package/get-shit-done/workflows/ui-review.md +157 -0
  177. package/get-shit-done/workflows/update.md +320 -0
  178. package/get-shit-done/workflows/validate-phase.md +167 -0
  179. package/get-shit-done/workflows/verify-phase.md +243 -0
  180. package/get-shit-done/workflows/verify-work.md +584 -0
  181. package/package.json +55 -0
  182. package/scripts/build-hooks.js +43 -0
  183. package/scripts/run-tests.cjs +29 -0
@@ -0,0 +1,610 @@
1
+ # Phase Prompt Template
2
+
3
+ > **Note:** Planning methodology is in `agents/ez-planner.md`.
4
+ > This template defines the PLAN.md output format that the agent produces.
5
+
6
+ Template for `.planning/phases/XX-name/{phase}-{plan}-PLAN.md` - executable phase plans optimized for parallel execution.
7
+
8
+ **Naming:** Use `{phase}-{plan}-PLAN.md` format (e.g., `01-02-PLAN.md` for Phase 1, Plan 2)
9
+
10
+ ---
11
+
12
+ ## File Template
13
+
14
+ ```markdown
15
+ ---
16
+ phase: XX-name
17
+ plan: NN
18
+ type: execute
19
+ wave: N # Execution wave (1, 2, 3...). Pre-computed at plan time.
20
+ depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"]).
21
+ files_modified: [] # Files this plan modifies.
22
+ autonomous: true # false if plan has checkpoints requiring user interaction
23
+ requirements: [] # REQUIRED — Requirement IDs from ROADMAP this plan addresses. MUST NOT be empty.
24
+ user_setup: [] # Human-required setup Claude cannot automate (see below)
25
+
26
+ # Goal-backward verification (derived during planning, verified after execution)
27
+ must_haves:
28
+ truths: [] # Observable behaviors that must be true for goal achievement
29
+ artifacts: [] # Files that must exist with real implementation
30
+ key_links: [] # Critical connections between artifacts
31
+ ---
32
+
33
+ <objective>
34
+ [What this plan accomplishes]
35
+
36
+ Purpose: [Why this matters for the project]
37
+ Output: [What artifacts will be created]
38
+ </objective>
39
+
40
+ <execution_context>
41
+ @~/.claude/ez-agents/workflows/execute-plan.md
42
+ @~/.claude/ez-agents/templates/summary.md
43
+ [If plan contains checkpoint tasks (type="checkpoint:*"), add:]
44
+ @~/.claude/ez-agents/references/checkpoints.md
45
+ </execution_context>
46
+
47
+ <context>
48
+ @.planning/PROJECT.md
49
+ @.planning/ROADMAP.md
50
+ @.planning/STATE.md
51
+
52
+ # Only reference prior plan SUMMARYs if genuinely needed:
53
+ # - This plan uses types/exports from prior plan
54
+ # - Prior plan made decision that affects this plan
55
+ # Do NOT reflexively chain: Plan 02 refs 01, Plan 03 refs 02...
56
+
57
+ [Relevant source files:]
58
+ @src/path/to/relevant.ts
59
+ </context>
60
+
61
+ <tasks>
62
+
63
+ <task type="auto">
64
+ <name>Task 1: [Action-oriented name]</name>
65
+ <files>path/to/file.ext, another/file.ext</files>
66
+ <read_first>path/to/reference.ext, path/to/source-of-truth.ext</read_first>
67
+ <action>[Specific implementation - what to do, how to do it, what to avoid and WHY. Include CONCRETE values: exact identifiers, parameters, expected outputs, file paths, command arguments. Never say "align X with Y" without specifying the exact target state.]</action>
68
+ <verify>[Command or check to prove it worked]</verify>
69
+ <acceptance_criteria>
70
+ - [Grep-verifiable condition: "file.ext contains 'exact string'"]
71
+ - [Measurable condition: "output.ext uses 'expected-value', NOT 'wrong-value'"]
72
+ </acceptance_criteria>
73
+ <done>[Measurable acceptance criteria]</done>
74
+ </task>
75
+
76
+ <task type="auto">
77
+ <name>Task 2: [Action-oriented name]</name>
78
+ <files>path/to/file.ext</files>
79
+ <read_first>path/to/reference.ext</read_first>
80
+ <action>[Specific implementation with concrete values]</action>
81
+ <verify>[Command or check]</verify>
82
+ <acceptance_criteria>
83
+ - [Grep-verifiable condition]
84
+ </acceptance_criteria>
85
+ <done>[Acceptance criteria]</done>
86
+ </task>
87
+
88
+ <!-- For checkpoint task examples and patterns, see @~/.claude/ez-agents/references/checkpoints.md -->
89
+
90
+ <task type="checkpoint:decision" gate="blocking">
91
+ <decision>[What needs deciding]</decision>
92
+ <context>[Why this decision matters]</context>
93
+ <options>
94
+ <option id="option-a"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
95
+ <option id="option-b"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
96
+ </options>
97
+ <resume-signal>Select: option-a or option-b</resume-signal>
98
+ </task>
99
+
100
+ <task type="checkpoint:human-verify" gate="blocking">
101
+ <what-built>[What Claude built] - server running at [URL]</what-built>
102
+ <how-to-verify>Visit [URL] and verify: [visual checks only, NO CLI commands]</how-to-verify>
103
+ <resume-signal>Type "approved" or describe issues</resume-signal>
104
+ </task>
105
+
106
+ </tasks>
107
+
108
+ <verification>
109
+ Before declaring plan complete:
110
+ - [ ] [Specific test command]
111
+ - [ ] [Build/type check passes]
112
+ - [ ] [Behavior verification]
113
+ </verification>
114
+
115
+ <success_criteria>
116
+
117
+ - All tasks completed
118
+ - All verification checks pass
119
+ - No errors or warnings introduced
120
+ - [Plan-specific criteria]
121
+ </success_criteria>
122
+
123
+ <output>
124
+ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
125
+ </output>
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Frontmatter Fields
131
+
132
+ | Field | Required | Purpose |
133
+ |-------|----------|---------|
134
+ | `phase` | Yes | Phase identifier (e.g., `01-foundation`) |
135
+ | `plan` | Yes | Plan number within phase (e.g., `01`, `02`) |
136
+ | `type` | Yes | Always `execute` for standard plans, `tdd` for TDD plans |
137
+ | `wave` | Yes | Execution wave number (1, 2, 3...). Pre-computed at plan time. |
138
+ | `depends_on` | Yes | Array of plan IDs this plan requires. |
139
+ | `files_modified` | Yes | Files this plan touches. |
140
+ | `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
141
+ | `requirements` | Yes | **MUST** list requirement IDs from ROADMAP. Every roadmap requirement MUST appear in at least one plan. |
142
+ | `user_setup` | No | Array of human-required setup items (external services) |
143
+ | `must_haves` | Yes | Goal-backward verification criteria (see below) |
144
+
145
+ **Wave is pre-computed:** Wave numbers are assigned during `/ez:plan-phase`. Execute-phase reads `wave` directly from frontmatter and groups plans by wave number. No runtime dependency analysis needed.
146
+
147
+ **Must-haves enable verification:** The `must_haves` field carries goal-backward requirements from planning to execution. After all plans complete, execute-phase spawns a verification subagent that checks these criteria against the actual codebase.
148
+
149
+ ---
150
+
151
+ ## Parallel vs Sequential
152
+
153
+ <parallel_examples>
154
+
155
+ **Wave 1 candidates (parallel):**
156
+
157
+ ```yaml
158
+ # Plan 01 - User feature
159
+ wave: 1
160
+ depends_on: []
161
+ files_modified: [src/models/user.ts, src/api/users.ts]
162
+ autonomous: true
163
+
164
+ # Plan 02 - Product feature (no overlap with Plan 01)
165
+ wave: 1
166
+ depends_on: []
167
+ files_modified: [src/models/product.ts, src/api/products.ts]
168
+ autonomous: true
169
+
170
+ # Plan 03 - Order feature (no overlap)
171
+ wave: 1
172
+ depends_on: []
173
+ files_modified: [src/models/order.ts, src/api/orders.ts]
174
+ autonomous: true
175
+ ```
176
+
177
+ All three run in parallel (Wave 1) - no dependencies, no file conflicts.
178
+
179
+ **Sequential (genuine dependency):**
180
+
181
+ ```yaml
182
+ # Plan 01 - Auth foundation
183
+ wave: 1
184
+ depends_on: []
185
+ files_modified: [src/lib/auth.ts, src/middleware/auth.ts]
186
+ autonomous: true
187
+
188
+ # Plan 02 - Protected features (needs auth)
189
+ wave: 2
190
+ depends_on: ["01"]
191
+ files_modified: [src/features/dashboard.ts]
192
+ autonomous: true
193
+ ```
194
+
195
+ Plan 02 in Wave 2 waits for Plan 01 in Wave 1 - genuine dependency on auth types/middleware.
196
+
197
+ **Checkpoint plan:**
198
+
199
+ ```yaml
200
+ # Plan 03 - UI with verification
201
+ wave: 3
202
+ depends_on: ["01", "02"]
203
+ files_modified: [src/components/Dashboard.tsx]
204
+ autonomous: false # Has checkpoint:human-verify
205
+ ```
206
+
207
+ Wave 3 runs after Waves 1 and 2. Pauses at checkpoint, orchestrator presents to user, resumes on approval.
208
+
209
+ </parallel_examples>
210
+
211
+ ---
212
+
213
+ ## Context Section
214
+
215
+ **Parallel-aware context:**
216
+
217
+ ```markdown
218
+ <context>
219
+ @.planning/PROJECT.md
220
+ @.planning/ROADMAP.md
221
+ @.planning/STATE.md
222
+
223
+ # Only include SUMMARY refs if genuinely needed:
224
+ # - This plan imports types from prior plan
225
+ # - Prior plan made decision affecting this plan
226
+ # - Prior plan's output is input to this plan
227
+ #
228
+ # Independent plans need NO prior SUMMARY references.
229
+ # Do NOT reflexively chain: 02 refs 01, 03 refs 02...
230
+
231
+ @src/relevant/source.ts
232
+ </context>
233
+ ```
234
+
235
+ **Bad pattern (creates false dependencies):**
236
+ ```markdown
237
+ <context>
238
+ @.planning/phases/03-features/03-01-SUMMARY.md # Just because it's earlier
239
+ @.planning/phases/03-features/03-02-SUMMARY.md # Reflexive chaining
240
+ </context>
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Scope Guidance
246
+
247
+ **Plan sizing:**
248
+
249
+ - 2-3 tasks per plan
250
+ - ~50% context usage maximum
251
+ - Complex phases: Multiple focused plans, not one large plan
252
+
253
+ **When to split:**
254
+
255
+ - Different subsystems (auth vs API vs UI)
256
+ - >3 tasks
257
+ - Risk of context overflow
258
+ - TDD candidates - separate plans
259
+
260
+ **Vertical slices preferred:**
261
+
262
+ ```
263
+ PREFER: Plan 01 = User (model + API + UI)
264
+ Plan 02 = Product (model + API + UI)
265
+
266
+ AVOID: Plan 01 = All models
267
+ Plan 02 = All APIs
268
+ Plan 03 = All UIs
269
+ ```
270
+
271
+ ---
272
+
273
+ ## TDD Plans
274
+
275
+ TDD features get dedicated plans with `type: tdd`.
276
+
277
+ **Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
278
+ → Yes: Create a TDD plan
279
+ → No: Standard task in standard plan
280
+
281
+ See `~/.claude/ez-agents/references/tdd.md` for TDD plan structure.
282
+
283
+ ---
284
+
285
+ ## Task Types
286
+
287
+ | Type | Use For | Autonomy |
288
+ |------|---------|----------|
289
+ | `auto` | Everything Claude can do independently | Fully autonomous |
290
+ | `checkpoint:human-verify` | Visual/functional verification | Pauses, returns to orchestrator |
291
+ | `checkpoint:decision` | Implementation choices | Pauses, returns to orchestrator |
292
+ | `checkpoint:human-action` | Truly unavoidable manual steps (rare) | Pauses, returns to orchestrator |
293
+
294
+ **Checkpoint behavior in parallel execution:**
295
+ - Plan runs until checkpoint
296
+ - Agent returns with checkpoint details + agent_id
297
+ - Orchestrator presents to user
298
+ - User responds
299
+ - Orchestrator resumes agent with `resume: agent_id`
300
+
301
+ ---
302
+
303
+ ## Examples
304
+
305
+ **Autonomous parallel plan:**
306
+
307
+ ```markdown
308
+ ---
309
+ phase: 03-features
310
+ plan: 01
311
+ type: execute
312
+ wave: 1
313
+ depends_on: []
314
+ files_modified: [src/features/user/model.ts, src/features/user/api.ts, src/features/user/UserList.tsx]
315
+ autonomous: true
316
+ ---
317
+
318
+ <objective>
319
+ Implement complete User feature as vertical slice.
320
+
321
+ Purpose: Self-contained user management that can run parallel to other features.
322
+ Output: User model, API endpoints, and UI components.
323
+ </objective>
324
+
325
+ <context>
326
+ @.planning/PROJECT.md
327
+ @.planning/ROADMAP.md
328
+ @.planning/STATE.md
329
+ </context>
330
+
331
+ <tasks>
332
+ <task type="auto">
333
+ <name>Task 1: Create User model</name>
334
+ <files>src/features/user/model.ts</files>
335
+ <action>Define User type with id, email, name, createdAt. Export TypeScript interface.</action>
336
+ <verify>tsc --noEmit passes</verify>
337
+ <done>User type exported and usable</done>
338
+ </task>
339
+
340
+ <task type="auto">
341
+ <name>Task 2: Create User API endpoints</name>
342
+ <files>src/features/user/api.ts</files>
343
+ <action>GET /users (list), GET /users/:id (single), POST /users (create). Use User type from model.</action>
344
+ <verify>curl tests pass for all endpoints</verify>
345
+ <done>All CRUD operations work</done>
346
+ </task>
347
+ </tasks>
348
+
349
+ <verification>
350
+ - [ ] npm run build succeeds
351
+ - [ ] API endpoints respond correctly
352
+ </verification>
353
+
354
+ <success_criteria>
355
+ - All tasks completed
356
+ - User feature works end-to-end
357
+ </success_criteria>
358
+
359
+ <output>
360
+ After completion, create `.planning/phases/03-features/03-01-SUMMARY.md`
361
+ </output>
362
+ ```
363
+
364
+ **Plan with checkpoint (non-autonomous):**
365
+
366
+ ```markdown
367
+ ---
368
+ phase: 03-features
369
+ plan: 03
370
+ type: execute
371
+ wave: 2
372
+ depends_on: ["03-01", "03-02"]
373
+ files_modified: [src/components/Dashboard.tsx]
374
+ autonomous: false
375
+ ---
376
+
377
+ <objective>
378
+ Build dashboard with visual verification.
379
+
380
+ Purpose: Integrate user and product features into unified view.
381
+ Output: Working dashboard component.
382
+ </objective>
383
+
384
+ <execution_context>
385
+ @~/.claude/ez-agents/workflows/execute-plan.md
386
+ @~/.claude/ez-agents/templates/summary.md
387
+ @~/.claude/ez-agents/references/checkpoints.md
388
+ </execution_context>
389
+
390
+ <context>
391
+ @.planning/PROJECT.md
392
+ @.planning/ROADMAP.md
393
+ @.planning/phases/03-features/03-01-SUMMARY.md
394
+ @.planning/phases/03-features/03-02-SUMMARY.md
395
+ </context>
396
+
397
+ <tasks>
398
+ <task type="auto">
399
+ <name>Task 1: Build Dashboard layout</name>
400
+ <files>src/components/Dashboard.tsx</files>
401
+ <action>Create responsive grid with UserList and ProductList components. Use Tailwind for styling.</action>
402
+ <verify>npm run build succeeds</verify>
403
+ <done>Dashboard renders without errors</done>
404
+ </task>
405
+
406
+ <!-- Checkpoint pattern: Claude starts server, user visits URL. See checkpoints.md for full patterns. -->
407
+ <task type="auto">
408
+ <name>Start dev server</name>
409
+ <action>Run `npm run dev` in background, wait for ready</action>
410
+ <verify>curl localhost:3000 returns 200</verify>
411
+ </task>
412
+
413
+ <task type="checkpoint:human-verify" gate="blocking">
414
+ <what-built>Dashboard - server at http://localhost:3000</what-built>
415
+ <how-to-verify>Visit localhost:3000/dashboard. Check: desktop grid, mobile stack, no scroll issues.</how-to-verify>
416
+ <resume-signal>Type "approved" or describe issues</resume-signal>
417
+ </task>
418
+ </tasks>
419
+
420
+ <verification>
421
+ - [ ] npm run build succeeds
422
+ - [ ] Visual verification passed
423
+ </verification>
424
+
425
+ <success_criteria>
426
+ - All tasks completed
427
+ - User approved visual layout
428
+ </success_criteria>
429
+
430
+ <output>
431
+ After completion, create `.planning/phases/03-features/03-03-SUMMARY.md`
432
+ </output>
433
+ ```
434
+
435
+ ---
436
+
437
+ ## Anti-Patterns
438
+
439
+ **Bad: Reflexive dependency chaining**
440
+ ```yaml
441
+ depends_on: ["03-01"] # Just because 01 comes before 02
442
+ ```
443
+
444
+ **Bad: Horizontal layer grouping**
445
+ ```
446
+ Plan 01: All models
447
+ Plan 02: All APIs (depends on 01)
448
+ Plan 03: All UIs (depends on 02)
449
+ ```
450
+
451
+ **Bad: Missing autonomy flag**
452
+ ```yaml
453
+ # Has checkpoint but no autonomous: false
454
+ depends_on: []
455
+ files_modified: [...]
456
+ # autonomous: ??? <- Missing!
457
+ ```
458
+
459
+ **Bad: Vague tasks**
460
+ ```xml
461
+ <task type="auto">
462
+ <name>Set up authentication</name>
463
+ <action>Add auth to the app</action>
464
+ </task>
465
+ ```
466
+
467
+ **Bad: Missing read_first (executor modifies files it hasn't read)**
468
+ ```xml
469
+ <task type="auto">
470
+ <name>Update database config</name>
471
+ <files>src/config/database.ts</files>
472
+ <!-- No read_first! Executor doesn't know current state or conventions -->
473
+ <action>Update the database config to match production settings</action>
474
+ </task>
475
+ ```
476
+
477
+ **Bad: Vague acceptance criteria (not verifiable)**
478
+ ```xml
479
+ <acceptance_criteria>
480
+ - Config is properly set up
481
+ - Database connection works correctly
482
+ </acceptance_criteria>
483
+ ```
484
+
485
+ **Good: Concrete with read_first + verifiable criteria**
486
+ ```xml
487
+ <task type="auto">
488
+ <name>Update database config for connection pooling</name>
489
+ <files>src/config/database.ts</files>
490
+ <read_first>src/config/database.ts, .env.example, docker-compose.yml</read_first>
491
+ <action>Add pool configuration: min=2, max=20, idleTimeoutMs=30000. Add SSL config: rejectUnauthorized=true when NODE_ENV=production. Add .env.example entry: DATABASE_POOL_MAX=20.</action>
492
+ <acceptance_criteria>
493
+ - database.ts contains "max: 20" and "idleTimeoutMillis: 30000"
494
+ - database.ts contains SSL conditional on NODE_ENV
495
+ - .env.example contains DATABASE_POOL_MAX
496
+ </acceptance_criteria>
497
+ </task>
498
+ ```
499
+
500
+ ---
501
+
502
+ ## Guidelines
503
+
504
+ - Always use XML structure for Claude parsing
505
+ - Include `wave`, `depends_on`, `files_modified`, `autonomous` in every plan
506
+ - Prefer vertical slices over horizontal layers
507
+ - Only reference prior SUMMARYs when genuinely needed
508
+ - Group checkpoints with related auto tasks in same plan
509
+ - 2-3 tasks per plan, ~50% context max
510
+
511
+ ---
512
+
513
+ ## User Setup (External Services)
514
+
515
+ When a plan introduces external services requiring human configuration, declare in frontmatter:
516
+
517
+ ```yaml
518
+ user_setup:
519
+ - service: stripe
520
+ why: "Payment processing requires API keys"
521
+ env_vars:
522
+ - name: STRIPE_SECRET_KEY
523
+ source: "Stripe Dashboard → Developers → API keys → Secret key"
524
+ - name: STRIPE_WEBHOOK_SECRET
525
+ source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
526
+ dashboard_config:
527
+ - task: "Create webhook endpoint"
528
+ location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
529
+ details: "URL: https://[your-domain]/api/webhooks/stripe"
530
+ local_dev:
531
+ - "stripe listen --forward-to localhost:3000/api/webhooks/stripe"
532
+ ```
533
+
534
+ **The automation-first rule:** `user_setup` contains ONLY what Claude literally cannot do:
535
+ - Account creation (requires human signup)
536
+ - Secret retrieval (requires dashboard access)
537
+ - Dashboard configuration (requires human in browser)
538
+
539
+ **NOT included:** Package installs, code changes, file creation, CLI commands Claude can run.
540
+
541
+ **Result:** Execute-plan generates `{phase}-USER-SETUP.md` with checklist for the user.
542
+
543
+ See `~/.claude/ez-agents/templates/user-setup.md` for full schema and examples
544
+
545
+ ---
546
+
547
+ ## Must-Haves (Goal-Backward Verification)
548
+
549
+ The `must_haves` field defines what must be TRUE for the phase goal to be achieved. Derived during planning, verified after execution.
550
+
551
+ **Structure:**
552
+
553
+ ```yaml
554
+ must_haves:
555
+ truths:
556
+ - "User can see existing messages"
557
+ - "User can send a message"
558
+ - "Messages persist across refresh"
559
+ artifacts:
560
+ - path: "src/components/Chat.tsx"
561
+ provides: "Message list rendering"
562
+ min_lines: 30
563
+ - path: "src/app/api/chat/route.ts"
564
+ provides: "Message CRUD operations"
565
+ exports: ["GET", "POST"]
566
+ - path: "prisma/schema.prisma"
567
+ provides: "Message model"
568
+ contains: "model Message"
569
+ key_links:
570
+ - from: "src/components/Chat.tsx"
571
+ to: "/api/chat"
572
+ via: "fetch in useEffect"
573
+ pattern: "fetch.*api/chat"
574
+ - from: "src/app/api/chat/route.ts"
575
+ to: "prisma.message"
576
+ via: "database query"
577
+ pattern: "prisma\\.message\\.(find|create)"
578
+ ```
579
+
580
+ **Field descriptions:**
581
+
582
+ | Field | Purpose |
583
+ |-------|---------|
584
+ | `truths` | Observable behaviors from user perspective. Each must be testable. |
585
+ | `artifacts` | Files that must exist with real implementation. |
586
+ | `artifacts[].path` | File path relative to project root. |
587
+ | `artifacts[].provides` | What this artifact delivers. |
588
+ | `artifacts[].min_lines` | Optional. Minimum lines to be considered substantive. |
589
+ | `artifacts[].exports` | Optional. Expected exports to verify. |
590
+ | `artifacts[].contains` | Optional. Pattern that must exist in file. |
591
+ | `key_links` | Critical connections between artifacts. |
592
+ | `key_links[].from` | Source artifact. |
593
+ | `key_links[].to` | Target artifact or endpoint. |
594
+ | `key_links[].via` | How they connect (description). |
595
+ | `key_links[].pattern` | Optional. Regex to verify connection exists. |
596
+
597
+ **Why this matters:**
598
+
599
+ Task completion ≠ Goal achievement. A task "create chat component" can complete by creating a placeholder. The `must_haves` field captures what must actually work, enabling verification to catch gaps before they compound.
600
+
601
+ **Verification flow:**
602
+
603
+ 1. Plan-phase derives must_haves from phase goal (goal-backward)
604
+ 2. Must_haves written to PLAN.md frontmatter
605
+ 3. Execute-phase runs all plans
606
+ 4. Verification subagent checks must_haves against codebase
607
+ 5. Gaps found → fix plans created → execute → re-verify
608
+ 6. All must_haves pass → phase complete
609
+
610
+ See `~/.claude/ez-agents/workflows/verify-phase.md` for verification logic.