Remove directory structure section in AGENTS.md as it's pointless and easily stale#173
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
My understanding and anecdotal experience is that it's the most important thing you can do in your agents.md file, (second being the list + descriptions of available NPM commands. meanwhile the coding practices are usually context waste in brownfield projects where patterns are inferred and strictly enforced by existing code) It's not about the (sub)agent being able to see the file structure, it's to give keywords the inference models can tokenize and match against so they can lookup and disclose more efficiently. I'll leave it to you folks to decide whether the upkeep is worth the benefit (I'm still of the opinion the file shouldn't have been committed in the first place because of the upkeep burden and how invalid context leads to worse outcomes than missing context). please don't consider this comment blocking. |
Can you clarify why you think it's helpful? Or where/how you've seen it providing value?
This is part of why I think this should be removed. The rest of the file doesn't really have any considerable upkeep burden I think. |
If I remember I can share the preprints later when I'm by my desk, but tl;dr is that by prepriming the context window with where things are, the agent doesn't need to waste the initial tokens or context space (storing the results of the tool/subagent) to build own keyword map. As you pointed out, common top-level patterns like When you prime the context with a directory/namespace treemap to semantic definitions the searching is more efficient, the results have more accurate relevance scores, and with less of your context window used you get longer before compaction takes your agent off track. (PS: this is the same way that progressive disclosure works elsewhere (to varying degress, depending on the harness), and one of the big motivators for nested AGENTS.md ).. Without real evals, easy way to see this in action would be to open two copies of this repo side by side and use opencode (or something else where you can disable the caching/"persistent memory") to ask it something requiring domain knowledge e.g. `--prompt "Scaffold out a new provider for OpenCode." and then watch the tool and token usage and relative accuracy w(/o) a domain tree. Obvs with a prompt like that we're not expecting anything functional but:
(Clarifying above is how I have/would see the value. Am not suggesting that this particular PR change needs the above "burden of proof", the level of detail is just for the discussion and future need for prior art.)
(IMO time and the evolution of the spec are the upkeep burden. For example, that The fact that you're here tweaking this file at all is a recognized counterpoint to my concern.) |
JasonTheAdams
left a comment
There was a problem hiding this comment.
I think there's a tension being struck with these files. Having them is useful, making them too robust loads up tokens and becomes hard to maintain, not having them requires each person to maintain their own, which may get out of sync.
So I think removing this is a fair trade-off for maintainability, while the rest of the file remains valuable.
No need for a directory structure in
AGENTS.md:src,tests,docswould work, but that is so basic, the agent will know anyway what these are for.In other words, I think we should remove it.