ontology-changelisted
Install: claude install-skill berenddeboer/ready-for-agent
# Changing the domain ontology
The domain model lives in `ontology/` as RDF (Turtle) and is the single
source of truth per ADR-0044
(`docs/adr/0044-ontology-derived-lifecycle-model.md`) and ADR-0058
(`docs/adr/0058-ontology-owns-step-run-reason-codes.md`).
Read `ontology/README.md` for the full model and diagrams before editing.
**Never hand-edit generated artifacts.** These are derived and CI-checked:
- `packages/lifecycle-model/src/generated/work-item-state.ts`
(state space, transition relation, and the complete `STEP_RUN_REASON` table)
- `packages/graphql-schema/src/type-defs.gen.ts`
- Any state enum in `db-schema` or SDL that lists Work Item states — they
import from `@ready-for-agent/lifecycle-model`.
## Procedure
1. **Edit the ontology first.**
- New lifecycle state: declare it in `ontology/rfa.ttl` as
`owl:Class, owl:NamedIndividual, skos:Concept` plus
`rfa:OperationalLifecycleStep` (or `rfa:TerminalWorkItemState`), with
`rdfs:subClassOf` the same class, one `skos:notation` (the runtime
snake_case string), one `skos:prefLabel`, and one `skos:definition`.
Add it to the `owl:AllDisjointClasses` list of the twenty lifecycle
values, and to the `sh:in` state list in `ontology/shapes.ttl`
(`rfa:WorkItemShape`).
- New transition: declare an `rfa:Transition` individual in `rfa.ttl`
with exactly one `rfa:fromStep`, `rfa:toStep`, `rfa:guard` (non-empty
string), and `rfa:reasonCode` (an `rfa:StepRunReason`).
- New Ste