Use when deciding how to organise code in an AI-assisted codebase — whether to split or merge a file, where to draw module boundaries, how big a file should get, whether to separate logic from rendering/styles/data, whether to use barrel/index re-export files, or where types and test files should live. Triggers on "should I split this file", "this file is getting too big", "separate concerns", "where should this code live", "are barrel files worth it", "central types file or co-locate", "colocate tests or a tests folder", reviewing or refactoring file/module organisation, structuring a new component or feature, or any architecture decision where part of the audience is an AI coding agent. Apply this whenever someone is choosing how to lay code out across files and an LLM will be reading or editing it, even if they only say "refactor this" or "clean up the structure" without mentioning AI.
83
87%
Does it follow best practices?
Impact
82%
1.54xAverage score across 9 eval scenarios
Passed
No known issues
{
"context": "A clean, typed, tested, 6-times-reused calculatePrice function is proposed for inlining 'so the agent sees it all'. The criteria check whether the answer keeps the abstraction, grounds it in the abstraction-over-file-structure heuristic, and rejects the over-rotated inline argument.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Recommends keeping the file",
"description": "Recommends keeping calculatePrice as its own file and rejects inlining it into the component",
"max_score": 8
},
{
"name": "Abstraction-over-structure heuristic",
"description": "Grounds it in the abstraction-over-file-structure heuristic (clean typed interface, hides implementation)",
"max_score": 6
},
{
"name": "Typed call site, no internals needed",
"description": "Notes the agent uses the typed call site without needing the internals (understood in isolation)",
"max_score": 6
},
{
"name": "Rejects inline-so-agent-sees-it argument",
"description": "Rejects the 'inline so Claude sees it all' argument for a clean, reused, tested abstraction",
"max_score": 6
}
]
}