harness · beginner · 30 min
Put a coding agent on rails
Write the instruction file a coding agent reads, and use permission modes so it plans before it edits.
HANDS-ON LAB · YOU RUN IT ON YOUR MACHINE · 4 STEPS
-
Write AGENTS.md: what the repo is, the test and lint commands, three rules, known traps
Write what a new colleague gets wrong in week one. Leave out what the code already says.
Run this to check
wc -l AGENTS.mdYou pass when
Under 60 lines. Every command in it runs as written.
Files you write
- AGENTS.md
-
Give the agent a small issue in its read-only or plan mode
Run this to check
git status --shortYou pass when
Nothing changed on disk, and you have a plan that names the files it will touch.
-
Allow edits and let it carry out the plan
Run this to check
git diff --statYou pass when
The diff touches only the files the plan named, and the agent ran your test command without being told to in the prompt.
-
Add the first thing it got wrong to AGENTS.md
Run this to check
git log --oneline -n 2 -- AGENTS.mdYou pass when
A second commit to AGENTS.md. The file grows from real mistakes, not guesses.
Files you write
- AGENTS.md
No transcript here on purpose. This page does not show terminal output, because model answers differ from run to run. Each step says what a pass looks like; your own terminal is the proof.