wizz-method 1.14.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.
- package/package.json +3 -2
- package/skills-registry.yaml +4 -0
- package/src/bmm-skills/3-solutioning/wizz-architecture/scripts/__pycache__/lint_spine.cpython-313.pyc +0 -0
- package/src/bmm-skills/3-solutioning/wizz-architecture/scripts/tests/__pycache__/test_lint_spine.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/SKILL.md +3 -5
- package/src/bmm-skills/4-implementation/wizz-code-review/customize.toml +71 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/references/claims-check.md +14 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/references/deletion-check.md +14 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/review-prompts/edge-case-hunter.md +110 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/review-prompts/verification-gap.md +113 -0
- package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-01-gather-context.md +32 -23
- package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-02-review.md +10 -13
- package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-03-triage.md +16 -22
- package/src/bmm-skills/4-implementation/wizz-code-review/steps/step-04-present.md +4 -2
- package/src/bmm-skills/4-implementation/wizz-quick-dev/customize.toml +76 -0
- package/src/bmm-skills/4-implementation/wizz-quick-dev/references/claims-check.md +14 -0
- package/src/bmm-skills/4-implementation/wizz-quick-dev/references/deletion-check.md +14 -0
- package/src/bmm-skills/4-implementation/wizz-quick-dev/review-prompts/edge-case-hunter.md +110 -0
- package/src/bmm-skills/4-implementation/wizz-quick-dev/review-prompts/verification-gap.md +113 -0
- package/src/bmm-skills/4-implementation/wizz-quick-dev/step-04-review.md +38 -16
- package/src/bmm-skills/4-implementation/wizz-retrospective/SKILL.md +56 -1488
- package/src/bmm-skills/4-implementation/wizz-retrospective/customize.toml +3 -5
- package/src/bmm-skills/4-implementation/wizz-retrospective/references/acceptance-verdict.md +55 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/references/aggregate-views.md +17 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/references/evidence-gathering.md +30 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/references/retro-document.md +84 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/references/team-discussion.md +22 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/__pycache__/sprint_status.cpython-313.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/git_evidence.py +304 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/sprint_status.py +746 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/fixtures/sprint-status-template.yaml +71 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/test_git_evidence.py +750 -0
- package/src/bmm-skills/4-implementation/wizz-retrospective/scripts/tests/test_sprint_status.py +1579 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/SKILL.md +39 -296
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/customize.toml +1 -3
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/fix-sprint-status.md +30 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/generate-tracking.md +25 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/readiness-gate.md +20 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/status-view.md +14 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/references/validate.md +10 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/__pycache__/sprint_plan.cpython-313.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/sprint_plan.py +697 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/scripts/tests/test_sprint_plan.py +524 -0
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/sprint-status-template.yaml +9 -7
- package/src/bmm-skills/module-help.csv +3 -3
- package/src/core-skills/_shared/handoff-protocol.md +7 -8
- package/src/core-skills/module-help.csv +1 -0
- package/src/core-skills/wizz-advanced-elicitation/SKILL.md +36 -114
- package/src/core-skills/wizz-advanced-elicitation/{methods.csv → assets/methods.csv} +29 -27
- package/src/core-skills/wizz-advanced-elicitation/customize.toml +54 -0
- package/src/core-skills/wizz-advanced-elicitation/scripts/__pycache__/pick_methods.cpython-313.pyc +0 -0
- package/src/core-skills/wizz-advanced-elicitation/scripts/pick_methods.py +233 -0
- package/src/core-skills/wizz-advanced-elicitation/scripts/tests/__pycache__/test_pick_methods.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/wizz-advanced-elicitation/scripts/tests/test_pick_methods.py +228 -0
- package/src/core-skills/wizz-brainstorming/SKILL.md +2 -2
- package/src/core-skills/wizz-brainstorming/assets/brain-selector.html +2 -0
- package/src/core-skills/wizz-brainstorming/references/converge.md +1 -1
- package/src/core-skills/wizz-brainstorming/references/finalize.md +1 -1
- package/src/core-skills/wizz-brainstorming/references/headless.md +1 -1
- package/src/core-skills/wizz-brainstorming/references/mode-autonomous.md +1 -1
- package/src/core-skills/wizz-brainstorming/scripts/__pycache__/brain.cpython-313.pyc +0 -0
- package/src/core-skills/wizz-brainstorming/scripts/brain.py +36 -6
- package/src/core-skills/wizz-brainstorming/scripts/tests/__pycache__/test_brain.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/wizz-brainstorming/scripts/tests/__pycache__/test_brain.cpython-314.pyc +0 -0
- package/src/core-skills/wizz-brainstorming/scripts/tests/test_brain.py +24 -2
- package/src/core-skills/wizz-customize/scripts/__pycache__/list_customizable_skills.cpython-313.pyc +0 -0
- package/src/core-skills/wizz-customize/scripts/tests/__pycache__/test_list_customizable_skills.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/wizz-forge-idea/SKILL.md +107 -0
- package/src/core-skills/wizz-forge-idea/customize.toml +41 -0
- package/src/core-skills/wizz-forge-idea/scripts/__pycache__/resolve_personas.cpython-313.pyc +0 -0
- package/src/core-skills/wizz-forge-idea/scripts/__pycache__/resolve_personas.cpython-314.pyc +0 -0
- package/src/core-skills/wizz-forge-idea/scripts/resolve_personas.py +275 -0
- package/src/core-skills/wizz-forge-idea/scripts/tests/__pycache__/test_resolve_personas.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/wizz-forge-idea/scripts/tests/__pycache__/test_resolve_personas.cpython-314.pyc +0 -0
- package/src/core-skills/wizz-forge-idea/scripts/tests/test_resolve_personas.py +138 -0
- package/src/core-skills/wizz-party-mode/SKILL.md +37 -54
- package/src/core-skills/wizz-party-mode/customize.toml +61 -2
- package/src/core-skills/wizz-party-mode/references/create-party.md +8 -3
- package/src/core-skills/wizz-party-mode/references/mode-agent-team.md +3 -1
- package/src/core-skills/wizz-party-mode/references/mode-subagent.md +16 -4
- package/src/core-skills/wizz-party-mode/references/party-memory.md +51 -0
- package/src/core-skills/wizz-party-mode/scripts/__pycache__/resolve_party.cpython-313.pyc +0 -0
- package/src/core-skills/wizz-party-mode/scripts/__pycache__/resolve_party.cpython-314.pyc +0 -0
- package/src/core-skills/wizz-party-mode/scripts/resolve_party.py +22 -7
- package/src/core-skills/wizz-party-mode/scripts/tests/__pycache__/test_resolve_party.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/core-skills/wizz-party-mode/scripts/tests/__pycache__/test_resolve_party.cpython-314.pyc +0 -0
- package/src/core-skills/wizz-party-mode/scripts/tests/{test-resolve_party.py → test_resolve_party.py} +8 -0
- package/src/core-skills/wizz-review-edge-case-hunter/SKILL.md +17 -3
- package/src/modules/wizz/README.md +1 -1
- package/src/modules/wizz/_shared/model-ladder.md +22 -0
- package/src/modules/wizz/_shared/token-economy.md +6 -2
- package/src/modules/wizz/agents/wizz-ads/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-copy/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-designer/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-growth/customize.toml +11 -1
- package/src/modules/wizz/agents/wizz-maestro/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-memoria/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-qa/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-seo/customize.toml +1 -1
- package/src/modules/wizz/agents/wizz-social/customize.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-analyst.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-architect.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-dev.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-pm.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-tech-writer.toml +1 -1
- package/src/modules/wizz/overrides/wizz-agent-ux-designer.toml +1 -1
- package/src/modules/wizz/subagents/codex/wizz-exec-haiku.toml +16 -0
- package/src/modules/wizz/subagents/codex/wizz-exec-opus.toml +18 -0
- package/src/modules/wizz/subagents/codex/wizz-exec-review.toml +17 -0
- package/src/modules/wizz/subagents/codex/wizz-exec-sonnet.toml +17 -0
- package/src/modules/wizz/subagents/gemini/wizz-exec-haiku.md +15 -0
- package/src/modules/wizz/subagents/gemini/wizz-exec-opus.md +17 -0
- package/src/modules/wizz/subagents/gemini/wizz-exec-review.md +15 -0
- package/src/modules/wizz/subagents/gemini/wizz-exec-sonnet.md +16 -0
- package/src/modules/wizz/subagents/opencode/wizz-exec-haiku.md +14 -0
- package/src/modules/wizz/subagents/opencode/wizz-exec-opus.md +16 -0
- package/src/modules/wizz/subagents/opencode/wizz-exec-review.md +16 -0
- package/src/modules/wizz/subagents/opencode/wizz-exec-sonnet.md +15 -0
- package/src/modules/wizz/subagents/wizz-exec-opus.md +16 -0
- package/src/modules/wizz/subagents/wizz-exec-review.md +15 -0
- package/src/scripts/__pycache__/memlog.cpython-313.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_memlog.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-313-pytest-9.1.1.pyc +0 -0
- package/src/skills-lib/pesquisa-de-publico-do-piva/README.md +83 -0
- package/src/skills-lib/pesquisa-de-publico-do-piva/SKILL.md +65 -0
- package/src/skills-lib/pesquisa-de-publico-do-piva/assets/template.html +414 -0
- package/src/skills-lib/pesquisa-de-publico-do-piva/prompts.md +131 -0
- package/src/skills-lib/wizz-offer-forge/README.md +13 -0
- package/src/skills-lib/wizz-offer-forge/SKILL.md +74 -0
- package/src/skills-lib/wizz-offer-forge/references/empilhamento-valor.md +25 -0
- package/src/skills-lib/wizz-offer-forge/references/garantia-reversa.md +22 -0
- package/src/skills-lib/wizz-offer-forge/references/mecanismo-unico.md +28 -0
- package/src/skills-lib/wizz-offer-forge/references/ponte-trafego.md +21 -0
- package/src/skills-lib/wizz-router/references/routing-table-flat.md +2 -0
- package/tools/installer/core/installer.js +57 -0
- package/tools/installer/ide/_config-driven.js +44 -30
- package/tools/installer/ide/platform-codes.yaml +42 -3
- package/tools/installer/modules/external-manager.js +140 -2
- package/tools/installer/modules/official-modules.js +68 -21
- package/tools/installer/prompts.js +45 -103
- package/tools/installer/ui.js +64 -7
- package/wizz-modules.yaml +65 -11
- package/src/bmm-skills/4-implementation/wizz-sprint-planning/checklist.md +0 -34
- package/src/core-skills/wizz-brainstorming/scripts/memlog.py +0 -202
- package/src/core-skills/wizz-brainstorming/scripts/tests/test_memlog.py +0 -265
|
@@ -35,7 +35,9 @@ Also append each `defer` finding to `{deferred_work_file}` under a heading `## D
|
|
|
35
35
|
|
|
36
36
|
Announce what was written:
|
|
37
37
|
|
|
38
|
-
> **Code review complete.** <D> `decision-needed`, <P> `patch`, <W> `defer`, <R> dismissed
|
|
38
|
+
> **Code review complete.** <D> `decision-needed`, <P> `patch`, <W> `defer`, <R> dismissed.
|
|
39
|
+
|
|
40
|
+
The findings report ends with a `Dismissed` appendix — one line per dismissed finding: the finding and the reason that disposed of its claim — in the story file's `### Review Findings` section when `{spec_file}` is set, at the tail of the chat listing otherwise.
|
|
39
41
|
|
|
40
42
|
If `{spec_file}` is set, add: `Findings written to the review findings section in {spec_file}.`
|
|
41
43
|
Otherwise add: `Findings are listed above. No story file was provided, so nothing was persisted.`
|
|
@@ -86,7 +88,7 @@ Skip this section if `{spec_file}` is not set.
|
|
|
86
88
|
|
|
87
89
|
#### Determine new status based on review outcome
|
|
88
90
|
|
|
89
|
-
- If all `decision-needed` and `patch` findings were resolved (fixed or dismissed) AND no unresolved
|
|
91
|
+
- If all `decision-needed` and `patch` findings were resolved (fixed or dismissed) AND no unresolved `high`/`medium` findings remain: set `{new_status}` = `done`. Update the story file Status section to `done`.
|
|
90
92
|
- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `in-progress`. Update the story file Status section to `in-progress`.
|
|
91
93
|
|
|
92
94
|
Save the story file.
|
|
@@ -39,3 +39,79 @@ 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 {claims_file} are
|
|
46
|
+
# substituted at run time; both are paths, and {diff_file} is the unified
|
|
47
|
+
# diff file the layer reads. Empty `instruction` disables a layer.
|
|
48
|
+
[[workflow.review_layers]]
|
|
49
|
+
id = "blind-hunter"
|
|
50
|
+
name = "Blind Hunter"
|
|
51
|
+
instruction = """
|
|
52
|
+
Launch a context-free subagent with this prompt:
|
|
53
|
+
|
|
54
|
+
Conduct a review of CONTENT.
|
|
55
|
+
Look for what's missing, not only what's wrong.
|
|
56
|
+
Find at least ten issues to fix or improve.
|
|
57
|
+
Output a Markdown list of findings only — no severity, priority, or ranking.
|
|
58
|
+
If the content is empty, stop and say so.
|
|
59
|
+
If you have zero findings, re-check and keep thinking; do not stop with an empty list.
|
|
60
|
+
|
|
61
|
+
CONTENT: the unified diff at `{diff_file}`. Read that file — it is the content under review.
|
|
62
|
+
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
[[workflow.review_layers]]
|
|
68
|
+
id = "edge-case-hunter"
|
|
69
|
+
name = "Edge Case Hunter"
|
|
70
|
+
instruction = """
|
|
71
|
+
Launch a context-free subagent with this prompt:
|
|
72
|
+
|
|
73
|
+
Read `{skill-root}/review-prompts/edge-case-hunter.md` completely and follow it as your review instructions.
|
|
74
|
+
|
|
75
|
+
claims_file (leave unread until your instructions call for it): {claims_file}
|
|
76
|
+
|
|
77
|
+
Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
|
|
78
|
+
|
|
79
|
+
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.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
[[workflow.review_layers]]
|
|
84
|
+
id = "verification-gap"
|
|
85
|
+
name = "Verification Gap Reviewer"
|
|
86
|
+
instruction = """
|
|
87
|
+
Launch a context-free subagent with this prompt:
|
|
88
|
+
|
|
89
|
+
Read `{skill-root}/review-prompts/verification-gap.md` completely and follow it as your review instructions.
|
|
90
|
+
|
|
91
|
+
Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
|
|
92
|
+
|
|
93
|
+
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.
|
|
94
|
+
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
# Review layers for the one-shot route.
|
|
98
|
+
|
|
99
|
+
[[workflow.oneshot_review_layers]]
|
|
100
|
+
id = "blind-hunter"
|
|
101
|
+
name = "Blind Hunter"
|
|
102
|
+
instruction = """
|
|
103
|
+
Launch a context-free subagent with this prompt:
|
|
104
|
+
|
|
105
|
+
Conduct a review of CONTENT.
|
|
106
|
+
Look for what's missing, not only what's wrong.
|
|
107
|
+
Find at least ten issues to fix or improve.
|
|
108
|
+
Output a Markdown list of findings only — no severity, priority, or ranking.
|
|
109
|
+
If the content is empty, stop and say so.
|
|
110
|
+
If you have zero findings, re-check and keep thinking; do not stop with an empty list.
|
|
111
|
+
|
|
112
|
+
CONTENT:
|
|
113
|
+
The changed files in the current worktree. Inspect them directly before reviewing.
|
|
114
|
+
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
"""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Claims Check
|
|
2
|
+
|
|
3
|
+
Final pass for the Edge Case Hunter. Read the claims file named in the message that launched you now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
|
|
4
|
+
|
|
5
|
+
It is the spec the change was built from. Read only its `## Intent` and `## Tasks & Acceptance` sections — the claims live there; ignore the rest of the file. The spec is the change's own account of itself: 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.
|
|
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** — Path to the spec this change was built from. Do NOT read it before Step 5: the path tracing in Steps 2–3 must finish before the claims are 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
|
+
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. Read the claims file named in the message that launched you now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
|
|
95
|
+
|
|
96
|
+
It is the spec the change was built from. Read only its `## Intent` and `## Tasks & Acceptance` sections — the claims live there; ignore the rest of the file. The spec is the change's own account of itself: 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 the file it points to is missing, empty, or unreadable, say exactly that and stop — never report a clean review for content you could not read.
|
|
@@ -1,49 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
-
|
|
3
|
+
diff_file: '' # set at runtime: path to the unified diff file
|
|
4
|
+
claims_file: '' # set at runtime: path to the change's own narrative
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Step 4: Review
|
|
7
8
|
|
|
8
9
|
## RULES
|
|
9
10
|
|
|
10
|
-
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
11
|
+
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`. Write any file output in `{document_output_language}`.
|
|
11
12
|
- Review subagents get NO conversation context.
|
|
12
13
|
- All review subagents must run at the same model capability as the current session.
|
|
14
|
+
- Run subagents synchronously: launch them together, then wait for all results before continuing. Never backgrounded or detached, never ending the turn to await results.
|
|
13
15
|
|
|
14
16
|
## INSTRUCTIONS
|
|
15
17
|
|
|
16
18
|
Change `{spec_file}` status to `in-review` in the frontmatter before continuing.
|
|
17
19
|
|
|
18
|
-
###
|
|
20
|
+
### Stage the Diff
|
|
19
21
|
|
|
20
|
-
Read `{baseline_commit}` from `{spec_file}` frontmatter. If `{baseline_commit}` is missing or `NO_VCS`, use best effort to determine what changed. Otherwise
|
|
22
|
+
Read `{baseline_commit}` from `{spec_file}` frontmatter. If `{baseline_commit}` is missing or `NO_VCS`, use best effort to determine what changed. Otherwise use the repository's version-control tooling to write `{diff_file}` — a uniquely-named file in the system temp directory — with a unified diff of all changes since `{baseline_commit}`, untracked files included. The review layers read that file; the diff text is never pasted into their prompts.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
Set `{claims_file}` = `{spec_file}`. The spec is the change's own account of itself, and it goes to the edge-case layer alone — as a path, so that layer reads it only after its own tracing and the other layers never see it at all.
|
|
25
|
+
|
|
26
|
+
Writing `{diff_file}` is the only change this section makes. Do NOT `git add` anything.
|
|
23
27
|
|
|
24
28
|
### Review
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
1. The review layers are `{workflow.review_layers}`, resolved during activation. For each layer:
|
|
31
|
+
- `instruction` empty or missing → drop the layer silently (an override disabled it).
|
|
32
|
+
- `when` condition present and not satisfied by the current context → drop the layer and tell the user.
|
|
33
|
+
- otherwise → the layer is active.
|
|
34
|
+
|
|
35
|
+
If no layer is active, HALT and escalate to the human.
|
|
36
|
+
|
|
37
|
+
2. 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}`). `{diff_file}` is a path: substitute the absolute path and let the layer read the file — a launch prompt never carries diff text. When an instruction 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 — the child's working directory is not yours. Spawn every reviewer before reading or reacting to any of their output; begin collection and triage only once all are launched.
|
|
38
|
+
|
|
39
|
+
3. If a layer's instruction requires subagents and none are available, for each such layer write under `{implementation_artifacts}` that layer's child prompt with every file it points to — the diff, the claims, the reviewer instruction file — replaced inline by that file's contents, and every other line left exactly as written. That session shares no filesystem with this one, so its prompt has to stand alone; this is the only place you read a reviewer instruction file yourself. Then HALT. Ask the human to run each in a separate session (ideally a different LLM) and paste back the findings.
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
- **Edge case hunter** — receives `{diff_output}` and read access to the project. Invoke via the `wizz-review-edge-case-hunter` skill.
|
|
30
|
-
- **Acceptance auditor** — receives `{diff_output}`, `{spec_file}`, and read access to the project. Must also read the docs listed in `{spec_file}` frontmatter `context`. Checks for violations of acceptance criteria, rules, and principles from the spec and context docs.
|
|
41
|
+
4. If any layer fails, times out, or returns empty, note it and proceed with the remaining layers. Collect all findings, keeping track of each finding's originating layer `id`.
|
|
31
42
|
|
|
32
43
|
### Classify
|
|
33
44
|
|
|
34
|
-
1.
|
|
35
|
-
|
|
45
|
+
1. 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:
|
|
46
|
+
- **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.
|
|
47
|
+
- **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.
|
|
48
|
+
- `low`: none or cosmetic
|
|
49
|
+
- `medium`: tolerable
|
|
50
|
+
- `high`: intolerable
|
|
51
|
+
- **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 in the `## Review Triage Log` section of `{spec_file}`; never drop a finding silently.
|
|
52
|
+
- A finding whose fix edits the spec this run is implementing: dismiss. A finding whose fix edits an agent-context document (e.g. CLAUDE.md, AGENTS.md, rules files, other specs): defer, never patch.
|
|
53
|
+
2. 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 and the highest severity among them.
|
|
54
|
+
3. Route each entry into exactly one triage category. The first three are **this story's problem** — caused or exposed by the current change. The last is **not this story's problem**.
|
|
36
55
|
- **intent_gap** — caused by the change; cannot be resolved from the spec because the captured intent is incomplete. Do not infer intent unless there is exactly one possible reading.
|
|
37
56
|
- **bad_spec** — caused by the change, including direct deviations from spec. The spec should have been clear enough to prevent it. When in doubt between bad_spec and patch, prefer bad_spec — a spec-level fix is more likely to produce coherent code.
|
|
38
57
|
- **patch** — caused by the change; trivially fixable without human input. Just part of the diff.
|
|
39
58
|
- **defer** — pre-existing issue not caused by this story, surfaced incidentally by the review. Collect for later focused attention.
|
|
40
|
-
|
|
41
|
-
3. Process findings in cascading order. If intent_gap or bad_spec findings exist, they trigger a loopback — lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Increment `{specLoopIteration}` on each loopback. If it exceeds 5, HALT and escalate to the human.
|
|
59
|
+
4. Process findings in cascading order. If intent_gap or bad_spec findings exist, they trigger a loopback — lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Before each loopback, read `{spec_file}` frontmatter `review_loop_iteration` (missing means `0`), increment it by 1, and write it back. If it exceeds 5, HALT and escalate to the human.
|
|
42
60
|
- **intent_gap** — Root cause is inside `<frozen-after-approval>`. Revert code changes. Loop back to the human to resolve. Once resolved, read fully and follow `./step-02-plan.md` to re-run steps 2–4.
|
|
43
61
|
- **bad_spec** — Root cause is outside `<frozen-after-approval>`. Before reverting code: extract KEEP instructions for positive preservation (what worked well and must survive re-derivation). Revert code changes. Read the `## Spec Change Log` in `{spec_file}` and strictly respect all logged constraints when amending the non-frozen sections that contain the root cause. Append a new change-log entry recording: the triggering finding, what was amended, the known-bad state avoided, and the KEEP instructions. Read fully and follow `./step-03-implement.md` to re-derive the code, then this step will run again.
|
|
44
|
-
- **patch** — Auto-fix. These are the only findings that survive loopbacks.
|
|
45
|
-
- **defer** — Append to `{deferred_work_file}
|
|
46
|
-
|
|
62
|
+
- **patch** — Auto-fix. These are the only findings that survive loopbacks. If the step-03 implementation subagent can be re-engaged with its context intact, send it all patch findings in one synchronous message — for each: the file, what is wrong, and what the fix must do. If it cannot be re-engaged, apply the patches yourself. Then re-run the checks in `{spec_file}`'s `## Verification` section, if present; if verification fails and the failure cannot be fixed, HALT and escalate to the human.
|
|
63
|
+
- **defer** — Append one new entry to `{deferred_work_file}` using this format. Do not modify existing entries or look for duplicates.
|
|
64
|
+
```markdown
|
|
65
|
+
- source_spec: `{spec_file}`
|
|
66
|
+
summary: <one sentence>
|
|
67
|
+
evidence: <why this is real>
|
|
68
|
+
```
|
|
47
69
|
|
|
48
70
|
## NEXT
|
|
49
71
|
|