Paths/Codex Engineer/Working in a Codebase / Orientation
Read Before You Write
An agent that edits before it reads produces code that duplicates what is already there. Write the orientation routine that prevents it.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- Directory ~/codex/repo exists○
- File ~/codex/repo/orientation.md exists○
- The routine lists the files to read first○
- The routine states what to look for in each of them○
02Walkthrough
4 steps- 01
Create the repo directory
The orientation notes are per repository, so they live with the repository.
mkdir -p ~/codex/repo - 02
Write the reading order
Four files, in this order: the instruction file, the manifest, the entry point and the tests. That is ten minutes and it saves an hour.
echo '# Orienting in a repository\n\n## Read these, in this order\n\n1. AGENTS.md - the rules the repository already states\n2. package.json - the scripts, the dependencies and the entry point\n3. the entry point - where the request comes in\n4. the test directory - the behaviour that is already promised' > ~/codex/repo/orientation.md - 03
Write what to look for
In each file, look for one thing: the conventions, the commands, the wiring, the contract.
echo '\n## What to look for\n\n- in AGENTS.md, the commands and the conventions\n- in the manifest, the scripts that build and test\n- in the entry point, the route or the handler\n- in the tests, the behaviour that already exists, so the change extends it' >> ~/codex/repo/orientation.md - 04
Verify and submit
cat the routine, then submit for validation.
cat ~/codex/repo/orientation.md
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list