Claude Code Lab for a Reviewable Diff
Write a focused Claude Code brief, edit one bilingual label in a practice checkout, and verify the diff against real repository checks and both routes.
By Matthews WongReviewed on Checked against Claude Code v2.1.301
Key takeaway
A reviewable Claude Code diff changes one observable behaviour and gives a reviewer a short way to reproduce it. In this lab you update one bilingual UI label, verify message key parity and inspect the route in both languages. You finish with the exact file paths and a repeatable acceptance check.
You will be able to
- Write an agent brief that ties one edit to visible outcomes.
- Show the bilingual diff and the independent verification.
Step through the diagram
Press Play, or step with the arrows. Every step is written out below the diagram.
Claude Code Lab for a Reviewable Diff
A reviewable Claude Code diff changes one observable behaviour and gives a reviewer a short way to reproduce it. In this lab you update one bilingual UI label, verify message key parity and inspect the route in both languages. You finish with the exact file paths and a repeatable acceptance check.
Reviewed on 3 December 2026 · Claude Code v2.1.301
Keys: ← → step · Home / End · K play or pause
Use an existing string shown on a named route. Record the exact before and after text in both languages.
Follow the key from the messages to the component. Identify shared uses before changing the string.
The diff should explain one requested behaviour in both locale files. Check for edits outside the task.
Predict the next step Which evidence proves both readers see the new copy? (An updated English file · The new labels visible in both routes · A green Git status)Use key parity for structure and the browser for the reader’s experience.
Keep both route results and the command outcome beside the diff.
Make the behaviour observable
Ask for a copy change to the blog’s Key takeaway label. Keep the existing message key common.keyTakeawayLabel and identify at least one blog route that renders it. Record that the change affects every post using that label.
Read more (1)Show less
Tell Claude Code to inspect references before editing. Keep both language edits in one patch so the reviewer sees how the new label translates.
Get evidence from the route
The message parity script verifies key structure. An unchanged key can pass even if one locale still displays its previous words. Open the same blog slug under /en and /id and inspect the callout at the start of each article.
The real config behind this lesson
Excerpts from the repository that builds and deploys this website, quoted as they are.
"messages:check": "node scripts/check-message-keys.mjs",This script provides independent key parity evidence. The experiment also verifies the actual words in each browser route.
Mistakes that cost real time
Only one language changed
Retain the existing key and update the actual Indonesian and English values. Reopen both routes even when the parity check passed.
A shared label changed more routes than expected
Trace where the key is used and decide if the task calls for a global edit or a separate route-specific key.
Do it on your own machine
Use a practice checkout where both language files are available.
Start a lab branch and inspect its starting state.
git switch -c lab/reviewable-diff git status --shortIn Claude Code, ask to set common.keyTakeawayLabel to “What to remember” and “Yang perlu diingat”. Have it report callers before editing.
Check the key tree and the diff. Then open the linked Codex comparison under /en and /id and inspect the new label.
npm run messages:check git diff -- messages/en.json messages/id.json npm run dev
Three questions before you move on
Pick an answer to see why it is right or wrong. Nothing is graded, so guess freely; a miss is kept in this browser so the course can ask it again later.
Two questions from earlier lessons
Recalling an older lesson after a gap is what makes it stick. Answer from memory before you look anything up.
Answer in your head, then check
1.What should you check before a shared copy edit?Show the answer
Answer:A shared key can change several routes, so use its callers to establish the scope.
2.What does key parity establish?Show the answer
Answer:The structural check verifies the presence of keys. Browser evidence shows how the translated text renders.
Related deep dives on this site
Sources
Primary sources checked on the research date. Follow them for the current version.