Break down a monolithic AGENTS.md into a web of interlinked, co-located design doc files. Use when a project's AGENTS.md has grown too large and mixes high-level project info with deep module-specific knowledge.
Workflow for splitting a large AGENTS.md into a maintainable web of per-component design docs that live next to the code they describe.
.md needs updating, not every file up to root.probability_model.md next to probability_model.py).Read the current AGENTS.md and understand the project structure.
.md — design, API checklists, dependencies, used-by, gotchas for a specific modulePresent your audit and proposed file tree to the user. Confirm before proceeding.
Rewrite the root AGENTS.md to be lean:
For each major directory (src/<package>/, tests/, examples/, docs/, models/), create a lightweight AGENTS.md:
.md filesKeep hubs under ~60 lines. They're navigation aids, not documentation.
For each logical component (one .py file or a tightly coupled group), create a <component>.md alongside the source. Work one at a time — show the user each extraction for feedback.
# <Component Name> — Design Notes
<1-2 line purpose statement>
## Dependencies
- [other_component.md](relative/link) — what this component imports/relies on
## Used By
- [consumer.md](relative/link) — what imports/uses this component
## <Design content>
- API checklists (abstract vs concrete methods for ABCs)
- Key method signatures and contracts
- Pipeline walkthroughs for complex flows
## Maintenance
<Link to relevant skill if changes here should trigger a skill update>
## Gotchas
- Concrete, actionable traps with fixes
get_log_probs pipeline).md captures working knowledge (how things connect, why decisions were made, what breaks). The docstring explains the API.models/<name>/ with its own .md, even if it's currently a single file. Scales better as models are added.TransitionModel and LogitFormatter in the same .py), they belong in the same .mdSkills: Look for procedural knowledge — multi-step processes an agent would follow. For each, create a skill in .agents/skills/<name>/SKILL.md with phases, decision trees, and gotcha checklists. Add maintenance notes in relevant component .md files pointing to skills that need updating when the component changes.
Global AGENTS.md cleanup: Move project-specific gotchas out. Keep truly cross-project knowledge. Generalize any gotchas that have broader applicability (remove project-specific references from the description).
Verify:
[×N]) transferred from original to destination files