Partitions
A partition is a node in the coverage tree. The tree is built from chunk paths, not from a model.
repo
app
app/src
app/src/api
app/src/pages
services
services/auth
tests
Tree flow
A small repository collapses into a few leaves. A large tree splits until it reaches the target or the depth limit.
Build rules
skills/auwai/scripts/partitions.py implements the tree.
- The top-level path segment becomes a partition.
- Files at the repository root become the
.partition. - A partition above the target token size splits by the next path segment.
- A partition with only files at its own level becomes a leaf, even when it is oversized.
- A leaf reports
oversizedwhen one file or one group cannot be split. - The maximum depth is 4.
The target size comes from the segment planner. At a 256K context the target is about 208K tokens. At 64K it is about 35K tokens. A small repository therefore collapses to a few leaves.
Tags
Each node has a kind and a language.
The kind is the most common scope kind under the node.
The language is the most common language under the node.
The current tags are source, tests, docs, config, infra, data, api, and ui.
Order
Entry partitions come first. The remaining partitions are ordered by token count, then path. The order makes the first segment start with entry points and the largest surface.
Current limits
The tree is path-first. A monorepo that names services outside the path layout needs a manifest or a custom classifier. The kind tag is a summary, not a guarantee for every file under the node. The tree is persisted in the ledger for inspection, not used as a foreign key yet. A changed-path sync marks the partition cache dirty; the survey and planner rebuild from the current chunks.