Skip to content

New folders for one or two files; layer trees for small apps ​

Files and folders: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as new-folder.

What makes new folders for one or two files and layer trees for small apps a bad practice? ​

The standards that call it a bad practice: Ousterhout: shallow modules; Martin's Common Closure Principle.

What does lessloc do about new folders for one or two files and layer trees for small apps? ​

lessloc catches it as new-folder. Framework route folders (Next.js, SvelteKit, Expo) are exempt.

  • new-folder (tier 2): A new folder with one or two entries, or an examples or demo folder nobody asked for.

The other patterns in Files and folders:

Released under the Apache-2.0 license. · llms.txt