src/bmm-skills/4-implementation/bmad-dev-auto/step-04-review.md
{communication_language}Change {spec_file} status to in-review in the frontmatter before continuing.
Read {baseline_revision} from {spec_file} frontmatter. If {baseline_revision} is missing or NO_VCS, use best effort to determine what changed. Otherwise, construct {diff_output} covering all changes — tracked and untracked — since {baseline_revision}.
Do NOT git add anything — this is read-only inspection.
Launch Blind Hunter and Edge Case Hunter in parallel without prior conversation context.
Invoke the
bmad-review-adversarial-generalskill on this diff:{diff_output}
Invoke the
bmad-review-edge-case-hunterskill on this diff:{diff_output}
low: none or cosmeticmedium: tolerablehigh: intolerable## Review Triage Log section in {spec_file}, in this format:
### {date} — Review pass
- intent_gap: count
- bad_spec: count
- patch: count
- defer: count
- reject: count
- addressed_findings:
- `[high|medium|low]` `[patch|bad_spec]` <finding summary and action taken in this pass>
count is either just 0, or total with breakdown by severity N: (high Nhigh, medium Nmedium, low Nlow).
If no patch was fixed and no bad_spec repair loopback was triggered in this pass, write:
- addressed_findings:
- none
{spec_file} frontmatter review_loop_iteration (missing means 0), increment it by 1, and write it back. If it exceeds 5, append the triage-log entry for this pass with addressed_findings: none, then HALT with status blocked and blocking condition review repair loop exceeded 5 iterations (non-convergence).
<intent-contract>. Revert code changes. Append the triage-log entry for this pass with addressed_findings: none, then HALT with status blocked, blocking condition intent gap in intent contract, and include the intent-gap findings.<intent-contract>. Do not modify content inside <intent-contract>. 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 sections outside <intent-contract> 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. Append the triage-log entry for this pass, listing every bad_spec finding that triggered the spec amendment and implementation loopback under addressed_findings. Read fully and follow ./step-03-implement.md to re-derive the code, then this step will run again.addressed_findings.{deferred_work_file} using this format. Do not modify existing entries or look for duplicates.
- source_spec: `{spec_file}`
summary: <one sentence>
evidence: <why this is real>
Prepare Auto Run Result details:
true when the final review pass made review-driven changes significant enough to benefit from an independent follow-up review; otherwise false. Use judgment, not a fixed numeric threshold. Base the judgment on the final pass's triage log and fixes, including patched-finding volume, consequence/severity, breadth, behavior/API/security/data impact, and implementation complexity. Many low-severity patched findings can be significant by volume. Do not recommend follow-up for only a few localized low-consequence fixes.Set {spec_file} frontmatter followup_review_recommended from the judgment above.
If version control is available, commit. Do not push.
Capture final_revision (current HEAD after committing, or NO_VCS if version control is unavailable) into {spec_file} frontmatter.
Set {spec_file} frontmatter status: done.
HALT with status done.