Codex Review Contract
Defines a review contract for Codex when acting as reviewer on a quantum computing compiler project, with priority rules and checklists.
What this file does
Defines a review contract for Codex when acting as reviewer on a quantum computing compiler project, with priority rules and checklists.
When to use it
- You want Codex to review pull requests against a formal spec
- You need a consistent review gate for an agentic split workflow
- Your project has pulse-level or timing-sensitive code that needs extra scrutiny
- You want to restrict review scope to avoid speculative feedback
Assumes this stack
Codex Review Contract
This repository uses a split workflow:
- Claude (or another coding agent) is the primary implementer.
- Codex is the reviewer and acceptance gate.
- The current task context lives in
docs/review_spec.mdattached to the review thread.
Review Mode
When running /review, Codex should treat this repository as a code review task by default.
Focus on correctness, regressions, missing tests, and spec mismatches before style or refactoring advice.
If docs/review_spec.md is attached in the current thread, treat it as the task contract for this review.
Context Priority
Read context in this order when needed:
- The diff / changed files
docs/review_spec.mdattached to the thread- Project specs and logs under
openqasm-rtir/docs/ openqasm-rtir/CLAUDE.mdfor project background
Do not expand scope beyond the attached spec unless the diff clearly introduces new risk.
Acceptance Priorities
Review against the following priorities, highest first:
- Semantic correctness
- Conformance to the task spec
- Regression risk
- Test adequacy
- Simplicity and scope control
Project-Specific Acceptance Rules
For openqasm-rtir/, pay extra attention to:
- Formal definitions are the source of truth; code must not silently contradict
openqasm-rtir/docs/formal_definitions_v0.md - Checker and oracle must stay meaningfully independent
- Timing semantics must be explicit and monotonic
- Port occupancy, feedback readiness, and frame/phase evolution must be auditable from code and tests
- Scope should stay MVP-first; avoid speculative abstractions unless the spec explicitly asks for them
Pulse-Level Review Checklist
If a change touches pulse code, verify:
Play,Acquire,ShiftPhase,Delay, and conditional behavior match the documented semantics- Port conflicts are checked independently from the reference semantics path
- Feedback checks use the right readiness time for classical bits
- Phase accumulation and elapsed-time handling are correct
- Positive and negative examples both exist when behavior changes
Testing Expectations
A review should flag missing validation when a change:
- modifies semantics without updating tests
- adds a new case without a focused unit or regression test
- changes a spec assumption without updating docs or examples
Passing tests do not override a clear semantic or specification bug.
Review Output
Findings come first. Each finding should be concrete, severity-ordered, and tied to file references when possible. Prefer reporting:
- incorrect behavior
- spec mismatch
- edge-case breakage
- missing regression coverage
Avoid low-value style nits unless they hide a real maintenance or correctness risk.
Communication
- Respond in Chinese unless the user asks otherwise.
- Keep code identifiers and file names in English.
- Be direct about blockers and uncertainty.
What's inside
8 sections covering review mode, context priority, acceptance rules, project-specific checks, pulse checklist, testing expectations, output format, and communication.
Change this for your project
- Replace
openqasm-rtirwith your own repository name - Replace
docs/review_spec.mdwith your own spec file path - Replace
openqasm-rtir/docs/formal_definitions_v0.mdwith your formal definitions path - Replace
openqasm-rtir/CLAUDE.mdwith your project background file
Where it goes
Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.
Worth borrowing
- Prioritize semantic correctness over style in reviews
- Require tests for any semantic or spec change
- Flag missing validation when behavior changes without test updates
Related Documents
Browser-only development
Guides AI assistants on an Electron + React + TypeScript desktop app for browsing and organizing AI-generated images locally.
Claude Agents — Reference & Recommendations
Catalogues 40+ Claude agents and marketing skills for building a cat adoption charity landing page, with a ready-to-paste prompt and backend API reference.
Golden DKG Prototype -- Master Plan
Defines an 8-phase implementation plan for a Rust prototype of the Golden non-interactive DKG protocol using BLS12-381 and tokio.
Swarms Examples Index
Lists 60+ example scripts for building single and multi-agent systems with the Swarms framework, organized by category and use case.