/dev-tools:code-reviewfrom dev-tools
Review code for Agent-IX Golden Path compliance, focusing on test style, mock boundaries, implementation gaps, and code-test alignment. Dispatches by language — Python inline, Rust via `rust-review`, React via `review-react`.
Ships in dev-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
If this plugin is not initialized or an Agent IX command fails, read the dev-tools setup guide for its prerequisites and local diagnosis.
Perform the following checks on the codebase.
The checks below are written for Python. Detect what the reviewed code
actually is and run the matching lane — transliterating a Python check into
another language produces false findings ("no test classes", "no pass
placeholders") that bury the real ones.
| Detected | Lane |
|---|---|
Cargo.toml / .rs files in the change | invoke rust-review and run it instead of Test Standards, Mock Compliance, Completeness, and Edge Case & Logic Review |
package.json with react | additionally run the React lane below |
pyproject.toml / setup.py / .py files | the Python checks below, as written |
Language-independent sections — Duplication and Vendoring, Integrity, Spec-Code Faithfulness, Code-Test Alignment, Gap Analysis, Output — always apply. Read "docstring" as "doc comment". Tests bind to acceptance criteria by criterion id through the tag forms quire declares:
Trace: FR-XXX-AC-N, … line — a docstring or # comment line in Python, a //
comment or JSDoc line in TS/React, /// in Rust#[trace("FR-XXX-AC-N")] attribute@pytest.mark.trace("FR-XXX-AC-N") markertrace("FR-XXX-AC-N") markerIds in a Criteria: list, a Description, or a Tracing: line bind nothing. Only test,
bench and fuzz functions bind; a tag on a Storybook story or other non-test code is
documentation only.
A mixed repo runs several lanes; scope each to the files it applies to.
Also load the repo's own conventions before judging style: CLAUDE.md,
AGENTS.md, and any .claude/skills/* describing the language's idioms in
this codebase. A documented repo idiom outranks this skill.
Before applying the ordinary rubric, look under the reviewed repository's spec/ tree
for an AssuranceProfile whose stated scope applies to the changed code or behavior.
Do not create a profile and do not apply an unrelated one. If no applicable profile
exists, continue with the ordinary review below unchanged.
When a profile applies, read
references/assurance-context.md. Use that context to
focus the existing checks and findings; it is not a second checklist. Name the profile
in the review artifact, and state explicitly when selected architecture, impact, measurement, exception, independence, structural-gap, or
producer-reliance evidence is unavailable. The durable artifact MUST contain an exact
## Assurance Context heading whenever a profile applies; discussing the profile only in
the summary, findings, or chat does not satisfy this requirement.
Vendoring is a CRITICAL P0 finding. It is an antipattern that will almost always be
rejected in favour of a cleaner design. Report it at high severity, which forces a
FAIL verdict. Do not soften it to medium because the copy is small, well-documented,
provenanced, or temporary — those are the properties of every copy that ever shipped.
No vendoring. No duplicating. No copying code or specs. Find one home for a thing and depend on it.
The defect is duplication. One question, asked of every change: does this repo now hold a second statement of something that is defined somewhere else? If yes, it is a finding. The thing now exists in two places, so it has two owners and one of them will drift. That is the whole of it.
Nothing launders a duplicate. Not retyping it, translating it to another language, reformatting it, renaming its identifiers, regenerating it from local types, splitting it across files, taking only part of it, or paraphrasing a spec into new prose. Every one of those still leaves two places that must be edited when the thing changes. Effort spent reworking a duplicate is evidence of vendoring, not a defence against it.
Apply it mechanically, not as a judgement. No case analysis, no weighing of how small, how documented, or how temporary. The weighing step is where new justifications get invented.
Read the lists below as examples, never as a definition. They are shapes already seen, written down so they are recognisable on sight. They are not the boundary of the rule and they are not exhaustive. A copy whose form appears nowhere in this skill is still a finding, and "it isn't any of the listed forms" is not a finding's refutation — the next copy is always spelled a way nobody wrote down yet.
Two things that are themselves findings:
A copy is a copy however it is spelled. Examples, not an exhaustive list:
vendor/, third_party/, schemas/vendored/, corpus/<upstream>-v1/schema.json, however its comment describes itinclude_str! / include_bytes! of another repo's artifactVENDOR.json / PROVENANCE.jsonconst TARGETS: [&str; 14] holding an upstream enum's members is that enum in
a different syntaxPaperwork does not make a copy acceptable. A VENDOR.json recording the upstream
revision, a SHA-256 snapshot guard, and a provenance note documenting the source are how
a copy gets described — not how it gets justified. A well-provenanced copy still
drifts; it just drifts with a paper trail.
Visibility is irrelevant. "The source repo is public, so this is drift rather than a leak" is not a reason to downgrade the finding. Public or private, the file does not belong in that repo.
A size limit raised to accommodate content is the signature of vendoring. BINARY_BYTES = 16 * 1_048_576 existed because a fixture embedded a 5.2 MB executable and someone lifted
the ceiling instead of asking why. If a change raises a limit to fit copied content, the
finding is the content, not the limit.
Before accepting a new helper, utility, constant, type, or test fixture: search for an existing one. A second implementation of the same idea is the same defect at smaller scale, and it drifts the same way.
When reviewing a new helper, state explicitly in the finding what you searched for and where, so the author can see the existing function rather than being told one exists.
| Seen in review | Why it is a finding | What to require instead |
|---|---|---|
tests/fixtures/modules/ (70 files) copied from another repo, with VENDOR.json pinning a commit | A fixture tree that drifts silently from its source; the pin goes stale and nothing checks it | Resolve the fixtures through the existing dependency |
schemas/vendored/semantic-core/0.1.0/ and 0.2.0/ side by side | Two snapshots of one upstream, nothing reconciling them — drift in its clearest form | One dependency on the published artifact |
scripts/vendor-schemas.sh refreshing a copy from a sibling checkout | The build depends on another repo's working tree; results differ per machine | Depend on the published artifact |
| A schema re-published by a second repo as package data "so consumers can find it" | Creates a second source of truth; consumers then depend on whichever they found first | One publisher; consumers depend on it |
quality_lints reading ../other-repo/file by absolute path | Vendoring spelled as a path; the result depends on an unrelated checkout | An owned fixture or the published artifact |
A vendored JS bundle that inlines [email protected] | Hides a transitive dependency from pnpm audit; advisories never surface | Depend on the package so the audit tooling can see it |
A new format_duration() beside an existing humanize_duration() | Two implementations of one rule; a fix to one silently misses the other | Reuse the existing function, or replace it — not both |
Related: a gate is never deleted to make a diff pass. When a copy is removed, a gate that existed only to watch that copy evaporates because its subject is gone — state that explicitly and show nothing is left for it to assert. Deleting the gate while keeping the copy is the opposite move and is strictly worse than the copy alone, because it makes the duplication silent.
A duplicate may arrive with a checksum, a provenance manifest, a refresh script or a conformance gate. Do not assess whether the guard works. Its quality is irrelevant: a guard that cannot detect upstream drift does not make the copy worse, and a guard that can does not make the copy acceptable. The copy is the finding either way.
Assessing the guard is itself the trap — it turns the review into a debate about guard design, which ends in "strengthen the check" rather than "remove the copy". If a guard is present, note it as evidence that somebody already reasoned their way to keeping the copy, and report the copy.
Do not rely on reading paths — the last duplicate is always the one nobody listed. These locate some of them:
# the same file tracked in two repos
( cd repo-a && git ls-files -z | xargs -0 sha256sum ) > /tmp/a.sums
( cd repo-b && git ls-files -z | xargs -0 sha256sum ) > /tmp/b.sums
join <(sort /tmp/a.sums) <(sort /tmp/b.sums) # any output is a finding
# one $id claimed by more than one document
grep -rho '"\$id": *"[^"]*"' --include='*.json' . | sort | uniq -c | sort -rn
Dependencies are untracked (node_modules/, cargo registry and git checkouts,
site-packages), so they fall outside a git ls-files sweep by where they live
— a property of the filesystem, not an exemption written into the gate.
These commands find duplicates. They do not define one. They catch what
cp produced and nothing else: a duplicate that was retyped, translated,
regenerated, reformatted or paraphrased is invisible to every one of them, and
those are the ones worth finding. Clean output means the search found nothing,
never that there is nothing. Read the change and ask what it now states that
something else already states.
Reworking a duplicate is not removing it, and it is the worse finding.
Measured instance: asked to delete a 23-file tree copied from another repo, an
agent renamed identifiers through 22 of them (immutable→sealed,
config-version→entry), changed nothing that carried meaning, and reported
the search clean. Every duplicate was still there — now silent, and drifting
from the thing it duplicates. Report that as a finding above the original
duplication: it removed the duplication's only symptom while keeping the
duplication.
So a diff resolves this only by the file being gone, at its path, with whatever used it resolving through a dependency.
Enumerating known duplicates is not a completeness argument. A review that lists paths lets every unlisted one survive by default. Gate on the property.
If a dependency cannot be reached because it is private or unpublished, that is a blocker to raise, not a licence to copy. The correct finding is "this needs a published home", not "this copy is acceptable for now". A broken build beats a copy.
An exception requires the repository owner's explicit approval as a direct question, and carries a written expiry condition and a tracking ticket. A reviewer never grants one, and never accepts one that an author granted themselves.
We have git. Do not reimplement file tracking, and do not build machinery nobody
asked for. Report at high severity, FAIL verdict, any change that adds:
git diff -M or git log --follow already showsScan all files in tests/.
Trace: line with the AC ids the test assertspytest and mocker fixture usageVerify mocks act only on external boundaries.
mocker.patch targetsunittest.mock or @patch usageVerify source modules contain real implementations, not stubs.
TODO, FIXME, XXXpass usage — fail if used as logic placeholder in concrete methods__init__.py) as likely stubpass bodiesVerify tests contain real assertions, not stubs or pass-throughs.
pass body or no assertionspytest.mark.skip / pytest.skip — each must have a tracked issue or spec referenceis not None, isinstance, or truthiness without verifying behaviorVerify that source code and tests actually implement what the spec says.
For each FR/NFR in spec/:
pass body, placeholder return)For each FR/NFR acceptance criterion:
quire matrix --strict in the reviewed repo.
The matrix is computed from criteria and trace tags, so an untagged criterion is the
gap — do not check hand-written matrix rows or Status markers, and do not ask the
author to add them. quire matrix needs quire-cli 0.34.0 or later. --strict exits non-zero when a
criterion is untagged, when it is tagged-by-ignored-test, or when the spec has
zero criteria (FR-026 §G).
Optionally run quire coverage and act only on its untracked and unmatched tags on
tests (a tag naming no criterion). Its status-lie and unbacked-row output concerns
hand-written matrices and is not a reason to edit one.pass, skip, or has no assertionsVerify test assumptions and criteria match implementation.
For each test module, compare:
| Pattern | Example | Fix |
|---|---|---|
| Weak assertion | assert result is not None when criteria says "Returns X" | Assert exact value |
| Missing criteria | Test verifies behavior undocumented in docstring | Add criteria to docstring |
| Untested defaults | Code has default like actor_type="user" with no test | Add dedicated test |
| Partial criteria | Criteria lists 3 items but only 2 assertions exist | Add missing assertion |
| Stubbed source | Test mocks a stub module — both mock and source are hollow | Implement source first, then write real test |
Scan source files for defensive coding gaps. For each category, list findings with file, line, and severity (Critical/High/Medium).
"") distinctly from None?is not None vs truthiness distinction correct for optional config?PermissionError and OSError?time.monotonic() used instead of time.time() for durations and rate limiting?$(...), backticks, --recursive, -delete)?auto_approve, admin overrides) still enforce safety constraints?../)?Detect Rust via a Cargo.toml at the repo or workspace root, or .rs files in
the reviewed change.
If detected:
rust-reviewfmt --check, clippy -D warnings, the crate tests, cargo deny) rather
than assuming themThe Python-shaped sections above (Test Standards, Mock Compliance, both Completeness sections, Edge Case & Logic Review) are superseded for Rust files by that skill's equivalents; do not report their Python-specific rules against Rust code.
Detect React projects via:
spec/spec.md has component-type: react-component, ORpackage.json has react in dependencies/devDependenciesIf detected:
review-reactIf Quoin is installed, invoke quoin:gap-analysis to compare implementation,
requirements, and test evidence. Otherwise compare the changed behavior against
the ticket acceptance criteria and report unimplemented or untested cases. State
which method ran and what evidence was unavailable. Do not invoke the deprecated
implementation-gap-analysis skill.
Write the findings to a SpecReview at
reviews/YY-MM-DD-<slug>.md. This is not optional and it is not a summary in the
chat: a review that leaves no artifact leaves nothing behind. When the review is
for a tracked ticket, the dev-team reviewer role posts this same artifact's
findings (and, later, dispositions) to the ticket with a machine-readable
marker — use it for that posting step rather than inventing another format.
Keep the review artifact with the target repository so its findings survive
the conversation.
Use the installed Quoin SpecReview schema and template when available.
Do not invent a second review format and call it validated.
Run this from the repository that will contain the review artifact:
quoin write . --types SpecReview
If quoin write is unavailable, use an installed Quoin SpecReview template if one
is accessible. Otherwise report that schema validation is unavailable; do not
claim a quire-validated artifact.
Allocate the id before writing the frontmatter — never paste SR-001 as a
literal. Check every existing SR- id in the repo, including quoted ones
(id: "SR-014", which a naive unquoted grep misses), and use the next unused
one. If this PR's ticket already has an SR- file from an earlier run of this
review (a retry), reuse that file's id instead of allocating a new one:
grep -rhoE '^id:[[:space:]]*"?SR-[0-9]+"?' --include=*.md . | grep -oE '[0-9]+' | sort -n | tail -1
The result plus one is the id (SR-004, not SR-4), whatever number that is
in this repo today. This check-then-write isn't atomic across parallel
branches — two reviews starting at once can compute the same "next" id.
Don't build a cross-branch lock for that; accept the rare collision as a
normal merge conflict and let later mining key on (repo, file path) rather
than assuming the id alone is globally unique.
---
id: SR-NNN # ^[A-Z]{2,4}-[0-9]+$ — the next unused id, from the check above
title: "Code review — <component> <scope>"
type: SpecReview
analysis: code-review # requires spec-artifacts-process >= the release adding it
scope: "<repo>; src/, tests/" # every file/artifact examined, not only the ones with findings
review_set: subset
---
## Summary and ## Findings are required and validated; the rest are extra.
## Summary
<1–2 sentences: what was reviewed and the headline result.>
## Verdict
**PASS | CONDITIONAL | FAIL** — <one line justifying the gate>.
## Assurance Context
<!-- Include only when an AssuranceProfile applies. Name the profile,
context examined, unavailable context, and active exceptions. -->
## Findings
| ID | Severity | Summary | Refs |
| ------- | -------- | --------------------------------------------------------- | --------------------- |
| FND-001 | high | Test suite leaks 178 temp directories per run | tests/conftest.py:41 |
| FND-002 | high | Package root read from `process.cwd()`, not module origin | src/paths.ts:18 |
| FND-003 | medium | `try/catch` falls through when nothing is thrown | tests/write.test.ts:92 |
A code-review finding usually has a file and a line — put them in Refs as
path:line.
ID | Severity | Summary | Refs.ID matches ^FND-\d+$; at least one row.Severity ∈ low | medium | high.info severity in the enum above low, so
use low and say what the row actually is in its own text:
FND-001 | low | No findings (placeholder) | -. The (placeholder) tag
matters — it's how later mining tells this row apart from a real low-severity
finding and drops it. There is only ever one of it per document. A clean
method or category does not get its own placeholder row ("no gaps in Mock
Compliance" is prose in that section, not a table row); the single
document-level row covers the case where nothing anywhere qualifies. The
"no gaps" conclusion itself belongs in ## Verdict, not in this table.Every finding eventually needs an explicit outcome: fixed, rejected: <reason>
(concretely why it is not a defect — a rejection with no reason is not a disposition), deferred: <reason> (a
follow-up ticket id, or why it's out of scope for this change), or
accepted-no-change (a real finding the team decided, with a stated reason, to
ship without changing — distinct from rejected, which means it was never a
defect). Record that outcome in a separate ## Dispositions section — FND | outcome | reason
— appended once the fix round lands. Never edit the original ## Findings
row to add or imply the outcome. The finding's wording is the record of what
was found; the disposition is a separate, later fact about what happened to it.
high finding. Vendoring and duplication findings are P0 and are
recorded as high; the table has no critical level, so high is the ceiling and it
is not to be softened.medium/low findings.No findings (placeholder) row.quire validate --scope <project_root> "reviews/**/*.md"
Fix any validation error — frontmatter pattern, the analysis enum, findings
headers/ids/severity — before saying the review is done. Then tell the user the
artifact path and the verdict.
When an AssuranceProfile applied, perform one final artifact check before reporting:
## Assurance Context heading is present;none statements where applicable.A review that used assurance context while omitting any of these disclosures is
incomplete even when quire validate passes.
Each check above contributes findings: style violations, boundary violations,
completeness issues (TODOs, pass), code-test alignment issues, detected
implementation gaps, and edge cases. Assurance observations contribute a finding only
after the reviewer relates them to the changed behavior and profile; a tool exit status,
metric value, or missing optional artifact does not choose severity by itself.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agent-ix/dev-tools --plugin dev-tools15 skills in this plugin
/audit-commentsAudit comments in a repository or bounded code section, remove tautologies and stale notes, convert decision records to ADRs, file issues for hack-enabling excuses, and add a ratcheting lint rule. Use when asked to audit or delete code comments./backport-codeA skill for systematically backporting bug fixes and features across specs, templates, and downstream repositories./docs-figuresDraw diagrams, charts and CSS animations for GitHub READMEs and documentation as transparent light and dark SVG pairs, with text drawn as glyph outlines so every viewer renders it identically. Use when a README or doc page needs a mechanism or flow diagram, a chart, an animated walkthrough, figures in the ix-docs style, or when a repository's docs/images figures must be regenerated or checked.Other plugins' skills for the same job