Goal and prerequisites
Server app; synthetic text fixtures; schema validator.
Environment setup
Define required output fields and invalid examples. Review the current API structured-output guide before implementation. Open only the intended project folder in Codex. Read applicable AGENTS.md and README instructions. Inspect git status before edits. Use sample data and keep secrets out of the repository.
Starter prompt
Extract invoice fields from synthetic text into a validated schema. Flag missing evidence rather than inventing values. First confirm the environment and relevant commands. Preserve unrelated changes. Report the files changed, checks actually run, and unresolved limitations.
Build in small steps
Ask for a short implementation plan. Resolve missing prerequisites, implement one bounded slice, and inspect its diff before expanding. Use the existing package manager and lockfile rather than copying commands from an unrelated stack.
Acceptance checks
Test missing fields, malformed input, and model refusal/error handling.
Troubleshooting
If parsing fails, inspect the actual response type and schema; avoid brittle substring extraction.
Finish and hand off
Review the complete diff, record the verification evidence, and document remaining work. Publishing, production migrations, and paid API calls are separate actions requiring an appropriate scope and budget.
Official references
- https://learn.chatgpt.com/docs/codex/cli
- https://learn.chatgpt.com/docs/agent-configuration/agents-md
- https://developers.openai.com/api/docs/quickstart
Suggested exercises, not official courses or certifications. Setup examples have not been executed in every environment. Confirm current product access and repository requirements before starting.