CtrlK
BlogDocsLog inGet started
Tessl Logo

mcclowes/ai-aware-code-structure

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

1.54x
Quality

87%

Does it follow best practices?

Impact

82%

1.54x

Average score across 9 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-6/

{
  "context": "A FastAPI orders.py mixes handlers, Pydantic models, SQLAlchemy queries, and discount logic. The criteria check whether the reasoning generalises beyond React, prefers a real abstraction over reflexive splitting, co-locates coupled handler+logic, and applies the isolation/line guidance — without giving React-specific advice.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Applies to Python, not React-specific",
      "description": "Applies the reasoning to Python/backend and does NOT give React- or hook-specific advice",
      "max_score": 8
    },
    {
      "name": "Real abstraction over file split",
      "description": "Recommends a real abstraction (pure function / service / repository) over reflexive file-splitting",
      "max_score": 6
    },
    {
      "name": "Co-locate coupled, separate standalone",
      "description": "Co-locates the tightly coupled handler+logic; separates only cleanly-standalone layers (e.g. discount calc or DB access)",
      "max_score": 6
    },
    {
      "name": "Isolation test / ~300-line guidance",
      "description": "Applies the understood-in-isolation test and/or the ~300-line guidance to the module",
      "max_score": 4
    }
  ]
}

README.md

SKILL.md

tile.json