# 0001 — Migration from MetaDrivenPlatform4AI

**Milestone:** TBD (cross-cutting; spans M2 → M4 by virtue of incorporating
legacy work across all phases)
**Owner:** jieni-droid
**Status:** done
**Started:** 2026-05-03
**Completed:** 2026-05-04
**Outcome:** 33 journey-anchored Stories + 20 escape-hatch Bugs filed across 19 module epics. See `docs/migration_report.md` for full results. Legacy repo `pingcap-inc/MetaDrivenPlatform4AI` is now read-only archive.

## Goal

Reorganize the 1265 issues (952 pingcap-inc + 313 fork-unique) + ~1457 PRs accumulated in the legacy repository
[`pingcap-inc/MetaDrivenPlatform4AI`](https://github.com/pingcap-inc/MetaDrivenPlatform4AI)
into clean Epic / Story / Task / Bug artifacts under this repo, with each
ported Story / Bug carrying a linked test (existing path or to-write task
with agent-drafted scaffold).

This is a one-time migration. After completion, the legacy repository is
treated as a read-only archive; no new development happens there.

## Scope

- **In scope**: all 952 legacy issues (open + closed), the 22 existing
  `[Umbrella]` issues, and existing test files referencing those issues
- **Not in scope**:
  - L0 / L1 / L2 layer-belonging judgment (engineering decides post-migration)
  - Code-level port of legacy implementations (separate workstream)
  - Writes to `pingcap-inc/NexusCRM` OSS repo (separate workstream)
  - Operational management of the legacy repo (freeze / archive banner /
    notifications) — handled outside this plan

## Acceptance criteria

- [ ] **Phase 0 — setup** complete: tracking epic + templates + skills committed
- [ ] **Phase 1 — classification** complete: `migration_audit.csv` has 1265 rows;
      Phase 1 spot-check baseline ≥ 95% accuracy
- [ ] **Phase 2 — epic synthesis** complete: ~30–50 epic markdowns under
      `docs/epics/`, each referencing milestone (M2 / M3 / M4 / TBD)
- [ ] **Phase 3 — story extraction** complete: ~150–250 stories filed as
      GitHub Issues with `type: story` label; each body starts with
      `**Epic:**` and contains `## Tests` section
- [ ] **Phase 4 — bug carry-forward** complete: ~80–150 bugs filed as
      GitHub Issues with `type: bug`; each linked to an epic and a test
      (existing or to-write task with scaffold draft)
- [ ] **Phase 5 — validation** complete: all invariants pass (see plan);
      `docs/MIGRATION_NOTICE.md` written; this epic closed



## Source corpus update (2026-05-03 review)

Engineer feedback flagged that the original scope of "952 issues from
pingcap-inc/MetaDrivenPlatform4AI" missed content in the fork repo
[ywang-official/MetaDrivenPlatform4AI](https://github.com/ywang-official/MetaDrivenPlatform4AI).
After cross-referencing migration markers:

- pingcap-inc/MetaDrivenPlatform4AI: 952 issues (already in audit)
- ywang-official/MetaDrivenPlatform4AI: 568 issues
  - 255 already migrated to pingcap-inc (have `Migrated from` marker)
  - **313 unique to fork** (closed issues + ongoing fork-only work)

Total source corpus: **1265 issues**. Audit CSV gained `source_repo`
column (`pingcap-inc` | `fork`) to disambiguate same-numbered issues
across the two repos.

Fork-unique issue distribution (313 ported):
- M2 (launch-blocker): 72
- M3 (P1/P2): 198
- M4 (post-launch): 6
- TBD: 20

Top fork-unique modules: flow (26), ui-components (25), approval (25),
report (20), quote (14). Plus 120 with no module label.


## Phase progress dashboard

| Phase | Days | Status | Manager hours |
|---|---|---|---|
| 0 — Setup | Day 0 | 🟡 in-progress | 1h |
| 1 — Classification | Day 1–5 | ⚪ pending | 5h |
| 2 — Epic synthesis | Day 5–9 | ⚪ pending | 12h |
| 3 — Story extraction | Day 9–13 | ⚪ pending | 10h |
| 4 — Bug carry-forward | Day 13–16 | ⚪ pending | 3h |
| 5 — Validation | Day 16–19 | ⚪ pending | 4h |

## Key non-goals

- Do not freeze / archive / notify on the legacy repo (not this plan's job)
- Do not classify content by L0 / L1 / L2 layer (engineering judgment, post-migration)
- Do not file any issue or doc to `pingcap-inc/NexusCRM` (OSS isolation)
- Do not introduce a Themes layer above Epic (Milestone + project vision
  docs handle strategic grouping)
- Do not auto-close legacy issues
- Do not port code

## Linked artifacts

- Migration plan (working doc): `~/.claude/plans/soft-whistling-lighthouse.md`
- Audit data:
  - `migration_audit.csv` (issue dispositions) — 953 rows when complete
- Migration skills: retired after the one-time migration completed; the audit
  CSV and final report retain the outcome.
- Final summary: `docs/MIGRATION_NOTICE.md` (written in Phase 5)

## Risks

| Risk | Mitigation |
|---|---|
| 22 legacy umbrellas are heterogeneous (narrative / lettered cluster / declarative) | The Phase 2 epic-author process carried multiple prompt templates per umbrella shape |
| Agent classification error rate 5–10% across 1265 issues (952 pingcap-inc + 313 fork-unique) | Phase 1 manager spot-check 30/day, calibrating prompt; CSV trail enables retroactive correction |
| Accidental writes to NexusCRM OSS | Plan explicitly forbids; verification step at Phase 5 confirms no migration commits to that repo |
| Some ported issues lack persona / outcome clarity | Phase 3 review gate marks them `needs-clarification`, await business-user input |
| IANTHEREAL / Daemonxiao bandwidth pulled into migration | Phase 2 concentrates their involvement in week 1; Phase 3+ they detach |
| Manager travel during migration | EOD-brief skill replaces morning slot; spot-check moves to 25min before 8pm call |

## History

- 2026-05-03 — Phase 0 started; tracking epic created.

(Subsequent phase transitions append entries here.)
