wizz-method 1.15.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/package.json +3 -2
  2. package/skills-registry.yaml +4 -0
  3. package/src/bmm-skills/3-solutioning/wizz-architecture/scripts/__pycache__/lint_spine.cpython-313.pyc +0 -0
  4. package/src/bmm-skills/3-solutioning/wizz-architecture/scripts/tests/__pycache__/test_lint_spine.cpython-313-pytest-9.1.1.pyc +0 -0
  5. package/src/bmm-skills/4-implementation/wizz-code-review/SKILL.md +3 -5
  6. package/src/bmm-skills/4-implementation/wizz-code-review/customize.toml +71 -0
  7. package/src/bmm-skills/4-implementation/wizz-code-review/references/claims-check.md +14 -0
  8. package/src/bmm-skills/4-implementation/wizz-code-review/references/deletion-check.md +14 -0
  9. package/src/bmm-skills/4-implementation/wizz-code-review/review-prompts/edge-case-hunter.md +110 -0
  10. package/src/bmm-skills/4-implementation/wizz-code-review/review-prompts/verification-gap.md +113 -0
  11. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-01-gather-context.md +32 -23
  12. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-02-review.md +10 -13
  13. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-03-triage.md +16 -22
  14. package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-04-present.md +4 -2
  15. package/src/bmm-skills/4-implementation/wizz-quick-dev/customize.toml +76 -0
  16. package/src/bmm-skills/4-implementation/wizz-quick-dev/references/claims-check.md +14 -0
  17. package/src/bmm-skills/4-implementation/wizz-quick-dev/references/deletion-check.md +14 -0
  18. package/src/bmm-skills/4-implementation/wizz-quick-dev/review-prompts/edge-case-hunter.md +110 -0
  19. package/src/bmm-skills/4-implementation/wizz-quick-dev/review-prompts/verification-gap.md +113 -0
  20. package/src/bmm-skills/4-implementation/wizz-quick-dev/step-04-review.md +38 -16
  21. package/src/bmm-skills/4-implementation/wizz-retrospective/SKILL.md +56 -1488
  22. package/src/bmm-skills/4-implementation/wizz-retrospective/customize.toml +3 -5
  23. package/src/bmm-skills/4-implementation/wizz-retrospective/references/acceptance-verdict.md +55 -0
  24. package/src/bmm-skills/4-implementation/wizz-retrospective/references/aggregate-views.md +17 -0
  25. package/src/bmm-skills/4-implementation/wizz-retrospective/references/evidence-gathering.md +30 -0
  26. package/src/bmm-skills/4-implementation/wizz-retrospective/references/retro-document.md +84 -0
  27. package/src/bmm-skills/4-implementation/wizz-retrospective/references/team-discussion.md +22 -0
  28. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/__pycache__/sprint_status.cpython-313.pyc +0 -0
  29. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/git_evidence.py +304 -0
  30. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/sprint_status.py +746 -0
  31. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-313-pytest-9.1.1.pyc +0 -0
  32. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-313-pytest-9.1.1.pyc +0 -0
  33. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/fixtures/sprint-status-template.yaml +71 -0
  34. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/test_git_evidence.py +750 -0
  35. package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/test_sprint_status.py +1579 -0
  36. package/src/bmm-skills/4-implementation/wizz-sprint-planning/SKILL.md +39 -296
  37. package/src/bmm-skills/4-implementation/wizz-sprint-planning/customize.toml +1 -3
  38. package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/fix-sprint-status.md +30 -0
  39. package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/generate-tracking.md +25 -0
  40. package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/readiness-gate.md +20 -0
  41. package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/status-view.md +14 -0
  42. package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/validate.md +10 -0
  43. package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/__pycache__/sprint_plan.cpython-313.pyc +0 -0
  44. package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/sprint_plan.py +697 -0
  45. package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-313-pytest-9.1.1.pyc +0 -0
  46. package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/tests/test_sprint_plan.py +524 -0
  47. package/src/bmm-skills/4-implementation/wizz-sprint-planning/sprint-status-template.yaml +9 -7
  48. package/src/bmm-skills/module-help.csv +3 -3
  49. package/src/core-skills/module-help.csv +1 -0
  50. package/src/core-skills/wizz-advanced-elicitation/SKILL.md +36 -114
  51. package/src/core-skills/wizz-advanced-elicitation/{methods.csv → assets/methods.csv} +29 -27
  52. package/src/core-skills/wizz-advanced-elicitation/customize.toml +54 -0
  53. package/src/core-skills/wizz-advanced-elicitation/scripts/__pycache__/pick_methods.cpython-313.pyc +0 -0
  54. package/src/core-skills/wizz-advanced-elicitation/scripts/pick_methods.py +233 -0
  55. package/src/core-skills/wizz-advanced-elicitation/scripts/tests/__pycache__/test_pick_methods.cpython-313-pytest-9.1.1.pyc +0 -0
  56. package/src/core-skills/wizz-advanced-elicitation/scripts/tests/test_pick_methods.py +228 -0
  57. package/src/core-skills/wizz-brainstorming/SKILL.md +2 -2
  58. package/src/core-skills/wizz-brainstorming/assets/brain-selector.html +2 -0
  59. package/src/core-skills/wizz-brainstorming/references/converge.md +1 -1
  60. package/src/core-skills/wizz-brainstorming/references/finalize.md +1 -1
  61. package/src/core-skills/wizz-brainstorming/references/headless.md +1 -1
  62. package/src/core-skills/wizz-brainstorming/references/mode-autonomous.md +1 -1
  63. package/src/core-skills/wizz-brainstorming/scripts/__pycache__/brain.cpython-313.pyc +0 -0
  64. package/src/core-skills/wizz-brainstorming/scripts/brain.py +36 -6
  65. package/src/core-skills/wizz-brainstorming/scripts/tests/__pycache__/test_brain.cpython-313-pytest-9.1.1.pyc +0 -0
  66. package/src/core-skills/wizz-brainstorming/scripts/tests/__pycache__/test_brain.cpython-314.pyc +0 -0
  67. package/src/core-skills/wizz-brainstorming/scripts/tests/test_brain.py +24 -2
  68. package/src/core-skills/wizz-customize/scripts/__pycache__/list_customizable_skills.cpython-313.pyc +0 -0
  69. package/src/core-skills/wizz-customize/scripts/tests/__pycache__/test_list_customizable_skills.cpython-313-pytest-9.1.1.pyc +0 -0
  70. package/src/core-skills/wizz-forge-idea/SKILL.md +107 -0
  71. package/src/core-skills/wizz-forge-idea/customize.toml +41 -0
  72. package/src/core-skills/wizz-forge-idea/scripts/__pycache__/resolve_personas.cpython-313.pyc +0 -0
  73. package/src/core-skills/wizz-forge-idea/scripts/__pycache__/resolve_personas.cpython-314.pyc +0 -0
  74. package/src/core-skills/wizz-forge-idea/scripts/resolve_personas.py +275 -0
  75. package/src/core-skills/wizz-forge-idea/scripts/tests/__pycache__/test_resolve_personas.cpython-313-pytest-9.1.1.pyc +0 -0
  76. package/src/core-skills/wizz-forge-idea/scripts/tests/__pycache__/test_resolve_personas.cpython-314.pyc +0 -0
  77. package/src/core-skills/wizz-forge-idea/scripts/tests/test_resolve_personas.py +138 -0
  78. package/src/core-skills/wizz-party-mode/SKILL.md +37 -54
  79. package/src/core-skills/wizz-party-mode/customize.toml +61 -2
  80. package/src/core-skills/wizz-party-mode/references/create-party.md +8 -3
  81. package/src/core-skills/wizz-party-mode/references/mode-agent-team.md +3 -1
  82. package/src/core-skills/wizz-party-mode/references/mode-subagent.md +16 -4
  83. package/src/core-skills/wizz-party-mode/references/party-memory.md +51 -0
  84. package/src/core-skills/wizz-party-mode/scripts/__pycache__/resolve_party.cpython-313.pyc +0 -0
  85. package/src/core-skills/wizz-party-mode/scripts/__pycache__/resolve_party.cpython-314.pyc +0 -0
  86. package/src/core-skills/wizz-party-mode/scripts/resolve_party.py +22 -7
  87. package/src/core-skills/wizz-party-mode/scripts/tests/__pycache__/test_resolve_party.cpython-313-pytest-9.1.1.pyc +0 -0
  88. package/src/core-skills/wizz-party-mode/scripts/tests/__pycache__/test_resolve_party.cpython-314.pyc +0 -0
  89. package/src/core-skills/wizz-party-mode/scripts/tests/{test-resolve_party.py → test_resolve_party.py} +8 -0
  90. package/src/core-skills/wizz-review-edge-case-hunter/SKILL.md +17 -3
  91. package/src/modules/wizz/agents/wizz-growth/customize.toml +10 -0
  92. package/src/scripts/__pycache__/memlog.cpython-313.pyc +0 -0
  93. package/src/scripts/tests/__pycache__/test_memlog.cpython-313-pytest-9.1.1.pyc +0 -0
  94. package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-313-pytest-9.1.1.pyc +0 -0
  95. package/src/skills-lib/pesquisa-de-publico-do-piva/README.md +83 -0
  96. package/src/skills-lib/pesquisa-de-publico-do-piva/SKILL.md +65 -0
  97. package/src/skills-lib/pesquisa-de-publico-do-piva/assets/template.html +414 -0
  98. package/src/skills-lib/pesquisa-de-publico-do-piva/prompts.md +131 -0
  99. package/src/skills-lib/wizz-offer-forge/README.md +13 -0
  100. package/src/skills-lib/wizz-offer-forge/SKILL.md +74 -0
  101. package/src/skills-lib/wizz-offer-forge/references/empilhamento-valor.md +25 -0
  102. package/src/skills-lib/wizz-offer-forge/references/garantia-reversa.md +22 -0
  103. package/src/skills-lib/wizz-offer-forge/references/mecanismo-unico.md +28 -0
  104. package/src/skills-lib/wizz-offer-forge/references/ponte-trafego.md +21 -0
  105. package/src/skills-lib/wizz-router/references/routing-table-flat.md +2 -0
  106. package/tools/installer/core/installer.js +57 -0
  107. package/tools/installer/ide/_config-driven.js +3 -3
  108. package/tools/installer/ide/platform-codes.yaml +28 -0
  109. package/tools/installer/modules/external-manager.js +140 -2
  110. package/tools/installer/modules/official-modules.js +68 -21
  111. package/tools/installer/prompts.js +45 -103
  112. package/tools/installer/ui.js +64 -7
  113. package/wizz-modules.yaml +65 -11
  114. package/src/bmm-skills/4-implementation/wizz-sprint-planning/checklist.md +0 -34
  115. package/src/core-skills/wizz-brainstorming/scripts/memlog.py +0 -202
  116. package/src/core-skills/wizz-brainstorming/scripts/tests/test_memlog.py +0 -265
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wizz-method",
4
- "version": "1.15.0",
4
+ "version": "1.16.0",
5
5
  "description": "Wizz Method — método de agência orientado por IA em PT-BR (fork independente do BMad Method)",
6
6
  "keywords": [
7
7
  "agile",
@@ -61,7 +61,7 @@
61
61
  "rebundle": "node tools/installer/bundlers/bundle-web.js rebundle",
62
62
  "sync:check": "node tools/sync-check.mjs",
63
63
  "sync:global": "node tools/sync-global.mjs",
64
- "test": "npm run test:refs && npm run test:install && npm run test:urls && npm run test:channels && npm run test:mcp && npm run test:env-vars && npm run test:cli && npm run test:deps && npm run test:dispatch-rule && npm run test:hooks && npm run test:quickupdate && npm run test:registry-schema && npm run test:method-refs-allowlist && npm run test:rtk-hook && npm run test:network-retry && npm run test:sync-check && npm run test:resolver && npm run test:fetch-assets && npm run test:install-smoke && npm run test:trace-report && npm run test:rehype-plugins && npm run test:workflow-path-regex && npm run test:preflight-tools-check && npm run lint && npm run lint:md && npm run format:check && npm run sync:check",
64
+ "test": "npm run test:refs && npm run test:install && npm run test:urls && npm run test:channels && npm run test:mcp && npm run test:env-vars && npm run test:cli && npm run test:deps && npm run test:dispatch-rule && npm run test:hooks && npm run test:quickupdate && npm run test:registry-schema && npm run test:module-registry && npm run test:method-refs-allowlist && npm run test:rtk-hook && npm run test:network-retry && npm run test:sync-check && npm run test:resolver && npm run test:fetch-assets && npm run test:install-smoke && npm run test:trace-report && npm run test:rehype-plugins && npm run test:workflow-path-regex && npm run test:preflight-tools-check && npm run lint && npm run lint:md && npm run format:check && npm run sync:check",
65
65
  "test:channels": "node test/test-installer-channels.js",
66
66
  "test:cli": "node test/test-cli-config.js",
67
67
  "test:deps": "node test/test-deps-cache.js",
@@ -74,6 +74,7 @@
74
74
  "test:install-smoke-mcp": "node test/test-install-smoke-mcp.js",
75
75
  "test:mcp": "node test/test-mcp-config.js",
76
76
  "test:method-refs-allowlist": "node test/test-method-refs-allowlist.js",
77
+ "test:module-registry": "node test/test-module-registry-fields.js",
77
78
  "test:network-retry": "node test/test-network-retry.js",
78
79
  "test:preflight-tools-check": "node test/test-preflight-tools-check.js",
79
80
  "test:quickupdate": "node test/test-quick-update-gate.js",
@@ -293,6 +293,10 @@ areas:
293
293
  when: "Setar/auditar tracking e medição (GA4, GTM, eventos, UTM, atribuição)."
294
294
  - id: site-launch-kit
295
295
  when: "Site pronto ou quase pronto pra ir ao ar: revisão de pré-lançamento em 15 rodadas corretivas (CTA acima da dobra, barra fixa mobile, tempo de resposta, prova social real, FAQ+FAQPage, imagens reais, endereço, titles, Open Graph, breadcrumbs, alt text, schema local, robots/sitemap, LGPD, medição), com regra anti-invenção e PENDÊNCIAS. Gatilhos: 'vamos subir o site', 'checklist de lançamento', 'revisa antes do deploy', pré-go-live, ou um item isolado (og:image, FAQ com schema, robots.txt). Roda DEPOIS do site construído, ANTES do deploy."
296
+ - id: pesquisa-de-publico-do-piva
297
+ when: "Pesquisa profunda de público, VoC, níveis de consciência, matriz de ângulos e léxico nativo de oferta compilados em HTML (metodologia @soupiva)."
298
+ - id: wizz-offer-forge
299
+ when: "Forjar oferta irresistível de resposta direta/infoproduto (mecanismo único, empilhamento de valor, garantia reversa, ponte de tráfego)."
296
300
  mcps:
297
301
  - id: scrapling
298
302
  when: "Scraping/crawl web para pesquisa de mercado, prospecção de leads e inteligência competitiva. Bypass anti-bot (Cloudflare), parsing adaptativo, spider concorrente. Requer: pip install 'scrapling[ai]' && scrapling install."
@@ -1,15 +1,13 @@
1
1
  ---
2
2
  name: wizz-code-review
3
- description: 'Review code changes adversarially using parallel review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor) with structured triage into actionable categories. Use when the user says "run code review" or "review this code"'
3
+ description: 'Review code changes adversarially using parallel review layers (Blind Hunter, Edge Case Hunter, Verification Gap Reviewer, Acceptance Auditor) with structured triage into actionable categories. Use when the user says "run code review" or "review this code"'
4
4
  ---
5
5
 
6
6
  # Code Review Workflow
7
7
 
8
- > **Cross-reference:** this is the orchestrator it gathers context, runs three parallel adversarial layers (Blind Hunter via `wizz-review-adversarial-general`, Edge Case Hunter, Acceptance Auditor), then triages and presents findings by severity. Use it for a real diff/PR review. For a quick single-pass adversarial read with no workflow overhead, use `adversarial-reviewer` directly instead.
8
+ > **Cross-reference:** this is the orchestrator. It gathers context, runs the review layers declared in `customize.toml` (Blind Hunter, Edge Case Hunter, Verification Gap Reviewer, Acceptance Auditor) as parallel context-free subagents driven by the prompt files under `review-prompts/`, then verifies, triages and presents findings by severity. Use it for a real diff/PR review. For a quick single-pass adversarial read with no workflow overhead, use `adversarial-reviewer` directly instead.
9
9
 
10
- **Goal:** Review code changes adversarially using parallel review layers and structured triage.
11
-
12
- **Your Role:** You are an elite code reviewer. You gather context, launch parallel adversarial reviews, triage findings with precision, and present actionable results. No noise, no filler.
10
+ **Goal:** Review code changes adversarially. No noise, no filler.
13
11
 
14
12
  Subagents, when the capability is available, are an important part of this workflow. Use them as directed by the workflow steps.
15
13
  If you need an explicit user instruction to run them, ask once now for the whole workflow run.
@@ -39,3 +39,74 @@ persistent_facts = [
39
39
  # Leave empty for no custom post-completion behavior.
40
40
 
41
41
  on_complete = ""
42
+
43
+ # Review layers for the review step. `instruction` is the layer's whole
44
+ # 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.
49
+
50
+ [[workflow.review_layers]]
51
+ id = "blind-hunter"
52
+ name = "Blind Hunter"
53
+ instruction = """
54
+ Launch a context-free subagent with this prompt:
55
+
56
+ Conduct a review of CONTENT.
57
+ Look for what's missing, not only what's wrong.
58
+ Find at least ten issues to fix or improve.
59
+ Output a Markdown list of findings only — no severity, priority, or ranking.
60
+ If the content is empty, stop and say so.
61
+ If you have zero findings, re-check and keep thinking; do not stop with an empty list.
62
+
63
+ CONTENT: the unified diff at `{diff_file}`. Read that file — it is the content under review.
64
+
65
+ 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.
66
+
67
+ """
68
+
69
+ [[workflow.review_layers]]
70
+ id = "edge-case-hunter"
71
+ name = "Edge Case Hunter"
72
+ instruction = """
73
+ Launch a context-free subagent with this prompt:
74
+
75
+ Read `{skill-root}/review-prompts/edge-case-hunter.md` completely and follow it as your review instructions.
76
+
77
+ claims_file (leave unread until your instructions call for it): {claims_file}
78
+
79
+ Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
80
+
81
+ 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.
82
+
83
+ """
84
+
85
+ [[workflow.review_layers]]
86
+ id = "verification-gap"
87
+ name = "Verification Gap Reviewer"
88
+ instruction = """
89
+ Launch a context-free subagent with this prompt:
90
+
91
+ Read `{skill-root}/review-prompts/verification-gap.md` completely and follow it as your review instructions.
92
+
93
+ Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
94
+
95
+ 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.
96
+
97
+ """
98
+
99
+ [[workflow.review_layers]]
100
+ id = "acceptance-auditor"
101
+ name = "Acceptance Auditor"
102
+ when = 'Only when {review_mode} = "full".'
103
+ instruction = """
104
+ Launch a subagent with this prompt:
105
+
106
+ 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.
107
+
108
+ Diff: the unified diff at `{diff_file}`. Read that file — it is the content under review.
109
+
110
+ 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.
111
+
112
+ """
@@ -0,0 +1,14 @@
1
+ # Claims Check
2
+
3
+ Final pass for the Edge Case Hunter — runs only when the message that launched you named a claims file. Read that file now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
4
+
5
+ The file holds the change's own narrative — commit messages and any stated description. The narrative is the author's testimony, not evidence: a claim repeated in a code comment is still the same claim, not confirmation. Extract each checkable claim — what the change does, what it preserves, ordering, arithmetic, and parity with existing code ("exactly as X does") — then try to falsify each one against the code you have already traced. Where your trace is not enough to decide, read the code that decides it: the compared-to function, the actual callee, the state the claim assumes.
6
+
7
+ Append one finding per falsified claim to the same JSON array, with the four standard fields plus:
8
+
9
+ - `kind`: `"claim"`
10
+ - `confidence`: `"high"`, `"medium"`, or `"low"`
11
+
12
+ For a claim finding the standard fields read as: `location` = where the code contradicts the claim; `trigger_condition` = the claim, quoted or tightly paraphrased; `guard_snippet` = what the code actually does; `potential_consequence` = what goes wrong for someone who believed the claim.
13
+
14
+ Verified claims produce nothing. Add nothing if nothing is falsified.
@@ -0,0 +1,14 @@
1
+ # Deletion Check
2
+
3
+ Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
4
+
5
+ For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
6
+
7
+ Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
8
+
9
+ - `kind`: `"deletion"`
10
+ - `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
11
+
12
+ For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
13
+
14
+ Add nothing if nothing qualifies.
@@ -0,0 +1,110 @@
1
+ # Edge Case Hunter Review
2
+
3
+ **Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
4
+ When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
5
+ When no diff is provided (full file or function), treat the entire provided content as the scope.
6
+ Ignore the rest of the codebase unless the provided content explicitly references external functions.
7
+ A brief secondary deletion check runs as Step 4 when the diff removes code.
8
+ A claims check runs as Step 5 when the launch message names a claims file.
9
+
10
+ **Inputs:**
11
+ - **content** — Content to review, or a path to read it from: diff, full file, or function
12
+ - **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
13
+ - **claims_file** (optional) — Path to the change's stated narrative. Do NOT read it before Step 5: the path tracing in Steps 2–3 must finish before the narrative is seen.
14
+
15
+ **MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
16
+
17
+ **Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler. Do not assign severity labels, rankings, or priority levels.**
18
+
19
+
20
+ ## EXECUTION
21
+
22
+ ### Step 1: Receive Content
23
+
24
+ - Take the content to review from the parent message that launched you — inline, or by reading the file it points to (never from this instruction file)
25
+ - If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
26
+ - Identify content type (diff, full file, or function) to determine scope rules
27
+
28
+ ### Step 2: Exhaustive Path Analysis
29
+
30
+ **Walk every branching path and boundary condition within scope — report only unhandled ones.**
31
+
32
+ - If `also_consider` input was provided, incorporate those areas into the analysis
33
+ - Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
34
+ - Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
35
+ - For each path: determine whether the content handles it
36
+ - Collect only the unhandled paths as findings — discard handled ones silently
37
+
38
+ ### Step 3: Validate Completeness
39
+
40
+ - Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
41
+ - Add any newly found unhandled paths to findings; discard confirmed-handled ones
42
+
43
+ ### Step 4: Deletion Check
44
+
45
+ If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
46
+
47
+ ### Step 5: Claims Check
48
+
49
+ If the launch message provided a `claims_file` path and the file exists and is non-empty: load `references/claims-check.md` and follow it.
50
+
51
+ ### Step 6: Present Findings
52
+
53
+ Output all findings as a single JSON array following the Output Format specification exactly.
54
+
55
+
56
+ ## OUTPUT FORMAT
57
+
58
+ Return ONLY a valid JSON array of objects. Each edge-case finding contains exactly these four fields:
59
+
60
+ ```json
61
+ [{
62
+ "location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
63
+ "trigger_condition": "one-line description (max 15 words)",
64
+ "guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
65
+ "potential_consequence": "what could actually go wrong (max 15 words)"
66
+ }]
67
+ ```
68
+
69
+ No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4 and claim findings from Step 5, if any, go in the same array with the extra fields defined in `references/deletion-check.md` and `references/claims-check.md`.
70
+
71
+
72
+ ## HALT CONDITIONS
73
+
74
+ - If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
75
+ <reference path="references/deletion-check.md">
76
+ # Deletion Check
77
+
78
+ Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
79
+
80
+ For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
81
+
82
+ Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
83
+
84
+ - `kind`: `"deletion"`
85
+ - `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
86
+
87
+ For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
88
+
89
+ Add nothing if nothing qualifies.
90
+ </reference>
91
+ <reference path="references/claims-check.md">
92
+ # Claims Check
93
+
94
+ Final pass for the Edge Case Hunter — runs only when the message that launched you named a claims file. Read that file now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
95
+
96
+ The file holds the change's own narrative — commit messages and any stated description. The narrative is the author's testimony, not evidence: a claim repeated in a code comment is still the same claim, not confirmation. Extract each checkable claim — what the change does, what it preserves, ordering, arithmetic, and parity with existing code ("exactly as X does") — then try to falsify each one against the code you have already traced. Where your trace is not enough to decide, read the code that decides it: the compared-to function, the actual callee, the state the claim assumes.
97
+
98
+ Append one finding per falsified claim to the same JSON array, with the four standard fields plus:
99
+
100
+ - `kind`: `"claim"`
101
+ - `confidence`: `"high"`, `"medium"`, or `"low"`
102
+
103
+ For a claim finding the standard fields read as: `location` = where the code contradicts the claim; `trigger_condition` = the claim, quoted or tightly paraphrased; `guard_snippet` = what the code actually does; `potential_consequence` = what goes wrong for someone who believed the claim.
104
+
105
+ Verified claims produce nothing. Add nothing if nothing is falsified.
106
+ </reference>
107
+
108
+ ## CONTENT SOURCE
109
+
110
+ "Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is.
@@ -0,0 +1,113 @@
1
+ # Verification Gap Review
2
+
3
+ **Goal:** Find changed behavior that could break without reliable verification catching it. Ask one question — "if the behavior this change is supposed to produce broke where it's actually used, would verification fail?" Do not hunt for correctness bugs, but report genuine problems you notice while tracing verification.
4
+
5
+ The main verification gap shapes are:
6
+
7
+ 1. **Regression gap:** the changed code regresses where it's used, and no test covering that use would fail.
8
+ 2. **Missing-adoption gap:** a place that should now use the new behavior doesn't; it handles the same case its own way, or not at all, and no test would flag the omission.
9
+ 3. **Broken-verification gap:** a test appears to cover the changed behavior, but would not actually protect it because it is skipped, flaky, not run in the normal verification path, or too weak to observe the regression.
10
+
11
+ ## Evidence Rules
12
+
13
+ - Read a test before claiming what it covers, runs, asserts, or misses.
14
+ - Before claiming no test exists, search the whole repo by the symbol under test and by import references; expected file locations are not enough.
15
+ - Never assert what you did not verify. If a finding cannot be grounded, drop it.
16
+ - In a finding, say what you actually checked — "none of the tests I read cover this" — and show how far you looked. Say a test doesn't exist anywhere only when the symbol/import-reference search actually shows that.
17
+ - Do not assign severity, confidence, priority, or ranking.
18
+
19
+ ## Review Sequence
20
+
21
+ ### Step 1: Screen for behavioral change
22
+
23
+ Screen each part of the change separately. If a part is non-behavioral, skip it. Call a part non-behavioral only when the changed code does not alter return values, thrown errors, caller-visible side effects, or observable state (including iteration order and emitted messages). Once a part meets that test, move on; do not inspect callers or tests for extra confirmation.
24
+
25
+ Common non-behavioral examples: formatting, comments, whitespace; pure renames; trivial getters/setters and pass-throughs; type-only or compiler-enforced changes with no runtime effect; etc.
26
+
27
+ Only outcomes produced by deterministic code are worth automatically testing; tests are useless on static source text and brittle on LLM output. Skip those parts.
28
+
29
+ If every part is skipped, output the clean result (see Output Format).
30
+
31
+ ### Step 2: Find the behavior that changed
32
+
33
+ Identify what behavior changed compared to the previous version: output, side effect, branch, error path, schema/event shape, config default, validation/authorization rule, external contract, etc. If the change affects more than one behavior, handle each separately.
34
+
35
+ Treat broad-impact changes as behavioral even when no single changed line looks important: dependency, toolchain, build/config, data-file, etc.
36
+
37
+ ### Step 3: Trace where that behavior is used
38
+
39
+ Trace the changed behavior to the places that observe it. Start with direct callers and registered entry points (routes, commands, DI), contract consumers (schemas, events, APIs, database readers), and reverse-dependency info if already available.
40
+
41
+ Follow a path only while the changed behavior is reachable and unverified. Stop when a test at that boundary would fail, the consumer does not observe the changed behavior, or the next hop is guesswork (dynamic dispatch, reflection, outside-repo consumers, etc.). Prefer the nearest observable boundary, often one to three hops away, especially across contract, integration, or service edges. If there are more than five similar consumers, group obvious repeats and check representative paths; expand only when a consumer observes the behavior differently.
42
+
43
+ ### Step 4: Qualify the consumer, then check its test
44
+
45
+ For each consumer, name the smallest realistic regression this consumer would observe: invert the branch, drop the default, omit the field, return the old error code, skip the integration call, etc. This is the Demonstration. If no such regression exists, drop the path; untested downstream code is not a finding.
46
+
47
+ A `Missing-adoption gap` qualifies not by the adoption failure alone but by a supersession signal: the change gives clear evidence the new behavior is meant to replace the local one — PR intent, naming or docs, a replaced sibling site, deleted duplicate logic, or a test defining the new rule — and the local site shares the same observable contract. Without a supersession signal and a shared observable contract, it is a refactor suggestion, not a verification-gap finding. Once both hold, check whether any test for that site would flag the non-adoption; missing coverage of the non-adoption is the gap itself, not a disqualifier.
48
+
49
+ Find and read the relevant test. Ask whether the Demonstration would make an assertion fail.
50
+
51
+ - If yes, the behavior is verified. No finding.
52
+ - For a regression-style Demonstration: if no test runs the path, the test is skipped/flaky/not run normally, or the test runs the code without checking the changed result, report a `Regression gap` or `Broken-verification gap`.
53
+ - For a qualifying Missing-adoption case: if none of the site tests you found assert it adopts the new behavior, report a `Missing-adoption gap`.
54
+
55
+ A test counts only if it runs normally and an assertion observes the changed output, branch, or contract. These do not count: no execution; source-text assertions that match a file's wording instead of running it; success/no-throw/snapshot-only checks; mock/log-call checks; human-only checks; tests that mock away the integration; e2e tests that pass through without checking the changed output; stale assertions or fixtures.
56
+
57
+ For example, `expect(x ?? DEFAULT).toBe(DEFAULT)` passes when `x` is missing.
58
+
59
+ Common patterns:
60
+
61
+ - **Caller-path gap** — helper test covers the branch, but caller values skip it.
62
+ - **Contract drift** — payload/schema/event changes must be verified at the consumer.
63
+ - **Migration compatibility** — tests only create new-format rows or fresh schemas.
64
+ - **Phantom exception** — handled partial-failure path has no test.
65
+ - **Missing-adoption gap** — sibling site should use the new rule/helper and does not.
66
+ - **Removed verification** — deleted test or weakened assertion leaves behavior unpinned; removing a source-text assertion is not this, since it never counted.
67
+
68
+ ### Step 5: Confirm each finding is real
69
+
70
+ Before writing a finding, re-open the specific tests or search results the finding relies on. Verify the Demonstration would not make any test you checked fail, or that the absence claim is backed by the symbol/import-reference search. Do not claim more than you verified; drop any finding you cannot ground.
71
+
72
+ Explain why the test misses the bug using what the test sets up and checks.
73
+
74
+ Do not report: compiler/type-checker-enforced cases; behavior already verified by an integration, contract, or e2e test; implementation-detail or mock-only tests; low coverage or a missing test file by itself; legacy untested code the change did not affect.
75
+
76
+ Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting.
77
+
78
+ ## OUTPUT FORMAT
79
+
80
+ Emit each verification-gap finding as one block. No general advice, no severity or confidence.
81
+
82
+ ```markdown
83
+ ### <one-line title naming the gap>
84
+
85
+ - **Changed surface:** the exact behavior or contract that changed — `file:line`.
86
+ - **Impacted consumer or site:** named concretely with `file:line` (e.g. "the `createInvoice` mutation used by the billing dashboard at `billing/dashboard.ts:88`," not "callers of this function").
87
+ - **Existing test evidence:**
88
+ - `Regression gap`: what the relevant test actually asserts, with `file:line`; or, if none, the symbol/import-reference searches run and their result.
89
+ - `Missing-adoption gap`: tests for the impacted site, and whether any assert it adopts the new behavior.
90
+ - `Broken-verification gap`: the apparent test or verification path, and why it does not count.
91
+ - **Missing verification:** the precise assertion or check that's absent.
92
+ - **Demonstration:**
93
+ - `Regression gap` / `Broken-verification gap`: the concrete regression that would ship undetected, and why the tests you checked would not fail.
94
+ - `Missing-adoption gap`: the case the site mishandles by not adopting the new behavior, and that none of the tests you read assert adoption.
95
+ - **Consequence:** the concrete thing that ships wrong — a regression the checked evidence would not catch, or a site that should use the new behavior and doesn't.
96
+ - **Suggested test shape:** (optional) the kind of test that would close the gap, fit to the repo's own way of verifying — don't impose a generic test pyramid.
97
+ ```
98
+
99
+ If you noticed genuine non-gap problems while tracing verification, append:
100
+
101
+ ```markdown
102
+ ## Other findings
103
+
104
+ - <description only; no severity, confidence, priority, or ranking>
105
+ ```
106
+
107
+ When you find no verification gaps and no other findings, output exactly this single line, not an empty response:
108
+
109
+ `No verification gaps found.`
110
+
111
+ ## CONTENT SOURCE
112
+
113
+ "Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is. If no content is supplied, or it is empty or unreadable, stop with exactly: `No verification gaps found.`
@@ -1,5 +1,6 @@
1
1
  ---
2
- diff_output: '' # set at runtime
2
+ diff_file: '' # set at runtime: path to the diff file
3
+ claims_file: '' # set at runtime (path or empty)
3
4
  spec_file: '' # set at runtime (path or empty)
4
5
  review_mode: '' # set at runtime: "full" or "no-spec"
5
6
  story_key: '' # set at runtime when discovered from sprint status
@@ -11,7 +12,7 @@ story_key: '' # set at runtime when discovered from sprint status
11
12
 
12
13
  - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
13
14
  - The prompt that triggered this workflow IS the intent — not a hint.
14
- - Do not modify any files. This step is read-only.
15
+ - Writing `{diff_file}` and the claims file is the only change this step may make. Otherwise it is read-only.
15
16
 
16
17
  ## INSTRUCTIONS
17
18
 
@@ -35,7 +36,10 @@ story_key: '' # set at runtime when discovered from sprint status
35
36
 
36
37
  **Tier 3 — Sprint tracking.**
37
38
  Look for a sprint status file (`*sprint-status*`) in `{implementation_artifacts}` or `{planning_artifacts}`. If found, scan for stories with status `review`:
38
- - **Exactly one `review` story:** Set `{story_key}` to the story's key (e.g., `1-2-user-auth`). Suggest it: "I found story <story-id> in `review` status. Would you like to review its changes? [Y] Yes / [N] No, let me choose". If confirmed, use the story context to determine the diff source (branch name derived from story slug, or uncommitted changes). If declined, clear `{story_key}` and fall through.
39
+ - **Exactly one `review` story:** Set `{story_key}` to the story's key (e.g., `1-2-user-auth`). HALT and give the user a choice:
40
+ - **Review this story** — review the detected story `<story-id>` (status `review`).
41
+ - **Choose another target** — pick a different review target.
42
+ If the user chooses **Review this story**, use the story context to determine the diff source (branch name derived from story slug, or uncommitted changes). If they choose **Choose another target**, clear `{story_key}` and fall through.
39
43
  - **Multiple `review` stories:** Present them as numbered options alongside a manual choice option. Wait for user selection. If a story is selected, set `{story_key}` and use its context to determine the diff source. If manual choice is selected, clear `{story_key}` and fall through.
40
44
  - **None:** Fall through.
41
45
 
@@ -54,32 +58,37 @@ story_key: '' # set at runtime when discovered from sprint status
54
58
  - **Specific commit range** (ask for the range)
55
59
  - **Provided diff or file list** (user pastes or provides a path)
56
60
 
57
- 3. Construct `{diff_output}` from the chosen source.
58
- - For **staged changes only**: run `git diff --cached`.
59
- - For **uncommitted changes** (staged + unstaged): run `git diff HEAD`.
60
- - For **branch diff**: verify the base branch exists before running `git diff`. If it does not exist, HALT and ask the user for a valid branch.
61
- - For **commit range**: verify the range resolves. If it does not, HALT and ask the user for a valid range.
62
- - 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.
63
- - For **file list**: validate each path exists in the working tree. Construct `{diff_output}` by running `git diff HEAD -- <path1> <path2> ...`. If any paths are untracked (new files not yet staged), use `git diff --no-index /dev/null <path>` to include them. 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.
64
- - After constructing `{diff_output}`, verify it is non-empty regardless of source type. If empty, HALT and tell the user there is nothing to review.
65
-
66
- 4. **Set the spec context.**
67
- - If `{spec_file}` is already set (from Tier 1 or Tier 2): verify the file exists and is readable, then set `{review_mode}` = `"full"`.
68
- - Otherwise, ask the user: **Is there a spec or story file that provides context for these changes?**
69
- - If yes: set `{spec_file}` to the path provided, verify the file exists and is readable, then set `{review_mode}` = `"full"`.
70
- - If no: set `{review_mode}` = `"no-spec"`.
71
-
72
- 5. 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.
73
-
74
- 6. Sanity check: if `{diff_output}` exceeds approximately 3000 lines, warn the user and offer to chunk the review by file group.
75
- - If the user opts to chunk: agree on the first group, narrow `{diff_output}` accordingly, and list the remaining groups for the user to note for follow-up runs.
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.
69
+ - Read `{diff_file}` yourself whenever you need the diff for your own context — triage and presentation later in this workflow.
70
+
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.
72
+
73
+ 5. **Set the spec context.**
74
+ - 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
+ - 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
+ - Else (neither a spec path nor an explicit no-spec declaration is present): ask the user to choose:
77
+ 1. Provide a spec or story file path for context; or
78
+ 2. Continue without a spec.
79
+ - 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
+ - If the user explicitly chooses to continue without a spec: set `{review_mode}` = `"no-spec"`.
81
+
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.
83
+
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.
76
86
  - If the user declines: proceed as-is with the full diff.
77
87
 
78
88
  ### CHECKPOINT
79
89
 
80
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.
81
91
 
82
-
83
92
  ## NEXT
84
93
 
85
94
  Read fully and follow `./step-02-review.md`
@@ -7,28 +7,25 @@ failed_layers: '' # set at runtime: comma-separated list of layers that failed o
7
7
  ## RULES
8
8
 
9
9
  - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
10
- - The Blind Hunter subagent receives NO project context — diff only.
11
- - The Edge Case Hunter subagent receives diff and project read access.
12
- - The Acceptance Auditor subagent receives diff, spec, and context docs.
13
10
  - All review subagents must run at the same model capability as the current session.
11
+ - Run subagents synchronously: launch them together as blocking calls awaited in this turn — never backgrounded or detached, never ending the turn to await results.
14
12
 
15
13
  ## INSTRUCTIONS
16
14
 
17
- 1. If `{review_mode}` = `"no-spec"`, note to the user: "Acceptance Auditor skipped — no spec file provided."
15
+ 1. The review layers are `{workflow.review_layers}`, resolved during activation.
18
16
 
19
- 2. Launch parallel subagents without conversation context. If subagents are not available, generate prompt files in `{implementation_artifacts}` — one per reviewer role below — and HALT. Ask the user to run each in a separate session (ideally a different LLM) and paste back the findings. When findings are pasted, resume from this point and proceed to step 3.
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.
20
21
 
21
- - **Blind Hunter** receives inline `{diff_output}` only. No spec, no context docs, no project access. Invoke via the `wizz-review-adversarial-general` skill.
22
+ If no layer is active, HALT with status `blocked` and blocking condition `no active review layers`.
22
23
 
23
- - **Edge Case Hunter** receives `{diff_output}` and read access to the project. Invoke via the `wizz-review-edge-case-hunter` skill.
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.
24
25
 
25
- - **Acceptance Auditor** (only if `{review_mode}` = `"full"`) receives `{diff_output}`, the content of the file at `{spec_file}`, and any loaded context docs. Its prompt:
26
- > You are an Acceptance Auditor. Review this diff against the spec and 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.
27
-
28
- 3. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, append the layer name to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
29
-
30
- 4. Collect all findings from the completed layers.
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.
31
27
 
28
+ 5. Collect all findings from the completed layers, keeping track of each finding's originating layer `id`.
32
29
 
33
30
  ## NEXT
34
31
 
@@ -6,43 +6,37 @@
6
6
  ## RULES
7
7
 
8
8
  - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
9
- - Be precise. When uncertain between categories, prefer the more conservative classification.
10
9
 
11
10
  ## INSTRUCTIONS
12
11
 
13
- 1. **Normalize** findings into a common format. Expected input formats:
14
- - Adversarial (Blind Hunter): markdown list of descriptions
15
- - Edge Case Hunter: JSON array with `location`, `trigger_condition`, `guard_snippet`, `potential_consequence` fields
16
- - Acceptance Auditor: markdown list with title, AC/constraint reference, and evidence
17
-
18
- If a layer's output does not match its expected format, attempt best-effort parsing. Note any parsing issues for the user.
19
-
20
- Convert all to a unified list where each finding has:
12
+ 1. **Normalize** findings from all layers into a unified list where each finding has:
21
13
  - `id` -- sequential integer
22
- - `source` -- `blind`, `edge`, `auditor`, or merged sources (e.g., `blind+edge`)
14
+ - `source` -- the `id` of the layer that produced the finding (e.g., `blind-hunter`)
23
15
  - `title` -- one-line summary
24
16
  - `detail` -- full description
25
17
  - `location` -- file and line reference (if available)
26
18
 
27
- 2. **Deduplicate.** If two or more findings describe the same issue, merge them into one:
28
- - Use the most specific finding as the base (prefer edge-case JSON with location over adversarial prose).
29
- - Append any unique detail, reasoning, or location references from the other finding(s) into the surviving `detail` field.
30
- - Set `source` to the merged sources (e.g., `blind+edge`).
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:
20
+ - **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
+ - **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
+ - `low` -- none or cosmetic
23
+ - `medium` -- tolerable
24
+ - `high` -- intolerable
25
+ - **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
+ - 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
+
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`).
31
29
 
32
- 3. **Classify** each finding into exactly one bucket:
30
+ 4. **Route** each entry into exactly one triage bucket:
33
31
  - **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"`.
34
32
  - **patch** -- Code issue that is fixable without human input. The correct fix is unambiguous.
35
33
  - **defer** -- Pre-existing issue not caused by the current change. Real but not actionable now.
36
- - **dismiss** -- Noise, false positive, or handled elsewhere.
37
-
38
- If `{review_mode}` = `"no-spec"` and a finding would otherwise be `decision_needed`, reclassify it as `patch` (if the fix is unambiguous) or `defer` (if not).
39
-
40
- 4. **Drop** all `dismiss` findings. Record the dismiss count for the summary.
41
34
 
42
- 5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping dismissed AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
35
+ 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).
43
36
 
44
- 6. If zero findings remain after triage (all rejected or none raised): state "✅ Clean review all layers passed." (Step 3 already warned if any review layers failed via `{failed_layers}`.)
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.
45
38
 
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}`.)
46
40
 
47
41
  ## NEXT
48
42