| name | persistence-change |
| description | Review or implement a change to data_contract, data_migrations, repo.py generation rules, ModuleContext.persistence, or persistence guidance. |
| argument-hint | [change summary or file path] |
Before starting: git fetch origin && gh pr list --state open && git log origin/main --oneline -3 — if another agent has an open PR touching the same files you need, wait for it to merge or branch off it instead of main.
Use this skill when a change touches persistence contracts or generated module
repo boundaries.
Inspect first:
AGENTS.md
AGENTS.md
docs/architecture/builder/data-contract-and-revision-contract.md
docs/architecture/foundations/events-and-data/persistence-and-artifact-storage.md
factory_app/build_context/AppGenerator/file_contracts.yaml when generator
file families or backend defaults are involved
Current persistence truth:
data_contract is the canonical planning object
data/contract.json is the exported app artifact
data/migrations/{migration_id}.json is the additive migration artifact
- generated module repo code uses
ModuleContext.persistence as ctx.persistence
ctx.db is absent and non-canonical
backend/repo.py, backend/policy.py, and backend/schemas.py are the
canonical persistence support files
Companion routing:
- Add
runtime-change when ModuleContext.persistence, runtime persistence injection, or runtime persistence behavior changes.
- Add
appgenerator-change when generated data/contract.json, data/migrations/{migration_id}.json, or generated module persistence output changes.
Do not reintroduce:
backend/models.py
backend/models/*.py
backend/database/schema.json
backend/database/seed.json
- raw persistence logic in
handler.py or service.py
Return:
- Layer changed
- Runtime/platform impact
- App workspace impact
- Persistence artifacts affected
- Tests required/run
- Compatibility risk