# Migration Report — `{FROM_PATTERN}` → `{TO_PATTERN}`

**Migration ID:** `{MIGRATION_ID}`
**Session ID:** `MIG-{MIGRATION_ID}`
**Date:** `{ISO_DATE}`
**Mode:** `{MODE_LABEL}`               <!-- "Full" | "Dry Run" | "Single-Path" -->
**Commit:** `{COMMIT_HASH}`            <!-- Filled in Phase 06 after commit -->

---

## Migration Summary

| Field | Value |
|-------|-------|
| `from_pattern` | `{FROM_PATTERN}` |
| `to_pattern`   | `{TO_PATTERN}` |
| `to_type`      | `{TO_TYPE}` |
| `scope_dirs`   | `{SCOPE_DIRS_LIST}` |
| Total files processed | `{TOTAL_FILES}` |
| Total occurrences classified | `{TOTAL_OCCURRENCES}` |
| Files edited | `{EDITED_FILE_COUNT}` |
| Occurrences transformed | `{TRANSFORMED_OCC}` |

---

## Per-Cluster Results

| Cluster | Files edited | Occurrences | FLAGGED | Uncertain | Verdict |
|---------|--------------|-------------|---------|-----------|---------|
| `{CLUSTER_ID_1}` | `{N}` | `{M}` | `{F}` | `{U}` | Green \| Yellow \| Red |
| `{CLUSTER_ID_2}` | `{N}` | `{M}` | `{F}` | `{U}` | … |

**Total clusters dispatched:** `{N_CLUSTERS}` (in `{N_WAVES}` wave(s))

---

## Design-Sensitive Files Handled Inline (Phase 03)

Files needing a logic rewrite rather than a noun-swap, hand-edited by the orchestrator:

- `{FILE_1}` — `{one-line summary of the inline change}`
- `{FILE_2}` — `{one-line summary}`

<!-- If none, write: "None — every transformable file was handled by a cluster worker." -->

---

## FLAGGED Sites — Resolved

Type-sensitive sites FLAGGED by workers and hand-resolved by the orchestrator in Phase 05:

| File:line | Trap category | Resolution |
|-----------|---------------|------------|
| `{FILE}:{LINE}` | `{CATEGORY 1-4}` | `{RESOLVED — one-line summary}` |

---

## FLAGGED Sites — Deferred

Type-sensitive sites the orchestrator deferred (with tracking ID):

| File:line | Trap category | Tracking ID | Reason |
|-----------|---------------|-------------|--------|
| `{FILE}:{LINE}` | `{CATEGORY}` | `{STORY-NNN \| issue-#NN}` | `{one-line reason}` |

<!-- If none, write: "None — every FLAGGED site was resolved inline." -->

---

## Residual Classification

Final residual grep of `{FROM_PATTERN}` across `scope_dirs` after the migration:

| Classification | Count | Example file |
|----------------|-------|--------------|
| ALREADY-MIGRATED | `{N}` | `{example file}` |
| DOC-historical | `{N}` | `{example file}` |
| EXCLUDED | `{N}` | `{example file}` |
| FLAGGED-type-sensitive | `{N}` | `{example file}` |
| **TOTAL residual (intentional)** | `{TOTAL}` | — |

No occurrences classified as READ-OP / LISTING / PATH-VALIDATION / DOC-current-state remain (verified by Phase 05 residual classification).

---

## Verification Verdict

| Stream | Result |
|--------|--------|
| Residual grep | PASS — all `{TOTAL}` residuals classified as intentional |
| Dual-path sweep (`diff -rq`) | PASS — every touched subtree byte-identical (modulo documented pre-existing CLAUDE.md drift) |
| FLAGGED resolution audit | PASS — every flag has RESOLVED / DEFERRED / INVALIDATED disposition |
| Tests affected | `{PASS \| pre-existing red isolated via revert-test}` |

**Overall:** `{CLEAN | YELLOW | RED}`

---

## Next Steps

- `{Next-step 1, e.g. "Land the deletion of the legacy artifact in a follow-up phase."}`
- `{Next-step 2, e.g. "Track STORY-NNN for the deferred FLAGGED site at .claude/.../foo.md:42."}`
