Codex Review Typed API Contracts for Order State Changes
Define mutation inputs, response types, errors, and persistence boundaries from the business capability.
中文Install in Codex
Use a local API design or code, type definitions, and synthetic request examples.
- Copy the pinned `.codex/skills/api-contract-guard/` directory into `.agents/skills/api-contract-guard/` in the project.
- Have Codex state the endpoint's business capability, then list request, result, and failure types.
Example task
Design `moveOrderToProcessingStatus` for a local fixture using an order ID and target state. Define valid transition, invalid transition, and missing order outcomes.What to check
The contract documents input, success, both errors, and when the change is persisted. Client and storage semantics remain traceable.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should an endpoint inherit its storage helper's name?
Name the API for the caller's business action. The storage helper can retain implementation terminology.