| name | ds-zig-review |
| description | Review Zig code with Tiger Style constraints and Zig idioms. |
| disable-model-invocation | true |
Applies to: Zig 0.16 (current stable). Systems programming, CLIs, embedded.
Zig is Tiger Style's native context (TigerBeetle): explicit allocators, no hidden control flow, and no hidden allocations map almost one-to-one onto the Tiger Style constraints. Lean into that section harder than for other languages.
Arguments
Scan the invocation for the --no-tiger, --fix, and --full flags. Treat every other argument as review scope (files or directories); if no scope is given, review the changed files on the current branch.
--no-tiger present → skip the Tiger Style section; run Memory & Allocators, Error Handling, Zig Idioms, Safety, and Testing only.
--no-tiger absent → run all sections (default).
--fix → after reporting, apply only the violations whose fix is mechanical and unambiguous (a rename to the idiom, a missing error check the review is certain about). Anything that changes logic or rests on an unverified assumption — especially security and correctness findings — stays report-only. After applying, re-run any build/test/lint check already in the loop and revert any fix that breaks it — or that touched more than the intended mechanical edit. End with a summary of what was applied and what was left.
--full → review the entire codebase instead of just the branch's changes. Explicit positional scope still wins; --full only replaces the no-scope default.
Example: /ds-zig-review --no-tiger src/ reviews src/ without Tiger Style.
Automated Checks (run first if tools are available)
zig fmt --check .
zig build test
zig build -Doptimize=ReleaseSafe
Run these, report what they surface, then do the manual review below. They are baseline context — anchor findings to the code in scope; don't report pre-existing failures outside the change as if it introduced them.
Review Checklist
Use the checklist as a lens, not a scorecard: reason about the actual change, report real violations anchored to file:line, and flag issues even when they aren't listed. Don't manufacture findings to fill a category. Report only violations — no praise, no summary.
Tiger Style
Skip this section entirely if --no-tiger was passed. Otherwise it is mandatory.
Memory & Allocators
Error Handling
Zig Idioms
Performance
Idiom-level checks only — for a ranked, costed optimization plan, use /ds-perf-plan.
Safety
Testing
Output Format
<file>:<line>: <severity>: <problem>. <fix>.
Severity levels: critical (memory safety / correctness), major (reliability / leak), minor (idiom/style).
Skip formatting nits unless they affect correctness or readability significantly.