Code is organized by file and function, but any one behavior hides across many files — what if repos were built around behaviors instead?
How can we reorganize repositories to make behaviors easier to locate?
This explores how the way code is organized — around structure vs. around behavior — determines whether you can find all the places a single behavior lives, and what the corpus says about reorganizing toward the latter.
This is really a question about a mismatch: code is stored by structure (files, functions, stages) but we think about it by behavior ("how does this system handle retries?"). The corpus names this directly — the hard part of changing a system isn't writing the edit, it's finding every scattered place a behavior is implemented, because a single behavior gets smeared across many files and stages Why is finding distributed behavior code so hard?. Reorganizing the repository, then, means building a representation that maps behaviors to their code locations instead of leaving that map implicit in the folder tree.
The strongest concrete result: when a harness is reorganized around a behavior-to-code mapping, even a weaker planning model matches a much stronger one at locating the right code — win rates jumped 10–19 points while the planner read fewer tokens Can explicit behavior maps help weaker planners compete with stronger models?. The lesson is that locatability is a property you can design into the repository's structure, not just a skill you hope a smart-enough model brings. Make the behavior boundaries explicit and the search problem mostly disappears.
Laterally, this is the same idea that shows up wherever agents accumulate reusable capability. Skill libraries store executable behaviors in an embedding-indexed catalogue and compose complex ones from simpler ones, which is what lets an agent keep learning without overwriting old skills Can agents learn new skills without forgetting old ones?. Agent Workflow Memory goes finer, extracting sub-task routines rather than whole tasks and compounding them hierarchically Can agents learn reusable sub-task routines from past experience?. In both, the win comes from the same move as behavior-centric harness organization: carve the repository at behavioral joints so units can be found, reused, and recombined.
A subtler point from the corpus is that a repository isn't best organized once and frozen — it can be actively curated toward locatability. SkillOS separates a trainable curator from the frozen executor, and that curator learns to reshape the skill store away from verbose generic entries toward crisp, actionable, cross-task logic Can a separate trained curator improve skill libraries better than frozen agents?. Reorganization becomes a learned, ongoing process, not a one-time refactor.
Worth knowing you didn't ask for: there may be no single best organization at all. StructRAG shows that different queries want different knowledge structures — tables, graphs, catalogues, plain chunks — and a router trained to pick the right structure per query beats any uniform layout, grounded in cognitive-fit theory Can routing queries to task-matched structures improve RAG reasoning?. And the flip side is a warning: retrieval over any repository fails structurally, not incrementally, because embeddings measure association rather than task relevance and have hard representational limits Where do retrieval systems fail and why?. So "make behaviors easier to locate" may mean maintaining several organizations and routing between them — not searching harder within one.
Sources 7 notes
The core difficulty in evolving production harnesses is not generating edits but finding every code location that implements a behavior. Harnesses distribute single behaviors across files, functions, and stages, creating a representational mismatch between behavioral requests and structural code organization.
A behavior-to-code mapping representation improved win rates by 10–19 points while reducing planner tokens by 8–13%. Weaker planners using this mapping matched stronger models' code localization across all precision and recall metrics.
VOYAGER demonstrates that storing executable skills in an embedding-indexed library and composing complex skills from simpler ones allows agents to learn continuously while avoiding the forgetting that occurs with weight-update-based methods. Environmental feedback refines skills while an automatic curriculum drives continual exploration.
Agent Workflow Memory induces sub-task routines at finer granularity than full tasks, abstracts example-specific values, and compounds them hierarchically. This produces 24.6% relative gain on Mind2Web and 51.1% on WebArena, with larger gains as train-test gaps widen.
SkillOS shows that separating a trainable curator from a frozen executor, grouped by task streams, causes skill repositories to shift from generic verbose additions toward actionable execution logic and cross-task meta-strategies. The trained curator generalizes across different executor backbones and domains.
Show all 7 sources
StructRAG demonstrates that selecting knowledge structure type based on query demands—via DPO-trained router choosing among tables, graphs, algorithms, catalogues, and chunks—improves knowledge-intensive reasoning over standard retrieval. The approach grounds this in cognitive load and cognitive fit theory from cognitive science.
RAG systems fail at three structural levels: adaptive triggering (fixed intervals waste context), semantic-task mismatch (embeddings measure association, not relevance), and mathematical limits (embedding dimension constrains representable document sets). These require fundamentally different retrieval approaches, not tuning.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- SkillClaw: Let Skills Evolve Collectively with Agentic Evolver
- MUSE-Autoskill: Self-Evolving Agents via Skill Creation, Memory, Management, and Evaluation
- LatentSkill: From In-Context Textual Skills to In-Weight Latent Skills for LLM Agents
- Harness Handbook: Making Evolving Agent Harnesses Readable,Navigable, and Editable
- SkillOS: Learning Skill Curation for Self-Evolving Agents
- Chain-of-Retrieval Augmented Generation
- You Don't Need Pre-built Graphs for RAG: Retrieval Augmented Generation with Adaptive Reasoning Structures
- Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMs