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
  1. Step 1 of 4

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

    You pass when

    Under 60 lines. Every command in it runs as written.

    Files you write

    • AGENTS.md
  2. Step 2 of 4

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

    Run this to check

    git status --short

    You pass when

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

  3. Step 3 of 4

    Allow edits and let it carry out the plan

    Run this to check

    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. Step 4 of 4

    Add the first thing it got wrong to AGENTS.md

    Run this to check

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

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