Primary domains: D3 Claude Code Configuration & Workflows (20%) · D4 Prompt Engineering & Structured Output (20%) — spans 40%
One of only two routes into D4 (with s6.md). Skip both and 20% of the exam is unprepared.
Brief
Claude Code integrated into a CI/CD pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. The prompts must produce actionable feedback and minimize false positives.
Task statements in play
| ID | Statement |
|---|---|
| 3.5 | Apply iterative refinement techniques for progressive improvement |
| 3.6 | Integrate Claude Code into CI/CD pipelines |
| 4.1 | Design prompts with explicit criteria to improve precision and reduce false positives |
| 4.2 | Apply few-shot prompting to improve output consistency and quality |
| 4.6 | Design multi-instance and multi-pass review architectures |
Related but not examinable through this scenario: statement 1.6 (task decomposition) is the formal home of "split a large review into per-file passes plus a cross-file pass", which is exactly the technique this lab demonstrates. But 1.6 belongs to D1, and D1 is not a primary domain of S5 — so no item in this scenario can cite it, and an S5 draw will never test it. Practise 1.6 through S1, S3, or S4. Read it here for the mechanism, not for coverage.
The decisions it tests
Precision over recall, explicitly. Task statement 4.1 exists for this scenario: a reviewer that flags everything gets muted, and a muted reviewer has zero value. The lever is explicit criteria in the prompt — define what qualifies as a finding, what severity thresholds apply, and what to stay silent about. Few-shot examples of non-findings are as useful as examples of findings.
Multi-pass beats one big pass. The guide is specific: split a large review into per-file local analysis passes plus a separate cross-file integration pass, to avoid attention dilution. Multi-instance and multi-pass review architecture is its own task statement (4.6). One prompt over a 200-file diff is the wrong shape.
Headless operation. CI means non-interactive: headless mode, exit codes that gate the pipeline, and a failure mode that does not masquerade as success.
> Not on the exam: streaming. The guide's Out-of-Scope Topics list includes "Streaming API > implementation or server-sent events" among the topics that "will not appear on the exam". An > earlier draft of this page listed streaming output as part of what CI means here. It was our > inference, it contradicts the guide, and it is removed. Do not study it for this scenario.
Fail loudly, not falsely. Gnar's own pr-review.sh hook reports "review unavailable (not a verdict)" when the reviewer fails, rather than reporting success. That distinction — a broken check must never look like a clean bill of health — is exactly this scenario's reliability concern.
Reference build
Gnar already runs this in production. Lift it into the lab rather than inventing something:
- The existing
PostToolUsePR-review hook, which backgrounds itself so it can never block a turn - A per-file pass plus a separate cross-file integration pass, with the prompts for each
- Explicit finding criteria and severity thresholds, plus few-shot non-findings
- A deliberate failure injection showing the reviewer reporting "unavailable" rather than "clean"
- A before/after false-positive count on a real PR — the metric that makes the prompt work legible
Traps
- Hope over enforcement — "be concise and only report real issues" instead of explicit criteria and severity definitions.
- Scale over design — a bigger model to reduce false positives, instead of decomposing the review and defining the bar.
- One monolithic pass over the whole diff.
- A failed reviewer reporting success — the most damaging default in CI.
- Optimizing recall because "catching everything" sounds responsible. The scenario states the opposite.