@howlil/ez-agents 3.4.2 → 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 (365) hide show
  1. package/README.md +735 -462
  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 -0
  18. package/agents/ez-requirements-agent.md +377 -0
  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/install.js +3221 -3272
  30. package/bin/lib/analytics/analytics-collector.cjs +86 -0
  31. package/bin/lib/analytics/analytics-reporter.cjs +130 -0
  32. package/bin/lib/analytics/cohort-analyzer.cjs +138 -0
  33. package/bin/lib/analytics/funnel-analyzer.cjs +147 -0
  34. package/bin/lib/analytics/nps-tracker.cjs +147 -0
  35. package/bin/lib/archetype-detector.cjs +289 -0
  36. package/bin/lib/assistant-adapter.cjs +361 -0
  37. package/bin/lib/audit-exec.cjs +175 -0
  38. package/bin/lib/auth.cjs +176 -0
  39. package/bin/lib/backup-service.cjs +422 -0
  40. package/bin/lib/bdd-validator.cjs +622 -0
  41. package/bin/lib/business-flow-mapper.cjs +429 -0
  42. package/bin/lib/circuit-breaker.cjs +276 -0
  43. package/bin/lib/code-complexity-analyzer.cjs +360 -0
  44. package/bin/lib/codebase-analyzer.cjs +241 -0
  45. package/bin/lib/commands.cjs +691 -0
  46. package/bin/lib/config.cjs +236 -0
  47. package/bin/lib/constraint-extractor.cjs +526 -0
  48. package/bin/lib/content-scanner.cjs +238 -0
  49. package/bin/lib/context-cache.cjs +154 -0
  50. package/bin/lib/context-compressor.cjs +102 -0
  51. package/bin/lib/context-deduplicator.cjs +105 -0
  52. package/bin/lib/context-errors.cjs +78 -0
  53. package/bin/lib/context-manager.cjs +338 -0
  54. package/bin/lib/context-metadata-tracker.cjs +140 -0
  55. package/bin/lib/context-relevance-scorer.cjs +99 -0
  56. package/bin/lib/core.cjs +507 -0
  57. package/bin/lib/cost-alerts.cjs +174 -0
  58. package/bin/lib/cost-tracker.cjs +275 -0
  59. package/bin/lib/crash-recovery.cjs +220 -0
  60. package/bin/lib/dependency-graph.cjs +319 -0
  61. package/bin/lib/deploy/deploy-audit-log.cjs +76 -0
  62. package/bin/lib/deploy/deploy-detector.cjs +69 -0
  63. package/bin/lib/deploy/deploy-env-manager.cjs +109 -0
  64. package/bin/lib/deploy/deploy-health-check.cjs +88 -0
  65. package/bin/lib/deploy/deploy-pre-flight.cjs +57 -0
  66. package/bin/lib/deploy/deploy-rollback.cjs +72 -0
  67. package/bin/lib/deploy/deploy-runner.cjs +97 -0
  68. package/bin/lib/deploy/deploy-status.cjs +74 -0
  69. package/bin/lib/discussion-synthesizer.cjs +439 -0
  70. package/bin/lib/error-cache.cjs +114 -0
  71. package/bin/lib/error-registry.cjs +177 -0
  72. package/bin/lib/file-access.cjs +207 -0
  73. package/bin/lib/file-lock.cjs +236 -0
  74. package/bin/lib/finops/budget-enforcer.cjs +126 -0
  75. package/bin/lib/finops/cost-reporter.cjs +132 -0
  76. package/bin/lib/finops/finops-analyzer.cjs +112 -0
  77. package/bin/lib/finops/spot-manager.cjs +118 -0
  78. package/bin/lib/framework-detector.cjs +396 -0
  79. package/bin/lib/frontmatter.cjs +313 -0
  80. package/bin/lib/fs-utils.cjs +153 -0
  81. package/bin/lib/gate-executor.cjs +272 -0
  82. package/bin/lib/gates/README.md +374 -0
  83. package/bin/lib/gates/gate-01-requirement.cjs +303 -0
  84. package/bin/lib/gates/gate-02-architecture.cjs +555 -0
  85. package/bin/lib/gates/gate-03-code.cjs +635 -0
  86. package/bin/lib/gates/gate-04-security.cjs +829 -0
  87. package/bin/lib/git-errors.cjs +83 -0
  88. package/bin/lib/git-utils.cjs +321 -0
  89. package/bin/lib/git-workflow-engine.cjs +1157 -0
  90. package/bin/lib/health-check.cjs +227 -0
  91. package/bin/lib/index.cjs +279 -0
  92. package/bin/lib/init.cjs +725 -0
  93. package/bin/lib/lock-logger.cjs +194 -0
  94. package/bin/lib/lock-state.cjs +263 -0
  95. package/bin/lib/lockfile-validator.cjs +227 -0
  96. package/bin/lib/log-rotation.cjs +71 -0
  97. package/bin/lib/logger.cjs +125 -0
  98. package/bin/lib/memory-compression.cjs +256 -0
  99. package/bin/lib/milestone.cjs +247 -0
  100. package/bin/lib/model-provider.cjs +241 -0
  101. package/bin/lib/package-manager-detector.cjs +203 -0
  102. package/bin/lib/package-manager-executor.cjs +385 -0
  103. package/bin/lib/package-manager-service.cjs +216 -0
  104. package/bin/lib/perf/api-monitor.cjs +88 -0
  105. package/bin/lib/perf/db-optimizer.cjs +78 -0
  106. package/bin/lib/perf/frontend-performance.cjs +56 -0
  107. package/bin/lib/perf/perf-analyzer.cjs +77 -0
  108. package/bin/lib/perf/perf-baseline.cjs +102 -0
  109. package/bin/lib/perf/perf-reporter.cjs +117 -0
  110. package/bin/lib/perf/regression-detector.cjs +92 -0
  111. package/bin/lib/phase.cjs +963 -0
  112. package/bin/lib/planning-write.cjs +123 -0
  113. package/bin/lib/project-reporter.cjs +565 -0
  114. package/bin/lib/quality-gate.cjs +332 -0
  115. package/bin/lib/quality-metrics.cjs +324 -0
  116. package/bin/lib/recovery-manager.cjs +98 -0
  117. package/bin/lib/release-validator.cjs +617 -0
  118. package/bin/lib/retry.cjs +119 -0
  119. package/bin/lib/roadmap.cjs +309 -0
  120. package/bin/lib/safe-exec.cjs +173 -0
  121. package/bin/lib/safe-path.cjs +130 -0
  122. package/bin/lib/security-errors.cjs +62 -0
  123. package/bin/lib/session-chain.cjs +304 -0
  124. package/bin/lib/session-errors.cjs +81 -0
  125. package/bin/lib/session-export.cjs +251 -0
  126. package/bin/lib/session-import.cjs +262 -0
  127. package/bin/lib/session-manager.cjs +280 -0
  128. package/bin/lib/skill-context.cjs +148 -0
  129. package/bin/lib/skill-matcher.cjs +236 -0
  130. package/bin/lib/skill-registry.cjs +360 -0
  131. package/bin/lib/skill-resolver.cjs +449 -0
  132. package/bin/lib/skill-triggers.cjs +90 -0
  133. package/bin/lib/skill-validator.cjs +270 -0
  134. package/bin/lib/skill-versioning.cjs +355 -0
  135. package/bin/lib/stack-detector.cjs +399 -0
  136. package/bin/lib/state.cjs +736 -0
  137. package/bin/lib/tech-debt-analyzer.cjs +309 -0
  138. package/bin/lib/temp-file.cjs +239 -0
  139. package/bin/lib/template.cjs +223 -0
  140. package/bin/lib/test-file-lock.cjs +112 -0
  141. package/bin/lib/test-graceful.cjs +93 -0
  142. package/bin/lib/test-logger.cjs +60 -0
  143. package/bin/lib/test-safe-exec.cjs +38 -0
  144. package/bin/lib/test-safe-path.cjs +33 -0
  145. package/bin/lib/test-temp-file.cjs +125 -0
  146. package/bin/lib/tier-manager.cjs +428 -0
  147. package/bin/lib/timeout-exec.cjs +63 -0
  148. package/bin/lib/tradeoff-analyzer.cjs +284 -0
  149. package/bin/lib/url-fetch.cjs +170 -0
  150. package/bin/lib/verify.cjs +863 -0
  151. package/bin/update.js +217 -214
  152. package/commands/deploy.cjs +53 -0
  153. package/commands/ez/add-tests.md +41 -41
  154. package/commands/ez/audit-milestone.md +36 -36
  155. package/commands/ez/complete-milestone.md +136 -136
  156. package/commands/ez/discuss-phase.md +90 -90
  157. package/commands/ez/execute-phase.md +52 -41
  158. package/commands/ez/help.md +22 -22
  159. package/commands/ez/map-codebase.md +71 -71
  160. package/commands/ez/new-milestone.md +44 -44
  161. package/commands/ez/new-project.md +51 -42
  162. package/commands/ez/plan-phase.md +53 -45
  163. package/commands/ez/progress.md +36 -24
  164. package/commands/ez/quick.md +45 -45
  165. package/commands/ez/resume-work.md +40 -40
  166. package/commands/ez/run-phase.md +580 -0
  167. package/commands/ez/settings.md +36 -36
  168. package/commands/ez/update.md +37 -37
  169. package/commands/ez/verify-work.md +402 -38
  170. package/commands/health-check.cjs +44 -0
  171. package/commands/rollback.cjs +47 -0
  172. package/ez-agents/bin/ez-tools.cjs +1692 -716
  173. package/ez-agents/bin/guards/autonomy-guard.cjs +346 -0
  174. package/ez-agents/bin/guards/context-budget-guard.cjs +247 -0
  175. package/ez-agents/bin/guards/hallucination-guard.cjs +271 -0
  176. package/ez-agents/bin/guards/hidden-state-guard.cjs +182 -0
  177. package/ez-agents/bin/guards/team-overhead-guard.cjs +266 -0
  178. package/ez-agents/bin/guards/tool-sprawl-guard.cjs +271 -0
  179. package/ez-agents/bin/lib/analytics/analytics-collector.cjs +86 -0
  180. package/ez-agents/bin/lib/analytics/analytics-reporter.cjs +130 -0
  181. package/ez-agents/bin/lib/analytics/cohort-analyzer.cjs +138 -0
  182. package/ez-agents/bin/lib/analytics/funnel-analyzer.cjs +147 -0
  183. package/ez-agents/bin/lib/analytics/nps-tracker.cjs +147 -0
  184. package/ez-agents/bin/lib/archetype-detector.cjs +289 -0
  185. package/ez-agents/bin/lib/audit-exec.cjs +166 -167
  186. package/ez-agents/bin/lib/auth.cjs +176 -176
  187. package/ez-agents/bin/lib/backup-service.cjs +422 -0
  188. package/ez-agents/bin/lib/bdd-validator.cjs +622 -0
  189. package/ez-agents/bin/lib/business-flow-mapper.cjs +429 -0
  190. package/ez-agents/bin/lib/code-complexity-analyzer.cjs +360 -0
  191. package/ez-agents/bin/lib/codebase-analyzer.cjs +241 -0
  192. package/ez-agents/bin/lib/commands.cjs +685 -685
  193. package/ez-agents/bin/lib/config.cjs +41 -1
  194. package/ez-agents/bin/lib/constraint-extractor.cjs +526 -0
  195. package/ez-agents/bin/lib/content-scanner.cjs +238 -0
  196. package/ez-agents/bin/lib/context-cache.cjs +154 -0
  197. package/ez-agents/bin/lib/context-errors.cjs +71 -0
  198. package/ez-agents/bin/lib/context-manager.cjs +220 -0
  199. package/ez-agents/bin/lib/core.cjs +507 -512
  200. package/ez-agents/bin/lib/cost-tracker.cjs +243 -0
  201. package/ez-agents/bin/lib/crash-recovery.cjs +172 -0
  202. package/ez-agents/bin/lib/dependency-graph.cjs +319 -0
  203. package/ez-agents/bin/lib/deploy/deploy-audit-log.cjs +76 -0
  204. package/ez-agents/bin/lib/deploy/deploy-detector.cjs +69 -0
  205. package/ez-agents/bin/lib/deploy/deploy-env-manager.cjs +109 -0
  206. package/ez-agents/bin/lib/deploy/deploy-health-check.cjs +88 -0
  207. package/ez-agents/bin/lib/deploy/deploy-pre-flight.cjs +57 -0
  208. package/ez-agents/bin/lib/deploy/deploy-rollback.cjs +72 -0
  209. package/ez-agents/bin/lib/deploy/deploy-runner.cjs +97 -0
  210. package/ez-agents/bin/lib/deploy/deploy-status.cjs +74 -0
  211. package/ez-agents/bin/lib/discussion-synthesizer.cjs +458 -0
  212. package/ez-agents/bin/lib/file-access.cjs +207 -0
  213. package/ez-agents/bin/lib/finops/budget-enforcer.cjs +126 -0
  214. package/ez-agents/bin/lib/finops/cost-reporter.cjs +132 -0
  215. package/ez-agents/bin/lib/finops/finops-analyzer.cjs +112 -0
  216. package/ez-agents/bin/lib/finops/spot-manager.cjs +118 -0
  217. package/ez-agents/bin/lib/framework-detector.cjs +396 -0
  218. package/ez-agents/bin/lib/frontmatter.cjs +3 -1
  219. package/ez-agents/bin/lib/gates/README.md +374 -0
  220. package/ez-agents/bin/lib/gates/gate-01-requirement.cjs +303 -0
  221. package/ez-agents/bin/lib/gates/gate-02-architecture.cjs +555 -0
  222. package/ez-agents/bin/lib/gates/gate-03-code.cjs +635 -0
  223. package/ez-agents/bin/lib/gates/gate-04-security.cjs +829 -0
  224. package/ez-agents/bin/lib/git-errors.cjs +83 -0
  225. package/ez-agents/bin/lib/git-utils.cjs +118 -0
  226. package/ez-agents/bin/lib/git-workflow-engine.cjs +1157 -0
  227. package/ez-agents/bin/lib/health-check.cjs +162 -162
  228. package/ez-agents/bin/lib/index.cjs +40 -2
  229. package/ez-agents/bin/lib/init.cjs +0 -2
  230. package/ez-agents/bin/lib/lockfile-validator.cjs +227 -0
  231. package/ez-agents/bin/lib/log-rotation.cjs +71 -0
  232. package/ez-agents/bin/lib/logger.cjs +99 -154
  233. package/ez-agents/bin/lib/memory-compression.cjs +256 -0
  234. package/ez-agents/bin/lib/package-manager-detector.cjs +203 -0
  235. package/ez-agents/bin/lib/package-manager-executor.cjs +385 -0
  236. package/ez-agents/bin/lib/package-manager-service.cjs +216 -0
  237. package/ez-agents/bin/lib/perf/api-monitor.cjs +88 -0
  238. package/ez-agents/bin/lib/perf/db-optimizer.cjs +78 -0
  239. package/ez-agents/bin/lib/perf/frontend-performance.cjs +56 -0
  240. package/ez-agents/bin/lib/perf/perf-analyzer.cjs +77 -0
  241. package/ez-agents/bin/lib/perf/perf-baseline.cjs +102 -0
  242. package/ez-agents/bin/lib/perf/perf-reporter.cjs +117 -0
  243. package/ez-agents/bin/lib/perf/regression-detector.cjs +92 -0
  244. package/ez-agents/bin/lib/project-reporter.cjs +502 -0
  245. package/ez-agents/bin/lib/quality-gate.cjs +332 -0
  246. package/ez-agents/bin/lib/recovery-manager.cjs +98 -0
  247. package/ez-agents/bin/lib/release-validator.cjs +617 -0
  248. package/ez-agents/bin/lib/safe-exec.cjs +128 -214
  249. package/ez-agents/bin/lib/security-errors.cjs +62 -0
  250. package/ez-agents/bin/lib/session-chain.cjs +304 -0
  251. package/ez-agents/bin/lib/session-errors.cjs +81 -0
  252. package/ez-agents/bin/lib/session-export.cjs +251 -0
  253. package/ez-agents/bin/lib/session-import.cjs +262 -0
  254. package/ez-agents/bin/lib/session-manager.cjs +280 -0
  255. package/ez-agents/bin/lib/skill-context.cjs +148 -0
  256. package/ez-agents/bin/lib/skill-matcher.cjs +236 -0
  257. package/ez-agents/bin/lib/skill-registry.cjs +341 -0
  258. package/ez-agents/bin/lib/skill-resolver.cjs +449 -0
  259. package/ez-agents/bin/lib/skill-triggers.cjs +90 -0
  260. package/ez-agents/bin/lib/skill-validator.cjs +270 -0
  261. package/ez-agents/bin/lib/skill-versioning.cjs +355 -0
  262. package/ez-agents/bin/lib/stack-detector.cjs +399 -0
  263. package/ez-agents/bin/lib/tech-debt-analyzer.cjs +309 -0
  264. package/ez-agents/bin/lib/tier-manager.cjs +428 -0
  265. package/ez-agents/bin/lib/tradeoff-analyzer.cjs +284 -0
  266. package/ez-agents/bin/lib/url-fetch.cjs +170 -0
  267. package/ez-agents/bin/lib/verify.cjs +863 -863
  268. package/ez-agents/references/decimal-phase-calculation.md +65 -65
  269. package/ez-agents/references/git-integration.md +248 -248
  270. package/ez-agents/references/git-planning-commit.md +38 -38
  271. package/ez-agents/references/metrics-schema.md +118 -0
  272. package/ez-agents/references/model-profile-resolution.md +34 -34
  273. package/ez-agents/references/model-profiles.md +93 -93
  274. package/ez-agents/references/phase-argument-parsing.md +61 -61
  275. package/ez-agents/references/planning-config.md +340 -200
  276. package/ez-agents/references/tier-strategy.md +103 -0
  277. package/ez-agents/references/ui-brand.md +160 -160
  278. package/ez-agents/references/verification-patterns.md +612 -612
  279. package/ez-agents/templates/DEBUG.md +164 -164
  280. package/ez-agents/templates/UAT.md +247 -247
  281. package/ez-agents/templates/agent-output-format.md +404 -0
  282. package/ez-agents/templates/bdd-feature.md +173 -0
  283. package/ez-agents/templates/codebase/architecture.md +255 -255
  284. package/ez-agents/templates/codebase/structure.md +285 -285
  285. package/ez-agents/templates/copilot-instructions.md +7 -7
  286. package/ez-agents/templates/debug-subagent-prompt.md +91 -91
  287. package/ez-agents/templates/discovery.md +146 -146
  288. package/ez-agents/templates/discussion.md +68 -0
  289. package/ez-agents/templates/handoff-protocol.md +294 -0
  290. package/ez-agents/templates/incident-runbook.md +205 -0
  291. package/ez-agents/templates/mode-workflow-templates.md +301 -0
  292. package/ez-agents/templates/phase-prompt.md +610 -610
  293. package/ez-agents/templates/planner-subagent-prompt.md +117 -117
  294. package/ez-agents/templates/project.md +184 -184
  295. package/ez-agents/templates/release-checklist.md +136 -0
  296. package/ez-agents/templates/research.md +552 -552
  297. package/ez-agents/templates/rollback-plan.md +201 -0
  298. package/ez-agents/templates/security-user-setup.md +244 -0
  299. package/ez-agents/templates/skill-validation-rules.md +476 -0
  300. package/ez-agents/templates/state.md +180 -176
  301. package/ez-agents/templates/summary-complex.md +59 -59
  302. package/ez-agents/tests/gates/gate-01-02.test.cjs +812 -0
  303. package/ez-agents/tests/gates/gate-03-04.test.cjs +762 -0
  304. package/ez-agents/tests/gates/gate-05-validator.test.cjs +145 -0
  305. package/ez-agents/tests/gates/gate-06-docs-validator.test.cjs +244 -0
  306. package/ez-agents/tests/gates/gate-07-release-validator.test.cjs +219 -0
  307. package/ez-agents/tests/guards/context-budget-guard.test.cjs +145 -0
  308. package/ez-agents/tests/guards/edge-case-guards.test.cjs +238 -0
  309. package/ez-agents/tests/guards/hallucination-guard.test.cjs +124 -0
  310. package/ez-agents/workflows/audit-milestone.md +1 -1
  311. package/ez-agents/workflows/autonomous.md +131 -30
  312. package/ez-agents/workflows/complete-milestone.md +1 -1
  313. package/ez-agents/workflows/discuss-phase.md +1 -1
  314. package/ez-agents/workflows/execute-phase.md +169 -3
  315. package/ez-agents/workflows/help.md +86 -133
  316. package/ez-agents/workflows/hotfix.md +291 -0
  317. package/ez-agents/workflows/new-milestone.md +340 -11
  318. package/ez-agents/workflows/new-project.md +294 -318
  319. package/ez-agents/workflows/plan-phase.md +22 -40
  320. package/ez-agents/workflows/progress.md +15 -25
  321. package/ez-agents/workflows/release.md +253 -0
  322. package/ez-agents/workflows/resume-session.md +215 -0
  323. package/ez-agents/workflows/run-phase.md +531 -0
  324. package/ez-agents/workflows/settings.md +2 -35
  325. package/hooks/dist/ez-check-update.js +81 -81
  326. package/hooks/dist/ez-context-monitor.js +148 -141
  327. package/hooks/dist/ez-statusline.js +115 -115
  328. package/package.json +78 -64
  329. package/scripts/fix-qwen-installation.js +144 -144
  330. package/agents/ez-integration-checker.md +0 -443
  331. package/agents/ez-nyquist-auditor.md +0 -176
  332. package/agents/ez-plan-checker.md +0 -706
  333. package/agents/ez-research-synthesizer.md +0 -247
  334. package/agents/ez-ui-auditor.md +0 -439
  335. package/agents/ez-ui-checker.md +0 -300
  336. package/agents/ez-ui-researcher.md +0 -353
  337. package/commands/ez/add-phase.md +0 -43
  338. package/commands/ez/add-todo.md +0 -47
  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/health.md +0 -22
  345. package/commands/ez/insert-phase.md +0 -32
  346. package/commands/ez/join-discord.md +0 -18
  347. package/commands/ez/list-phase-assumptions.md +0 -46
  348. package/commands/ez/pause-work.md +0 -38
  349. package/commands/ez/plan-milestone-gaps.md +0 -34
  350. package/commands/ez/reapply-patches.md +0 -124
  351. package/commands/ez/remove-phase.md +0 -31
  352. package/commands/ez/research-phase.md +0 -190
  353. package/commands/ez/set-profile.md +0 -34
  354. package/commands/ez/stats.md +0 -18
  355. package/commands/ez/ui-phase.md +0 -34
  356. package/commands/ez/ui-review.md +0 -32
  357. package/commands/ez/validate-phase.md +0 -35
  358. package/ez-agents/templates/UI-SPEC.md +0 -100
  359. package/ez-agents/templates/VALIDATION.md +0 -76
  360. package/ez-agents/templates/context.md +0 -352
  361. package/ez-agents/templates/verification-report.md +0 -322
  362. package/ez-agents/workflows/research-phase.md +0 -74
  363. package/ez-agents/workflows/ui-phase.md +0 -290
  364. package/ez-agents/workflows/ui-review.md +0 -157
  365. package/ez-agents/workflows/validate-phase.md +0 -167
@@ -1,6 +1,8 @@
1
1
  <purpose>
2
2
 
3
- Drive all remaining milestone phases autonomously. For each incomplete phase: discuss → plan → execute using Skill() flat invocations. Pauses only for explicit user decisions (grey area acceptance, blockers, validation requests). Re-reads ROADMAP.md after each phase to catch dynamically inserted phases.
3
+ Drive all remaining milestone phases autonomously. For each incomplete phase: discuss → plan → execute **ALL tasks in loop** using Skill() flat invocations. Pauses only for explicit user decisions (grey area acceptance, blockers, validation requests). Re-reads ROADMAP.md after each phase to catch dynamically inserted phases.
4
+
5
+ **Key:** Execute-phase loops through ALL task plans within a phase, not just the phase as a whole.
4
6
 
5
7
  </purpose>
6
8
 
@@ -86,12 +88,12 @@ Exit cleanly.
86
88
  ```
87
89
  ## Phase Plan
88
90
 
89
- | # | Phase | Status |
90
- |---|-------|--------|
91
- | 5 | Skill Scaffolding & Phase Discovery | In Progress |
92
- | 6 | Smart Discuss | Not Started |
93
- | 7 | Auto-Chain Refinements | Not Started |
94
- | 8 | Lifecycle Orchestration | Not Started |
91
+ | # | Phase | Status | Tasks |
92
+ |---|-------|--------|-------|
93
+ | 5 | Skill Scaffolding & Phase Discovery | In Progress | [count] |
94
+ | 6 | Smart Discuss | Not Started | [count] |
95
+ | 7 | Auto-Chain Refinements | Not Started | [count] |
96
+ | 8 | Lifecycle Orchestration | Not Started | [count] |
95
97
  ```
96
98
 
97
99
  **Fetch details for each phase:**
@@ -100,13 +102,13 @@ Exit cleanly.
100
102
  DETAIL=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase ${PHASE_NUM})
101
103
  ```
102
104
 
103
- Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in execute_phase and transition messages.
105
+ Extract `phase_name`, `goal`, `success_criteria`, `task_count` from each. Store for use in execute_phase and transition messages.
104
106
 
105
107
  </step>
106
108
 
107
109
  <step name="execute_phase">
108
110
 
109
- ## 3. Execute Phase
111
+ ## 3. Execute Phase (with Task Loop)
110
112
 
111
113
  For the current phase, display the progress banner:
112
114
 
@@ -114,9 +116,11 @@ For the current phase, display the progress banner:
114
116
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
115
117
  EZ ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%
116
118
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
+
120
+ Phase {N} has {task_count} tasks to execute
117
121
  ```
118
122
 
119
- Where N = current phase number (from the ROADMAP, e.g., 6), T = total milestone phases (from `phase_count` parsed in initialize step, e.g., 8), P = percentage of all milestone phases completed so far. Calculate P as: (number of phases with `disk_status` "complete" from the latest `roadmap analyze` / T × 100). Use █ for filled and ░ for empty segments in the progress bar (8 characters wide).
123
+ Where N = current phase number (from the ROADMAP, e.g., 6), T = total milestone phases (from `phase_count` parsed in initialize step, e.g., 8), P = percentage of all milestone phases completed so far.
120
124
 
121
125
  **3a. Smart Discuss**
122
126
 
@@ -154,15 +158,95 @@ Skill(skill="ez:plan-phase", args="${PHASE_NUM}")
154
158
 
155
159
  Verify plan produced output — re-run `init phase-op` and check `has_plans`. If false → go to handle_blocker: "Plan phase ${PHASE_NUM} did not produce any plans."
156
160
 
157
- **3c. Execute**
161
+ **Get task list for loop:**
162
+
163
+ ```bash
164
+ PLANS=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" phase-list-plans ${PHASE_NUM})
165
+ ```
166
+
167
+ Parse JSON for: `plans` array with `plan_number`, `plan_name`, `task_description`, `status` for each plan.
168
+
169
+ **Filter to incomplete plans:** Keep only plans where `status !== "complete"`.
170
+
171
+ **Store for task loop:** `plan_list` = array of incomplete plans.
172
+
173
+ **3c. Execute ALL Tasks in Loop**
174
+
175
+ Display task execution banner:
176
+
177
+ ```
178
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
+ EZ ► AUTONOMOUS ▸ Phase {N} Task Execution
180
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
181
+
182
+ {task_count} tasks to execute in Phase {N}
183
+ ```
184
+
185
+ **For each plan in `plan_list` (loop through ALL tasks):**
186
+
187
+ ```
188
+ FOR EACH plan IN plan_list:
189
+ ```
190
+
191
+ **3c-i. Display task progress:**
192
+
193
+ ```
194
+ Task {plan.plan_number}/{task_count}: {plan.plan_name}
195
+ [████░░░░] {completed_tasks}/{total_tasks} completed
196
+ ```
197
+
198
+ **3c-ii. Execute single task:**
158
199
 
159
200
  ```
160
- Skill(skill="ez:execute-phase", args="${PHASE_NUM} --no-transition")
201
+ Skill(skill="ez:execute-phase", args="${PHASE_NUM} --plan ${plan.plan_number} --no-transition")
161
202
  ```
162
203
 
163
- **3d. Post-Execution Routing**
204
+ **3c-iii. Verify task completion:**
164
205
 
165
- After execute-phase returns, read the verification result:
206
+ ```bash
207
+ TASK_STATUS=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" phase-get-task-status ${PHASE_NUM} ${plan.plan_number})
208
+ ```
209
+
210
+ Parse `status` from JSON (values: "complete", "in_progress", "blocked", "failed").
211
+
212
+ **If `complete`:**
213
+ - Display: `✅ Task ${plan.plan_number}: ${plan.plan_name} — Complete`
214
+ - Mark task as completed in local tracking
215
+ - Continue to next task in loop
216
+
217
+ **If `in_progress`:**
218
+ - Display: `⚠ Task ${plan.plan_number}: ${plan.plan_name} — Still in progress`
219
+ - Retry status check once (wait 30 seconds)
220
+ - If still `in_progress` → go to handle_blocker: "Task ${plan.plan_number} did not complete"
221
+
222
+ **If `blocked` or `failed`:**
223
+ - Read error/blocker details from task status
224
+ - Go to handle_blocker with: "Task ${plan.plan_number} (${plan.plan_name}) ${status}: {details}"
225
+
226
+ **3c-iv. After each task completes, update phase progress:**
227
+
228
+ ```bash
229
+ node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" phase-update-progress ${PHASE_NUM}
230
+ ```
231
+
232
+ **End loop** (continue to next plan in plan_list)
233
+
234
+ **After ALL tasks complete:**
235
+
236
+ Display phase completion banner:
237
+
238
+ ```
239
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
240
+ EZ ► AUTONOMOUS ▸ Phase {N} Complete ✅
241
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242
+
243
+ All {task_count} tasks completed successfully
244
+ Phase {N}: {phase_name} — DONE
245
+ ```
246
+
247
+ **3d. Post-Execution Verification**
248
+
249
+ After all tasks in the phase complete, read the verification result:
166
250
 
167
251
  ```bash
168
252
  VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
@@ -185,6 +269,7 @@ Go to handle_blocker: "Execute phase ${PHASE_NUM} did not produce verification r
185
269
  Display:
186
270
  ```
187
271
  Phase ${PHASE_NUM} ✅ ${PHASE_NAME} — Verification passed
272
+ All {task_count} tasks verified
188
273
  ```
189
274
 
190
275
  Proceed to iterate step.
@@ -194,7 +279,7 @@ Proceed to iterate step.
194
279
  Read the human_verification section from VERIFICATION.md to get the count and items requiring manual testing.
195
280
 
196
281
  Display the items, then ask user via AskUserQuestion:
197
- - **question:** "Phase ${PHASE_NUM} has items needing manual verification. Validate now or continue to next phase?"
282
+ - **question:** "Phase ${PHASE_NUM} has {N} items needing manual verification. Validate now or continue to next phase?"
198
283
  - **options:** "Validate now" / "Continue without validation"
199
284
 
200
285
  On **"Validate now"**: Present the specific items from VERIFICATION.md's human_verification section. After user reviews, ask:
@@ -213,6 +298,7 @@ Read gap summary from VERIFICATION.md (score and missing items). Display:
213
298
  ```
214
299
  ⚠ Phase ${PHASE_NUM}: ${PHASE_NAME} — Gaps Found
215
300
  Score: {N}/{M} must-haves verified
301
+ {gap_count} tasks have gaps
216
302
  ```
217
303
 
218
304
  Ask user via AskUserQuestion:
@@ -227,9 +313,15 @@ Skill(skill="ez:plan-phase", args="${PHASE_NUM} --gaps")
227
313
 
228
314
  Verify gap plans were created — re-run `init phase-op ${PHASE_NUM}` and check `has_plans`. If no new gap plans → go to handle_blocker: "Gap closure planning for phase ${PHASE_NUM} did not produce plans."
229
315
 
230
- Re-execute:
316
+ **Re-execute ALL gap tasks in loop:**
317
+
318
+ ```bash
319
+ GAP_PLANS=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" phase-list-plans ${PHASE_NUM} --gap-only)
320
+ ```
321
+
322
+ For each gap plan in GAP_PLANS:
231
323
  ```
232
- Skill(skill="ez:execute-phase", args="${PHASE_NUM} --no-transition")
324
+ Skill(skill="ez:execute-phase", args="${PHASE_NUM} --plan ${gap_plan.number} --no-transition")
233
325
  ```
234
326
 
235
327
  Re-read verification status:
@@ -357,7 +449,7 @@ Read the 3-5 most relevant files to understand existing patterns.
357
449
  DETAIL=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase ${PHASE_NUM})
358
450
  ```
359
451
 
360
- Extract `goal`, `requirements`, `success_criteria` from the JSON response.
452
+ Extract `goal`, `requirements`, `success_criteria`, `task_count` from the JSON response.
361
453
 
362
454
  **Infrastructure detection — check FIRST before generating grey areas:**
363
455
 
@@ -542,7 +634,7 @@ Decisions captured: {count} across {area_count} areas
542
634
 
543
635
  ## 4. Iterate
544
636
 
545
- After each phase completes, re-read ROADMAP.md to catch phases inserted mid-execution (decimal phases like 5.1):
637
+ After each phase completes (ALL tasks executed), re-read ROADMAP.md to catch phases inserted mid-execution (decimal phases like 5.1):
546
638
 
547
639
  ```bash
548
640
  ROADMAP=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap analyze)
@@ -563,7 +655,7 @@ Check for blockers in the Blockers/Concerns section. If blockers are found, go t
563
655
 
564
656
  If incomplete phases remain: proceed to next phase, loop back to execute_phase.
565
657
 
566
- If all phases complete, proceed to lifecycle step.
658
+ If all phases complete: proceed to lifecycle step.
567
659
 
568
660
  </step>
569
661
 
@@ -674,6 +766,7 @@ Display final completion banner:
674
766
  Milestone: {milestone_version} — {milestone_name}
675
767
  Status: Complete ✅
676
768
  Lifecycle: audit ✅ → complete ✅ → cleanup ✅
769
+ All Tasks: {total_tasks} executed across {phase_count} phases
677
770
 
678
771
  Ship it! 🚀
679
772
  ```
@@ -686,16 +779,16 @@ Display final completion banner:
686
779
 
687
780
  When any phase operation fails or a blocker is detected, present 3 options via AskUserQuestion:
688
781
 
689
- **Prompt:** "Phase {N} ({Name}) encountered an issue: {description}"
782
+ **Prompt:** "Phase {N} ({Name}), Task {task_num} encountered an issue: {description}"
690
783
 
691
784
  **Options:**
692
- 1. **"Fix and retry"** — Re-run the failed step (discuss, plan, or execute) for this phase
693
- 2. **"Skip this phase"** — Mark phase as skipped, continue to the next incomplete phase
785
+ 1. **"Fix and retry"** — Re-run the failed step (discuss, plan, or execute) for this task
786
+ 2. **"Skip this task"** — Mark task as skipped, continue to next task in same phase
694
787
  3. **"Stop autonomous mode"** — Display summary of progress so far and exit cleanly
695
788
 
696
789
  **On "Fix and retry":** Loop back to the failed step within execute_phase. If the same step fails again after retry, re-present these options.
697
790
 
698
- **On "Skip this phase":** Log `Phase {N} ⏭ {Name} — Skipped by user` and proceed to iterate.
791
+ **On "Skip this task":** Log `Phase {N}, Task {task_num} ⏭ {task_name} — Skipped by user` and continue to next task in the phase loop.
699
792
 
700
793
  **On "Stop autonomous mode":** Display progress summary:
701
794
 
@@ -704,11 +797,12 @@ When any phase operation fails or a blocker is detected, present 3 options via A
704
797
  EZ ► AUTONOMOUS ▸ STOPPED
705
798
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
706
799
 
707
- Completed: {list of completed phases}
708
- Skipped: {list of skipped phases}
709
- Remaining: {list of remaining phases}
800
+ Completed Phases: {list of completed phases}
801
+ In Progress: Phase {N}, Task {task_num}
802
+ Skipped Tasks: {list of skipped tasks}
803
+ Remaining Tasks: {count} tasks in {count} phases
710
804
 
711
- Resume with: /ez:autonomous --from {next_phase}
805
+ Resume with: /ez:autonomous --from {current_phase}
712
806
  ```
713
807
 
714
808
  </step>
@@ -719,16 +813,23 @@ When any phase operation fails or a blocker is detected, present 3 options via A
719
813
  - [ ] All incomplete phases executed in order (smart discuss → plan → execute each)
720
814
  - [ ] Smart discuss proposes grey area answers in tables, user accepts or overrides per area
721
815
  - [ ] Progress banners displayed between phases
722
- - [ ] Execute-phase invoked with --no-transition (autonomous manages transitions)
816
+ - [ ] Execute-phase loops through ALL task plans within each phase
817
+ - [ ] Each task plan executed individually with --plan {N} flag
818
+ - [ ] Task progress displayed during loop ([████░░░░] X/Y completed)
819
+ - [ ] Task completion verified after each execution
820
+ - [ ] Failed/blocked tasks route to handle_blocker
821
+ - [ ] After ALL tasks complete, phase verification runs
723
822
  - [ ] Post-execution verification reads VERIFICATION.md and routes on status
724
823
  - [ ] Passed verification → automatic continue to next phase
725
824
  - [ ] Human-needed verification → user prompted to validate or skip
726
825
  - [ ] Gaps-found → user offered gap closure, continue, or stop
826
+ - [ ] Gap closure re-executes ALL gap tasks in loop
727
827
  - [ ] Gap closure limited to 1 retry (prevents infinite loops)
728
828
  - [ ] Plan-phase and execute-phase failures route to handle_blocker
729
829
  - [ ] ROADMAP.md re-read after each phase (catches inserted phases)
730
830
  - [ ] STATE.md checked for blockers before each phase
731
831
  - [ ] Blockers handled via user choice (retry / skip / stop)
832
+ - [ ] Task-level blocker handling (skip task vs skip phase)
732
833
  - [ ] Final completion or stop summary displayed
733
834
  - [ ] After all phases complete, lifecycle step is invoked (not manual suggestion)
734
835
  - [ ] Lifecycle transition banner displayed before audit
@@ -737,7 +838,7 @@ When any phase operation fails or a blocker is detected, present 3 options via A
737
838
  - [ ] Audit technical failure (no file/no status) routes to handle_blocker
738
839
  - [ ] Complete-milestone invoked via Skill() with ${milestone_version} arg
739
840
  - [ ] Cleanup invoked via Skill() — internal confirmation is acceptable (CTRL-01)
740
- - [ ] Final completion banner displayed after lifecycle
841
+ - [ ] Final completion banner displays total task count
741
842
  - [ ] Progress bar uses phase number / total milestone phases (not position among incomplete)
742
843
  - [ ] Smart discuss documents relationship to discuss-phase with CTRL-03 note
743
844
  </success_criteria>
@@ -24,7 +24,7 @@ When a milestone completes:
24
24
  4. Delete REQUIREMENTS.md (fresh one for next milestone)
25
25
  5. Perform full PROJECT.md evolution review
26
26
  6. Offer to create next milestone inline
27
- 7. Archive UI artifacts (`*-UI-SPEC.md`, `*-UI-REVIEW.md`) alongside other phase documents
27
+ 7. Archive UI artifacts (SUMMARY.md, UAT.md) alongside other phase documents
28
28
  8. Clean up `.planning/ui-reviews/` screenshot files (binary assets, never archived)
29
29
 
30
30
  **Context Efficiency:** Archives keep ROADMAP.md constant-size and REQUIREMENTS.md milestone-scoped.
@@ -638,7 +638,7 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
638
638
 
639
639
  **Also available:**
640
640
  - `/ez:plan-phase ${PHASE} --skip-research` — plan without research
641
- - `/ez:ui-phase ${PHASE}` generate UI design contract before planning (if phase has frontend work)
641
+ - Not a frontend phase Continue without UI spec
642
642
  - Review/edit CONTEXT.md before continuing
643
643
 
644
644
  ---
@@ -12,6 +12,34 @@ Read STATE.md before any operation to load project context.
12
12
 
13
13
  <process>
14
14
 
15
+ <auto_invoke>
16
+ Run BEFORE the initialize step. Check flags from ARGUMENTS:
17
+
18
+ **Flag handling:**
19
+ - If ARGUMENTS contains `--no-auto`: skip all auto_invoke blocks, proceed directly to initialize.
20
+ - If ARGUMENTS contains `--verbose`: display detail for every auto_invoke step.
21
+
22
+ **Pre-flight health check (always, unless --no-auto):**
23
+ ```bash
24
+ SMART_ORCH=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" config-get smart_orchestration.enabled 2>/dev/null || echo "true")
25
+ ```
26
+ If `SMART_ORCH` is `"false"`: skip all auto_invoke, proceed to initialize.
27
+
28
+ ```bash
29
+ HEALTH=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" health --json 2>/dev/null)
30
+ ```
31
+ - If output shows status FAIL: display error, STOP execution.
32
+ - If PASS: display `[auto] ✅ health check passed` only when `--verbose` flag is present; otherwise silent.
33
+
34
+ **Conditional discuss-phase:**
35
+ Read tier from `.planning/config.json` (`release.tier`). If tier is `medium` or `enterprise` AND no CONTEXT.md exists in the phase directory AND `--skip-discussion` is not in ARGUMENTS:
36
+ → Display: `[auto] Running pre-flight discussion...`
37
+ → Invoke: Skill(ez:discuss-phase, args: phase_number + " --auto")
38
+ → Continue to initialize.
39
+
40
+ If conditions are not met: skip silently.
41
+ </auto_invoke>
42
+
15
43
  <step name="initialize" priority="first">
16
44
  Load all context in one call:
17
45
 
@@ -103,7 +131,29 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
103
131
  - Bad: "Executing terrain generation plan"
104
132
  - Good: "Procedural terrain generator using Perlin noise — creates height maps, biome zones, and collision meshes. Required before vehicle physics can interact with ground."
105
133
 
106
- 2. **Spawn executor agents:**
134
+ 2. **Batch execution (resource-aware):**
135
+
136
+ Read `maxParallel` from config (default: 5). If wave has {N} plans:
137
+ - Batch size = maxParallel
138
+ - Number of batches = Math.ceil(N / maxParallel)
139
+ - Execute each batch sequentially, wait for all agents in batch to complete before next batch
140
+
141
+ ```bash
142
+ # Read maxParallel from config
143
+ MAX_PARALLEL=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" config-get workflow.maxParallel 2>/dev/null || echo "5")
144
+
145
+ # Calculate batches
146
+ WAVE_PLAN_COUNT={N}
147
+ BATCH_COUNT=$(( (WAVE_PLAN_COUNT + MAX_PARALLEL - 1) / MAX_PARALLEL ))
148
+ ```
149
+
150
+ **Loop through batches:**
151
+ - Batch 1: Spawn min(remaining, maxParallel) agents
152
+ - Wait for all agents in batch to complete
153
+ - Check for failures before proceeding to next batch
154
+ - Repeat until all batches complete
155
+
156
+ 3. **Spawn executor agents:**
107
157
 
108
158
  Pass paths only — executors read files themselves with their fresh 200k context.
109
159
  This keeps orchestrator context lean (~10-15%).
@@ -234,20 +284,27 @@ After all waves:
234
284
  ```markdown
235
285
  ## Phase {X}: {Name} Execution Complete
236
286
 
237
- **Waves:** {N} | **Plans:** {M}/{total} complete
287
+ **Waves:** {N} | **Plans:** {M}/{total} complete | **Blocked:** {B}
238
288
 
239
289
  | Wave | Plans | Status |
240
290
  |------|-------|--------|
241
291
  | 1 | plan-01, plan-02 | ✓ Complete |
242
292
  | CP | plan-03 | ✓ Verified |
243
293
  | 2 | plan-04 | ✓ Complete |
294
+ | 3 | plan-05 | ⚠ Blocked (depends on failed plan-02) |
244
295
 
245
296
  ### Plan Details
246
297
  1. **03-01**: [one-liner from SUMMARY.md]
247
298
  2. **03-02**: [one-liner from SUMMARY.md]
248
299
 
300
+ ### Blocked Plans
301
+ - **{plan-id}**: Blocked — depends on {failed-plan-id} (Wave {N})
302
+
249
303
  ### Issues Encountered
250
304
  [Aggregate from SUMMARYs, or "None"]
305
+
306
+ ### Failed Plans
307
+ [List failed plans with error summary, or "None"]
251
308
  ```
252
309
  </step>
253
310
 
@@ -304,6 +361,76 @@ node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" commit "docs(phase-${PARENT_PHAS
304
361
  <step name="verify_phase_goal">
305
362
  Verify phase achieved its GOAL, not just completed tasks.
306
363
 
364
+ ## Design Review Gate (Frontend Phases Only)
365
+
366
+ **If phase has frontend/UI work:** Spawn ez-design-expert BEFORE verifier.
367
+
368
+ ```bash
369
+ # Check if phase has frontend indicators
370
+ PHASE_SECTION=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase "${PHASE_NUMBER}" 2>/dev/null)
371
+ echo "$PHASE_SECTION" | grep -iE "UI|interface|frontend|component|layout|page|screen|view|form|dashboard|widget" > /dev/null 2>&1
372
+ HAS_UI=$?
373
+ ```
374
+
375
+ **If `HAS_UI` is 0 (frontend found):**
376
+
377
+ ```
378
+ Task(
379
+ prompt="Review UI design quality for phase {phase_number}.
380
+ Phase directory: {phase_dir}
381
+ Check: design token consistency, AI slop patterns, visual hierarchy.
382
+ Report: PASS/PASS_WITH_WARNINGS/FAIL with specific fixes.
383
+ Output: DESIGN-REVIEW.md",
384
+ subagent_type="ez-design-expert",
385
+ model="{planner_model}"
386
+ )
387
+ ```
388
+
389
+ **Read verdict:**
390
+ ```bash
391
+ grep "^**Status:**" "$PHASE_DIR"/DESIGN-REVIEW.md | cut -d: -f2 | tr -d ' '
392
+ ```
393
+
394
+ | Verdict | Action |
395
+ |---------|--------|
396
+ | `PASS` | → Continue to verifier |
397
+ | `PASS_WITH_WARNINGS` | → Show warnings, continue to verifier |
398
+ | `FAIL` | → Show critical issues, offer `/ez:plan-phase {N} --design-fixes` |
399
+
400
+ **If FAIL:**
401
+ ```
402
+ ## ❌ Design Review Failed — Phase {X}: {Name}
403
+
404
+ **AI Slop Detected:** {specific patterns found}
405
+
406
+ ### Critical Issues
407
+ {List from DESIGN-REVIEW.md}
408
+
409
+ ---
410
+ ## ▶ Next Up
411
+
412
+ `/ez:plan-phase {X} --design-fixes`
413
+
414
+ <sub>`/clear` first → fresh context window</sub>
415
+
416
+ Also: `cat {phase_dir}/DESIGN-REVIEW.md` — full report
417
+ ```
418
+
419
+ **If PASS or PASS_WITH_WARNINGS:**
420
+ ```
421
+ ## ✅ Design Review Complete
422
+
423
+ **Status:** {PASS | PASS_WITH_WARNINGS}
424
+
425
+ {Warnings list if any}
426
+
427
+ Continuing to verification...
428
+ ```
429
+
430
+ ---
431
+
432
+ ## Standard Verification
433
+
307
434
  ```
308
435
  Task(
309
436
  prompt="Verify phase {phase_number} goal achievement.
@@ -447,6 +574,23 @@ Read and follow `~/.claude/ez-agents/workflows/transition.md`, passing through t
447
574
  ```
448
575
  </step>
449
576
 
577
+ <auto_invoke_post>
578
+ Run AFTER all waves complete. Skip if --no-auto is in ARGUMENTS or `smart_orchestration.enabled` is false.
579
+
580
+ **Post-execution verify-work:**
581
+ Display: `[auto] Running verification...`
582
+ Invoke: Skill(ez:verify-work, args: phase_number)
583
+ - If PASS: display `[auto] ✅ Verification passed`
584
+ - If FAIL: display `⚠️ Verification warnings (non-blocking)` — show details, do NOT block
585
+
586
+ **Scope creep detection:**
587
+ Check if there is scope creep from DISCUSSION.md (if it exists):
588
+ ```bash
589
+ grep -i "scope creep\|out of scope\|BLOCKER" .planning/phases/${PHASE_DIR}/DISCUSSION.md 2>/dev/null
590
+ ```
591
+ If any match found: display `[auto] Scope creep detected — creating todos...` → Invoke: Skill(ez:add-todo)
592
+ </auto_invoke_post>
593
+
450
594
  </process>
451
595
 
452
596
  <context_efficiency>
@@ -454,9 +598,31 @@ Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (Task bloc
454
598
  </context_efficiency>
455
599
 
456
600
  <failure_handling>
601
+ **Failure classification:**
602
+
603
+ - **Transient failures** (API timeout, rate limit 429, network error):
604
+ - Auto-retry up to 2 times with exponential backoff (1s, 2s, 4s delays)
605
+ - If retry succeeds: continue execution
606
+ - If retry fails after 2 attempts: classify as permanent
607
+
608
+ - **Permanent failures** (logic error, missing file, validation failure):
609
+ - Stop immediately, do not retry
610
+ - Report to user with error details
611
+ - Mark plan as failed
612
+
613
+ **Dependency-aware failure handling:**
614
+
615
+ 1. After each wave completes, collect failed plan IDs
616
+ 2. Before starting next wave, check each plan's `depends_on`:
617
+ - If depends_on includes any failed plan: mark as **blocked** (skip execution)
618
+ - If depends_on is clear: execute normally
619
+ 3. Track blocked plans in summary output
620
+
621
+ **Specific scenarios:**
622
+
457
623
  - **classifyHandoffIfNeeded false failure:** Agent reports "failed" but error is `classifyHandoffIfNeeded is not defined` → Claude Code bug, not EZ. Spot-check (SUMMARY exists, commits present) → if pass, treat as success
458
624
  - **Agent fails mid-plan:** Missing SUMMARY.md → report, ask user how to proceed
459
- - **Dependency chain breaks:** Wave 1 fails → Wave 2 dependents likely fail → user chooses attempt or skip
625
+ - **Dependency chain breaks:** Wave 1 fails → Wave 2 dependents are **blocked**report blocked plans, user chooses attempt remaining or skip
460
626
  - **All agents in wave fail:** Systemic issue → stop, report for investigation
461
627
  - **Checkpoint unresolvable:** "Skip this plan?" or "Abort phase execution?" → record partial progress in STATE.md
462
628
  </failure_handling>