ADR-0006 — AI changes require preview before apply¶
Status¶
Accepted — proposed v1.1+ (AI workflows)
Context¶
AI-assisted editing must not bypass OntoCore validation or user consent (design/adr/0010-ai-features-opt-in.md). Patch-based write-back (design/adr/0006-patch-based-write-back.md) already supports preview.
Decision¶
All AI-generated ontology changes MUST follow:
- Generate proposal (structured patch or refactor ops)
- Validate via OntoCore
- Show preview to user
- Require explicit approval
- Apply via existing LSP apply paths
- Audit log entry
No silent apply. Opt-in required for AI features at workspace or org level.
Consequences¶
Positive: Aligns AI with refactoring safety model; reduces bad-edit risk.
Negative: Extra UX step; latency for large proposals.