get-shit-done/references/doc-conflict-engine.md
Shared conflict-detection contract for workflows that ingest external content into .planning/ (e.g., /gsd-import, /gsd-ingest-docs). Defines the report format, severity semantics, and safety-gate behavior. The specific checks that populate each severity bucket are workflow-specific and defined by the calling workflow.
Plain-text, never markdown tables (no |---|). The report is rendered to the user verbatim.
## Conflict Detection Report
### BLOCKERS ({N})
[BLOCKER] {Short title}
Found: {what the incoming content says}
Expected: {what existing project context requires}
→ {Specific action to resolve}
### WARNINGS ({N})
[WARNING] {Short title}
Found: {what was detected}
Impact: {what could go wrong}
→ {Suggested action}
### INFO ({N})
[INFO] {Short title}
Note: {relevant information}
Every entry requires Found: plus one of Expected:/Impact:/Note: plus (for BLOCKER/WARNING) a → remediation line.
If any [BLOCKER] exists:
Display:
GSD > BLOCKED: {N} blockers must be resolved before {operation} can proceed.
Exit WITHOUT writing any destination files. The gate must hold regardless of WARNING/INFO counts.
If only WARNINGS and/or INFO (no blockers):
Render the full report, then prompt for approval via the approve-revise-abort or yes-no pattern from references/gate-prompts.md. Respect text mode (see the workflow's own text-mode handling). If the user aborts, exit cleanly with a cancellation message.
If the report is empty (no entries in any bucket):
Proceed silently or display GSD > No conflicts detected. Either is acceptable; workflows choose based on verbosity context.
Each workflow that consumes this contract must define:
import, ingest, etc.).The workflow MUST NOT:
Do NOT:
|---|) in the conflict report — use plain-text labels as shown above