Open the project and check the baseline
Run the project's existing checks and inspect Git status. Write down any failure or change that already exists.
A terminal coding agent can read files, propose edits, run commands, and respond to errors. Daily work still belongs to the operator. Scope the task, place instructions at the right level, review the diff, run the checks yourself, save state, and keep a tested way back.
Install one supported terminal agent from its current official documentation. Start it inside the project repository, leave the conservative permission profile in place, and confirm that Git can show you the files already changed before the agent touches anything.
The course setup lab comes first for a reason. You should be able to move around the terminal, run a script, read the bottom line of a traceback, inspect a diff, and restore one bad edit before an agent begins changing the project for you.
Run the project's existing checks and inspect Git status. Write down any failure or change that already exists.
Use the official setup path for your chosen tool. Keep the default approval behavior while the habits are new.
Record the project, commands, conventions, intentional oddities, and actions that always require approval.
Begin work only when you can name the commit or clean state that recovery should return to.
A project instruction file should hold constraints the code cannot explain on its own. Keep task requests, project rules, personal preferences, reusable procedures, and enforced policies in separate layers so each instruction has the correct scope.
# Project instructions
## What this is
Weekly report formatter. It reads a local CSV and writes a Markdown summary.
## Conventions
- Keep the first release local and command-line only.
- Run tests with the command documented in README.md.
- Map every accepted test to requirements.md.
## Intentional choices
- The fixture with a missing column stays. It proves the ugly case.
## Never
- Never read a real customer export in tests.
- Never print values from .env.
- Ask before adding a dependency.The “never” lines help the model behave. Permission profiles, environment boundaries, and tests decide what the process can do when guidance is ignored or misunderstood.
| Stage | What you give the agent | Evidence you keep | Stop condition |
|---|---|---|---|
| Scope | One outcome, one important constraint, and a named non-goal. | The accepted task or plan. | The proposed diff is too large to explain or review. |
| Propose | Read scope, write scope, allowed commands, and approval points. | The files and commands proposed before execution. | The request reaches secrets, deletion, money, or an external write without approval. |
| Review | A request for a plain explanation of every changed file. | The diff and your one-sentence explanation. | The explanation and the diff disagree. |
| Test | A known case, an ugly case, and the project's normal checks. | Commands, output, and any mapped acceptance criterion. | A test was weakened, deleted, or made to agree with the implementation. |
| Commit | A concise description of the accepted change. | The commit and clean status. | The project cannot return to a working state. |
Supervised profile
Name the allowed roots, action classes, network destinations, secret exclusions, and actions that always come back to you. Read each approval before it runs.
Unattended profile
Give background and scheduled work less filesystem access, no secrets by default, named network destinations, a stop method, and notification on every final state.
Separate worktrees protect files and branches from parallel edits. Credentials, network access, processes, shared databases, and paths outside the repository still need their own permission and environment boundaries.
Keep four artifacts with separate jobs. The plan records the stages and their closing tests. Progress records what happened and where the evidence lives. Decisions keep resolved choices from reopening. The handoff gives a reader with zero session memory the exact next move.
# Handoff
Current state
- CSV parsing is complete at commit 8c2f1a4.
- The normal and empty-file tests pass.
Evidence
- Test output: artifacts/test-run.txt
- Accepted plan: plan.md
Next action
- Add the missing-column error message from requirement 3.
Do not redo
- The parser choice was decided in decisions.md.
- Do not replace the fixture or weaken the empty-file test.End repeated variations and stop any background or scheduled work that can keep changing state.
Save the exact error, triggering input, expected behavior, current diff, and last known-good commit.
Make the agent state its belief in one sentence. Verify that belief before another edit starts.
Change one variable, shrink the stage, or return to the known-good state and plan the work again.
Run the smallest failing check, then the normal project checks, and record the clean result before resuming.
Keep it small enough that you can describe the diff in one sentence and run a direct check when it finishes. If the change is too large to review, split the request before more work piles on top.
No. It guides the agent. Permission settings, environment boundaries, tests, and hooks enforce rules. Anything involving secrets, money, deletion, or an irreversible external action still needs a real approval gate.
Record the current state, evidence paths, decisions already made, the exact next action, and a do-not-redo list. A fresh session should be able to resume without reconstructing the transcript.
Stop the loop. Capture the exact error, the input that triggers it, and the result you expected. Ask the agent to state its diagnosis in one sentence, check that belief, then change one variable or return to the last known-good commit.
The course starts with terminal and Git basics, then uses the same loop for a small application, hosted model connection, provider adapter, data systems, agents, evals, safety, reliability, and a capstone.