with one click
adr-review
Review code changes against accepted ADRs for compliance violations
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Review code changes against accepted ADRs for compliance violations
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | adr-review |
| description | Review code changes against accepted ADRs for compliance violations |
| argument-hint | [--branch BRANCH] |
| allowed-tools | mcp__claude-flow__agentdb_hierarchical-query mcp__claude-flow__agentdb_causal-query mcp__claude-flow__memory_search Bash Read Grep Glob |
Review code changes against accepted Architecture Decision Records to detect violations, drift, and non-compliance.
Before merging a PR, after significant code changes, or as part of a periodic compliance check. Use this to ensure code changes respect the architectural decisions the team has agreed upon.
Get diff -- Run git diff main...HEAD --name-only (or the specified branch) to list changed files. Then run git diff main...HEAD to get the full diff content.
Find relevant ADRs -- For each changed file:
Grep the file for ADR references (ADR-\d+)Grep docs/adr/ for ADRs that mention the changed file paths or modulesmcp__claude-flow__memory_search with the file path and change summary to find semantically related ADRsLoad ADR content -- Read each relevant ADR file. Focus on:
Check for violations -- Analyze each changed file against its relevant ADRs:
Query relationship graph -- Call mcp__claude-flow__agentdb_causal-query to check if any referenced ADRs have been superseded. If so, flag that the code references an outdated decision.
Report -- Present findings as a compliance report:
## ADR Compliance Report
### Violations
- [ ] <file>:<line> — violates ADR-NNN: <reason>
### Warnings
- [!] <file> references superseded ADR-NNN (replaced by ADR-MMM)
### Compliant
- [x] <file> — consistent with ADR-NNN
### Unlinked Changes
- [?] <file> — no ADR coverage (consider creating one)
Suggest actions -- For each violation, suggest whether to update the code or propose a new ADR to supersede the violated one.
Execute a natural-language browser intent via page-agent (browser_act) when the target is easier to describe than to select — degrades gracefully when page-agent or an OpenAI-compatible LLM provider isn't configured
Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves. Closes the loop ADR-150 opens (score+genome describe; evolve changes). Degrades gracefully when @metaharness/darwin is absent (ADR-150 + ADR-153 architectural constraints).
Run a GEPA learning cycle via `metaharness learn` (upstream ADR-235, metaharness@0.3.0) — optimizes a harness genome against a SWE-bench-style slice manifest. $0 dry-run by default; `--run` is the explicit spend opt-in. Requires a metaharness repo checkout (`--repo` or $METAHARNESS_REPO) — without one it reports `checkout-required` with clone instructions. Degrades gracefully when metaharness is absent.
Static security scan of a harness's declared MCP surface via `harness mcp-scan <path>`. Reads `.mcp/servers.json` + `.harness/claims.json`. Pure-read, no dispatch. Exits 1 on findings at or above `--fail-on` severity.
5-dimension harness readiness scorecard from `metaharness score <path>`. Returns harnessFit / compileConfidence / taskCoverage / toolSafety / memoryUsefulness + estCostPerRunUsd + scaffoldReady. Pure-read; subprocess invocation; degrades gracefully when MetaHarness is absent (ADR-150 architectural constraint).
Enterprise-review-grade threat model from `harness threat-model <path>`. Categorizes MCP-surface threats; emits `worst: 'clean'|'low'|'medium'|'high'` + per-threat findings. Pure-read.