All labs · Lab 31 · 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.

You build: An AGENTS.md under 60 lines in a repo of yours, and one small change made by a coding agent under your rules.

  • A coding agent you already use (Claude Code, Codex, OpenCode or similar)
  • A small git repo with a test command
  1. 01Write 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.

    wc -l AGENTS.md

    You pass when: Under 60 lines. Every command in it runs as written.

  2. 02Give the agent a small issue in its read-only or plan mode

    git status --short

    You pass when: Nothing changed on disk, and you have a plan that names the files it will touch.

  3. 03Allow edits and let it carry out the plan

    git diff --stat

    You 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.

  4. 04Add the first thing it got wrong to AGENTS.md

    git log --oneline -n 2 -- AGENTS.md

    You pass when: A second commit to AGENTS.md. The file grows from real mistakes, not guesses.

The check runs on the computer, not on your word: a step passes when its command exits with 0 there.

Your computer · Fleet · off

Computers are not set up on this site yet. Run each command on your own machine and compare with "You pass when".