wizz-method 2.1.1 → 2.3.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 (212) hide show
  1. package/README.md +62 -62
  2. package/SECURITY.md +15 -16
  3. package/THIRD-PARTY-NOTICES.md +49 -49
  4. package/package.json +1 -1
  5. package/src/bmm-skills/1-analysis/wizz-agent-analyst/customize.toml +1 -1
  6. package/src/bmm-skills/2-plan-workflows/wizz-agent-pm/customize.toml +1 -1
  7. package/src/bmm-skills/2-plan-workflows/wizz-agent-ux-designer/customize.toml +1 -1
  8. package/src/bmm-skills/3-solutioning/wizz-agent-architect/customize.toml +1 -1
  9. package/src/bmm-skills/4-implementation/wizz-agent-dev/customize.toml +1 -1
  10. package/src/bmm-skills/4-implementation/wizz-code-review/SKILL.md +2 -2
  11. package/src/bmm-skills/4-implementation/wizz-code-review/customize.toml +102 -8
  12. package/src/bmm-skills/4-implementation/wizz-code-review/references/review-economy.md +75 -0
  13. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-01-gather-context.md +29 -15
  14. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-02-review.md +13 -10
  15. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-03-triage.md +11 -5
  16. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-04-present.md +4 -0
  17. package/src/bmm-skills/4-implementation/wizz-quick-dev/customize.toml +103 -7
  18. package/src/bmm-skills/4-implementation/wizz-quick-dev/references/review-economy.md +75 -0
  19. package/src/bmm-skills/4-implementation/wizz-quick-dev/step-04-review.md +43 -18
  20. package/src/bmm-skills/4-implementation/wizz-quick-dev/step-05-present.md +4 -0
  21. package/src/bmm-skills/4-implementation/wizz-quick-dev/step-oneshot.md +2 -2
  22. package/src/core-skills/_shared/handoff-protocol.md +72 -71
  23. package/src/core-skills/wizz-review-adversarial-general/SKILL.md +1 -1
  24. package/src/modules/lowticket/skills/wizz-lowticket-funil/references/copy-das-paginas.md +39 -39
  25. package/src/modules/lowticket/skills/wizz-lowticket-funil/references/mapa-do-funil.md +23 -23
  26. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/CATALOGO.md +72 -72
  27. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/01-principios.md +10 -10
  28. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/02-diagnostico-funil.md +50 -50
  29. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/03-campanha-bidcap.md +68 -68
  30. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04-criativos.md +44 -44
  31. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04a-criativos-ia.md +77 -77
  32. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/04b-criativos-formatos.md +121 -121
  33. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/05-oferta.md +35 -35
  34. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06-pagina-vendas.md +122 -122
  35. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06a-instagram.md +93 -93
  36. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/06b-player-vsl.md +57 -57
  37. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07-funil-upsell.md +83 -83
  38. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/07a-copy-humanizacao.md +61 -61
  39. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/08-pesquisa-publico.md +11 -11
  40. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/09-especialista-coproducao.md +26 -26
  41. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/10-levantar-caixa.md +29 -29
  42. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/11-checklist-roi.md +22 -22
  43. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12-mineracao-ofertas.md +80 -80
  44. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12a-mineracao-veredito.md +72 -72
  45. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12b-fabrica-de-ofertas.md +63 -63
  46. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/12c-anatomia-low-ticket.md +71 -71
  47. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/13-benchmarks-vsl.md +6 -6
  48. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/14-vocabulario.md +53 -51
  49. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/15-como-estender.md +26 -26
  50. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/17-rastreamento.md +76 -76
  51. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/18-copy-desejo-oferta.md +149 -149
  52. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/INDEX.md +45 -45
  53. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/guardrails.md +45 -45
  54. package/src/modules/lowticket/skills/wizz-lowticket-metodologia/knowledge/pontos-em-aberto.md +64 -66
  55. package/src/modules/lowticket/skills/wizz-lowticket-minerador/references/rubrica.md +63 -63
  56. package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/metas-e-medicao.md +23 -23
  57. package/src/modules/lowticket/skills/wizz-lowticket-pagina/references/padroes-de-codigo.md +50 -50
  58. package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/formato-do-diagnostico.md +9 -9
  59. package/src/modules/lowticket/skills/wizz-lowticket-trafego/references/reguas.md +42 -42
  60. package/src/modules/wizz/README.md +27 -27
  61. package/src/modules/wizz/_shared/cerebro.md +37 -37
  62. package/src/modules/wizz/_shared/communication-rules.md +15 -15
  63. package/src/modules/wizz/_shared/despacho-barato.md +6 -6
  64. package/src/modules/wizz/_shared/encerramento.md +23 -23
  65. package/src/modules/wizz/_shared/model-ladder.md +29 -28
  66. package/src/modules/wizz/_shared/planning-gate.md +30 -30
  67. package/src/modules/wizz/_shared/token-economy.md +28 -28
  68. package/src/modules/wizz/_shared/video-pipeline.md +42 -42
  69. package/src/modules/wizz/agents/wizz-ads/SKILL.md +16 -16
  70. package/src/modules/wizz/agents/wizz-ads/customize.toml +21 -21
  71. package/src/modules/wizz/agents/wizz-copy/SKILL.md +18 -18
  72. package/src/modules/wizz/agents/wizz-copy/customize.toml +24 -24
  73. package/src/modules/wizz/agents/wizz-designer/SKILL.md +24 -24
  74. package/src/modules/wizz/agents/wizz-designer/customize.toml +29 -29
  75. package/src/modules/wizz/agents/wizz-growth/SKILL.md +20 -20
  76. package/src/modules/wizz/agents/wizz-growth/customize.toml +34 -34
  77. package/src/modules/wizz/agents/wizz-maestro/SKILL.md +63 -63
  78. package/src/modules/wizz/agents/wizz-maestro/customize.toml +38 -38
  79. package/src/modules/wizz/agents/wizz-memoria/SKILL.md +19 -19
  80. package/src/modules/wizz/agents/wizz-memoria/customize.toml +24 -24
  81. package/src/modules/wizz/agents/wizz-qa/SKILL.md +22 -22
  82. package/src/modules/wizz/agents/wizz-qa/customize.toml +29 -29
  83. package/src/modules/wizz/agents/wizz-seo/SKILL.md +19 -19
  84. package/src/modules/wizz/agents/wizz-seo/customize.toml +27 -27
  85. package/src/modules/wizz/agents/wizz-social/SKILL.md +53 -53
  86. package/src/modules/wizz/agents/wizz-social/customize.toml +37 -37
  87. package/src/modules/wizz/agents/wizz-social/knowledge/analise-imagem-referencia.md +20 -20
  88. package/src/modules/wizz/agents/wizz-social/knowledge/biblioteca-prompts-imagem.md +71 -71
  89. package/src/modules/wizz/agents/wizz-social/knowledge/blueprint-roteiro-viral.md +196 -196
  90. package/src/modules/wizz/agents/wizz-social/knowledge/legenda-instagram.md +32 -32
  91. package/src/modules/wizz/agents/wizz-social/knowledge/prompts-imagem-video.md +48 -48
  92. package/src/modules/wizz/module.yaml +28 -28
  93. package/src/modules/wizz/overrides/wizz-agent-analyst.toml +17 -17
  94. package/src/modules/wizz/overrides/wizz-agent-architect.toml +21 -21
  95. package/src/modules/wizz/overrides/wizz-agent-dev.toml +20 -20
  96. package/src/modules/wizz/overrides/wizz-agent-pm.toml +11 -11
  97. package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +14 -14
  98. package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +14 -14
  99. package/src/modules/wizz/subagents/codex/wizz-exec-haiku.toml +17 -17
  100. package/src/modules/wizz/subagents/codex/wizz-exec-opus.toml +19 -19
  101. package/src/modules/wizz/subagents/codex/wizz-exec-review.toml +18 -17
  102. package/src/modules/wizz/subagents/codex/wizz-exec-sonnet.toml +18 -18
  103. package/src/modules/wizz/subagents/gemini/wizz-exec-haiku.md +17 -17
  104. package/src/modules/wizz/subagents/gemini/wizz-exec-opus.md +19 -19
  105. package/src/modules/wizz/subagents/gemini/wizz-exec-review.md +18 -17
  106. package/src/modules/wizz/subagents/gemini/wizz-exec-sonnet.md +18 -18
  107. package/src/modules/wizz/subagents/opencode/wizz-exec-haiku.md +17 -17
  108. package/src/modules/wizz/subagents/opencode/wizz-exec-opus.md +19 -19
  109. package/src/modules/wizz/subagents/opencode/wizz-exec-review.md +18 -17
  110. package/src/modules/wizz/subagents/opencode/wizz-exec-sonnet.md +18 -18
  111. package/src/modules/wizz/subagents/spec.yaml +84 -82
  112. package/src/modules/wizz/subagents/wizz-exec-haiku.md +17 -17
  113. package/src/modules/wizz/subagents/wizz-exec-opus.md +19 -19
  114. package/src/modules/wizz/subagents/wizz-exec-review.md +18 -17
  115. package/src/modules/wizz/subagents/wizz-exec-sonnet.md +18 -18
  116. package/src/skills-lib/cerebro/SKILL.md +61 -61
  117. package/src/skills-lib/cerebro/references/comandos-pesquisa-e-memoria.md +46 -46
  118. package/src/skills-lib/cerebro/references/comandos-rotina-e-captura.md +65 -65
  119. package/src/skills-lib/cerebro/references/comandos-sessao.md +74 -74
  120. package/src/skills-lib/ctc-align/SKILL.md +37 -37
  121. package/src/skills-lib/find-skills/SKILL.md +19 -19
  122. package/src/skills-lib/pesquisa-de-publico-do-piva/README.md +33 -33
  123. package/src/skills-lib/pesquisa-de-publico-do-piva/SKILL.md +42 -42
  124. package/src/skills-lib/pesquisa-de-publico-do-piva/prompts.md +20 -20
  125. package/src/skills-lib/references/premium-agency-rules.md +63 -63
  126. package/src/skills-lib/security-audit-pentest/SKILL.md +31 -31
  127. package/src/skills-lib/security-audit-pentest/references/stage-1-validacao-entrada.md +37 -37
  128. package/src/skills-lib/security-audit-pentest/references/stage-2-autorizacao.md +61 -61
  129. package/src/skills-lib/security-audit-pentest/references/stage-3-abuso-volume.md +37 -37
  130. package/src/skills-lib/security-audit-pentest/references/stage-4-vazamento-resposta.md +52 -52
  131. package/src/skills-lib/site-launch-kit/SKILL.md +42 -42
  132. package/src/skills-lib/site-launch-kit/references/01-cta-principal.md +20 -20
  133. package/src/skills-lib/site-launch-kit/references/02-barra-fixa-mobile.md +24 -24
  134. package/src/skills-lib/site-launch-kit/references/03-tempo-de-resposta.md +21 -21
  135. package/src/skills-lib/site-launch-kit/references/04-prova-social.md +22 -22
  136. package/src/skills-lib/site-launch-kit/references/05-faq-decisao.md +28 -28
  137. package/src/skills-lib/site-launch-kit/references/06-imagens-reais.md +27 -27
  138. package/src/skills-lib/site-launch-kit/references/07-endereco-como-chegar.md +25 -25
  139. package/src/skills-lib/site-launch-kit/references/08-titles.md +30 -30
  140. package/src/skills-lib/site-launch-kit/references/09-open-graph.md +23 -23
  141. package/src/skills-lib/site-launch-kit/references/10-breadcrumbs.md +23 -23
  142. package/src/skills-lib/site-launch-kit/references/11-alt-text.md +28 -28
  143. package/src/skills-lib/site-launch-kit/references/12-schema-local.md +22 -22
  144. package/src/skills-lib/site-launch-kit/references/13-robots-sitemap.md +26 -26
  145. package/src/skills-lib/site-launch-kit/references/14-privacidade-termos.md +27 -27
  146. package/src/skills-lib/site-launch-kit/references/15-medicao.md +23 -23
  147. package/src/skills-lib/wizz-ai-product-design/SKILL.md +70 -70
  148. package/src/skills-lib/wizz-auth-and-secrets/SKILL.md +78 -78
  149. package/src/skills-lib/wizz-caching-and-queues/SKILL.md +40 -40
  150. package/src/skills-lib/wizz-cloud-and-infra/SKILL.md +22 -22
  151. package/src/skills-lib/wizz-database-and-deps/SKILL.md +52 -52
  152. package/src/skills-lib/wizz-database-scaling/SKILL.md +31 -31
  153. package/src/skills-lib/wizz-desktop-security/SKILL.md +49 -49
  154. package/src/skills-lib/wizz-implementation-planner/SKILL.md +56 -56
  155. package/src/skills-lib/wizz-implementation-planner/references/folder-structure-and-dependencies.md +14 -14
  156. package/src/skills-lib/wizz-implementation-planner/references/implementation-phases.md +15 -15
  157. package/src/skills-lib/wizz-implementation-planner/references/implementation-types.md +9 -9
  158. package/src/skills-lib/wizz-implementation-planner/references/motion-path-implementation.md +19 -19
  159. package/src/skills-lib/wizz-implementation-planner/references/performance-plan.md +27 -27
  160. package/src/skills-lib/wizz-infrastructure/SKILL.md +21 -21
  161. package/src/skills-lib/wizz-inicio-de-projeto/SKILL.md +63 -63
  162. package/src/skills-lib/wizz-inicio-de-projeto/references/implementacao-api-forms.md +27 -27
  163. package/src/skills-lib/wizz-inicio-de-projeto/references/padroes-arquiteturais-e-pastas.md +31 -31
  164. package/src/skills-lib/wizz-inicio-de-projeto/references/seguranca-e-regras-codigo.md +21 -21
  165. package/src/skills-lib/wizz-launch-readiness/SKILL.md +61 -61
  166. package/src/skills-lib/wizz-launch-readiness/references/01-tecnico-build.md +16 -16
  167. package/src/skills-lib/wizz-launch-readiness/references/02-seguranca.md +16 -16
  168. package/src/skills-lib/wizz-launch-readiness/references/03-seo-descoberta.md +16 -16
  169. package/src/skills-lib/wizz-launch-readiness/references/04-analytics-medicao.md +15 -15
  170. package/src/skills-lib/wizz-launch-readiness/references/05-conteudo-prova-social.md +15 -15
  171. package/src/skills-lib/wizz-launch-readiness/references/06-legal-lgpd.md +15 -15
  172. package/src/skills-lib/wizz-launch-readiness/references/07-infra-deploy-rollback.md +16 -16
  173. package/src/skills-lib/wizz-launch-readiness/references/08-fusao-priorizacao.md +19 -19
  174. package/src/skills-lib/wizz-launch-readiness/references/09-persistencia-project-context.md +26 -26
  175. package/src/skills-lib/wizz-motion-3d-director/SKILL.md +70 -70
  176. package/src/skills-lib/wizz-motion-3d-director/references/image-to-video-workflow.md +34 -35
  177. package/src/skills-lib/wizz-motion-3d-director/references/motion-paths.md +70 -70
  178. package/src/skills-lib/wizz-motion-3d-director/references/performance-and-handoff.md +17 -17
  179. package/src/skills-lib/wizz-offer-forge/README.md +9 -9
  180. package/src/skills-lib/wizz-offer-forge/SKILL.md +64 -64
  181. package/src/skills-lib/wizz-offer-forge/references/empilhamento-valor.md +17 -17
  182. package/src/skills-lib/wizz-offer-forge/references/garantia-reversa.md +16 -16
  183. package/src/skills-lib/wizz-offer-forge/references/mecanismo-unico.md +19 -19
  184. package/src/skills-lib/wizz-offer-forge/references/ponte-trafego.md +17 -17
  185. package/src/skills-lib/wizz-premium-landing-ui-researcher/SKILL.md +36 -36
  186. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/audit-protocol.md +81 -82
  187. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/component-sources.md +105 -105
  188. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/core-goal.md +39 -39
  189. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/dashboard-and-portfolio-modes.md +49 -50
  190. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/handoffs.md +33 -34
  191. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/landing-page-strategy.md +141 -142
  192. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/mandatory-process.md +24 -24
  193. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/output-format-and-quality.md +73 -73
  194. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/prompt-templates.md +4 -4
  195. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/site-levels.md +282 -283
  196. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-first-protocol.md +39 -39
  197. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/source-links.md +8 -8
  198. package/src/skills-lib/wizz-premium-landing-ui-researcher/references/stack-and-visual-direction.md +63 -64
  199. package/src/skills-lib/wizz-router/SKILL.md +38 -38
  200. package/src/skills-lib/wizz-router/references/auditoria-360.md +12 -12
  201. package/src/skills-lib/wizz-router/references/routing-table-flat.md +80 -80
  202. package/src/skills-lib/wizz-tracking-audit/SKILL.md +48 -48
  203. package/src/skills-lib/wizz-tracking-audit/references/modo-diagnostico.md +43 -43
  204. package/src/skills-lib/wizz-tracking-audit/references/modo-implantacao.md +59 -59
  205. package/src/skills-lib/wizz-tracking-audit/references/utm-e-atribuicao.md +35 -35
  206. package/src/skills-lib/wizz-web-security/SKILL.md +35 -35
  207. package/src/skills-lib/wizz-web-security/references/checklist-deploy.md +50 -50
  208. package/src/skills-lib/wizz-web-security/references/headers-rate-limit-cors.md +33 -33
  209. package/src/skills-lib/wizz-web-security/references/owasp-top5-detalhado.md +36 -36
  210. package/tools/hooks/session-rules.js +14 -11
  211. package/tools/installer/core/resolved-customizations.js +58 -10
  212. package/tools/installer/core/resolved-schema.js +116 -18
@@ -40,22 +40,104 @@ persistent_facts = [
40
40
 
41
41
  on_complete = ""
42
42
 
43
+ # Git pathspec globs to exclude from the diff. See references/review-economy.md
44
+ # § 1. This is a plain array, so a team/user override entry is APPENDED to the
45
+ # defaults below (per the merge rules above) — the defaults can never be
46
+ # removed by an override, only added to.
47
+
48
+ review_exclude = [
49
+ "**/package-lock.json",
50
+ "**/npm-shrinkwrap.json",
51
+ "**/yarn.lock",
52
+ "**/pnpm-lock.yaml",
53
+ "**/bun.lock",
54
+ "**/bun.lockb",
55
+ "**/Cargo.lock",
56
+ "**/poetry.lock",
57
+ "**/Pipfile.lock",
58
+ "**/Gemfile.lock",
59
+ "**/composer.lock",
60
+ "**/go.sum",
61
+ "**/uv.lock",
62
+ "**/__snapshots__/**",
63
+ "**/*.snap",
64
+ "**/*.min.js",
65
+ "**/*.min.css",
66
+ "**/*.js.map",
67
+ "**/*.css.map",
68
+ ]
69
+
70
+ # Plain-language sensitive areas the session judges the diff against to
71
+ # decide the `critical` tier — not patterns, guidance for the session's own
72
+ # reading of the changed files. See references/review-economy.md § 2.
73
+
74
+ review_critical_paths = [
75
+ "authentication",
76
+ "sessions",
77
+ "passwords and credentials",
78
+ "authorization",
79
+ "permissions and RLS",
80
+ "payments, billing and checkout",
81
+ "database migrations, schema and SQL",
82
+ "secrets, keys and .env files",
83
+ "cryptography",
84
+ "CI and deploy workflows",
85
+ ]
86
+
43
87
  # Review layers for the review step. `instruction` is the layer's whole
44
88
  # execution recipe — subagents by default, but an override may run anything
45
- # (e.g. an external reviewer via bash). {diff_file} and {spec_file} are
46
- # substituted at run time; both are paths, and {diff_file} is the unified
47
- # diff file the layer reads. `when` (optional) gates a layer; empty
48
- # `instruction` disables it.
89
+ # (e.g. an external reviewer via bash). Layers read `{clean_diff_file}`, the
90
+ # deterministically cleaned diff. The step substitutes `{clean_diff_file}`,
91
+ # `{diff_file}`, `{claims_file}`, `{spec_file}` and `{max_calls}` at run
92
+ # time. `{review_mode}` is never substituted into instruction text — it only
93
+ # gates a layer's `when` condition (see the Acceptance Auditor layer below).
94
+ # Optional `tiers` (a list of `small`/`normal`/`critical`) gates a layer by
95
+ # diff size — absent means every tier. `max_calls` caps the layer's tool
96
+ # calls; at the cap the layer stops and its final message ends with a
97
+ # `PARTIAL:` line. See `references/review-economy.md`. `when` (optional)
98
+ # gates a layer; empty `instruction` disables it.
99
+ #
100
+ # This is an array of tables keyed by `id`: an override entry with the same
101
+ # `id` as one below REPLACES that whole layer, it does not merge field by
102
+ # field. An override that only means to change one field (e.g. `max_calls`)
103
+ # must still restate `tiers` and `max_calls` in full, or the layer loses
104
+ # whichever of those two it did not restate.
105
+
106
+ [[workflow.review_layers]]
107
+ id = "blind-verification"
108
+ name = "Blind Hunter + Verification Gap"
109
+ tiers = ["small", "normal"]
110
+ max_calls = 35
111
+ instruction = """
112
+ Launch a context-free `wizz-exec-review` subagent with this prompt — pinned to the platform's Forte tier (`opus` in Claude Code), never inheriting the session model. Tell the user the tier and count of this dispatch.
113
+
114
+ You run two review passes in order, and each pass follows its own instruction file.
115
+
116
+ Pass 1, Blind Hunter: read `{skill-root}/review-prompts/blind-hunter.md` completely and follow it against the review content alone. Do not open any other file during this pass. In this combined layer the minimum-issue count in blind-hunter.md does not apply: report only real issues. Write its findings under a `## Blind Hunter` heading.
117
+
118
+ Pass 2, Verification Gap: only after pass 1 is written, read `{skill-root}/review-prompts/verification-gap.md` completely and follow it. Write its output under a `## Verification Gap` heading.
119
+
120
+ Review content: the unified diff at `{clean_diff_file}`. Read that file — it is the content under review.
121
+
122
+ max_calls: {max_calls}. At the cap, stop and return what you have, ending with a final line `PARTIAL: <what you did not cover>`.
123
+
124
+ Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If `blind-hunter.md` is unreadable, report that exact failure and stop. If `verification-gap.md` is unreadable, keep the Blind Hunter output you already wrote and end with a final line `PARTIAL: verification-gap pass not run` instead of stopping empty. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
125
+
126
+ """
49
127
 
50
128
  [[workflow.review_layers]]
51
129
  id = "blind-hunter"
52
130
  name = "Blind Hunter"
131
+ tiers = ["critical"]
132
+ max_calls = 20
53
133
  instruction = """
54
134
  Launch a context-free `wizz-exec-review` subagent with this prompt — pinned to the platform's Forte tier (`opus` in Claude Code), never inheriting the session model. Tell the user the tier and count of this dispatch.
55
135
 
56
136
  Read `{skill-root}/review-prompts/blind-hunter.md` completely and follow it as your review instructions.
57
137
 
58
- Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
138
+ Review content: the unified diff at `{clean_diff_file}`. Read that file — it is the content under review.
139
+
140
+ max_calls: {max_calls}. At the cap, stop and return what you have, ending with a final line `PARTIAL: <what you did not cover>`.
59
141
 
60
142
  Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If the instruction file is unreadable, report that exact failure and stop. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
61
143
 
@@ -64,6 +146,8 @@ Do not invoke any skill, and do not spawn subagents of your own — you are the
64
146
  [[workflow.review_layers]]
65
147
  id = "edge-case-hunter"
66
148
  name = "Edge Case Hunter"
149
+ tiers = ["normal", "critical"]
150
+ max_calls = 25
67
151
  instruction = """
68
152
  Launch a context-free `wizz-exec-review` subagent with this prompt — pinned to the platform's Forte tier (`opus` in Claude Code), never inheriting the session model. Tell the user the tier and count of this dispatch.
69
153
 
@@ -71,7 +155,9 @@ Read `{skill-root}/review-prompts/edge-case-hunter.md` completely and follow it
71
155
 
72
156
  claims_file (leave unread until your instructions call for it): {claims_file}
73
157
 
74
- Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
158
+ Review content: the unified diff at `{clean_diff_file}`. Read that file — it is the content under review.
159
+
160
+ max_calls: {max_calls}. At the cap, stop and return what you have, ending with a final line `PARTIAL: <what you did not cover>`.
75
161
 
76
162
  Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If the instruction file is unreadable, report that exact failure and stop. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
77
163
 
@@ -80,12 +166,16 @@ Do not invoke any skill, and do not spawn subagents of your own — you are the
80
166
  [[workflow.review_layers]]
81
167
  id = "verification-gap"
82
168
  name = "Verification Gap Reviewer"
169
+ tiers = ["critical"]
170
+ max_calls = 25
83
171
  instruction = """
84
172
  Launch a context-free `wizz-exec-review` subagent with this prompt — pinned to the platform's Forte tier (`opus` in Claude Code), never inheriting the session model. Tell the user the tier and count of this dispatch.
85
173
 
86
174
  Read `{skill-root}/review-prompts/verification-gap.md` completely and follow it as your review instructions.
87
175
 
88
- Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
176
+ Review content: the unified diff at `{clean_diff_file}`. Read that file — it is the content under review.
177
+
178
+ max_calls: {max_calls}. At the cap, stop and return what you have, ending with a final line `PARTIAL: <what you did not cover>`.
89
179
 
90
180
  Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If the instruction file is unreadable, report that exact failure and stop. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
91
181
 
@@ -94,13 +184,17 @@ Do not invoke any skill, and do not spawn subagents of your own — you are the
94
184
  [[workflow.review_layers]]
95
185
  id = "acceptance-auditor"
96
186
  name = "Acceptance Auditor"
187
+ tiers = ["critical"]
188
+ max_calls = 15
97
189
  when = 'Only when {review_mode} = "full".'
98
190
  instruction = """
99
191
  Launch a `wizz-exec-review` subagent with this prompt — pinned to the platform's Forte tier (`opus` in Claude Code), never inheriting the session model. Tell the user the tier and count of this dispatch.
100
192
 
101
193
  You are an Acceptance Auditor. Review the provided diff against `{spec_file}` and any loaded context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a Markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff.
102
194
 
103
- Diff: the unified diff at `{diff_file}`. Read that file — it is the content under review.
195
+ Diff: the unified diff at `{clean_diff_file}`. Read that file — it is the content under review.
196
+
197
+ max_calls: {max_calls}. At the cap, stop and return what you have, ending with a final line `PARTIAL: <what you did not cover>`.
104
198
 
105
199
  Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
106
200
 
@@ -0,0 +1,75 @@
1
+ # Review Economy
2
+
3
+ Shared rules that keep the review layers on the Forte tier (`opus` in Claude Code) while cutting what they read and how many of them run. Two byte-identical copies live in `wizz-code-review/references/review-economy.md` and `wizz-quick-dev/references/review-economy.md`. Diffs are built with plain git commands; the tier is picked by session judgment.
4
+
5
+ ## 1. Build the diff
6
+
7
+ Every diff command here runs against the repository root, never a bare `.`: compute `TOP="$(git rev-parse --show-toplevel)"` once, then run every git command as `git -C "$TOP" ...`. Every flag goes before the `--`: `--no-ext-diff --no-color --no-textconv`. `{diff_file}` and `{clean_diff_file}` are written by the identical command for a given source — same flags, same source args — differing only in the pathspecs that follow the single `--`.
8
+
9
+ - **Pathspecs.** Positive pathspecs come first, always: `:(top)` for the whole tree, or one `:(top,literal)<path>` per path for a file-list or chunked source. `{clean_diff_file}` then adds exclude pathspecs after the positive ones — one `:(top,exclude,glob)<pattern>` per `{workflow.review_exclude}` entry (`wizz-quick-dev` adds `:(top,exclude,literal)<repo-relative spec path>` first — see "Spec path" below). `{diff_file}` never carries an exclude pathspec.
10
+ - **Per-source command.** `git -C "$TOP" diff <source-args> --no-ext-diff --no-color --no-textconv -- <pathspecs>`, where `<source-args>` is:
11
+ | Source | `<source-args>` |
12
+ |---|---|
13
+ | Staged changes only | `--cached` |
14
+ | Uncommitted changes (staged + unstaged) | `HEAD` |
15
+ | Branch diff | `<base-branch>...HEAD` — only after `git -C "$TOP" merge-base <base-branch> HEAD` has already succeeded |
16
+ | Commit range | `<range>` |
17
+ | File list / chunk | `HEAD`, with `:(top,literal)<path>` positive pathspecs, one per listed or chunked path |
18
+ - **Exclusions.** `{workflow.review_exclude}` is a list of git pathspec globs. The default in `customize.toml`:
19
+ `**/package-lock.json`, `**/npm-shrinkwrap.json`, `**/yarn.lock`, `**/pnpm-lock.yaml`, `**/bun.lock`, `**/bun.lockb`, `**/Cargo.lock`, `**/poetry.lock`, `**/Pipfile.lock`, `**/Gemfile.lock`, `**/composer.lock`, `**/go.sum`, `**/uv.lock`, `**/__snapshots__/**`, `**/*.snap`, `**/*.min.js`, `**/*.min.css`, `**/*.js.map`, `**/*.css.map`.
20
+ - **Spec path (`wizz-quick-dev` only).** Compute the spec's repo-relative path first — `git -C "$TOP" ls-files --full-name -- <spec-path>` when it is tracked, otherwise a path relative to `$TOP` (e.g. via `realpath`) — then exclude it as `:(top,exclude,literal)<repo-relative path>`, ahead of the `review_exclude` excludes. If that one exclusion alone empties `{clean_diff_file}` (untracked files included) — meaning the spec's own edit was the only change — there is nothing to review: skip the review layers entirely and go straight to triage with no findings. Do not fall back to the raw diff in this case.
21
+ - **Untracked files (uncommitted changes and file-list sources).** List them with `git -C "$TOP" ls-files --others --exclude-standard -z -- <pathspecs>` — the same positive-plus-exclude pathspecs as `{clean_diff_file}` for its own list, the positive pathspecs alone for `{diff_file}`'s list. For every path the `-z` listing returns, append it to that diff with `git -C "$TOP" diff --no-index --no-color -- /dev/null <path>`. Exit code `1` means "files differ" — that is success, append the output; only an exit code greater than `1` is a failure. Both `{diff_file}` and `{clean_diff_file}` include every untracked file that passes their own pathspecs.
22
+ - **Counts.** `files` and `changed_lines` come from `git -C "$TOP" diff <source-args> --no-ext-diff --no-color --no-textconv --numstat -- <pathspecs>` (the same pathspecs as the diff being counted) plus, for every untracked path, `git -C "$TOP" diff --no-index --numstat -- /dev/null <path>`. `files` is the number of lines printed across both; `changed_lines` is the sum of their numeric columns. A binary (`-`) counts as a file with 0 lines.
23
+ - **Provided or pasted diffs, and no VCS.** No git at all — `{clean_diff_file}` = `{diff_file}`. See § 2 for how `files`/`changed_lines` are counted here instead.
24
+ - **Nothing left after exclusions.** `{clean_diff_file}` is empty — untracked files included, not merely that `--numstat` printed nothing for the tracked part. `wizz-code-review` HALTs, lists the exclusions, and asks whether to review the raw diff anyway. `wizz-quick-dev` reviews the raw diff instead, except for the spec-only case above.
25
+ - **Git failure.** Review the raw `{diff_file}` at `critical`.
26
+ - `{clean_diff_file}` is a uniquely-named file in the system temp directory.
27
+
28
+ ## 2. Pick the tier (session judgment)
29
+
30
+ | Tier | Rule | Active layers | Forte subagents |
31
+ |---|---|---|---|
32
+ | `small` | at most 3 files and 80 changed lines (after exclusion), no critical hit | `blind-verification` | 1 |
33
+ | `normal` | anything above `small`, no critical hit | `blind-verification`, `edge-case-hunter` | 2 |
34
+ | `critical` | the change touches a sensitive area, or the user asks for every layer | `blind-hunter`, `edge-case-hunter`, `verification-gap`, `acceptance-auditor` (`wizz-quick-dev` has no `acceptance-auditor` layer: 3 layers there) | up to 4 (`wizz-quick-dev`: up to 3) |
35
+
36
+ The session reads the file list (`git diff --name-status`) and, when unsure, the relevant hunks, then decides the tier itself by judgment.
37
+
38
+ **Provided or pasted diffs, and no VCS.** There is no `git --numstat` to read. Count `files` from the diff's own `diff --git` (or, lacking that, `+++`) headers, and `changed_lines` from the `+`/`-` body lines (the `+++`/`---` header lines themselves don't count). The table above applies without exception in both workflows — `small` included.
39
+
40
+ `{workflow.review_critical_paths}` is a plain-language list of sensitive areas, not a pattern list. Default: authentication, sessions, passwords and credentials, authorization, permissions and RLS, payments, billing and checkout, database migrations, schema and SQL, secrets, keys and `.env` files, cryptography, CI and deploy workflows. Judge by meaning, not by substring: a security check added inside an otherwise generic file counts as `critical`; a document that merely talks about auth does not.
41
+
42
+ Raise the tier when in doubt, never lower it — a change that clearly touches something the list above doesn't name (e.g. a data migration done in application code) still earns `critical`. State the tier, the reason and the resulting layer count to the user before launching any layer.
43
+
44
+ A layer is active only when `{tier}` is listed in its `tiers` field. A layer without `tiers` is active in every tier.
45
+
46
+ If `{tier}` is empty or not one of `small`/`normal`/`critical` when the review step (`wizz-code-review` step 2) or the `wizz-quick-dev` Review section starts, set it to `critical` now and say so before evaluating any layer.
47
+
48
+ Track each configured layer's outcome as `{layer_status}` — every `id` marked `active` or `dropped: <reason>` (tier, disabled by override, or its `when` condition). This list travels into triage so a delegated triager can tell, for example, whether `acceptance-auditor` ran.
49
+
50
+ ## 3. Cap each layer
51
+
52
+ Every layer carries `max_calls` in its config. Substitute `{max_calls}` in its instruction. A layer that hits the cap stops and ends its final message with a line `PARTIAL: <what you did not cover>` — that exact marker is what the steps and triage look for to detect a partial layer. Triage treats a layer that returned that marker like a failed layer: the review may be incomplete and the user is told so.
53
+
54
+ A layer that returns an explicit no-findings result (e.g. `[]`, or "No verification gaps found.") has succeeded, not failed — it found nothing to report. Only errors, timeouts, unreadable output, or a `PARTIAL:` ending count against a layer.
55
+
56
+ A layer whose review-prompts method returns JSON (e.g. Edge Case Hunter's array) may still hit the cap mid-run and end with a trailing `PARTIAL: <...>` line after the JSON payload. Parse the JSON that precedes that line as the layer's findings — the trailing line only marks the run partial, it does not invalidate the JSON before it.
57
+
58
+ When the brief names a `review-prompts/` file, that file owns the method and the output format. The reviewer ignores its generic verdict format and does not re-run the project's test suite unless the review prompt itself asks for it.
59
+
60
+ ## 4. Decide who triages
61
+
62
+ The Forte tier is defined in `_shared/model-ladder.md`.
63
+
64
+ - **Session runs on the Forte tier:** the session triages, as the triage instructions say. It already holds the context, so a subagent would only re-read it.
65
+ - **Any session model other than the Forte tier:** write the collected findings, each with its originating layer `id`, to a uniquely-named temp file and launch one `wizz-exec-opus` subagent. Its brief is: the triage instructions (the path of the step file that holds them), the findings file, `{diff_file}`, `{spec_file}` when present, the paths of any loaded context docs, `{tier}`, `{failed_layers}`, `{layer_status}` (the active/dropped layer ids with drop reasons, so the triager knows which layers actually ran), and — only in workflows that set it (`wizz-code-review`) — `{review_mode}`. The subagent runs the whole pipeline itself: verdicts, the acceptance audit, grouping, and routing into categories. It returns every entry with severity, category and evidence, plus every dismissal with its reason — it never writes to any file; the session writes every log. The session then re-checks the subagent's own verdicts and routing against the evidence it returned — this is the session validating a delegated triager's work, not a new prompt to the user — and carries on per each workflow's own step. In `wizz-code-review`, `decision_needed` entries still get a genuine human confirmation before continuing, exactly as the presentation step already does; a confirmed entry the user rejects there is logged as dismissed with the user's own reason, never forced through. In `wizz-quick-dev`, `intent_gap` still loops back to the human as part of resolving it, and `bad_spec` still loops back automatically — the session's re-check adds no new user prompt for either.
66
+
67
+ `{failed_layers}` stores layer `id`s (append ` (partial)` for a partial layer); every check against it compares ids, not names.
68
+
69
+ **Acceptance audit.** Runs before the per-finding verdicts, as one more source of findings that then get verdicts like any other. In `wizz-code-review`, run it when a spec is present and the `acceptance-auditor` layer did not run to completion for any reason: `{layer_status}` marks it `dropped` (tier, disabled by override, or its `when` condition), or it failed or ended `PARTIAL:` (its id appears in `{failed_layers}`) — a `critical` tier where that layer actually ran to completion does not also get the triage-side audit. In `wizz-quick-dev`, run it on every tier — that workflow has no `acceptance-auditor` layer. Either way, check the diff against the spec's acceptance criteria and constraints, and add a finding with source `triage-acceptance` for each violation, deviation or missing behavior.
70
+
71
+ ## 5. Cleanup
72
+
73
+ Delete `{diff_file}` only when `{diff_file_owned}` is true — never a file the user supplied directly by path. Delete `{clean_diff_file}` only when it is a different path from `{diff_file}`; when the two are the same path (a provided, pasted or no-VCS diff, a git failure, or a raw review after exclusions emptied the clean diff), the `{diff_file}` rule above decides. Also delete `{claims_file}` when it is non-empty, and any findings temp files. Delete them when the workflow ends, including every HALT that ends it outright. The one exception is the subagents-unavailable HALT: it keeps `{diff_file}` and `{clean_diff_file}`, because that HALT resumes when the human pastes findings back rather than ending the workflow.
74
+
75
+ In `wizz-quick-dev`, each review loop iteration writes a new `{diff_file}`/`{clean_diff_file}` generation; before overwriting them for the next loop, save the previous generation's paths and delete those old files per this section.
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  diff_file: '' # set at runtime: path to the diff file
3
+ diff_file_owned: '' # set at runtime: true when this workflow wrote {diff_file}, false when the user supplied its path
4
+ clean_diff_file: '' # set at runtime: path to the cleaned diff file
5
+ tier: '' # set at runtime: "small", "normal" or "critical"
3
6
  claims_file: '' # set at runtime (path or empty)
4
7
  spec_file: '' # set at runtime (path or empty)
5
8
  review_mode: '' # set at runtime: "full" or "no-spec"
@@ -12,7 +15,7 @@ story_key: '' # set at runtime when discovered from sprint status
12
15
 
13
16
  - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
14
17
  - The prompt that triggered this workflow IS the intent — not a hint.
15
- - Writing `{diff_file}` and the claims file is the only change this step may make. Otherwise it is read-only.
18
+ - Writing `{diff_file}`, `{clean_diff_file}` and the claims file is the only change this step may make. Otherwise it is read-only.
16
19
 
17
20
  ## INSTRUCTIONS
18
21
 
@@ -58,19 +61,30 @@ story_key: '' # set at runtime when discovered from sprint status
58
61
  - **Specific commit range** (ask for the range)
59
62
  - **Provided diff or file list** (user pastes or provides a path)
60
63
 
61
- 3. Write the diff for the chosen source to `{diff_file}` — a uniquely-named file in the system temp directory, so concurrent reviews cannot collide. The review layers read that file; the diff text is never pasted into their prompts.
62
- - For **staged changes only**: run `git diff --cached > {diff_file}`.
63
- - For **uncommitted changes** (staged + unstaged): run `git diff HEAD > {diff_file}`.
64
- - For **branch diff**: verify the base branch exists, then run `git diff <base-branch>...HEAD > {diff_file}`. If it does not exist, HALT and ask the user for a valid branch.
65
- - For **commit range**: verify the range resolves, then run `git diff <range> > {diff_file}`. If it does not resolve, HALT and ask the user for a valid range.
66
- - For **provided diff**: validate the content is non-empty and parseable as a unified diff. If it is not parseable, HALT and ask the user to provide a valid diff. Write the validated diff to `{diff_file}`.
67
- - For **file list**: validate each path exists in the working tree. Run `git diff HEAD -- <path1> <path2> ... > {diff_file}`. If any paths are untracked (new files not yet staged), append them with `git diff --no-index /dev/null <path> >> {diff_file}`. If the diff is empty (files have no uncommitted changes and are not untracked), ask the user whether to review the full file contents or to specify a different baseline.
68
- - After writing `{diff_file}`, verify it is non-empty regardless of source type. If empty, HALT and tell the user there is nothing to review.
64
+ 3. Write the diff for the chosen source to `{diff_file}` — a uniquely-named file in the system temp directory, so concurrent reviews cannot collide. The review layers read that file; the diff text is never pasted into their prompts. Compute `TOP="$(git rev-parse --show-toplevel)"` once and reuse it for every git command below (`references/review-economy.md` § 1). Set `{diff_file_owned}` = `true` unless a source below says otherwise.
65
+ - For **staged changes only**: `git -C "$TOP" diff --cached --no-ext-diff --no-color --no-textconv -- ':(top)' > {diff_file}`.
66
+ - For **uncommitted changes** (staged + unstaged): `git -C "$TOP" diff HEAD --no-ext-diff --no-color --no-textconv -- ':(top)' > {diff_file}`, then append untracked files per § 1 — list them with `git -C "$TOP" ls-files --others --exclude-standard -z -- ':(top)'` and append each with `git -C "$TOP" diff --no-index --no-color -- /dev/null <path> >> {diff_file}`.
67
+ - For **branch diff**: verify the base branch exists, then compute `git -C "$TOP" merge-base <base-branch> HEAD` and confirm it succeeded — never build a diff with an empty base. If either check fails, HALT, delete any temp file this instruction already created per `references/review-economy.md` § 5, and ask the user for a valid branch. Only once both succeed: `git -C "$TOP" diff <base-branch>...HEAD --no-ext-diff --no-color --no-textconv -- ':(top)' > {diff_file}`.
68
+ - For **commit range**: verify the range resolves, then `git -C "$TOP" diff <range> --no-ext-diff --no-color --no-textconv -- ':(top)' > {diff_file}`. If it does not resolve, HALT, delete any temp file this instruction already created per `references/review-economy.md` § 5, and ask the user for a valid range.
69
+ - For **provided diff**:
70
+ - Pasted text: validate it is non-empty and parseable as a unified diff. If it is not parseable, HALT and ask the user to provide a valid diff (nothing to clean up yet). Write it to `{diff_file}` — a workflow-owned temp copy, safe for cleanup to delete later.
71
+ - A file path: validate the file exists, is non-empty, and parseable as a unified diff. If it is not parseable, HALT and ask for a valid diff. Set `{diff_file}` to that path directly — do not copy it — and set `{diff_file_owned}` = `false`. This file is user-owned: cleanup (`references/review-economy.md` § 5) must never delete it, unconditionally — regardless of whether `{clean_diff_file}` ends up equal to it.
72
+ - For **file list**: validate each path exists in the working tree. Run `git -C "$TOP" diff HEAD --no-ext-diff --no-color --no-textconv -- ':(top,literal)<path1>' ':(top,literal)<path2>' ... > {diff_file}` — one `:(top,literal)<path>` pathspec per listed path. If any paths are untracked (new files not yet staged), append them with `git -C "$TOP" diff --no-index --no-color -- /dev/null <path> >> {diff_file}`. If the diff is empty (files have no uncommitted changes and are not untracked), ask the user whether to review the full file contents or to specify a different baseline.
73
+ - After writing `{diff_file}`, verify it is non-empty regardless of source type. If empty, HALT, delete `{diff_file}` (when `{diff_file_owned}` is true) per `references/review-economy.md` § 5, and tell the user there is nothing to review.
69
74
  - Read `{diff_file}` yourself whenever you need the diff for your own context — triage and presentation later in this workflow.
70
75
 
71
- 4. **Stage the claims file.** Collect the change's own narrative: for a branch diff or commit range, the commit messages it covers (`git log <base>..<head>`); for other sources, whatever description of the change the user or conversation supplied. Write it verbatim to a uniquely-named file in the system temp directory and set `{claims_file}` to its path. If there is no narrative, set `{claims_file}` = `''`. Do not analyze or summarize the narrative — it is input for one review layer, staged as a file precisely so the other layers never see it.
76
+ 4. **Clean the diff and pick the tier.** A branch diff's base was already validated against `merge-base` in instruction 3 — do not re-check it here.
72
77
 
73
- 5. **Set the spec context.**
78
+ - **Provided diff, pasted diff, or no VCS:** skip exclusions entirely — `{clean_diff_file}` = `{diff_file}`. Pick the tier per § 2 by judgment.
79
+ - **Otherwise:** build `{clean_diff_file}` per § 1 — the identical git command that wrote `{diff_file}` for the chosen source, plus one `:(top,exclude,glob)<pattern>` pathspec per entry in `{workflow.review_exclude}`, appended after the positive pathspecs. For **uncommitted changes**, also append untracked files to `{clean_diff_file}` the same way they were appended to `{diff_file}`, but listed with the positive-plus-exclude pathspecs from § 1 so any excluded file is skipped. Get `files` and `changed_lines` from `git -C "$TOP" diff --no-ext-diff --no-color --no-textconv --numstat` with the same source args and pathspecs, plus per-file `git -C "$TOP" diff --no-index --numstat -- /dev/null <path>` for the untracked ones (§ 1).
80
+ - If a git command in this instruction fails: delete any partially written `{clean_diff_file}` temp file, then set `{clean_diff_file}` = `{diff_file}` and `{tier}` = `critical`, say so, and continue.
81
+ - If nothing is left after exclusions (`{clean_diff_file}` is empty, untracked files included, even though `{diff_file}` is non-empty): HALT, list the exclusions, and ask the user whether to review the raw diff anyway. If they do, set `{clean_diff_file}` = `{diff_file}` and pick the tier per § 2 from the raw diff. If they decline, delete `{diff_file}` (when `{diff_file_owned}` is true) and `{clean_diff_file}` per § 5 and end the workflow.
82
+ - Otherwise, pick the tier per § 2: read `git diff --name-status` for the same source (and the relevant hunks when unsure) and judge it against `{workflow.review_critical_paths}`.
83
+ - State the tier, the reason, and the resulting Forte subagent count to the user before launching any layer.
84
+
85
+ 5. **Stage the claims file.** Collect the change's own narrative: for a branch diff or commit range, the commit messages it covers (`git log <base>..<head>`); for other sources, whatever description of the change the user or conversation supplied. Write it verbatim to a uniquely-named file in the system temp directory and set `{claims_file}` to its path. If there is no narrative, set `{claims_file}` = `''`. Do not analyze or summarize the narrative — it is input for one review layer, staged as a file precisely so the other layers never see it.
86
+
87
+ 6. **Set the spec context.**
74
88
  - If the triggering request or recent conversation **explicitly** states there is no spec (e.g. "no spec", "without a spec", "no-spec"): set `{review_mode}` = `"no-spec"` and clear `{spec_file}` (set it to `''`). Do **not** ask for a spec. Do **not** infer no-spec mode merely because the invocation omitted a spec path.
75
89
  - Else if `{spec_file}` is already set (from Tier 1 or Tier 2): verify the file exists and is readable, then set `{review_mode}` = `"full"`.
76
90
  - Else (neither a spec path nor an explicit no-spec declaration is present): ask the user to choose:
@@ -79,15 +93,15 @@ story_key: '' # set at runtime when discovered from sprint status
79
93
  - If the user provides a path: set `{spec_file}` to that path, verify the file exists and is readable, then set `{review_mode}` = `"full"`.
80
94
  - If the user explicitly chooses to continue without a spec: set `{review_mode}` = `"no-spec"`.
81
95
 
82
- 6. If `{review_mode}` = `"full"` and the file at `{spec_file}` has a `context` field in its frontmatter listing additional docs, load each referenced document. Warn the user about any docs that cannot be found.
96
+ 7. If `{review_mode}` = `"full"` and the file at `{spec_file}` has a `context` field in its frontmatter listing additional docs, load each referenced document. Warn the user about any docs that cannot be found.
83
97
 
84
- 7. Sanity check: if `wc -l {diff_file}` exceeds approximately 3000 lines, warn the user and offer to chunk the review by file group.
85
- - If the user opts to chunk: agree on the first group, rebuild `{diff_file}` narrowed to that group, and list the remaining groups for the user to note for follow-up runs.
98
+ 8. Sanity check: if `wc -l {clean_diff_file}` or `wc -l {diff_file}` exceeds approximately 3000 lines, warn the user and offer to chunk the review by file group. Check both — `{diff_file}` is read directly later, for triage and presentation, regardless of how much `{clean_diff_file}` was filtered down.
99
+ - If the user opts to chunk: agree on the first group, then rebuild both `{diff_file}` and `{clean_diff_file}` narrowed to that file group (add the group's paths as a pathspec to the same git commands from instructions 3-4, re-applying the exclusions from § 1 to the narrowed `{clean_diff_file}`); the resulting `{tier}` for the chunk is never lower than the tier from the full, unchunked run. List the remaining groups for the user to note for follow-up runs.
86
100
  - If the user declines: proceed as-is with the full diff.
87
101
 
88
102
  ### CHECKPOINT
89
103
 
90
- Present a summary before proceeding: diff stats (files changed, lines added/removed), `{review_mode}`, and loaded spec/context docs (if any). HALT and wait for user confirmation to proceed.
104
+ Present a summary before proceeding: diff stats (files changed, lines added/removed), the excluded files — the file paths present in `{diff_file}` but absent from `{clean_diff_file}`, each with the exclusion pattern that matched it — `{tier}` and how many Forte review subagents that tier will launch, `{review_mode}`, and loaded spec/context docs (if any). HALT and wait for user confirmation to proceed. If the user declines, delete `{diff_file}` (when `{diff_file_owned}` is true), `{clean_diff_file}`, and `{claims_file}` (when non-empty) per `references/review-economy.md` § 5, and end the workflow.
91
105
 
92
106
  ## NEXT
93
107
 
@@ -1,5 +1,6 @@
1
1
  ---
2
- failed_layers: '' # set at runtime: comma-separated list of layers that failed or returned empty
2
+ failed_layers: '' # set at runtime: comma-separated list of layer ids that failed, timed out, or ended PARTIAL
3
+ layer_status: '' # set at runtime: every configured layer's id marked active or dropped (with the drop reason)
3
4
  ---
4
5
 
5
6
  # Step 2: Review
@@ -9,23 +10,25 @@ failed_layers: '' # set at runtime: comma-separated list of layers that failed o
9
10
  - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
10
11
  - Review subagents run pinned to the platform's Forte tier via `wizz-exec-review` (`opus` in Claude Code) — never at the same model capability as the current session. See `_shared/model-ladder.md`.
11
12
  - Run subagents synchronously: launch them together as blocking calls awaited in this turn — never backgrounded or detached, never ending the turn to await results.
13
+ - Layers scale with `{tier}` and read `{clean_diff_file}`. See `references/review-economy.md`.
12
14
 
13
15
  ## INSTRUCTIONS
14
16
 
15
- 1. The review layers are `{workflow.review_layers}`, resolved during activation.
17
+ 1. The review layers are `{workflow.review_layers}`, resolved during activation. If `{tier}` is empty or not one of `small`/`normal`/`critical`, set it to `critical` now and tell the user why, per `references/review-economy.md` § 2.
16
18
 
17
- 2. For each layer in `{workflow.review_layers}`:
18
- - `instruction` empty or missing → drop the layer silently (an override disabled it).
19
- - `when` condition present and not satisfied by the current context (`{review_mode}`, `{spec_file}`) → drop the layer and tell the user, e.g. "Acceptance Auditor skipped — no spec file provided."
20
- - otherwise → the layer is active.
19
+ 2. For each layer in `{workflow.review_layers}`, record the outcome in `{layer_status}` as you go:
20
+ - `tiers` present and `{tier}` not listed in it → drop the layer silently (the checkpoint already announced the tier). Record `<id>: dropped (tier)`.
21
+ - `instruction` empty or missing → drop the layer silently (an override disabled it). Record `<id>: dropped (disabled by override)`.
22
+ - `when` condition present and not satisfied by the current context (`{review_mode}`, `{spec_file}`) → drop the layer and tell the user, e.g. "Acceptance Auditor skipped — no spec file provided." Record `<id>: dropped (when condition not met)`.
23
+ - otherwise → the layer is active. Record `<id>: active`.
21
24
 
22
- If no layer is active, HALT with status `blocked` and blocking condition `no active review layers`.
25
+ If no layer is active, delete `{diff_file}`, `{clean_diff_file}` and any findings temp files per `references/review-economy.md` § 5, then HALT with status `blocked` and blocking condition `no active review layers`.
23
26
 
24
- 3. Announce skipped layers first, then launch every active layer before handling any layer's result. Try running all active layers simultaneously: expand `{skill-root}` in each layer's `instruction` to this skill's absolute installed directory, then substitute the runtime placeholders (`{diff_file}`, `{claims_file}`, `{spec_file}`). `{diff_file}` is a path: substitute the path itself and let the layer read the file — a launch prompt never carries diff text. For an instruction that launches a reviewer subagent, launch that child with the prompt text after placeholder substitution; do not load the reviewer instruction file yourself. For any other customized instruction, execute it as written. Do not leave `{skill-root}` unresolved in a child prompt, and resolve `{diff_file}` to an absolute path — the child's working directory is not yours. If a layer's instruction requires subagents and subagents are not available, for each such layer write under `{implementation_artifacts}` that layer's child prompt with everything after its content label replaced by the contents of `{diff_file}` (not a path-only pointer) — that session may not share this filesystem, so its prompt must be self-contained. Then HALT. Ask the user to run each in a separate session (ideally a different LLM) and paste back the findings. When findings are pasted, treat them as those layers' findings and resume from this point. This is the only allowed parent-side read of a reviewer instruction file.
27
+ 3. Announce skipped layers first, then launch every active layer before handling any layer's result. Try running all active layers simultaneously: expand `{skill-root}` in each layer's `instruction` to this skill's absolute installed directory, then substitute the runtime placeholders (`{clean_diff_file}`, `{diff_file}`, `{claims_file}`, `{spec_file}`, and `{max_calls}` from the layer's `max_calls` — if the layer has none, remove the whole `max_calls:` line). `{clean_diff_file}` is a path: substitute the path itself and let the layer read the file — a launch prompt never carries diff text. For an instruction that launches a reviewer subagent, launch that child with the prompt text after placeholder substitution; do not load the reviewer instruction file yourself. For any other customized instruction, execute it as written. Do not leave `{skill-root}` unresolved in a child prompt, and resolve `{clean_diff_file}` to an absolute path — the child's working directory is not yours. If a layer's instruction requires subagents and subagents are not available, for each such layer write under `{implementation_artifacts}` that layer's child prompt with everything after its content label replaced by the contents of `{clean_diff_file}` (not a path-only pointer) — that session may not share this filesystem, so its prompt must be self-contained. Then HALT — do NOT delete `{diff_file}` or `{clean_diff_file}`; this HALT resumes when findings are pasted back, so triage still needs them. Ask the user to run each in a separate session (ideally a different LLM) and paste back the findings. When findings are pasted, treat them as those layers' findings and resume from this point. This is the only allowed parent-side read of a reviewer instruction file.
25
28
 
26
- 4. **Layer failure handling**: If any layer fails, times out, or returns empty results, append the layer's `name` to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
29
+ 4. **Layer failure handling**: If any layer errors, times out, or returns unreadable output, append the layer's `id` to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers. A layer that returns an explicit no-findings result (e.g. `[]`, or "No verification gaps found.") has succeeded — do not append it to `{failed_layers}`. A layer whose final message ends with a `PARTIAL:` line counts as partial: append `<id> (partial)` to `{failed_layers}` and keep its findings.
27
30
 
28
- 5. Collect all findings from the completed layers, keeping track of each finding's originating layer `id`.
31
+ 5. Collect all findings from the completed layers, keeping track of each finding's originating layer `id`. Carry `{layer_status}` forward into triage along with `{failed_layers}`.
29
32
 
30
33
  ## NEXT
31
34
 
@@ -9,6 +9,8 @@
9
9
 
10
10
  ## INSTRUCTIONS
11
11
 
12
+ 0. **Decide who triages**, per `references/review-economy.md` section 4. When a `wizz-exec-opus` subagent triages, its brief includes `{layer_status}` so it can tell which layers ran; it runs every instruction of this step through routing (instructions 1-5 below) and returns the result. The session then re-checks the subagent's verdicts and routing against the evidence, confirms `decision_needed` entries with the user, and continues with instruction 6.
13
+
12
14
  1. **Normalize** findings from all layers into a unified list where each finding has:
13
15
  - `id` -- sequential integer
14
16
  - `source` -- the `id` of the layer that produced the finding (e.g., `blind-hunter`)
@@ -16,7 +18,9 @@
16
18
  - `detail` -- full description
17
19
  - `location` -- file and line reference (if available)
18
20
 
19
- 2. Once every layer has reported -- and not before -- render a verdict on each finding on its own, ahead of any deduplication or grouping. For each finding:
21
+ 2. Run the acceptance audit from `references/review-economy.md` section 4 and add its findings with source `triage-acceptance` to the unified list, before verdicts, when `{review_mode}` = `"full"` and the `acceptance-auditor` layer did not run to completion for any reason: `{layer_status}` marks it `dropped` (tier, disabled by override, or its `when` condition), or it failed or ended `PARTIAL:` (its id appears in `{failed_layers}`) — a `critical` tier where that layer actually ran to completion does not also get this audit. They get a verdict like any other finding, per instruction 3 below.
22
+
23
+ 3. Once every layer has reported -- and not before -- render a verdict on each finding on its own, ahead of any deduplication or grouping. For each finding:
20
24
  - **Verify its own claimed consequence** at the location it names. Read past the diff hunk -- into the callers, the guards upstream, whatever else the site depends on -- far enough to tell whether that consequence actually occurs. Another finding's outcome, however adjacent, never settles this one.
21
25
  - **Assign severity** from the verified consequence for the artifact's main consumer (software user, document reader, etc). Disregard any severity assigned by a reviewing subagent. Review subagents operate under by-design information asymmetry and do not have enough context to set final severity for this workflow.
22
26
  - `low` -- none or cosmetic
@@ -25,18 +29,20 @@
25
29
  - **Keep or dismiss.** Keep a finding only where verification confirmed its consequence. Dismiss noise, claims the verification refuted, and claims it could not substantiate -- no path to the claimed consequence at the named site is a valid disposal. Whatever the reason, it must dispose of the finding's own claim: a true fact about neighboring code that leaves the claim standing is not a dismissal, and the finding stays kept. Record each dismissal with its reason for the summary; never drop a finding silently.
26
30
  - A finding whose fix edits the spec under review: dismiss. A finding whose fix edits an agent-context document (e.g. CLAUDE.md, AGENTS.md, rules files, other specs): defer, never patch.
27
31
 
28
- 3. **Group the survivors by shared root cause** -- two findings belong in one entry only when the same underlying defect produced both. Same location alone is not a shared root cause, and neither is a shared fix. An entry carries every member's verified consequence in `detail` and the highest severity among them; set `source` to the contributing layers joined with `+` (e.g., `blind-hunter+edge-case-hunter`).
32
+ 4. **Group the survivors by shared root cause** -- two findings belong in one entry only when the same underlying defect produced both. Same location alone is not a shared root cause, and neither is a shared fix. An entry carries every member's verified consequence in `detail` and the highest severity among them; set `source` to the contributing layers joined with `+` (e.g., `blind-hunter+edge-case-hunter`).
29
33
 
30
- 4. **Route** each entry into exactly one triage bucket:
34
+ 5. **Route** each entry into exactly one triage bucket:
31
35
  - **decision_needed** -- There is an ambiguous choice that requires human input. The code cannot be correctly patched without knowing the user's intent. Only possible if `{review_mode}` = `"full"`.
32
36
  - **patch** -- Code issue that is fixable without human input. The correct fix is unambiguous.
33
37
  - **defer** -- Pre-existing issue not caused by the current change. Real but not actionable now.
34
38
 
35
39
  If `{review_mode}` = `"no-spec"` and an entry would otherwise be `decision_needed`, reclassify it as `patch` (if the fix is unambiguous) or `defer` (if not).
36
40
 
37
- 5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero entries remain after dismissals AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
41
+ 6. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero entries remain after dismissals AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
38
42
 
39
- 6. If zero entries remain after triage (all dismissed or none raised): state "✅ Clean review — all layers passed." (Step 3 already warned if any review layers failed via `{failed_layers}`.)
43
+ 7. If zero entries remain after triage (all dismissed or none raised):
44
+ - `{failed_layers}` is empty: state "✅ Clean review — all layers passed."
45
+ - `{failed_layers}` is non-empty: never call it clean — state that the review found nothing but is incomplete, naming the failed/partial layers (already flagged in instruction 6).
40
46
 
41
47
  ## NEXT
42
48
 
@@ -127,6 +127,10 @@ Present the user with follow-up options:
127
127
 
128
128
  **HALT** — I am waiting for your choice. Do not proceed until the user selects an option.
129
129
 
130
+ ### 8. Cleanup
131
+
132
+ Once the user's choice from section 7 of this step is handled, delete `{diff_file}`, `{clean_diff_file}` and any findings temp files, per `references/review-economy.md` section 5.
133
+
130
134
  ## On Complete
131
135
 
132
136
  Run: read `workflow.on_complete` from the `{project-root}/_wizz/_resolved/wizz-code-review.json` snapshot loaded in step 1