|
1 | 1 | # CodeFlow Monorepo Migration Plan |
2 | 2 |
|
3 | | -This document tracks the migration of all CodeFlow-related repositories into a unified monorepo structure. |
| 3 | +This document tracks the migration of all CodeFlow-related repositories into a unified |
| 4 | +monorepo structure. The decision to consolidate is recorded in |
| 5 | +[docs/adr/0021-repository-structure.md](docs/adr/0021-repository-structure.md). |
4 | 6 |
|
5 | 7 | ## Structure |
6 | 8 |
|
7 | | -- engine/ # Python core engine project |
8 | | -- desktop/ # Electron/Tauri app |
9 | | -- vscode-extension/ # VS Code extension |
10 | | -- website/ # Docs/marketing |
11 | | -- orchestration/ # Infra, bootstrap, and shared orchestration assets |
12 | | -- templates/ # Workflow templates |
13 | | -- tools/ # Dev tools/scripts |
14 | | -- tests/ # Unified test suite for engine |
15 | | -- docs/ # Shared documentation |
| 9 | +``` |
| 10 | +engine/ # Python core engine project |
| 11 | +desktop/ # Tauri + React desktop application |
| 12 | +vscode-extension/ # VS Code extension |
| 13 | +website/ # Next.js marketing and documentation site |
| 14 | +orchestration/ # Azure IaC, bootstrap scripts, and shared utility packages |
| 15 | +docs/ # Shared project documentation |
| 16 | +tools/ # Shared development tooling and helper scripts |
| 17 | +``` |
16 | 18 |
|
17 | 19 | ## Current Status |
18 | 20 |
|
19 | | -Completed: |
| 21 | +### Phase 1 — Code Consolidation ✅ Complete |
20 | 22 |
|
21 | 23 | 1. Added monorepo migration scaffolding and shared documentation. |
22 | 24 | 2. Imported `codeflow-desktop` into `desktop/`. |
23 | 25 | 3. Imported `codeflow-website` into `website/`. |
24 | 26 | 4. Imported `codeflow-orchestration` into `orchestration/`. |
25 | 27 | 5. Imported `codeflow-vscode-extension` into `vscode-extension/`. |
| 28 | +6. Added path-aware CI workflow (`.github/workflows/monorepo-ci.yml`). |
| 29 | +7. Added archive and redirect guidance (`docs/LEGACY_REPO_REDIRECTS.md`). |
| 30 | +8. Finalised repository structure decision (ADR-0021 accepted). |
26 | 31 |
|
27 | | -Pending: |
| 32 | +### Phase 2 — Tooling Standardisation ⏳ In Progress |
28 | 33 |
|
29 | | -1. Normalize dependency management across Python and Node-based projects. |
30 | | -2. Add path-aware CI and release automation. |
31 | | -3. Consolidate duplicate docs, licenses, and contribution guidance. |
32 | | -4. Complete archive and redirect steps for the former split repositories. |
| 34 | +1. Normalise dependency management across Python and Node.js projects. |
| 35 | +2. Add path-aware release automation for each component. |
| 36 | +3. Consolidate duplicate `README`, `LICENSE`, and `CONTRIBUTING` files. |
| 37 | +4. Archive legacy split repositories and update their READMEs to redirect here. |
33 | 38 |
|
34 | | -## Migration Steps |
| 39 | +## Future Extraction Candidates |
35 | 40 |
|
36 | | -1. Import code from each repo, preserving git history. |
| 41 | +The following components *could* be extracted to separate repositories in future if |
| 42 | +specific conditions are met (see ADR-0021 for full rationale): |
| 43 | + |
| 44 | +| Component | Condition for extraction | |
| 45 | +|---|---| |
| 46 | +| `website/` | Content team needs write access without engine write access | |
| 47 | +| `orchestration/bootstrap/` | A shared `justaghost/*` or `phoenixvc/*` infra repo is created | |
| 48 | + |
| 49 | +No extraction is recommended at this stage. |
| 50 | + |
| 51 | +## Migration Steps (Reference) |
| 52 | + |
| 53 | +1. Import code from each repo, preserving git history (`git subtree`). |
37 | 54 | 2. Resolve conflicts and update imports. |
38 | | -3. Centralize CI/CD workflows. |
| 55 | +3. Centralise CI/CD workflows with path-aware filtering. |
39 | 56 | 4. Update documentation and onboarding. |
40 | | -5. Deprecate old repositories. |
| 57 | +5. Archive legacy split repositories. |
41 | 58 | 6. Announce migration and monitor feedback. |
42 | 59 |
|
43 | 60 | --- |
44 | 61 |
|
45 | | -For detailed instructions, see MIGRATION_GUIDE.md. |
| 62 | +For detailed instructions, see [MIGRATION_GUIDE.md](MIGRATION_GUIDE.md). |
0 commit comments