Lesson 02
Build with Codex and demand evidence.
Give Codex a crisp goal, enough repository context, hard constraints, and an observable definition of done.
- Suggested time
- 15 minutes to set up · 60–120 minutes to build
- You will finish with
- A reviewed implementation with commands and browser evidence, not a vague completion claim.
Sign in using the supported path
Codex surfaces support ChatGPT subscription sign-in or an API key. Choose the route that matches your account and organization policy.
- Use the Codex app for a visual workspace or the CLI/IDE integration for terminal-first work.
- Open the project directory before prompting so repository instructions are available.
- Never paste real secrets into the prompt or source tree.
Prompt in four blocks
Use Goal, Context, Constraints, and Done when. Then ask Codex to implement and verify, not merely explain.
- Mention the exact user journey.
- Name files or conventions that must be preserved.
- Require tests, typecheck, lint, build, and browser inspection where applicable.
Review the proof
Read the changed files and the verification summary before accepting the work.
- Check which tests ran and their exact counts.
- Ask what remains unverified.
- Run the main journey yourself with a fresh browser state.
Copy-ready starter prompt
Replace the bracketed details, give it to your coding agent, and keep the verification steps intact.
Goal
Implement [SMALL FEATURE] in this repository from user input through visible output.
Context
Read the repository instructions first. The primary user is [WHO], and the required journey is [START] → [ACTION] → [RESULT].
Constraints
Preserve unrelated changes. Do not add external services, secrets, trackers, permissive CORS, or unpinned dependencies. Keep the UI responsive and keyboard accessible.
Done when
Implement the feature, add proportionate tests, run typecheck/lint/build, exercise the full browser journey at desktop/390px/320px, inspect console and network activity, and report exact commands, exit codes, test counts, limitations, and changed files.Official resources
Learn pages are public and anonymous. They do not create an account, a session, analytics, or marketplace activity.