@howlil/ez-agents 3.5.0 → 4.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 (382) hide show
  1. package/README.md +735 -537
  2. package/agents/ez-architect-agent.md +267 -0
  3. package/agents/ez-backend-agent.md +303 -0
  4. package/agents/ez-chief-strategist.md +271 -0
  5. package/agents/ez-codebase-mapper.md +770 -770
  6. package/agents/ez-context-manager.md +319 -0
  7. package/agents/ez-debugger.md +1255 -1255
  8. package/agents/ez-design-expert.md +347 -0
  9. package/agents/ez-devops-agent.md +331 -0
  10. package/agents/ez-executor.md +487 -487
  11. package/agents/ez-frontend-agent.md +322 -0
  12. package/agents/ez-phase-researcher.md +553 -553
  13. package/agents/ez-planner.md +1307 -1307
  14. package/agents/ez-product-engineer.md +435 -0
  15. package/agents/ez-project-researcher.md +629 -629
  16. package/agents/ez-qa-agent.md +320 -0
  17. package/agents/ez-release-agent.md +333 -333
  18. package/agents/ez-requirements-agent.md +377 -377
  19. package/agents/ez-roadmapper.md +650 -650
  20. package/agents/ez-technical-writer.md +551 -0
  21. package/agents/ez-ux-expert.md +393 -0
  22. package/agents/ez-verifier.md +579 -579
  23. package/bin/guards/autonomy-guard.cjs +346 -0
  24. package/bin/guards/context-budget-guard.cjs +278 -0
  25. package/bin/guards/hallucination-guard.cjs +380 -0
  26. package/bin/guards/hidden-state-guard.cjs +182 -0
  27. package/bin/guards/team-overhead-guard.cjs +266 -0
  28. package/bin/guards/tool-sprawl-guard.cjs +271 -0
  29. package/bin/lib/analytics/analytics-collector.cjs +86 -0
  30. package/bin/lib/analytics/analytics-reporter.cjs +130 -0
  31. package/bin/lib/analytics/cohort-analyzer.cjs +138 -0
  32. package/bin/lib/analytics/funnel-analyzer.cjs +147 -0
  33. package/bin/lib/analytics/nps-tracker.cjs +147 -0
  34. package/bin/lib/archetype-detector.cjs +289 -0
  35. package/bin/lib/assistant-adapter.cjs +361 -0
  36. package/bin/lib/audit-exec.cjs +175 -0
  37. package/bin/lib/auth.cjs +176 -0
  38. package/bin/lib/backup-service.cjs +422 -0
  39. package/bin/lib/bdd-validator.cjs +622 -0
  40. package/bin/lib/business-flow-mapper.cjs +429 -0
  41. package/bin/lib/circuit-breaker.cjs +276 -0
  42. package/bin/lib/code-complexity-analyzer.cjs +360 -0
  43. package/bin/lib/codebase-analyzer.cjs +241 -0
  44. package/bin/lib/commands.cjs +691 -0
  45. package/bin/lib/config.cjs +236 -0
  46. package/bin/lib/constraint-extractor.cjs +526 -0
  47. package/bin/lib/content-scanner.cjs +238 -0
  48. package/bin/lib/context-cache.cjs +154 -0
  49. package/bin/lib/context-compressor.cjs +102 -0
  50. package/bin/lib/context-deduplicator.cjs +105 -0
  51. package/bin/lib/context-errors.cjs +78 -0
  52. package/bin/lib/context-manager.cjs +338 -0
  53. package/bin/lib/context-metadata-tracker.cjs +140 -0
  54. package/bin/lib/context-relevance-scorer.cjs +99 -0
  55. package/bin/lib/core.cjs +507 -0
  56. package/bin/lib/cost-alerts.cjs +174 -0
  57. package/bin/lib/cost-tracker.cjs +275 -0
  58. package/bin/lib/crash-recovery.cjs +220 -0
  59. package/bin/lib/dependency-graph.cjs +319 -0
  60. package/bin/lib/deploy/deploy-audit-log.cjs +76 -0
  61. package/bin/lib/deploy/deploy-detector.cjs +69 -0
  62. package/bin/lib/deploy/deploy-env-manager.cjs +109 -0
  63. package/bin/lib/deploy/deploy-health-check.cjs +88 -0
  64. package/bin/lib/deploy/deploy-pre-flight.cjs +57 -0
  65. package/bin/lib/deploy/deploy-rollback.cjs +72 -0
  66. package/bin/lib/deploy/deploy-runner.cjs +97 -0
  67. package/bin/lib/deploy/deploy-status.cjs +74 -0
  68. package/bin/lib/discussion-synthesizer.cjs +439 -0
  69. package/bin/lib/error-cache.cjs +114 -0
  70. package/bin/lib/error-registry.cjs +177 -0
  71. package/bin/lib/file-access.cjs +207 -0
  72. package/bin/lib/file-lock.cjs +236 -0
  73. package/bin/lib/finops/budget-enforcer.cjs +126 -0
  74. package/bin/lib/finops/cost-reporter.cjs +132 -0
  75. package/bin/lib/finops/finops-analyzer.cjs +112 -0
  76. package/bin/lib/finops/spot-manager.cjs +118 -0
  77. package/bin/lib/framework-detector.cjs +396 -0
  78. package/bin/lib/frontmatter.cjs +313 -0
  79. package/bin/lib/fs-utils.cjs +153 -0
  80. package/bin/lib/gate-executor.cjs +272 -0
  81. package/bin/lib/gates/README.md +374 -0
  82. package/bin/lib/gates/gate-01-requirement.cjs +303 -0
  83. package/bin/lib/gates/gate-02-architecture.cjs +555 -0
  84. package/bin/lib/gates/gate-03-code.cjs +635 -0
  85. package/bin/lib/gates/gate-04-security.cjs +829 -0
  86. package/bin/lib/git-errors.cjs +83 -0
  87. package/bin/lib/git-utils.cjs +321 -0
  88. package/bin/lib/git-workflow-engine.cjs +1157 -0
  89. package/bin/lib/health-check.cjs +227 -0
  90. package/bin/lib/index.cjs +279 -0
  91. package/bin/lib/init.cjs +725 -0
  92. package/bin/lib/lock-logger.cjs +194 -0
  93. package/bin/lib/lock-state.cjs +263 -0
  94. package/bin/lib/lockfile-validator.cjs +227 -0
  95. package/bin/lib/log-rotation.cjs +71 -0
  96. package/bin/lib/logger.cjs +125 -0
  97. package/bin/lib/memory-compression.cjs +256 -0
  98. package/bin/lib/milestone.cjs +247 -0
  99. package/bin/lib/model-provider.cjs +241 -0
  100. package/bin/lib/package-manager-detector.cjs +203 -0
  101. package/bin/lib/package-manager-executor.cjs +385 -0
  102. package/bin/lib/package-manager-service.cjs +216 -0
  103. package/bin/lib/perf/api-monitor.cjs +88 -0
  104. package/bin/lib/perf/db-optimizer.cjs +78 -0
  105. package/bin/lib/perf/frontend-performance.cjs +56 -0
  106. package/bin/lib/perf/perf-analyzer.cjs +77 -0
  107. package/bin/lib/perf/perf-baseline.cjs +102 -0
  108. package/bin/lib/perf/perf-reporter.cjs +117 -0
  109. package/bin/lib/perf/regression-detector.cjs +92 -0
  110. package/bin/lib/phase.cjs +963 -0
  111. package/bin/lib/planning-write.cjs +123 -0
  112. package/bin/lib/project-reporter.cjs +565 -0
  113. package/bin/lib/quality-gate.cjs +332 -0
  114. package/bin/lib/quality-metrics.cjs +324 -0
  115. package/bin/lib/recovery-manager.cjs +98 -0
  116. package/bin/lib/release-validator.cjs +617 -0
  117. package/bin/lib/retry.cjs +119 -0
  118. package/bin/lib/roadmap.cjs +309 -0
  119. package/bin/lib/safe-exec.cjs +173 -0
  120. package/bin/lib/safe-path.cjs +130 -0
  121. package/bin/lib/security-errors.cjs +62 -0
  122. package/bin/lib/session-chain.cjs +304 -0
  123. package/bin/lib/session-errors.cjs +81 -0
  124. package/bin/lib/session-export.cjs +251 -0
  125. package/bin/lib/session-import.cjs +262 -0
  126. package/bin/lib/session-manager.cjs +280 -0
  127. package/bin/lib/skill-context.cjs +148 -0
  128. package/bin/lib/skill-matcher.cjs +236 -0
  129. package/bin/lib/skill-registry.cjs +360 -0
  130. package/bin/lib/skill-resolver.cjs +449 -0
  131. package/bin/lib/skill-triggers.cjs +90 -0
  132. package/bin/lib/skill-validator.cjs +270 -0
  133. package/bin/lib/skill-versioning.cjs +355 -0
  134. package/bin/lib/stack-detector.cjs +399 -0
  135. package/bin/lib/state.cjs +736 -0
  136. package/bin/lib/tech-debt-analyzer.cjs +309 -0
  137. package/bin/lib/temp-file.cjs +239 -0
  138. package/bin/lib/template.cjs +223 -0
  139. package/bin/lib/test-file-lock.cjs +112 -0
  140. package/bin/lib/test-graceful.cjs +93 -0
  141. package/bin/lib/test-logger.cjs +60 -0
  142. package/bin/lib/test-safe-exec.cjs +38 -0
  143. package/bin/lib/test-safe-path.cjs +33 -0
  144. package/bin/lib/test-temp-file.cjs +125 -0
  145. package/bin/lib/tier-manager.cjs +428 -0
  146. package/bin/lib/timeout-exec.cjs +63 -0
  147. package/bin/lib/tradeoff-analyzer.cjs +284 -0
  148. package/bin/lib/url-fetch.cjs +170 -0
  149. package/bin/lib/verify.cjs +863 -0
  150. package/bin/update.js +217 -214
  151. package/commands/deploy.cjs +53 -0
  152. package/commands/ez/add-tests.md +41 -41
  153. package/commands/ez/audit-milestone.md +36 -36
  154. package/commands/ez/complete-milestone.md +136 -136
  155. package/commands/ez/discuss-phase.md +90 -90
  156. package/commands/ez/execute-phase.md +52 -52
  157. package/commands/ez/help.md +22 -22
  158. package/commands/ez/map-codebase.md +71 -71
  159. package/commands/ez/new-milestone.md +44 -44
  160. package/commands/ez/new-project.md +51 -42
  161. package/commands/ez/plan-phase.md +53 -53
  162. package/commands/ez/progress.md +36 -36
  163. package/commands/ez/quick.md +45 -45
  164. package/commands/ez/resume-work.md +40 -40
  165. package/commands/ez/run-phase.md +580 -0
  166. package/commands/ez/settings.md +36 -36
  167. package/commands/ez/update.md +37 -37
  168. package/commands/ez/verify-work.md +402 -38
  169. package/commands/health-check.cjs +44 -0
  170. package/commands/rollback.cjs +47 -0
  171. package/ez-agents/bin/ez-tools.cjs +599 -2
  172. package/ez-agents/bin/guards/autonomy-guard.cjs +346 -0
  173. package/ez-agents/bin/guards/context-budget-guard.cjs +247 -0
  174. package/ez-agents/bin/guards/hallucination-guard.cjs +271 -0
  175. package/ez-agents/bin/guards/hidden-state-guard.cjs +182 -0
  176. package/ez-agents/bin/guards/team-overhead-guard.cjs +266 -0
  177. package/ez-agents/bin/guards/tool-sprawl-guard.cjs +271 -0
  178. package/ez-agents/bin/lib/analytics/analytics-collector.cjs +86 -0
  179. package/ez-agents/bin/lib/analytics/analytics-reporter.cjs +130 -0
  180. package/ez-agents/bin/lib/analytics/cohort-analyzer.cjs +138 -0
  181. package/ez-agents/bin/lib/analytics/funnel-analyzer.cjs +147 -0
  182. package/ez-agents/bin/lib/analytics/nps-tracker.cjs +147 -0
  183. package/ez-agents/bin/lib/archetype-detector.cjs +289 -0
  184. package/ez-agents/bin/lib/audit-exec.cjs +166 -167
  185. package/ez-agents/bin/lib/auth.cjs +176 -176
  186. package/ez-agents/bin/lib/backup-service.cjs +422 -0
  187. package/ez-agents/bin/lib/bdd-validator.cjs +622 -622
  188. package/ez-agents/bin/lib/business-flow-mapper.cjs +429 -0
  189. package/ez-agents/bin/lib/code-complexity-analyzer.cjs +360 -0
  190. package/ez-agents/bin/lib/codebase-analyzer.cjs +241 -0
  191. package/ez-agents/bin/lib/commands.cjs +685 -685
  192. package/ez-agents/bin/lib/config.cjs +41 -1
  193. package/ez-agents/bin/lib/constraint-extractor.cjs +526 -0
  194. package/ez-agents/bin/lib/content-scanner.cjs +238 -238
  195. package/ez-agents/bin/lib/context-cache.cjs +154 -154
  196. package/ez-agents/bin/lib/context-errors.cjs +71 -71
  197. package/ez-agents/bin/lib/context-manager.cjs +220 -220
  198. package/ez-agents/bin/lib/core.cjs +507 -512
  199. package/ez-agents/bin/lib/cost-tracker.cjs +243 -0
  200. package/ez-agents/bin/lib/crash-recovery.cjs +172 -0
  201. package/ez-agents/bin/lib/dependency-graph.cjs +319 -0
  202. package/ez-agents/bin/lib/deploy/deploy-audit-log.cjs +76 -0
  203. package/ez-agents/bin/lib/deploy/deploy-detector.cjs +69 -0
  204. package/ez-agents/bin/lib/deploy/deploy-env-manager.cjs +109 -0
  205. package/ez-agents/bin/lib/deploy/deploy-health-check.cjs +88 -0
  206. package/ez-agents/bin/lib/deploy/deploy-pre-flight.cjs +57 -0
  207. package/ez-agents/bin/lib/deploy/deploy-rollback.cjs +72 -0
  208. package/ez-agents/bin/lib/deploy/deploy-runner.cjs +97 -0
  209. package/ez-agents/bin/lib/deploy/deploy-status.cjs +74 -0
  210. package/ez-agents/bin/lib/file-access.cjs +207 -207
  211. package/ez-agents/bin/lib/finops/budget-enforcer.cjs +126 -0
  212. package/ez-agents/bin/lib/finops/cost-reporter.cjs +132 -0
  213. package/ez-agents/bin/lib/finops/finops-analyzer.cjs +112 -0
  214. package/ez-agents/bin/lib/finops/spot-manager.cjs +118 -0
  215. package/ez-agents/bin/lib/framework-detector.cjs +396 -0
  216. package/ez-agents/bin/lib/frontmatter.cjs +3 -1
  217. package/ez-agents/bin/lib/gates/README.md +374 -0
  218. package/ez-agents/bin/lib/gates/gate-01-requirement.cjs +303 -0
  219. package/ez-agents/bin/lib/gates/gate-02-architecture.cjs +555 -0
  220. package/ez-agents/bin/lib/gates/gate-03-code.cjs +635 -0
  221. package/ez-agents/bin/lib/gates/gate-04-security.cjs +829 -0
  222. package/ez-agents/bin/lib/git-errors.cjs +83 -83
  223. package/ez-agents/bin/lib/git-utils.cjs +321 -321
  224. package/ez-agents/bin/lib/git-workflow-engine.cjs +1157 -1157
  225. package/ez-agents/bin/lib/health-check.cjs +162 -162
  226. package/ez-agents/bin/lib/index.cjs +2 -8
  227. package/ez-agents/bin/lib/init.cjs +0 -2
  228. package/ez-agents/bin/lib/lockfile-validator.cjs +227 -227
  229. package/ez-agents/bin/lib/log-rotation.cjs +71 -0
  230. package/ez-agents/bin/lib/logger.cjs +22 -47
  231. package/ez-agents/bin/lib/memory-compression.cjs +256 -256
  232. package/ez-agents/bin/lib/package-manager-detector.cjs +203 -203
  233. package/ez-agents/bin/lib/package-manager-executor.cjs +385 -385
  234. package/ez-agents/bin/lib/package-manager-service.cjs +216 -216
  235. package/ez-agents/bin/lib/perf/api-monitor.cjs +88 -0
  236. package/ez-agents/bin/lib/perf/db-optimizer.cjs +78 -0
  237. package/ez-agents/bin/lib/perf/frontend-performance.cjs +56 -0
  238. package/ez-agents/bin/lib/perf/perf-analyzer.cjs +77 -0
  239. package/ez-agents/bin/lib/perf/perf-baseline.cjs +102 -0
  240. package/ez-agents/bin/lib/perf/perf-reporter.cjs +117 -0
  241. package/ez-agents/bin/lib/perf/regression-detector.cjs +92 -0
  242. package/ez-agents/bin/lib/project-reporter.cjs +502 -0
  243. package/ez-agents/bin/lib/quality-gate.cjs +332 -0
  244. package/ez-agents/bin/lib/recovery-manager.cjs +98 -0
  245. package/ez-agents/bin/lib/release-validator.cjs +617 -614
  246. package/ez-agents/bin/lib/security-errors.cjs +62 -0
  247. package/ez-agents/bin/lib/session-chain.cjs +304 -304
  248. package/ez-agents/bin/lib/session-errors.cjs +81 -81
  249. package/ez-agents/bin/lib/session-export.cjs +251 -251
  250. package/ez-agents/bin/lib/session-import.cjs +262 -262
  251. package/ez-agents/bin/lib/session-manager.cjs +280 -280
  252. package/ez-agents/bin/lib/skill-context.cjs +148 -0
  253. package/ez-agents/bin/lib/skill-matcher.cjs +236 -0
  254. package/ez-agents/bin/lib/skill-registry.cjs +341 -0
  255. package/ez-agents/bin/lib/skill-resolver.cjs +449 -0
  256. package/ez-agents/bin/lib/skill-triggers.cjs +90 -0
  257. package/ez-agents/bin/lib/skill-validator.cjs +270 -0
  258. package/ez-agents/bin/lib/skill-versioning.cjs +355 -0
  259. package/ez-agents/bin/lib/stack-detector.cjs +399 -0
  260. package/ez-agents/bin/lib/tech-debt-analyzer.cjs +309 -0
  261. package/ez-agents/bin/lib/tier-manager.cjs +428 -428
  262. package/ez-agents/bin/lib/tradeoff-analyzer.cjs +284 -0
  263. package/ez-agents/bin/lib/url-fetch.cjs +170 -170
  264. package/ez-agents/bin/lib/verify.cjs +863 -863
  265. package/ez-agents/references/decimal-phase-calculation.md +65 -65
  266. package/ez-agents/references/git-integration.md +248 -248
  267. package/ez-agents/references/git-planning-commit.md +38 -38
  268. package/ez-agents/references/metrics-schema.md +118 -118
  269. package/ez-agents/references/model-profile-resolution.md +34 -34
  270. package/ez-agents/references/model-profiles.md +93 -93
  271. package/ez-agents/references/phase-argument-parsing.md +61 -61
  272. package/ez-agents/references/planning-config.md +340 -340
  273. package/ez-agents/references/tier-strategy.md +103 -103
  274. package/ez-agents/references/ui-brand.md +160 -160
  275. package/ez-agents/references/verification-patterns.md +612 -612
  276. package/ez-agents/templates/DEBUG.md +164 -164
  277. package/ez-agents/templates/UAT.md +247 -247
  278. package/ez-agents/templates/agent-output-format.md +404 -0
  279. package/ez-agents/templates/bdd-feature.md +173 -173
  280. package/ez-agents/templates/codebase/architecture.md +255 -255
  281. package/ez-agents/templates/codebase/structure.md +285 -285
  282. package/ez-agents/templates/copilot-instructions.md +7 -7
  283. package/ez-agents/templates/debug-subagent-prompt.md +91 -91
  284. package/ez-agents/templates/discovery.md +146 -146
  285. package/ez-agents/templates/discussion.md +68 -68
  286. package/ez-agents/templates/handoff-protocol.md +294 -0
  287. package/ez-agents/templates/incident-runbook.md +205 -205
  288. package/ez-agents/templates/mode-workflow-templates.md +301 -0
  289. package/ez-agents/templates/phase-prompt.md +610 -610
  290. package/ez-agents/templates/planner-subagent-prompt.md +117 -117
  291. package/ez-agents/templates/project.md +184 -184
  292. package/ez-agents/templates/release-checklist.md +136 -133
  293. package/ez-agents/templates/research.md +552 -552
  294. package/ez-agents/templates/rollback-plan.md +201 -201
  295. package/ez-agents/templates/security-user-setup.md +244 -0
  296. package/ez-agents/templates/skill-validation-rules.md +476 -0
  297. package/ez-agents/templates/state.md +180 -176
  298. package/ez-agents/templates/summary-complex.md +59 -59
  299. package/ez-agents/tests/gates/gate-01-02.test.cjs +812 -0
  300. package/ez-agents/tests/gates/gate-03-04.test.cjs +762 -0
  301. package/ez-agents/tests/gates/gate-05-validator.test.cjs +145 -0
  302. package/ez-agents/tests/gates/gate-06-docs-validator.test.cjs +244 -0
  303. package/ez-agents/tests/gates/gate-07-release-validator.test.cjs +219 -0
  304. package/ez-agents/tests/guards/context-budget-guard.test.cjs +145 -0
  305. package/ez-agents/tests/guards/edge-case-guards.test.cjs +238 -0
  306. package/ez-agents/tests/guards/hallucination-guard.test.cjs +124 -0
  307. package/ez-agents/workflows/audit-milestone.md +1 -1
  308. package/ez-agents/workflows/autonomous.md +844 -844
  309. package/ez-agents/workflows/complete-milestone.md +1 -1
  310. package/ez-agents/workflows/discuss-phase.md +1 -1
  311. package/ez-agents/workflows/execute-phase.md +124 -3
  312. package/ez-agents/workflows/help.md +42 -181
  313. package/ez-agents/workflows/hotfix.md +291 -291
  314. package/ez-agents/workflows/new-milestone.md +713 -713
  315. package/ez-agents/workflows/new-project.md +1089 -1107
  316. package/ez-agents/workflows/plan-phase.md +0 -40
  317. package/ez-agents/workflows/release.md +253 -253
  318. package/ez-agents/workflows/resume-session.md +215 -215
  319. package/ez-agents/workflows/run-phase.md +531 -0
  320. package/ez-agents/workflows/settings.md +2 -35
  321. package/hooks/dist/ez-check-update.js +81 -81
  322. package/hooks/dist/ez-context-monitor.js +148 -141
  323. package/hooks/dist/ez-statusline.js +115 -115
  324. package/package.json +78 -71
  325. package/scripts/fix-qwen-installation.js +144 -144
  326. package/agents/ez-integration-checker.md +0 -443
  327. package/agents/ez-nyquist-auditor.md +0 -176
  328. package/agents/ez-observer-agent.md +0 -260
  329. package/agents/ez-plan-checker.md +0 -706
  330. package/agents/ez-research-synthesizer.md +0 -247
  331. package/agents/ez-scrum-master-agent.md +0 -242
  332. package/agents/ez-tech-lead-agent.md +0 -267
  333. package/agents/ez-ui-auditor.md +0 -439
  334. package/agents/ez-ui-checker.md +0 -300
  335. package/agents/ez-ui-researcher.md +0 -353
  336. package/commands/ez/add-phase.md +0 -43
  337. package/commands/ez/add-todo.md +0 -47
  338. package/commands/ez/arch-review.md +0 -102
  339. package/commands/ez/auth.md +0 -87
  340. package/commands/ez/autonomous.md +0 -41
  341. package/commands/ez/check-todos.md +0 -45
  342. package/commands/ez/cleanup.md +0 -18
  343. package/commands/ez/debug.md +0 -168
  344. package/commands/ez/export-session.md +0 -79
  345. package/commands/ez/gather-requirements.md +0 -117
  346. package/commands/ez/git-workflow.md +0 -72
  347. package/commands/ez/health.md +0 -22
  348. package/commands/ez/hotfix.md +0 -120
  349. package/commands/ez/import-session.md +0 -82
  350. package/commands/ez/insert-phase.md +0 -32
  351. package/commands/ez/join-discord.md +0 -18
  352. package/commands/ez/list-phase-assumptions.md +0 -46
  353. package/commands/ez/list-sessions.md +0 -96
  354. package/commands/ez/package-manager.md +0 -316
  355. package/commands/ez/pause-work.md +0 -38
  356. package/commands/ez/plan-milestone-gaps.md +0 -34
  357. package/commands/ez/preflight.md +0 -79
  358. package/commands/ez/reapply-patches.md +0 -124
  359. package/commands/ez/release.md +0 -153
  360. package/commands/ez/remove-phase.md +0 -31
  361. package/commands/ez/research-phase.md +0 -190
  362. package/commands/ez/resume.md +0 -107
  363. package/commands/ez/set-profile.md +0 -34
  364. package/commands/ez/standup.md +0 -85
  365. package/commands/ez/stats.md +0 -18
  366. package/commands/ez/ui-phase.md +0 -34
  367. package/commands/ez/ui-review.md +0 -32
  368. package/commands/ez/validate-phase.md +0 -35
  369. package/ez-agents/bin/lib/metrics-tracker.cjs +0 -406
  370. package/ez-agents/templates/UI-SPEC.md +0 -100
  371. package/ez-agents/templates/VALIDATION.md +0 -76
  372. package/ez-agents/templates/context.md +0 -352
  373. package/ez-agents/templates/verification-report.md +0 -322
  374. package/ez-agents/workflows/arch-review.md +0 -54
  375. package/ez-agents/workflows/export-session.md +0 -255
  376. package/ez-agents/workflows/gather-requirements.md +0 -206
  377. package/ez-agents/workflows/import-session.md +0 -303
  378. package/ez-agents/workflows/research-phase.md +0 -74
  379. package/ez-agents/workflows/standup.md +0 -64
  380. package/ez-agents/workflows/ui-phase.md +0 -290
  381. package/ez-agents/workflows/ui-review.md +0 -157
  382. package/ez-agents/workflows/validate-phase.md +0 -167
@@ -1,610 +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.
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.