← ClaudeAtlas

codebase-layoutlisted

Carries the rules that decide where a new file goes, when a folder splits, and when a file moves from its one consumer to shared code, so a plan places each new path by role and feature with a one-clause reason rather than beside its nearest neighbor. Use when a plan names a file or folder that does not exist yet, when `plan-feature` reaches its placement step, or when asked "where should this file go", "this folder is flat", "restructure this folder", or "should this be its own folder". Do NOT use to choose which layer a test belongs at, which is `test-craft`, or to shape a module's interface and seams.
erclx/canon · ★ 2 · Web & Frontend · score 75
Install: claude install-skill erclx/canon
# Codebase layout A session placing a new file copies the folder next to it, so a flat folder stays flat until a refactor pays to split it. In one target, two source folders grew to 46 and 36 flat files under installed rules against it, and the split cost a pull request touching 98 files. This skill carries the placement call to the moment the path is written, which is the one moment it is cheap. Load it before writing a new path into a plan, not after. A worker copies the path the plan gives it, so the placement is settled once the plan is. Skip it when every path the work names already exists. ## Read the project's strategy first - Name the layout the project already uses before placing anything: by feature, by route, by role, or flat. Look at the folders a new file would sit beside and at any stated rule on layout. - Keep to that strategy. A second strategy beside the first costs every later reader a guess about which one a file follows. - Propose a strategy change as its own decision, never as a side effect of placing one file. ## Group what changes together - Put files that change for the same reason in one folder, and separate files that change for different reasons. - Name a folder for what it holds for a reader, being a feature, a route, or a role, over its technical kind alone. `checkout/` tells a reader what is inside where `helpers/` does not. - Never create a bucket named `misc`, `common`, `utils`, or `helpers` on its own. Qualify it by what it serves, or p