Skill / Architecture
Cohesive folders
Keep every folder a short, readable table of contents by grouping loose files into named responsibilities.
Goal
Make each folder express one nameable intent so a reader can predict its contents without opening files, and promote the hidden grouping into a folder when loose files accumulate.
Ownership and derivation rules for canonical facts, generated projections, and system boundaries.
Checks
1Treat roughly seven loose files in one folder as the review threshold: beyond it, find the implicit groups — shared responsibility, shared consumer, or shared lifecycle — and promote each into its own folder.
2Read a shared filename prefix across several files as a folder that was never created; promote the prefix into a directory and drop it from the filenames.
3Name every folder after its single responsibility; a file you cannot place without hesitation reveals a grouping that does not exist yet.
4Keep only framework-reserved files at conventional roots, such as route files, entrypoints, and global config; everything else lives in a named group.
5Colocate what changes together: a unit's component, styles, hooks, tests, and helpers sit in that unit's folder rather than sorted by file kind at the top level.
Avoid
1Junk-drawer folders such as utils, helpers, misc, common, or shared that accept anything and grow without bound.
2Generic catch-all filenames such as utils.ts, helpers.ts, types.ts, or constants.ts at broad scope; scope them to the unit they serve or name the actual content.
3Disambiguating with filename prefixes instead of directories once several files share the same prefix.
4Overcorrecting into single-file folders or deep nesting; a folder earns its existence by grouping several related files.