Repository navigation
Description
Goal
Leave the Code-XR VS Code extension as a spotless base for the TFM work and for the future Code-XR IDE (epic #11): no zombie code, no duplicated subsystems, low complexity, single-responsibility modules, guardrails that stop the rot from coming back, a smaller package, and a clean monorepo layout. Without losing any functionality.
This epic executes the v1.2.1 cleanup programme that was approved on 2026-09-18 (.claude/docs/v1.2.1/ROADMAP.md, waves W2–W5, ~235 bisectable commits), re-validated against the monorepo tree on 2026-11-25, and extends it with the findings of a new sweep of every directory of the repository.
Analysis (2026-11-25)
Documented in docs/cleanup/ (added by the first PR of this epic):
| Document | Content |
|---|---|
docs/cleanup/README.md |
This plan, the story map and the execution order |
docs/cleanup/feature-baseline.md |
Exhaustive inventory of everything the extension has and does, with a verification checklist |
docs/cleanup/w2-revalidation.md |
Every W2 deletion row re-checked against the monorepo tree: 57 valid, 16 need amendments, 1 invalid (W2-29) |
docs/cleanup/sweep-outside-src.md |
Sweep of root, media/, pages/, .claude/, adr/, scripts, fixtures and monorepo seams: 20 new findings |
docs/cleanup/host-boundary.md |
How vscode coupling, template resolution and folder cycles shape the code for the IDE |
Headline numbers today: 369 TS files / 52,988 lines; 54 modules unreachable from extension.ts (2,317 lines); 1,646 console.* calls; 219 any; 6 functions with CCN > 30 (worst 61); 19 files over 500 lines; 179 of 369 files import vscode; 9 two-way folder cycles; ~165 MB of unused media in the working tree. Test baseline: npm test 708/709 on Linux (1 known path-portability failure), Python 52/52.
Rules
- Behaviour-neutral. The only user-visible changes allowed are the ones the maintainer authorized on 2026-09-18 (ROADMAP §B: remove Hello World and the 17 unreachable commands, hide the venv-deleting debug command, logging moves to the "CodeXR" output channel, delete the abandoned visual-style feature). Each one gets a CHANGELOG line.
- Characterize before reshaping, prove before deleting (four-check deadness proof, H1 dist-identical / H2 reviewed shrink). One roadmap item = one bisectable commit;
npm testgreen after every commit; the guardrail ratchet records each before/after. - One PR per story, against
v1.2.1, nevermaster. Must keep working on Linux, Windows and macOS. - Does not start the IDE ([Epic] Migrate Code-XR from a VS Code extension to its own IDE (Electron + Monaco) #11) nor story [Story] Extract a host-agnostic Code-XR core from the VS Code extension #13 (host-agnostic core); only the cleanup that makes it cheaper.
Definition of done
- All sub-issues closed, CI green on the three OSes.
- The roadmap exit criteria (ROADMAP §5) met or each deviation recorded.
- The feature-baseline story verified item by item (automated checks + a manual end-to-end run) and closed.
- A final report of everything found and changed.
Activity
Merge pull request #44 from Code-XR-Project/claude/project-thread-n2s3q6
aMonteSl commentedon Nov 25, 2026
Scope extended on 2026-11-25 at the maintainer's request:
src/into a feature-first directory tree. The target tree and the move map are written before any file moves.Order: both run after #34, #35, #40 and #42, and before the final verification (#43). #56 goes first or alongside #55, so code is rewritten before it moves.
Generated by Claude Code
aMonteSl commentedon Nov 25, 2026
Every story of this epic is merged into
v1.2.1(PRs #44–#66). The final report isdocs/cleanup/REPORT.md.399494af)d89e08d4)src/filessrc/foldersindex.tsbarrelsextension.tsconsole.*calls insrc/anyTwo things remain before this epic closes. Both are for the maintainer:
Generated by Claude Code