name: spec-first-control description: > Enforce Spec-First execution for this repository. Use when changes touch OpenAPI, JSON schemas, DB migrations, event payloads, runtime semantics, or service boundaries.
Spec-First Control
Goal
Prevent implementation drift from product/API/runtime specifications.
Triggers
- API contract changes
- JSON schema changes
- DB schema or migration changes
- Streaming/event payload changes
- Workflow runtime semantics changes
Required artifacts (update before code)
docs/api/openapi.yamldocs/api/schemas/*.jsondb/migrations/*.sqldocs/architecture/*.mdand/ordocs/adr/*.mdwhen behavior changes
Mandatory action items
- Goal and scope
- Exact spec files to change
- Compatibility strategy (additive/breaking)
- Implementation files
- Tests to add/update
- Observability/security impacts
- Rollout/rollback notes
- Open questions/TODOs
Workflow
- Classify task (A-G from
AGENTS.md). - For A-E, update spec artifacts first.
- Implement code changes.
- Add/update tests (unit/integration/contract/e2e as applicable).
- Update docs and summarize residual risks.
Guardrails
- Do not invent undocumented fields.
- Do not merge contract/schema changes without tests.
- If information is missing, add TODO + request clarification.