git:20260509.8cf57a9 to git:20260827.29b1fbf

30 added, 27 removed. Audit A to A.

What this update changes in the checks

No check changed: every fixed check gives the same answer before and after this update.

A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.

---
name: review-changes
- description: Review working-tree, branch, or PR changes using graph change detection, blast-radius analysis, affected flows, and test coverage checks.
+ description: Review working-tree, branch, or PR changes on two separate axes — Standards (repo conventions + a smell baseline) and Spec (does it do what the active feature spec asked) — with blast-radius and test-coverage checks. Graph tools accelerate when present; never required.
argument-hint: "[file | function | branch | PR number]"
---
# Review Changes
- Perform a focused code review of changed code and its blast radius.
+ Two axes, never merged. Code can pass one and fail the other, and merging lets one mask the other.
- ## Core Rules
+ ## Inputs
- - Use code-review stance: findings first, ordered by severity, with file and line references where possible.
- - Start with `get_minimal_context_tool(task="review changes")`.
- - Run `build_or_update_graph_tool()` before review if the graph is stale.
- - Prefer `detect_changes_tool(detail_level="minimal")` for risk-scored deltas.
- - Read full source only for changed or high-impact files.
- - If graph tools are unavailable, review with `git diff`, `rg`, and direct file reads.
+ - The diff: no argument -> working tree vs the default diff base; file/function -> that target and its impact; branch -> vs `main`/`master`; PR number -> the checked-out PR branch or local diff.
+ - `.safe-code/context/code-standards.md` (documented repo standards).
+ - The active spec, if any: `.safe-code/context/feature-specs/<NN>-*.md` with `status: in-progress` (or the one the user names).
+ - Graph accelerators when ready: `detect_changes_tool(detail_level="minimal")` for risk-scored deltas, `get_impact_radius_tool()` for high-risk changes, `get_affected_flows_tool()` for critical paths, `query_graph_tool(pattern="tests_for", target=<symbol>)`. Without them: `git diff`, `rg`, direct reads. Read full source only for changed or high-impact files.
- ## Scope Modes
+ ## Axis 1 — Standards
- - No argument: review current working tree against default diff base.
- - File or function argument: review that target and its graph impact.
- - Branch argument: review branch diff against `main` or `master`.
- - PR number: inspect the checked-out PR branch or use local git diff if available.
+ Does the change follow the documented standards, and does it avoid the smell baseline?
- ## Workflow
+ Smell baseline (Fowler), always carried against the diff: Mysterious Name · Duplicated Code · Feature Envy · Data Clumps · Primitive Obsession · Repeated Switches · Shotgun Surgery · Divergent Change · Speculative Generality · Message Chains · Middle Man · Refused Bequest.
- 1. Identify diff base from argument or current branch.
- 2. Update graph incrementally.
- 3. Run `detect_changes_tool()` for changed files, impacted nodes, risk, and guidance.
- 4. Run `get_impact_radius_tool()` for high-risk changes.
- 5. Run `get_affected_flows_tool()` for critical path changes.
- 6. Use `query_graph_tool(pattern="tests_for", target=<symbol>)` for changed high-risk functions.
- 7. Read changed source snippets or full files where needed.
- 8. Report only actionable findings.
+ Binding rules: a documented repo standard always overrides the baseline; every smell is a labelled judgement call ("possible Feature Envy"), never a hard violation; skip anything tooling (lint, type-check, formatter) already enforces.
+ Test shapes to reject on this axis: **implementation-coupled** (mocks internal collaborators or asserts through a side channel — the tell is that it breaks on refactor while behaviour is unchanged); **tautological** (the assertion recomputes the expected value the way the code does, so it passes by construction — expected values must come from an independent source: a known-good literal, a worked example, the spec); **horizontally sliced** (all tests first, then all implementation — it verifies imagined behaviour).
+
+ ## Axis 2 — Spec
+
+ Only when an active spec exists; otherwise report `Spec: no active spec`. Does the change implement what the spec asked?
+
+ - **Missing**: a requirement in the spec with no corresponding change.
+ - **Scope creep**: a change no requirement asked for (note it; it may be prefactoring, which is fine if labelled).
+ - **Wrongly implemented**: the requirement is addressed but the behaviour differs from the spec's Design / Verify When Done.
+
## Output
```text
- Findings
+ ## Standards
- [severity] path:line - issue, impact, fix
+ Worst issue: <one line, or none>
- Open questions
- - ...
+ ## Spec
+ - [missing | creep | wrong] <requirement or change> - detail
+ Worst issue: <one line, or "no active spec">
- Summary
+ ## Summary
- Risk: <low|medium|high>
- Blast radius: <files/functions/flows>
- Tests checked: <commands or graph coverage>
+ - Open questions: <or none>
```
+
+ Findings first, ordered by severity **within** each axis; never re-rank across axes. Report only actionable findings.