fix: a new workspace no longer inherits CodeCartographer's own project state (B16, B17) - #155
Open
TheAmericanMaker wants to merge 1 commit into
Open
fix: a new workspace no longer inherits CodeCartographer's own project state (B16, B17)#155TheAmericanMaker wants to merge 1 commit into
TheAmericanMaker wants to merge 1 commit into
Conversation
…t state This repository's .codecarto/ is two things at once: the template copied into a user's repo on init, and CodeCartographer's own live workspace. Init copied it wholesale, so every new workspace started with ~40 KB of another project's history presented as its own — a 15 KB backlog of framework deferrals, a thread log carrying the framework's entries, and a closeout from a session where CodeCartographer analyzed itself. The damage was not only clutter. GUIDE.md keys First-Time Project Setup on "no closeouts in closeouts/", so the shipped closeout told every new session it was not the first to touch the project — suppressing the orchestrator role that #97/#98 made the default. Verified against a real init before and after: closeouts/ went from one inherited file to empty. Init now copies through a filter that skips the four orchestrator files and the contents of closeouts/, then seeds BACKLOG.md and THREAD_LOG.md from new templates alongside CONVENTIONS.md and DECISIONS.md. closeouts/ is created explicitly rather than by the copy, because npm tarballs carry no empty directories and a missing directory reads differently to anything listing it. package.json negates the same paths so the tarball stops transporting them either. The one-off CHANGELOG-2026-05-02-feedback-pass.md moves to docs/, where framework history belongs. Existing workspaces are untouched: refresh already treated all four files as user-owned. Template backlog items B16 and B17 ship with it, since both were symptoms of this bug seen from the inside: - B16: templates/backlog-project.md carries the entry shape it specified (rationale, raised-by, preconditions, smallest viable form), and GUIDE.md distinguishes the project backlog from the framework's under Trust Boundaries. - B17: the spec-delta SKILL states that DEFER goes to BACKLOG.md with no D number, that a refinement made while applying is a decision recorded in the audit file, and that an existing D entry's disposition is updated in place rather than superseded. Tests: a fresh workspace has an empty closeouts/, no orchestrator file carries real entries, the seeded backlog is the template rather than the framework's list, every orchestrator file has a template to seed from, and package.json negates each shipped-by-accident path. 408 pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new workspace was starting with ~40 KB of CodeCartographer's own project history presented as its own — and one consequence was behavioral, not cosmetic.
The bug
This repository's
.codecarto/is two things at once: the template copied into a user's repo on init, and CodeCartographer's own live workspace. Init copied it wholesale. A freshcodecarto_initon any repository produced:BACKLOG.mdTHREAD_LOG.mdcloseouts/2026-05-02-framework-feedback-pass.mdCHANGELOG-2026-05-02-feedback-pass.mdAll four are in
REFRESH_EXCLUDED_TOP_LEVEL/ excluded dirs — treated as user-owned — so nothing ever cleaned them up.The behavioral part.
GUIDE.md§First-Time Project Setup keys on "no closeouts incloseouts/,CONVENTIONS.mdandDECISIONS.mdmissing or still template skeletons" to decide whether to adopt the orchestrator role by default. Because a closeout shipped,closeouts/was never empty on a brand-new workspace — so the detection said "not the first LLM to touch this project," suppressing the default that #97/#98 deliberately established.Verified against a real
handleInitbefore and after:closeouts/went from one inherited file to[], andBACKLOG.mdfrom 15,175 bytes of framework deferrals to a 1,957-byte project skeleton.The fix
copyPackagedWorkspace()incore/workspace.tscopies the template through a filter that skips the four orchestrator files and the contents ofcloseouts/. Both init paths (MCP and Pi) now go through it instead of a rawcp.closeouts/is created explicitly rather than by the copy — npm tarballs carry no empty directories, and a missing directory reads differently to anything that lists it.ORCHESTRATOR_FILESgainsBACKLOG.mdandTHREAD_LOG.md, seeded from two new templates.package.jsonnegates the same paths, so the tarball stops transporting them either.CHANGELOG-2026-05-02-feedback-pass.mdmoves todocs/, where framework history belongs.Existing workspaces are untouched — refresh already treated all four files as user-owned.
Two backlog items ride along
Both were this bug seen from the inside, so they land with it:
templates/backlog-project.mdcarries the entry shape the item specified (rationale, raised-by, preconditions, smallest viable form), andGUIDE.mddistinguishes the project backlog from the framework's under Trust Boundaries.BACKLOG.mdwith noDnumber, that a refinement made while applying is a decision recorded in the audit file's Decisions Beyond Triage section, and that an existingDentry's disposition is updated in place rather than superseded.Verification
408 tests pass, build clean. New
tests/init-workspace-isolation.test.mjspins: a fresh workspace has an emptycloseouts/; no orchestrator file carries real entries (as opposed to a template's illustrative examples); the seeded backlog is the template, not the framework's list; everyORCHESTRATOR_FILESentry has a template that actually exists to seed from; andpackage.jsonnegates each path.Branched off
main, independent of #154.🤖 Generated with Claude Code