.claude/skills/code-review/SKILL.md
LLM-focused code review process for this repo: what to check, how to ground feedback in invariants/tests, and how to verify changes efficiently (including test-report.json).
npx skillsauth add atopile/atopile code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill is the canonical guidance for automated and interactive code reviews in this repo. It is written for LLM reviewers (CI bots and local agents).
.github/pull_request_template.md.ato dev test --llm -k <area> (fast filter)ato dev compile (if Zig/bindings changed)ato dev flags (if behavior depends on ConfigFlags)artifacts/test-report.json over HTML.Correctness + invariants
Performance / scalability
O(n^2) walks, repeated graph traversals, excessive allocations, or debug logging in hot paths.Maintainability
Test coverage
ato dev test --llm writes artifacts/test-report.json and artifacts/test-report.llm.json, and optionally artifacts/test-report.html (see test/runner/main.py).ato dev flags; prefer code-driven discovery over hand-maintained docs.AGENTS.md and the relevant .claude/skills/* docs for the area you're reviewing.src/faebryk/core/solver/README.md + src/faebryk/core/solver/symbolic/invariants.py.When writing a CI review comment, produce exactly this structure and nothing else. The goal is a minimal, scannable summary a human can glance at in seconds.
Use gh pr comment --edit-last --create-if-none so the review stays in a single updated comment.
## <one-line summary of intent>
| Metric | Score |
|--------|-------|
| **Impact** | X/10 |
| **Test coverage** | X/10 |
<details>
<summary>🔴 High-severity issues (N found)</summary>
### 1. <short title>
<details>
<file:line — description>
</details>
</details>
Impact measures how important it is for a human to manually review this PR. Think: "if I skip reviewing this, what's the worst that could happen?"
| Score | Meaning | Examples | |-------|---------|---------| | 0–1 | No-op, typo fix, comment-only, CI config tweak | Fixing a typo in a README, bumping a version pin | | 2–3 | Low-risk, isolated change with no behavioral effect on users | Renaming an internal variable, adding a log line | | 4–5 | Normal feature or bugfix, limited blast radius | Adding a new CLI flag, fixing a parser edge case | | 6–7 | Touches shared infrastructure, changes public API surface, or affects multiple modules | Refactoring a compiler pass, changing graph traversal logic | | 8–9 | High-risk: breaking API/ABI change, security-sensitive, concurrency/lifetime changes, large refactor across module boundaries | Changing Zig↔Python ownership semantics, modifying solver constraint propagation | | 10 | Critical: data loss risk, auth bypass, or silent correctness regression in a hot path | Removing a safety check in the linker, changing deinit order |
When in doubt, round up — it's cheaper to over-flag than to miss something.
Test coverage measures how well the changed behavior is exercised by existing or new tests. Consider both direct test coverage AND whether the changed code sits in a hot path that is transitively tested.
| Score | Meaning | Examples | |-------|---------|---------| | 0–1 | No tests touch this code path, directly or transitively | Brand-new module with no tests added | | 2–3 | Some transitive coverage but no direct tests for the changed behavior | Helper function called from tested code, but the specific new branch isn't exercised | | 4–5 | Partial coverage: some cases tested, others not | New function has a happy-path test but no edge-case or error-path tests | | 6–7 | Good coverage: most branches exercised, or the change is in a very hot path that many integration tests traverse | Modifying a graph traversal function that every build test exercises | | 8–9 | Strong coverage: direct unit tests plus integration coverage for the changed behavior | New solver rule with dedicated tests AND it runs in existing end-to-end builds | | 10 | Exhaustive or trivially safe: change is purely mechanical, or every branch is tested | Renaming a variable (trivially safe), or new function with 100% branch coverage |
If behavior changed but no test was added or updated, the score should be ≤5 regardless of transitive coverage.
Only flag issues in these categories — everything else is noise for the PR comment:
If zero issues are found, write "None" inside the details block. Do NOT pad with style nits or nice-to-haves.
file:line and be actionable.When reviewing interactively (not in CI), you can be more conversational, but still ground every non-trivial claim in the diff or a repo path (be explicit about file + symbol).
Separate feedback into:
Prefer actionable suggestions (what to change + why + where). If you're uncertain, ask a concrete question and point to the ambiguous code.
development
How the Faebryk parameter solver works (Sets/Literals, Parameters, Expressions), the core invariants enforced during mutation, and practical workflows for debugging and extending the solver. Use when implementing or modifying constraint solving, parameter bounds, or debugging expression simplification.
development
# SEXP Benchmark Strategy ## Goal Measure and improve S-expression pipeline performance with a focus on: - Throughput per stage - Peak memory per stage - End-to-end behavior on realistic KiCad PCB inputs ## Pipeline Stages Benchmark these layers separately: - `tokenizer` - `ast` - `parser` (typed decode) - `encode` (typed encode to raw SEXP) - `pretty` (formatting) ## Dataset Dimensions Use a matrix over: - `depth`: shallow vs deep nesting - `size`: small, medium, large Recommended size buck
development
How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzig_sexp), and the invariants around parsing, formatting, and freeing. Use when working with KiCad file parsing, S-expression generation, or layout sync.
tools
How the Zig↔Python binding layer works (pyzig), including build-on-import, wrapper generation patterns, ownership rules, and where to add new exported APIs. Use when adding Zig-Python bindings, modifying native extensions, or debugging C-API interactions.