# Phase 01.7: Validate Spec vs Context Files [MANDATORY]

**Check for conflicts between story requirements and context file constraints:**

From story Technical Specification section, extract:
- Required technologies (languages, frameworks, libraries)
- Required patterns (architectures, designs)
- File locations (where code should be placed)

Compare against:
- tech-stack.md (locked technologies)
- architecture-constraints.md (design patterns)
- source-tree.md (file placement rules)

**If conflicts detected → Use AskUserQuestion:**

```
Question: "Spec requires [X], but tech-stack.md specifies [Y]. Which is correct?"
Header: "Spec conflict"
options:
  - label: "Follow tech-stack.md (use [Y])"
    description: "Maintain consistency with existing architecture"
  - label: "Update tech-stack.md (use [X] + create ADR)"
    description: "Document architecture change in ADR and update tech-stack.md"
multiSelect: false
```

**After user response:**
- If "Update tech-stack.md" chosen:
  - Create ADR documenting technology decision
  - Update tech-stack.md
  - Proceed with development
- If "Follow tech-stack.md" chosen:
  - Proceed with development using tech-stack.md technologies

**Token cost:** ~1,000 tokens (conflict detection) + ~3,000 (if AskUserQuestion needed)
