Module · Codex Engineer
Instructions & Context
The file that tells the agent how this repository works before it touches anything.
TOPIC 01
Repository Instructions
One instruction file, inherited down the tree, short enough to be read.
What you'll practice
- Write the Repository Instruction File — guided · beginner
- Scope the Rules to a Directory — practice · intermediate
A command you'll meet
cat AGENTS.mdThe instruction file is the cheapest prompt engineering there is. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Write the Repository Instruction File
The agent reads the instruction file before it plans. Write one that says how to build, how to test and what the conventions are.
Scope the Rules to a Directory
The root file applies everywhere, but a service has its own rules. Write the nested instruction file that adds them without repeating the root.
TOPIC 02
Context Discipline
What to put in front of the agent, what to leave out, and how to hand over a task.
What you'll practice
- Decide What Goes Into the Context — practice · intermediate
- Write a Task Spec an Agent Can Follow — challenge · advanced
A command you'll meet
cat ~/codex/tasks/TICKET-42.mdA vague prompt gives a vague result. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Decide What Goes Into the Context
Context is the scarcest resource in an agent run. Write the rules for what to include and what to keep out of it.
Write a Task Spec an Agent Can Follow
The spec is the contract. Write one with a goal, acceptance criteria, what is out of scope and how the work is verified.