Organizing Large Harnesses
As a harness grows, listing every skill and document directly inHARNESS.md becomes unwieldy. Top-level subdirectories let you group related content together, keeping HARNESS.md short while still giving the agent a clear map of what’s available.
Top-Level Directories
Choose top-level directory names that reflect your domain. There are no required names — structure the harness around how the agent actually thinks about its work:Routing Files
The routing file name is derived from the top-level directory name and propagates throughout the entire subtree. Every subdirectory withintools/ uses TOOLS.md; every subdirectory within data/ uses DATA.md:
HARNESS.md:
Routing in HARNESS.md
With routing files in place,HARNESS.md points to the top-level directories rather than listing every item individually:
Termination
By default an agent may explore any subdirectory. Two mechanisms stop traversal at the right boundary:.harnessleaf— place this file in any directory to mark it as an explicit leaf the agent should not recurse into.leaf-detectors— a file at the harness root that declares keyword patterns; any directory containing the named file is treated as a leaf of the declared type (e.g.skill=SKILL.md)
scripts/, internal references/) or large document stores that are meant to be accessed through a dedicated traversal skill.
Nesting
Subdirectories may be nested arbitrarily. Each level gets its own routing file, allowing the agent to incrementally drill down rather than loading everything at once:query-postgres/, query-bigquery/, read-csv/) are treated as leaves because the harness root contains a .leaf-detectors file declaring skill=SKILL.md. Without that entry, those directories would be traversed as ordinary grouping directories.
At each level the agent reads only the routing file to understand what’s available, then drills in only when a task requires it — the same progressive disclosure model that governs the harness as a whole.