Create a reviewable repository
Create a reviewable repository — Coding agents: small changes you can verify. Check account and execution mode; Create the training files; Inspect before prompting. Practical assignment: Lab evidence.
Demo edition. The materials are undergoing editorial review.
Topics covered
- Check account and execution mode
- Create the training files
- Inspect before prompting
Check account and execution mode
Use an already available assistant allowance or complete the code manually. Do not enable paid overages or assume a ChatGPT subscription includes unlimited API calls.
Use an installed Codex CLI or the official quickstart linked in sources; installation and sign-in are separate from this local code exercise. Review the platform installer before running it, choose your intended account manually and check allowance/billing before sending a task. From agent-lab, the commands below check the installed version and start a read-only session. Ask it to explain total.mjs first. Use /status and /permissions to inspect the actual directory and permissions. Change to scoped editing only for the later authorized repair.
The fictional repository calculates workshop reservation totals. Its small size lets you inspect every changed line and reproduce every test yourself. An assistant proposal is evidence of a suggested change, not proof that the code ran or that an external action was authorized. Keep secrets and unrelated repositories out of context. Check the tool’s actual permission settings rather than assuming a prompt creates a sandbox.
# After official installation and choosing the intended account
# Run from the agent-lab directory created in the next step:
codex --version
codex --sandbox read-only --ask-for-approval on-request
# In the interactive session: /status then /permissions
# Prompt: Explain total.mjs. Do not edit files or install dependencies.
Create the training files
Initialize an empty local repository and create total.mjs with the shown function. The initial implementation deliberately accepts negative seat counts. Commit only this synthetic baseline.
The local Git identity is fictional and configured only inside this disposable repository. It enables a baseline commit without changing global settings. If a real project already has history or uncommitted changes, inspect that state instead of running the empty-directory initialization over it.
Create total.mjs in the repository root with the exact JavaScript below, without the shell comment marker. Save it before git add. The shell block configures Git and records that file; it is not the file content itself.
export function total(seats,price){return seats*price;}
Work on a dedicated branch in a clean training repository. Save files exactly as named and run the given commands from its root. Before asking for an edit, capture the current failing behavior and the intended passing behavior. Keep the allowed files and dependency policy explicit. Review any generated shell command before execution, especially if it installs software, contacts a service or discards working files.
# Terminal
mkdir agent-lab
cd agent-lab
git init
git config user.name "Training Learner"
git config user.email "learner@example.test"
# Save total.mjs:
# export function total(seats,price){return seats*price;}
git add total.mjs
git commit -m "Training baseline"
git switch -c fix-seat-validation
Inspect before prompting
Check status, history and files before sharing context. If existing work is present, preserve it and narrow the task rather than overwriting the directory.
A useful completion report names the behavior changed, the exact checks executed and any remaining uncertainty. A test command shown in prose is not a passed test; preserve its actual exit result. Review both the patch and the test quality before committing. A successful unit test does not authorize deployment, billing changes or sending repository data to another service. Those are separate actions with their own scope.
git status --short
git log -3 --oneline
git diff
Practical assignment
Lab evidence
Continue to learning