Generate or update the OpenAPI specification from the Rails application tests (specs). Use when you need to synchronize the public API contract with the actual implementation in the Rails service.
Perform repository documentation accuracy audits that compare docs claims to current-branch runtime code truth and produce a dated report in docs/audit with mandatory Sections A-E, severity-ranked findings, score, and PASS/FAIL gate. Use when asked to audit root/docs markdown accuracy, generate recurring audit reports, validate setup/API contract documentation, or produce evidence-backed documentation backlog items.
Create, refresh, or reconcile the repository root `AGENTS.md` using current branch truth. Use when Codex needs to update `AGENTS.md` after code, config, CI, audit, or documentation changes, or when the repo's agent guidance must be checked against current files without widening scope to the rest of the docs set.
Create or update `docs/features/*` documentation for this repository using the established feature-doc structure and keep `docs/features/README.md` synchronized. Use when Codex needs to add a new feature page, revise an existing feature page, choose the correct feature category (`core`, `infrastructure`, `resilience`, `security`), or reconcile the features index with the files that actually exist on disk.
Create and update technical research papers in docs/research using the repository's standard structure: Problem Statement, Alternatives Considered, Trade-offs, Why Current Approach Was Selected, Benchmarks / Status, References, and Assumptions. Use when asked to write or revise architecture/implementation research notes, compare design options, or document evidence-backed rationale in this repo.