384 points kmeh 5 days ago 310 comments
jdw64 5 days ago | parent
However, AI works differently from humans in that much more of its working context has to be made explicit. Because of that, there may be some fundamentally different way for AI to maintain or reconstruct a program’s overall model.
iamwil 5 days ago | parent
jdw64 5 days ago | parent
Naur argued that when a team disbands, the program dies. But in an era where the primary maintainer is no longer human, but an AI agent, how should we approach this?
My take is that we will lean heavily on concepts like Algebraic Data Types (ADTs) and state machines—making state definitions something humans can readily track through explicit specifications—while modularizing boundaries so that humans only need to retain the interfaces.
In other words, rather than keeping low-level implementation details in our heads, systems will be structured around high-level interfaces, data flows, core capabilities, and first-class functions.
Of course, the prevailing assumption today is still that humans must grasp the underlying implementation to work effectively. There are trade-offs to both models, and the optimal balance will naturally vary across different workflows.
Ultimately, the core issue is this: when something goes wrong within the AI's internal implementation, will we actually be able to steer it? And as you know, even ADTs must eventually change when business requirements shift. I haven't thought deeply about how to handle that yet, either.
It's an open question that neither experienced programmers like yourself nor less experienced ones like me have the definitive answer to. Software is heavily dependent on highly personal contexts. My answers and experiences won't neatly apply to your context, and vice versa.
My guess is that we might eventually need an entirely new programming language. What would that language look like? I have no idea. IDEs might also shift away from traditional text blocks toward a UI-based, flowchart-like approach. I imagine a system somewhat like n8n, where we can visualize and track the workflows and code blocks generated by the AI.
I recently did a few "vibe coding" projects with AI. It churned out 50,000 to 60,000 lines of code in an instant, and I couldn't keep up. To cope, I built a tool to visualize and track the code's dependencies. It worked out much better than I expected.
The caveat, of course, is that with tools like Unreal Blueprints or n8n, the visual dependency graph eventually explodes as the program grows, turning the UI itself into a bottleneck. Perhaps the solution will be that programs up to a certain size are abstracted into single nodes, which can then be clicked to expand and reveal the underlying implementation details.
nottorp 5 days ago | parent
LLMs don't retrain, it's too expensive atm.
alienbaby 5 days ago | parent
however, I have found keeping a good solid reference to my home infrastructure, services, ci/cd setup, hosts, storage , networking etc.. really works wonders as a set of 'memories' to share across projects that I expect to be tested / deployed / acceptance tested etc.. using the home infra bits and pieces.
kaydub 4 days ago | parent
The code is the documentation. There's no need for most of this stuff.
alienbaby 3 days ago | parent
kaydub 2 days ago | parent
People take things a little too literally and absolute on the internet. I'm more posting like this as a push back from the absolutely insane amount of documentation, plugins/skills, decision docs, and other bs I'm seeing in my professional life and being shared online.
I even said in my original comment in here that I still do have AGENTS/CLAUDE.md files. I've just trimmed them.
There's documentation where I work. I'd say I even made up about 5-10% of the documentation on our knowledge base (pre-llm). But now our knowledge base is mostly useless because every eng/dev is creating so much fucking documentation. A lot of it trash LLM generated.
stavros 4 days ago | parent
https://github.com/skorokithakis/gnosis
This just does a pass at the end, rather than consume context all the time. I've been using it for months and it works great.
espeed 5 days ago | parent
nextaccountic 5 days ago | parent
Github Copilot had the idea of attaching memory to files, and if the file hash changes the memory is automatically dropped (not sure if they still do it). This means they are overly eager to drop stuff (even if the file change is just cosmetic), but at least they don't accumulate outdated cruft too much. (a memory can still be outdated if it was invalidated by a change in another file though)
espeed 5 days ago | parent
monneyboi 5 days ago | parent
You have the whole session history right there. One recall skill and some JSON parsing gets you grep over perfect memory. Why would you ever use more tools to spend more tokens to construct a imperfect memory next to your session history?
I just don't get it.
dboreham 5 days ago | parent
gregwebs 5 days ago | parent
My thought though has always been that I don't want there to be agent-only designated documentation.
I use mattpocock/skills and that generates ADRs (Architectural Decision Records). That only uses skills, including a setup skill that will write a few pointers in AGENTS.md. I always have a CONTRIBUTING.md to document development flow and a CODING_STANDARDS.md. Between those and the README.md and architecture documentation and commit messages the agents seem to be able to find and use docs and keep them up to date. We are also writing a lot of specs and putting those in Github issues.
cyanydeez 5 days ago | parent
Once qwen3.8-flash-next showed up, it cañ go "forever" with dynamic context pruning.
It's fascinating for local coding.
j45 5 days ago | parent
The slightest amount of guidance, input from experience can make a huge difference.
cyanydeez 4 days ago | parent
And it's quite fascinating. Still dont think there's trillions of TAM out there if Qwen3.8-Flash-Next runs fast enough on $3k (before memory cartel) pricing.
girvo 4 days ago | parent
And it’s an experimental likely undertrained model. Wait til Qwen 4 Flash…
cyanydeez 4 days ago | parent
jon-wood 4 days ago | parent
gregwebs 4 days ago | parent
However, I found the same problems with agents that it has with humans (usually with humans it isn't TDD but code coverage requirements). The problem is the tests are now written to satisfy a bureaucracy rather than to properly verify the code. And there are real studies that point out the low value of these types of bureaucratic testing requirements. For example, when models are just required to write a test file, they don't produce a better result: https://arxiv.org/abs/2602.07900
I wrote a /verify skill that focuses on properly verifying code and I am finding it works a lot better. I do need to revise it now- in practice certain parts of the skill are doing all the heavy lifting and others are more dead weight. But it does seem to be properly orienting the agents towards finding defects. https://github.com/gregwebs/skills-sdlc/blob/main/skills/ver...
cyanydeez 4 days ago | parent
Context then is: docs, code and tests. Rather than try to build some omniscient agent, the context is built where the agent needs it.
gregwebs 4 days ago | parent
TDD doesn't help the agent figure out what it is supposed to do now- it is already writing the code and now and it must know what it is supposed to do to write it.
I am trying to use evidence-based approaches. I am only observing better results and tweaking now, but I plan to benchmark when tweaking is done.
cyanydeez 4 days ago | parent
I'm working on javascript, and now I'm only doing this via typescript. I've successfully got this going:
1. Design a feature in plain language with the coding agen (opencode) and write a document for it.
2. Restart the context (or I use /compact to flush any errant details)
3. Pull the new plan into context and ask the agent to revise it follow Test Driven Development.
4. Depending on how big it is, the agent places it into multi stages, each with it's own document.
It then loops through the stages. It might be entirely based on the language you're using, but this loop seems strong enough.
Then when there's bugs, errors, anything, we update the doc, add more tests, then revise the code.
It's quite possible the harness you're using isn't setup properly. For me to do this locally, I had to hack on dynamic context pruning which I described here: https://news.ycombinator.com/item?id=49906637#49907641
gojogs 5 days ago | parent
I write README and docs by hand, thus only important stuff goes in there. If it is not worth my attention to write down, it's not worth writing down.
Smaller context, easier to consume.
bushido 5 days ago | parent
Essentially patterns the agents need to always think in. I also implemented a versioning system to the principles that need to be quoted in any comments which are there in the code. That way, when my principles evolve, so does the code.
I did package it up in a way that I can share it with friends [0]. System still evolving, but the last two-ish months that I've used it has served me really, really well, And it's been even better with the latest models.
I've had surprisingly good adherence from agents on this technique.
skybrian 5 days ago | parent
bushido 5 days ago | parent
The github repo might be more helpful: https://github.com/Principle-Driven/pdd
skybrian 5 days ago | parent
I was wondering about this bit:
> "Code comments cite a versioned token where code depends on the rule."
What does a token look like? I went looking for an example, but I don't know what I'm looking for.
bushido 5 days ago | parent
// The binding deliberately SKIPS the contradiction check: a form
// bound to an object the same document deletes is a legal stale
// state (PDD-3@v1)
Where PDD-3 deals with a specific type of race conditions that my agents were over-optimizing/spinning out on; Now if I ever change the rule the version would change to PDD-3@v2; which triggers a re-evaluation for all decisions that were made under the previous version.visarga 5 days ago | parent
The questions are designed specifically to identify the state the agent is in, in order to assign its steering. Changing this tool changes how the agent works. You just need to make the use of this tool a necessity so it does not forget to call it.
Unlike principles and memories, questions are more openended and tend sometimes to trigger the right mentality in the agent even before it gets to the policy itself. In my opinion agents get lost in local work losing the big picture, my questions jog the big picture back into attention.
1. call ssp tool, no arg, it just reads features from the repo, like most other tools -> ssp locates state and sends 4-5 questions
2. agent responds the first batch -> state is further narrowed down -> ssp sends a second batch of questions
3. agent responds again to the interview -> state gets finally pinned down -> agent gets the steering assigned
4. a log is created of this ssp session, and reflection on the log used to refine the questions and steerings in the ssp tool (name comes from State-Space Policy)
locknitpicker 5 days ago | parent
It seems you tried to reinvent instruction files. What do you think is the difference between your approach and standard tools such as instruction files, AGENTS.md, and even skills?
bushido 3 days ago | parent
PDD adds convention that is geared towards helping maintain consistency that will work on very large/complex codebases.
It's what Rails is to Ruby, or Phoenix is to Elixir. Ruby and Elixir provide building blocks. The frameworks add convention to make a lot of decisions simpler - while still providing building blocks for some types of applications.
You should only use something like phoenix when you need to build a web application.
Similarly you should only use PDD when you're trying to force your agents to great use of system thinking/mental models – IF that's how you think as well.
mzhaase 5 days ago | parent
bushido 4 days ago | parent
If it helps, here's how you think about it, principles are not decisions, they're mental models and frameworks to allow making decisions. In my case, they're there to allow agents to make decisions without asking me. But the decisions cannot be recorded - the code serves that purpose. What can be recorded is why the commend for the block of code needs to cite what principle was used in the current shape, which is why there is a citation of the principle.
When the principle evolves, so does every decision, at the very least, every decision gets re-litigated to see if it needs to evolve.
PetriCasserole 4 days ago | parent
Do you have any resources that guided your work?
bushido 4 days ago | parent
A big part of it really comes to that I have led large product teams and platform engineering teams in the past, And I like giving feedback to my agents in the same way that I would plan things with my teams.
One of which is give them repeatable mental models which allow them to make decisions without relying on managers or me. The result is usually that the teams can work for weeks-to-months with autonomy.
I try achieving the same with my agents, so that they can work for 1-14 days without my intervention. I usually have them working on very very long running tasks/initiatives.
If you do want some resources, this is one of the pages that I've been using for nearly a decade to help people get started with mental models: https://fs.blog/mental-models/
vcryan 5 days ago | parent
docheinestages 5 days ago | parent
dboreham 5 days ago | parent
isaachinman 5 days ago | parent
mzhaase 5 days ago | parent
bird0861 4 days ago | parent
But seriously, Opus has been garbage after 4.6 -- the public seems very easily fooled into thinking breadth == depth. Anthropic, I'll grant them, has been and is still an extraordinary data team. As for model alignment though... I have to wonder sometimes if they are even trying beyond just chat training.
"Guys, SI is just around the corner... Huh? What production DB? Anyway GPT2...I mean Mythos is too good it would be dangerous to release to the public!"
isaachinman 4 days ago | parent
Neywiny 5 days ago | parent
kolinko 5 days ago | parent
You’re confusing, I think, memory system with llm finetuning. Completely different concepts.
Neywiny 5 days ago | parent
YuechenLi 5 days ago | parent
mcbuilder 5 days ago | parent
dboreham 5 days ago | parent
dboreham 5 days ago | parent
kaydub 4 days ago | parent
Every single project at work that has documentation/ADRs/etc ends up stale as fuck and it pollutes context more than it helps. Even the agent generated docs. Hell, especially the agent generated docs. It's like the LLMs can't just DELETE something, they always amend. So now there's stale details in there about something we abandoned polluting context.
The code is the documentation, none of this stuff is needed. I'm seeing WAY too many devs/engineers go down the rabbit hole of trying to build these tools and systems but not actually getting meaningful work done.
I've been doing my best to remove and delete all the documentation. I usually keep a super high level AGENTS.md/CLAUDE.md file and that's it. The llm/agent can figure it out. You might argue I waste 5 minutes and a dollar or two for the agent to "figure it out" each time, but I'm pretty certain people are wasting FAR more time and money building these things out and maintaining them in each of their projects (or NOT maintaining them and they're actively BAD for their projects).
spike021 5 days ago | parent
If I say "use jq instead of writing a python script to parse json" it should never write adhoc python scripts to parse json. Yet that constantly happens to me anyway.
ACCount39 5 days ago | parent
zahrevsky 5 days ago | parent
aliasxneo 5 days ago | parent
gf000 5 days ago | parent
jon-wood 4 days ago | parent
PcChip 4 days ago | parent
rmunn 4 days ago | parent
spike021 4 days ago | parent
It's not like it's being rewritten for efficiency. "Just because".
gf000 4 days ago | parent
Like it may issue an incorrect jq invocation but that's surely cheaper to fix than rewriting the python script. And then it's a simple problem, but let's say you clearly see that "manually editing git files instead of using git" is worse, and most tasks are somewhere in-between.
dboreham 5 days ago | parent
locknitpicker 5 days ago | parent
You haven't been paying attention then. I routinely see Claude and GPT models churning out python code to do stupid things like linting. Last week I even had a TypeScript project with prettier configured all over the place, including in a custom agent skill I added with the express purpose of getting the damned model to lint the code, being constantly prompted to run ad-hoc python code supposedly to format whitespaces. I even explicitly prompted one session to just use npm run lint, where I pointed out the exact line of code where prettier was invoked, and the session still churned python code to hande whitespaces.
yulaow 5 days ago | parent
jkhdigital 5 days ago | parent
koolba 5 days ago | parent
Otherwise you can get a python one liner that execs a different script engine.
devmor 5 days ago | parent
TZubiri 5 days ago | parent
Terr_ 5 days ago | parent
The LLM's job would be to channel "I perambulate in the direction of the Arctic circle" into go(north). You saved writing the grammar parser, but you still need to write the game world.
altmanaltman 5 days ago | parent
user_of_the_wek 5 days ago | parent
locknitpicker 5 days ago | parent
I think there is a deeper problem emerging from this sort of behavior. Even when we bother to create agent skills with there own scripts that call tools like jq a specific way to achieve a goal, AI coding assistants and agents still go way out of their way to generate ad-hoc scripts to do the most absurdly stupid tasks such as parsing output in structured language, and even remove whitespaces from a markdown file. This means AI coding assistants and coding agents treat agent skills as mere suggestions of using a alternative option that more often than not the choose to ignore.
This has a very dangerous implication: your average user is trained to develop a pavlovian reflex to authorize agents to just execute their ad-hoc scripting code with our own permissions and credentials in our systems, which includes the ability to call anything over the internet.
ozim 5 days ago | parent
https://gist.github.com/cynthiateeters/6868ca26c059a3106cd93...
fennect 4 days ago | parent
I’m the author of the project.
kadhirvelm 5 days ago | parent
greatergoodguy 5 days ago | parent
Since then I've gone down the rabbit hole of really digging deep into current AI research and especially what AI whistleblowers are currently saying. And I can't even express how existentially scared shitless I am.
mewpmewp2 5 days ago | parent
dingaling911 5 days ago | parent
altcognito 5 days ago | parent
That being said, the danger is measured in computer damage, which can be a lot personally and to a company, but less existential, so your mileage may vary as to how "scary" it is.
Xirdus 5 days ago | parent
throwaway27448 5 days ago | parent
What scares me are the people who think that this software is the equivalent of an perfectly-smart elf in a box and use it blindly.
Forgeties79 5 days ago | parent
apsurd 5 days ago | parent
Forgeties79 4 days ago | parent
iamwil 5 days ago | parent
How, if at all, do you keep the architecture or a working theory of the code in your head?
zahrevsky 5 days ago | parent
> No one rewatches a team meeting from 3 years ago to remember constraints around a feature. People write things down and use those records instead.
Memory plugins don't re-read old transcripts. Memory snippets are basically the notes that people write down after the meeting.
The problem, however, is different. The problem with memory plugins is that your agent basically writes a note every time someone says a sentence, and then tries to work with those 5000 notes.
Instead, the agent should recognize what's important and write only that. And that is, of course, a documentation. (And ADRs, if you want not only a description of the final state, but also the trajectory of how the agent arrived to it. Which, arguably, contains more information than the docs themsleves.)
Another difference is that memory snippets are immutable, append-only and don't have a lot of structure. Of course, this is done to be able to store lots and lots of notes: they should be independent. The main problem is that increasing the number of notes adds not enough benefits to compensate for downsides of this structure-less immutable format.
popalchemist 5 days ago | parent
nijave 4 days ago | parent
pornel 5 days ago | parent
I've been bitten by agent-written ADRs. Agents carelessly add extrapolated details and speculated nice-to-haves that I never asked for, and this becomes a source of bloat that keeps coming back like a boomerang.
zahrevsky 5 days ago | parent
sathish316 5 days ago | parent
Lack of this capability makes automated principles or patterns update a recipe for more bloat.
otterley 5 days ago | parent
jen729w 5 days ago | parent
`cd` to a folder. Launch `claude`. Do your work. Save scripts and documentation in that folder. `/resume` previous conversations from that folder.
That's it. That's the trick.
Now, having very static, very well-defined folders helps a lot. I'm Johnny.Decimal so I have numbered folders for everything I do. So my process when I want to use my 'process a travel booking from my email to my calendar' script is:
- `jd tripsy`
- The folder name includes 'tripsy' and this is how I remember it.
- `jd` just parses my limited tree and `cd`s me to a folder.
- `jd 21.15` gets me there by number if preferred.
- `claude`- Say 'hey Claude, there's a new email in my inbox please'.
- Done.
nijave 4 days ago | parent
Legally and culinarily, they're vegetables. Botanically they're fruit.
Tomatoes are members of the nightshare family which includes tobacco, potato, and chili peppers.
They are used in popular recipes like Mexican salsa and Italian pasta sauce. Pasta sauce commonly uses the San Marzano variety. Here's a <picture> of San Marzano tomatoes from our Italy trip.
Rhett likes tomatoes in all dishes. Link only likes tomatoes if they're blended in a dish like pasta sauce or tomato soup. Frank is allergic and can't have tomatoes.
Tomato prices are up due to a bad <year> yield in <country>.
---
This is all memory. Where does it go?
jen729w 4 days ago | parent
What is it that you are doing with tomatoes today? Store that locally. Sounds like you're cooking. I put those here, then I can find them again really easily.
10-19 Life admin/
└── 12 Where I live & how I get around/
└── 12.44 Meals & recipesnijave 3 days ago | parent
mcapodici 5 days ago | parent
If I want the LLM to remember something I ask it to update some docs, and even check that docs are consistent across the board after doing so.
The only thing I want the LLM to remember everywhere is talk like a human (no load-bearing, not this/that etc...), so I have an AGENT.md for that.
jsemrau 5 days ago | parent
chaostheory 5 days ago | parent
jmtulloss 5 days ago | parent
Snarky comment aside, I am very interested in how we evaluate the performance of these systems and what kinds of work match best with different approaches.
lewelove 5 days ago | parent
ramoz 5 days ago | parent
https://backnotprop.com/blog/context-monorepos/
- Better models can keep the drift in check.
- What's super important these days is having all historical context, historical decision making, prototypes and whatnot.
- all projects and their worktrees located together
- all reference docs, code, etc - a folder away
When I ask "what happened to x?" ... the agent has everything it needs to give me that answer. When it plans the next feature it can validate assumptions against previous decions made in my `decisions` folder.kaydub 4 days ago | parent
I don't think you need more documentation or these memory systems. The code IS the documentation. Lots of this stuff is unnecessary. It's a bunch of people doing their special rain dances and then when it happens to rain they say "I did that"
nicwolff 5 days ago | parent
https://cline.bot/blog/memory-bank-how-to-make-cline-an-ai-a...
stbenjam 5 days ago | parent
If someone has good A/B evals of this being more effective I'll eat my hat, but the reason no one is publishing them is because well, evals are hard, and this is likely just magical thinking.
My current view is that an agent generally needs three things to work effectively: a way to discover information that isn’t obvious, such as a minimal `AGENTS.md` that points to more focused brief files; a clear way to verify that its work is correct; and some guidance on project-specific tastes. Everything else is noise.
DriverDaily 5 days ago | parent
Like, you can quickly lookup related ideas based on what came before and after, causes, effects, just like calling relationships a graph database.
Documents can’t be queried efficiently like that, you need a database.
apsurd 5 days ago | parent
I take the article's point more directly. It's just a straighter line to have clear communication through documentation than to fuddle around with the perfect memory setup.
Garlef 5 days ago | parent
I tried an approach based on the following idea recently and it's amazing - Lint rules where the error messages contain an explanation on how to deal with the issue.
I'm using it to foster IOSP (integration operation segregation principle) for example.
jghn 5 days ago | parent
Garlef 5 days ago | parent
https://youtu.be/6AgndHSkHFI?t=238
(You could of course argue that you don't like the direction the rules push the agents in given in the example - some people don't prefer small functions everywhere - but that's not the point: The lint-hooks work in pushing the agent in the desired direction; If one desires something else they'd simply need different rules)
jcjmcclean 5 days ago | parent
Then for example you could write your own hook and convert existing code smell documentation which agents ignore into a format that works with the hook.
Garlef 5 days ago | parent
That's what I did; I did not use the library I linked to ~ It served only as an inspiration.
Instead, I let the agents create custom lint rules (using eslint, pylint, ...) and add custom coaching error messages based on where I want to take my codebase.
jcjmcclean 5 days ago | parent
spacebanana7 5 days ago | parent
fxtentacle 5 days ago | parent
DelightOne 5 days ago | parent
Or is that the secret sauce no one wants to share, the edge people see themselves having.
fxtentacle 4 days ago | parent
But some of the resellers have freebies, like:
https://app.primeintellect.ai/dashboard/environments?ex_sort...
balder1991 4 days ago | parent
OJFord 5 days ago | parent
Garlef 5 days ago | parent
Just flagging big functions will make the agent write small functions ~ but not necessarliy in a good way
(for example the agent might just cut `doOneThingAndTheOther` in half and call the second half `doOneThingAndTheOther2`)
jason1cho 5 days ago | parent
Indeed, AI fanatics lack critical thinking. They easily accept the idea that AI needs documentation, but merely disagree the method to approach it.
indrex 5 days ago | parent
ContinuityLab 5 days ago | parent
locknitpicker 5 days ago | parent
Isn't memory just documentation that agents create and update on the fly to fill in the documentation hole that your average user leaves open?
There was a time when the need to provide context and signal was a key topic in LLM and AI-assisted coding. People talked about MCPs AGENTS.md and README.md and agent skills and even comments, descriptive tests, and naming conventions. Supposedly the theory was that if you provide context, agents wouldn't misbehave so much. Then plan mode and spec-kit approaches stepped in with approaches aimed at providing that context when starting sessions, because users never bothered with docs or MCPs or AGENTS.md or anything. But then plan mode and spec-kit approaches were considered too laborious and requiring too much from users. Then, because users systematically failed to provide context, this task was finally given to agents. And things just worked.
You should ask yourself why in software engineering circles documentation is seen more as a problem than a solution to any problem.
atworkc 5 days ago | parent
The only "prompt" is in AGENTS.md saying that this thing exists and there's a map.md <- which is a one liner reference to whatever the agent stores in there.
And usually, I tackle a new feature, and at some point tell it to store to jot down notes in workbench if I'm comfortable with it (and if it needs to be stored in memory)
This makes it easy to just spawn other agents and such from a good point, I just point them that stuff is in workbench.
Token costs, seem decent and I can always just delete stuff in there as its purpose is ephemeral.
ArtRichards 5 days ago | parent
https://github.com/ArtRichards/docs-cli
and
chrisweekly 4 days ago | parent
hedgehog 4 days ago | parent
aniceperson 5 days ago | parent
b-karl 5 days ago | parent
My most recent example were some deprecated and archived repos that kept getting added to plans for patching issues.
We use a private Claude plugin marketplace for internal plugins and skills and I try to regularly prune my memory, migrating relevant stuff to a proper home (skills in the marketplace, docs in repos or Notion etc) and prune outdated information.
jon-wood 4 days ago | parent
bob1029 5 days ago | parent
The idea of dumping everything into a big database and hoping the model will write the correct queries does work out to some extent. It's a very enchanting idea. However, it pales in comparison to having a dedicated tool per type. The outcomes seem to be much better when joins between low cardinality types occur within the token stream.
If your agent does need access to some enterprise knowledge base, I would give it a lexical search capability and not overthink it with vector shenanigans.
Tools are the only thing you need if you build them right. I don't even have a system prompt anymore aside from injecting the name of the robot and the current user's name. Keep in mind that all aspects of tools can be dynamic over time. I've got some where the description is composed by hundreds of lines of conditional string builder depending on the current state of the conversation.
skinfaxi 5 days ago | parent
simianwords 5 days ago | parent
I think what you are trying to say is that “give the LLMs access to information and it can figure out how to use it. Don’t get fancy about how to structure the data”.
If that’s the case it has largely turned out to be true. RAGs have fallen out of fashion.
Where does that put AGENTS.md though? Is it worth spending time to structure it or just dump it.
voiper1 5 days ago | parent
I've worked with docs that get _updated_, and progressive disclosure: make references to more obscure features in their own page, so they don't majorly bloat the context.
firemelt 5 days ago | parent
zenapollo 5 days ago | parent
.agents/plans/<plan-name>/
.agents/notes/<topic>/
.agents/knowledge/<topic>/
I only commit knowledge and if knowledge gets big i add .agents/knowledge/INDEX.md
This is a good mix of human readable and agent fluent. Notes are ephemeral, knowledge is permanent.
I have a rule for knowledge that it has to be stable and mostly permanent (though updatable). And the agents are not allowed to post there unless docs are clean organized and with permission.
Notes are for jotting things down and handoffs, massaging a featureset. Agent can document at will.
Still WIP.
sdevonoes 4 days ago | parent
balder1991 4 days ago | parent
clickety_clack 4 days ago | parent
byteknight 4 days ago | parent
notjes 4 days ago | parent
koct9i 4 days ago | parent
k__ 4 days ago | parent
marvstazar 4 days ago | parent
Organizing the markdown files by feature/issue/change makes it easier for the LLM to search for the appropriate documentation. Coupled with well-broken down Claude rules files, and Claude Code (or other harnesses) get better as you make more changes.
WillAdams 4 days ago | parent
https://news.ycombinator.com/item?id=47300747
"We should revisit literate programming in the agent era" (silly.business) 292 points, 251 comments
dham 4 days ago | parent
jrochkind1 4 days ago | parent
CapitalistCartr 4 days ago | parent
This is a first draft; his github is better than his article. Looking through it, Consult actually works. The agent doesn't pick documents blind. Every scope has a catalog file that describes each document: what it covers, when to open it. These catalogs seem to load in to the start of each session, so the agent gets a little map without reading every file. Code navigation seems the same. Each index document has a short description and a "read_if", and subindexes are opened when their condition matches the job. This looks pretty well laid out, which I would never have guessed from the article.
aaronscott 4 days ago | parent
This way the primary agent only has relevant information in their context to make decisions and take actions.
Context management is still under valued imo.
CapitalistCartr 4 days ago | parent
themgt 4 days ago | parent
mikeryan 4 days ago | parent
Not today. IMHO Documentation is just a form of structured memory and it’s all just context. Getting that context right is a hard problem and there’s a lot of different ways to skin that cat.
crazygringo 4 days ago | parent
I don't know, but I have a pretty standard (I think?) setup, and Claude manages to find every relevant file every time. But I've also only used Claude for greenfield projects, where "documentation is primary, and code flows from documentation" is the philosophy.
I have CLAUDE.md describe all the types of documentation files and the directory structure. And then Claude is pretty aggressive (automatically) about always inserting cross-references everywhere. So a feature description will reference the ADR's that it implements, the ADR's say what feature implements them. A code file will make reference to the "implementation design" document that describes the motivation behind which iOS elements were chosen, how the animation is defined in a particular way that doesn't break another animation, and so forth. So I've really never run into a situation where Claude failed to read a file it should have. I've been pleasantly surprised.
I would say that the one really big thing I've had to learn is to teach Claude both in CLAUDE.md and in the header of every top-level design document, that keeping documentation current and in sync is paramount. Because its default seems to be to keep history and append, e.g. by default it will take a section of a document and mark it "[DEPRECATED]" and add the new version below. So my instructions are pretty clear in having it always be aggressive in maintaining current state only, always replace rather than append. And if there's anything we want to save from the previous approach (e.g. we did it X way previously and it failed because Y), then just add that as a new short note in the new current-state text, possibly with a pointer to a commit or tag or something.
So this seems to solve both recall and staleness in my projects at least.
The only thing I still haven't found a solution for is numbering. Claude is always giving everything numbers, like F23 for feature 23. But I'm always changing the order of things, inserting new things, deleting things, so I wind up with a sequence of development work that goes in order like "Phase 9", "Phase 9b", "Phase 9e", "Phase 11", "Phase 12". I'm halfway ready to abandon numbers entirely and just start giving things names from noun collections instead, so every feature is named after an animal, every ADR is named after a kitchen implement, or something. Or just four-digit hex codes chosen at random. Curious if anyone else has found what works.
hedgehog 4 days ago | parent
demibabs 4 days ago | parent
athrowaway3z 4 days ago | parent
When you have knowledge distributed in markdown files; finding them puts the path/filename into context as well as some indication of document size. (If its on line 1200 or line 20). This is extremely valuable for picking what ought to be focused on next.
RAG on the other hand creates the hardest challenge for these models. It instead puts 5 ideas with the highest similarity into the context in full.
Its the difference between having to remember a set of numbers when in a crowd that's talking about stuff, and having to remember them when the crowd is shouting out random numbers. The similarity in the task makes things harder. SoTA models work despite this, but its extra-gambling while you're already gambling.
panarky 4 days ago | parent
In this implementation, Markdown should be considered harmful.
Operator Memory injects `.operator-shared/operator.md` and `.operator-shared/index/.md` directly into your agent's instructions before you even write the first prompt.
So if you clone a repo or review a PR where a bad actor put malicious instructions in these files, now your agent executes those instructions automatically and silently.
It could exfil `.env` and `~/.ssh/`, change `~/.bashrc`, all kinds of dirty deeds.
Agents are pretty good now about not running prompt injections hidden in code and Markdown, but this plugin bypasses all of that, and puts the prompt injection right in the system prompt.
And with higher priority than AGENTS.md and CLAUDE.md.
Seems bad.
yesb 4 days ago | parent
I think what you're observing is that there is more to information retrieval i.e. "retrieval" in RAG than slapping everything into a vector database and calling it a day. There's no such requirement in RAG to mindlessly load the k nearest neighbors into your context and see what happens. That's a very rudimentary implementation.
This markdown system I'd argue is RAG as well. You're just doing the retrieval in a way customized for the problem at hand. If you have a precise method of retrieving the most relevant things, obviously use that rather than a similarity metric. If I'm reading correctly, this markdown system is basically a knowledge graph which is not a new idea.
athrowaway3z 3 days ago | parent
Instead, I have a (pi.dev) tool called `do` which forks the agent and spawns a task on top of it - then returns the last message to the parent agent. (or `delegate` to start with a fresh context).
That's it.
claude/codex use it for a lot of things (impl/review/search/misc), and thus including situations RAG would otherwise be used. By skipping RAG, these search sub-agents instead use tools they've been trained on to use (find, grep, etc), and can decide to look deeper if required.
I'm not saying RAG couldn't be made to work, but with my set-up i've automatically gotten improvement every time a new range of models was released.
tabbybyte 4 days ago | parent
tabbybyte 4 days ago | parent
scotty79 4 days ago | parent
ravenstine 4 days ago | parent
crazygringo 4 days ago | parent
"Code is the documentation" doesn't solve the problem in my experience. Because what happens is that you still need a lot of "why" comments in the code, and then these go stale, so you still have the same problem you have to solve. And so I find that markdown documentation is a lot easier to organize and review in a structured hierarchical way in one place, than code comments sprinkled across the repo.
nijave 4 days ago | parent
It also doesn't seem to have a way to separate preference from factual memory which is useful when you have various humans interacting with the same agent. One human might prefer a certain output style over the other and that's something a memory framework can also address.
Like the MCP articles a few months ago, it also seems to assume all agents are cli coding harnesses running on your local machine. We have a handful of other things like chat bots, event-driven agents running on servers, chat driven agents running on servers in sandboxes--there's not a single filesystem and even if there were one, having multiple agents try to edit it at once would corrupt it.
AllegedAlec 4 days ago | parent
It doesn't even understand when its current context isn't...
See the whole issue of refining a concept, removing a few points or notions, and it will write a paragraph why a point that isn't in the text anymore when no version a human will read ever had that point in it.
charles_f 4 days ago | parent
My main issue with LLMs is that by construction they work primarily by addition, and are very task oriented. If you have documentation, it adds blobs corresponding to its task and that's it, and soon enough you need to break your documentation onto chapters and you're back at square one.
jookers 4 days ago | parent
https://gist.github.com/karpathy/442a6bf555914893e9891c11519...
rogeliodh 4 days ago | parent
Almey 4 days ago | parent
Almey 4 days ago | parent
kaydub 4 days ago | parent
All this stuff is LLM rube goldberg machines. It just pollutes context.
I barely use AGENTS.md/CLAUDE.md these days. And where they remain, it's super basic high level stuff.
I'm honestly still kicking myself in the ass on many projects where I did something similar to this. I kept tons of markdown docs and decision docs. Now those things are just causing problems because they got stale. Even after having sessions of reconciling documentation, the LLM just gets confused.
le-mark 4 days ago | parent
kaydub 4 days ago | parent
mmcdermott 3 days ago | parent
AppleBananaPie 4 days ago | parent
I think it's going to be an incredibly common, maybe universal cycle people will go through working with AI until they realize it doesn't work long term.
smokel 4 days ago | parent
Why something exists, and how it connects to the outside world may be documented in comments, but more often than not it isn't.
arcanemachiner 4 days ago | parent
kaydub 4 days ago | parent
smokel 4 days ago | parent
Consider working on software for a coffee machine. Why is pin 42 (GRIND) activated every now and then? Would you really want to document that in Git commit messages?
kaydub 4 days ago | parent
I'm seeing decision files that are so big the LLM can't fit it all in context on some projects. Then the LLM makes decisions that revert previous ones and later sessions don't pick that up so it sticks to the original decision. Now in some sessions, every so often I have to remind the LLM, "no, we changed that later, we do it this way now"
And I'm seeing our knowledge base grow to a completely useless giant mess of stale, outdated, duplicated, or superfluous info. LLMs often pull unrelated info or confuse similar but different things or get old documentation for something that's been updated to new documentation in a different part of the knowledge base. And these are LLMs generating the docs. And we have LLMs and agents reconciling. But it doesn't seem to always get everything.
For code comments, it's terrible because the comments are starting to get larger than the code. A large chunk of the comment can be discerned from the code itself. Then the comment has details on why that maybe don't quite make much sense. It's like the LLMs start using words in a specific context that doesn't really apply to the word in normal spoken english. Then it will also often include a specific JIRA ticket id, you check the JIRA ticket, you see that yeah, the code was changed because of that JIRA ticket, but it's not really related to the ticket itself, it was just a blocker. But now the comment forever links it to THAT ticket (And then now sometimes the LLM pulls in that ticket with the atlassian mcp).
rectang 4 days ago | parent
But this article argues that LLMs do better when the context is smaller — when it can understand the totality of the task with as little context as possible. And so having correct API-level docs is greatly advantageous. Anecdotally, this rings true to me — when the local context is good and clear, the LLM writes code matching my intent even when my prompt is sloppy and poorly specified.
Rejoice! The LLM will write the docs for you, relieving you of most of the work.
However without intervention, it will do too much and record absurdly verbose docs (similar to how an LLM will relentlessly refactor your code until you instruct it to move in minimal, incremental changesets). You will still need to edit down what the LLM generates.
klodolph 4 days ago | parent
trinsic2 4 days ago | parent
kaydub 4 days ago | parent
The docs end up stale or you waste a ton of time and tokens keeping them up to date. And you can't even trust the LLMs to keep the docs up to date, you will still need to review it yourself keep a bunch of shit out of them.
joquarky 4 days ago | parent
kaydub 4 days ago | parent
I don't mind SOME documentation. I'm growing extremely frustrated with the absolute MOUNTAIN of docs, comments, decision documents, etc being created. I'm so fucking tired of the LLM rube goldberg machines being built.
hbrn 3 days ago | parent
- it feels productive and has illusion of value
- it seems harmless/free, refusing means that at best you'll be at net zero
- if you do refuse, now you actually need to think about what should be documented
So yeah, LLM-generated garbage will inevitably spread.
The good news is that teams that do have the discipline are way more competitive today.
kaydub 3 days ago | parent
I've got one example that's at the top of my mind driving me crazy right now.
We have to move some git repos. It requires making sure there are no secrets in git history or committed, in a lot of cases we're just archiving, creating new repos, copying the code over. We just have to mostly mirror the config of the prior repo. There are probably about 100 repos that we need to move. I farmed this out to 3 of my ICs, a Sr and 2 jr/mid level guys. I thought one of them would figure out a way to mass move them and worst case they just move them real quick... shouldn't be too hard.
Well my Sr has spent the past 6-8 weeks building claude skills/plugins to move the repos. Every week he finds an edge case or the tool doesn't do something perfect, so every sprint he has "fixes" for it.
So far he's moved 5 repos. The jr/mid level guys, one has moved 30 the other has moved 10. I grabbed one of these tasks, threw claude at it (again, no tools or any bullshit), gave it a quick prompt, knocked out one of these in 20 minutes (while multi-tasking).
This same IC has built an MR review tool. It takes 20-60 minutes to run and costs $20-$50+ each run. Wants to put it into our CI/CD so that it runs on MRs. If you include all the pipelines that would run because of a dev updating a branch in an MR we're talking hundreds to thousands of pipelines a day.
I thought this dev was token maxing or just trying to look busy and I've had to sit down and talk to him, pull him aside for quick 1 on 1s, and to be honest, I don't get the feeling that he knows what he's doing is a gigantic waste of time. The LLMs are sycophants that glaze you. You think everything coming out of it is GREAT work because it tells you that. And I think this is happening across all layers of every org out there in various degrees.
hbrn 3 days ago | parent
Review tool is an interesting one - I find LLMs to be quite useful for code reviews, but people should really stop associating code reviews with Github/Gitlab and running them as a part of CI. Those platforms were built for humans because reviewing patches over email was a terrible experience. Clankers have no problem with raw patches, in fact they prefer them over fancy web UI. Code hosting platforms are not a good place for agentic code reviews, and they never will be.
Most LLM reviews should only run locally on developer's machine, in your regular coding harness.
kaydub 2 days ago | parent
* vanilla claude with our MCPs + a decent prompt (like a paragraph tops) * an agent that was previously made, much more concise skills * the mr tool this IC created
The MR tool didn't even catch some of the stuff in our domain that the others caught and it took 45minutes, cost $20 vs 4mins for vanilla (<$1) and 7mins for the agent ($3ish)
And yeah, code-reviews are supposed to be by humans, but we have a ton of reviews come in where there's a ton of low hanging fruit. This tool is meant to be a gate between getting an actual human code review and some of the slop coming in these days.
I'll go through a bunch more MR reviews, see how things go. But I've gotta start figuring out how to test the documentation, decision docs, and other plugins/skills.
JohnBooty 3 days ago | parent
We don't need to tell the LLM where the User model is. The LLM can find it.
However, IME we need to tell the LLM preferences like, "the User model should not have dependencies on other models" (you know, to avoid the God Model problem...)
To discover that preference, the LLM would (best case scenario) need to look at every model, and notice that the User model has no dependencies, but all the other models do, and infer that this is an architecture requirement. Except, some of our other leaf models might not have dependencies anyway, so it wouldn't necessarily be apparent. Or maybe it's a new project and none of the models have dependencies in which case our preference could not be deduced. Etc. All of this is token-intensive and unreliable.
(Perhaps even more ideally than placing this instruction in AGENTS.md or similar, it could be an inline comment in the User model itself. However, I have found LLMs to be very hit-or-miss when it comes to recognizing directives inside inline comments. And some architecture rules can't be easily expressed via inline comments in a particular file...)
kaydub 3 days ago | parent
Like you said, an inline comment probably makes more sense. Sure, maybe it misses it, then you can just tell it. Better than putting such granular details in a CLAUDE/AGENTS.md and better than having disparate markdown files or decisions documents that get unwieldy.
JohnBooty 3 days ago | parent
You know the contents of AGENTS.md/CLAUDE.md just get injected into your context window by the harness? And that it's functionally equivalent to typing the same thing into every session?
There's no difference between typing "keep dependencies out of User" at the beginning of every session, and putting that into AGENTS.md, other than wasting a bunch of time.
Sure, maybe it misses it, then you can just tell it.
Re-doing that work after it gets things wrong is going to take roughly 1-3 orders of magnitude more tokens than including it in AGENTS.md/CLAUDE.md.Here's a good concrete example. I've caught Claude writing python scripts to parse JSON instead of simply using `jq`. I initially attempted to correct this by adding `jq` to my allow list, but it still always reached for Python scripting first, before eventually figuring out it could use `jq`. You think that burned a few extra tokens vs. just telling it `use jq to parse JSON` in AGENTS.md?
kaydub 3 days ago | parent
I don't really care how claude parses json. I'd say you're just wasting your time caring about that detail. I definitely wouldn't put that kind of useless info into my claude.md/agents.md.
If I DID care, yeah, I think it makes more sense to just correct the action. I'm not parsing json in every session so why would I want it in context for every session AND every sub-agent's session?
JohnBooty 3 days ago | parent
I eagerly await your misunderstanding!
kaydub 4 days ago | parent
The docs just make you feel good. They're not worth anything. They just create more work if anything because now you don't only have to fight entropy in your codebase but also your docs.
rectang 4 days ago | parent
With the LLM, though, I have some influence: I can instruct it to be more succinct. I don't have a specific top-level instruction about that at present in any global prefs file, but I've occasionally asked it to summarize and archive and it's done an okayish job of pruning.
kaydub 4 days ago | parent
I'm not the one bolting things on claiming it increases productivity. Why would I ADD stuff without any proof or evidence that it works? I'm simply NOT adding these things.
frankacter 4 days ago | parent
While arguing against using the tool as designed.
https://claude.com/blog/using-claude-md-files
"CLAUDE.md files solve this by giving Claude persistent context about your project. A well-configured CLAUDE.md transforms how Claude works with your specific project. The file serves multiple purposes: providing architectural context, establishing workflows, and connecting Claude to your development tools. Each addition should solve a real problem you have encountered, not theoretical concerns about what Claude might need."
kaydub 3 days ago | parent
I've just been trimming down to the recommended < 100 lines and I keep only super high level info in there and allow the agents to figure things out by reading the code.
I wouldn't use a blog post from Nov 2025 be my guiding light.
Anthropic over the past few months have said they've cut their system prompts 80%. These are current best practices. The models are good enough and can figure things out on their own BETTER than you can present the info in markdown files and "decision" documents.
JohnBooty 4 days ago | parent
Notice the things they struggle with and the small problems (typically, environment issues IME) they repeatedly encounter and re-solve across multiple sessions. That is what your instructions should cover. When possible, move those instructions into skills, so they get loaded into context selectively instead of on every session. (Example: instructions for running specs, placed into a skill that only gets loaded into context when it’s time to run specs)
Again, this can be automated by the LLMs themselves: both Codex and Claude (and I’m assuming other major harnesses) know how to read their own transcripts and are good at looking for repeated friction and making concrete suggestions to reduce that friction in the future.
It takes a bit of a time investment on the user’s part, and every now and then you probably should throw it all out and start fresh so that the new batch of instructions can be appropriate for the current state of the repo and the capabilities of whatever model(s) you’re using.
kaydub 4 days ago | parent
The LLMs will always have these suggestions on things that will "reduce friction in the future" but I really think the LLM is a sycophant glazing you. Because even when you add those skills or prompts at some point the LLM ignores it or does whatever it wants to do anyways. Better to leave most of that out and deal with it when it arises.
Even your example, instructions for running specs... none of the current frontier models need this at all.
joquarky 4 days ago | parent
kaydub 4 days ago | parent
At work it's all Anthropic. I spent a while on Sonnet models but have been pretty consistent about using Opus now. For personal projects I bounce between Sol/Terra and Gemini Flash.
Most of the models are good enough now. You don't need all these documents, memory, plugins, skills, etc. MCPs are good for hooking up to external sources of data (at work we have gitlab mcp, datadog mcp, and our knowledge base mcp... which the knowledge base is mostly worthless now because of all this AI generated documentation, but I digress). I DO still use beads on a lot of projects, but not always. My prompts these days are lazy as fuck: "review this repo, check out this other repo with architectural patterns we should follow and libraries/terraform/etc we should use, <basic desc of goal>. What do you think? Let's review everything and discuss before we start building"
Oh no, I might have to stop the llm agent on occasion, or review what they did and tell them to fix a couple things. Way better use of tokens and my time than creating some rube goldberg machine. Way better than keeping a giant decision file that goes stale and causes context corruption because the llm only saw the OLD decision and not the UPDATED decision.
JohnBooty 4 days ago | parent
That must be a remarkable model. Smart enough to flawlessly discover everything on its own in every session... but also it just straight up just doesn't obey direction.
Hmmm.
kaydub 4 days ago | parent
I didn't say give no direction.
I'm saying a lot of devs/engineers little rain dances aren't really bringing the rain.
Keep a basic CLAUDE.md/AGENTS.md that keeps high level details. Have a way to reference other projects/apps/codebases to use as reference architecture.
Don't keep tons of markdown files. Don't keep "decision" documents (these are probably the worst). Don't make skills for every little thing (superpowers are dead these days, stop using them). Oh yeah, don't have the LLM generate docs for reference later... if it can generate the docs it doesn't really need them.
JohnBooty 4 days ago | parent
kaydub 4 days ago | parent
You're just stuck on your dogma.
JohnBooty 4 days ago | parent
However. At least in the projects I've worked on, it's trivial to read the transcripts and notice that without enough direction, there are certain things the agents will burn lots of tokens to rediscover in every session. That's absolutely not dogma.
kaydub 4 days ago | parent
And I think a lot of places are burning way more on the latter than the former. I think the former is more cost effective due to caching as well. So I HEAVILY lean towards the former especially with how effective I think it is these days.
JohnBooty 3 days ago | parent
I think there's a balance between the tokens
burned up rediscovering things vs tokens being
used keeping docs/decisions/skills/etc.
This mystical balance isn't difficult to measure. You don't have to believe anybody; just read the darn session transcripts. It's going to take at least one (but usually multiple) turns of grepping or other exploration to rediscover a thing. How many tokens does this add to your context? Since 1 token = ~4 characters you can count characters in your text editor.Is this less, or greater than the number of tokens it would cost to simply add that thing to AGENTS.md?
If you're burning 5000 tokens to rediscover the same thing in every session, and it would take only 500 tokens to just put the thing in your AGENTS.md, it's an easy decision. Do you understand that paying 500 tokens in every session is less than paying 5000 tokens in every session?
If you're burning 5000 tokens to rediscover the same thing in 50% of your sessions, it's probably still worth it, but now you might consider placing it into a skill so that it only gets loaded into the 50% of sessions that need it.
If you're burning 5000 tokens to rediscover the same thing in 1% of your sessions then yeah, definitely skill. (You can add it to your prompts manually too, of course, but that is functionally equivalent to adding it to a skill that is set to manual invocation only...)
So I HEAVILY lean towards the former especially with
how effective I think it is these days.
How is this different from what I already said at the beginning of this conversation, where I recommended beginning with minimal (or no) skills or instructions... and then judiciously adding very lean ones based on actual observations? You claimed that this was a waste of time.kaydub 3 days ago | parent
You aren't putting into 500 tokens what takes 5k tokens to discover. I've found that when I had these larger markdown files with all the details the models STILL went to the code to review. Then the markdown files get stale in spots, NO MATTER WHAT. Not only stale, but if you're having agents maintain these files they WILL hallucinate or input superfluous or unnecessary info. Now that I have short markdown files (or none in some instances) the agent just looks at the code and it's pretty simple to figure out.
And yes, I think most of the skills are a waste of time. You're just creating more shit to maintain. The most usable and reusable skills end up being short and concise, to where you could just type them into the prompt in any number of ways adhoc... effectively making the skill mostly worthless. The big skills end up being too much and less effective ime. And it can be difficult to rely on agents to invoke skills or the right skills.
If my skills need maintenance and hand holding, what am I really gaining?
JohnBooty 3 days ago | parent
As I optimistically hope you may be able to eventually understand with what I assume to be significant effort on your part[1], the numbers are going to be different on a case by case basis. Thus, my generalization.
This conversation is over, as you have been moving goalposts in various random directions: careening between "no directions for LLMs!" and then talking about your "minimal" AGENTS.md and markdown files, and then disagreeing with me for having minimal AGENTS.md and markdown files, in favor of your approach which involves... minimal AGENTS.md and markdown files, apparently. Luckily, it all sounds so schizo that at least nobody will take you seriously enough to follow your bad advice. It's exhausting talking to you, but surely not as exhausting as being you, so I do still have sympathy. Good luck.
---
[1] remember to hydrate, a good night's sleep helps too
kaydub 3 days ago | parent
The condescending attitude isn't a great look, especially when you're making up strawmen arguments.
kaydub 4 days ago | parent
icedchai 4 days ago | parent
kaydub 4 days ago | parent
I don't think I've ever seen an agent review a doc and then NOT also go look at the code. So skip the middleman, just have the agent look at the code.
joquarky 4 days ago | parent
hbrn 3 days ago | parent
They are truly horrible at generating docs, prompts, knowledge bases, memories, etc.
ramesh31 4 days ago | parent
enraged_camel 4 days ago | parent
We have heard this nonsense from the "we don't need to write comments, code should be self-documenting" types for decades. It was wrong in that context, and it is wrong in this one.
Code tells you how a system works. It does not tell you why it works that way. That is what memory is for. It exists so that your AI does not keep undoing past decisions when it writes or refactors code.
kaydub 4 days ago | parent
Old decisions always end up in the docs. If the LLM gets a whiff of an old decision, but doesn't get the update to that decision, well now you're doing things the old way again.
dregitsky 4 days ago | parent
I liked this advice when humans wrote code. Though even then I'd urge people to write meaningful commit messages that capture the "why" of what they did, so no one tramples their intent by mistake.
But not sure it works in an age where most code is LLM-generated. Especially if that code is not even reviewed by humans (irresponsible or not, it's happening), and commit messages are also generated by AI. I think something is needed to separate "what did the human operator intend" from what the agent went and built.
I do agree that this gets way overengineered. My approach has been more or less what you stopped doing though - committing all our timestamped "plan/implementation docs" and "investigation docs" that document what the user wanted + empirical findings, and making all prior session transcripts searchable. It's seemed mostly helpful? For whatever reason I haven't run into many staleness problems so far.
kaydub 4 days ago | parent
I'm mainly aiming my frustrations at all the markdown files being committed, all the additions to knowledge bases, all the comments in the code (especially the ones referencing specific JIRA tickets). This stuff isn't helpful, it gets hella stale. I've had the LLM fuck up plenty due to these docs and comments.
Commit message ARE EXACTLY where architectural decisions or nuance should go. Not another fucking .md or more comments.
jjfoooo4 4 days ago | parent
kaydub 4 days ago | parent
Make a high level .md, let it rip, iterate. You can give specifics in your original prompt.
I don't need to document the framework or the libraries etc. Pre-code, I tell it in the prompt one time. After it inits the project it's in the code.
mmcnl 4 days ago | parent
kaydub 4 days ago | parent
If it's not, that's what commit messages are for.
mmcnl 3 days ago | parent
kaydub 3 days ago | parent
I'm seeing ENORMOUS decision files and when I read them a lot of the decisions are self-evident. Or the decisions flip flop but the old decisions remain in the file, which fucks up context. It's often better to completely remove a reference to X rather than leave it and have an amendment later that says "don't do X". Because X is in context, now the LLM is more likely to stumble into doing X.
nomel 2 days ago | parent
Wouldn't this require that your commits would have to be as frequent as each new reasons why? That could easily end up being a commit per function, which seems crazy to me.
I always put any important why close to the code that I'm explaining. For architectural explanations, maybe at the top of the file, or for really high level "how it all works together", in an md.
hosh 4 days ago | parent
When it is not, it has to be reasoned out and does not work well for documentation.
Other things that code and tests alone do not capture well:
- promises (as in Promise Theory) made to other parties. Claude already has PT in its training data.
- Constraints-inducing-properites, as in Roy Fielding / Christopher Alexander. While tests, and property testing can capture properties, there is no formal connection to the constraints that induces fhem. By constraints, I am not talking about business requirements and business value — those are better understood through Promise Theory. I am talking about things like at-least-once delivery or total ordering (from append-only constraint). Claude already has Fielding’s dissertation and Alexander’s works and ideas in its training data.
- grammars, as in pattern panguages (not just patterns) a la Alexander / Fielding are also not captured in code alone. These tell both humans ans AI how to extend a pattern, and how to identify anti-patterns (when they violate a constraint-inducing-property)
- LLMs are trained with many different worldviews and bounded contexts at the same time, and is very capable of translating across it. However, these need to be soelled out, otherwise it would talk in whatever it infers
Specifications written for the exact way components are wited together run into that stale doc problem. Although it takes much more human attention and token burn to describe things in terms of pattern language and promise theory, it becomes easier over time. The actual implementation plan tends to fall out more cleanly when all those other stuff are at least considered. This is where I have been spending most of my time.
chaostheory 4 days ago | parent
kaydub 4 days ago | parent
chaostheory 4 days ago | parent
kaydub 3 days ago | parent
I like how so many of you get offended or go on the attack acting like I'm vibe coding some small apps. I'm working at a small/medium enterprise business with about 1B in ARR. We have 100s of repos, a couple of which are our original monolithic products. There's no issue working on any of these apps. The models have no problem using gitlab mcp to get pertinent information when they need it.
chaostheory 3 days ago | parent
Also you’re telling everyone that you don’t have proof that you actually understand what your AI built. It may not bite your company now, but it will bite them one day.
This is a prime example of bad laziness. Tbf most companies like reducing as much cost as fast as possible while ignoring the potential downsides of it, so I don’t blame anyone taking on as many projects as possible.
kaydub 3 days ago | parent
I've already DONE the large docs, the decision docs, the skills/plugins. I'm ripping those out now because I can see that they're garbage and they add little to zero value.
And I don't get where you think I'm telling everyone I don't have proof that I understand what my AI built. Doesn't even make sense. Because I don't have it generate tons of prose that's going to get stale? I'm okay not generating low value garbage and patting myself on the back for it.
chaostheory 2 days ago | parent
But not as much of it since it has more context assuming the docs are good enough, which is my point.
> And I don't get where you think I'm telling everyone I don't have proof that I understand what my AI built.
Are you writing any of the code? Writing the tests? If not, then there isn’t any proof that you actually know the code base unless you have documentation. Even if you do know the code base one day, it’s not like you’re going to remember everything unless… you have documentation that quickly summarizes everything. Documentation isn’t just for AI. You’re likely also not going to be a company lifer so it’s also in your company’s interests for there to be documentation.
kaydub 2 days ago | parent
Prove it.
Somewhat related, I DID test some of this stuff today. Plain claude, telling it to use gitlab mcp to review our codebase vs a big claude skill (for mr reviews) with a lot of details encoded in the plugin, kinda like these overly verbose and other llm generated document rube goldberg machine.
Plain claude with a simple paragraph prompt + gitlab mcp outperformed the skill by quite a bit. Less false positives, one finding the skill didn't find, ran in 4min for less than $1 vs 45min and $20 for the skill (which is basically overly verbose documentation packaged up)
The llms don't need your prose or your documentation, they can figure things out more efficiently without it.
> Are you writing any of the code? Writing the tests? If not, then there isn’t any proof that you actually know the code base unless you have documentation
The code is the documentation. You can read the code. This makes zero sense.
Your two statements are contradictory here. Docs should be good enough so the llm doesn't need to read the codebase, but it should just summarize everything? You can't have both.
I even stated in my OG post that I still keep a claude/agents.md, they're just VERY SMALL. I'm railing against the decision docs, the explosion of markdown files, and the extremely verbose code comments. All the LLM generated docs are causing friction more than anything, the llms are just good enough to work through it.
chaostheory 2 days ago | parent
Anyone can make up a anecdote. In my case an agent was able to do a task in 10 min vs almost an hour without documentation. Citing an anecdote as “proof” isn’t good enough.
Here is my proof:
Hai, N. L., Nguyen, D. M., & Bui, N. D. Q. (2024). On the Impacts of Contexts on Repository-Level Code Generation. arXiv. https://doi.org/10.48550/arxiv.2406.11927 Cited by: 46
Jimenez, C. E., Yang, J., Wettig, A., et al. (2023). SWE-bench: Can Language Models Resolve Real-World GitHub Issues? arXiv. https://doi.org/10.48550/arxiv.2310.06770 Cited by: 4998
Zhang, F., Chen, B., Zhang, Y., et al. (2023). RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. https://doi.org/10.18653/v1/2023.emnlp-main.151 Cited by: 698
> The code is the documentation.
No because it doesn’t capture the intent or the rationale why something was designed a certain way. Like why does it do some weird logic in this spot? What and why is being tested (a lot of tests are not straightforward)?
> Your two statements are contradictory here. Docs should be good enough so the llm doesn't need to read the codebase, but it should just summarize everything? You can't have both.
They are not contradictory. There’s this thing called a table of contents that summarizes large sections into a sentence or less, and links to said sections. Each section both large and small can also have a little paragraph that serves as a summary for the content to come. Sections can even have their own mini TOC. This enables an AI to be able to skip the parts it doesn’t need.
> All the LLM generated docs are causing friction
Ok, if you have a LLM generate your docs and you don’t vet it and make it your own, it doesn’t help you. Because again, how can you prove that you actually know the code base? Unless all you do is work on the same part of the same application day in and day out? Maybe the programs you’re working on is small or simple? How can you ever quickly ramp up when changing projects? This is assuming that you’re not just pairing vibe coding with manual monkey testing, or are you even validating anything when you’re not recording your goals in writing? Most of the cost in application development lies in maintenance and that is also where documentation benefits the most
kaydub 1 day ago | parent
You're really going to use papers from 2023 and 2024? It's 2026. The models are better these days... a lot better. Like come on man "The best-performing model, Claude 2" You're going to base your assessment on THAT?
Dude, maybe it's YOU guys working on small codebases that are worrying about "knowing the codebase" or maybe you guys just work on shit code, I don't know. This industry isn't new, there are known patterns and the models know them. It's really not hard to navigate a new codebase if you know what you're doing or if you know the framework or patterns of the language/platform. If you think you know your whole codebase though, I'd argue that it's YOU working on a small or simple app.
I'm not even understanding your line of questioning here. I don't know the codebase because I had an LLM write it and I didn't write documentation? You think writing documentation means you know the codebase? You think having your goals in writing is any different than putting it in the prompt?
chaostheory 1 day ago | parent
I gave you real proof: real research in this field on the exact subject matter WITH data.
> You're really going to use papers from 2023 and 2024?
Vs what? Nothing? Ok, prove them wrong. anecdotes aren't proof
> I'm not even understanding your line of questioning here.
I've disproven your claim 3 times. You're not understanding anything because it goes against your narrative. If you didn’t write the code and you didn’t write any documentation about the code, then you have no proof that you know anything about said code base.
> Dude, maybe it's YOU guys working on small codebases
You're projecting. You can't vibe code large projects. It's not sustainable. if you are actually vibe coding actual large projects blind, it's only a matter of time before things go really wrong.
kaydub 10 hours ago | parent
You know it's possible to READ too, right? I don't have to write the code or documentation... not that writing documentation means anything.
I have hundreds of repos at my job, some are in the 10s of thousands of lines of code, many are in the hundreds of thousands, and we still have a couple monoliths in the millions of lines of code range.
Personal projects completely built with the LLM range in the 10s to 100s of thousands of lines.
It's sustainable. LLMs have no problem working on all these projects and working on them across repos.
But I don't know what "vibe coding actual large projects blind" is supposed to mean.
chaostheory 5 hours ago | parent
yes, and how do you prove that you both read and understand the code? saying you understand it does nothing especially when you no longer write the code.
> I have hundreds of repos at my job, some are in the 10s of thousands of lines of code, many are in the hundreds of thousands, and we still have a couple monoliths in the millions of lines of code range. Personal projects completely built with the LLM range in the 10s to 100s of thousands of lines.
Who cares because how would you be able to prove that? I can say the same thing.
> It's sustainable. LLMs have no problem working on all these projects and working on them across repos.
You have no proof of that especiall at scale. If anything all you're telling me, especially with your hard to believe anecdotes, is that you're not very experienced and you're very imaginative. It's also hard to believe anything that you've written because it makes no sense unless everyone above you isn't technical because what you're doing wouldn't fly anywhere that wasn't just a really small shop in the middle of nowhere with one or two apps.
> You haven't disproven shit using research papers using Claude 2
Compared to your anecdotes, those white papers are real work by credible professionals at respected institutions with real data that says definitively that YOU ARE WRONG. If you feel that they are wrong, feel free to prove it with specific examples and data. Right, you won't because of reasons...
I'm done humoring you. This was a complete waste of time.
nomel 2 days ago | parent
How big are your code bases that result in this opinion? I'm working on a few million lines of code, and the AI will very very often reinvent/reimplement whole libraries within the codebase.
kaydub 10 hours ago | parent
01100011 4 days ago | parent
In my codebase it is difficult to get agreement on comments and documentation so rather than rely on it I adapted. One of the first things I did when I succumbed to agentic development was to point codex at the code and ask it to generate a high level description of where important files, such as our public API, reside, what the hierarchy is, what the code does, etc. In my case, this level of documentation is fairly static if I avoid implementation details. So now I have a handful of agent files in my tree and it seems to save quite a few tokens and improve my results. I frequently have other devs ask me how I get such good results when doing agentic reviews of their changes(always my first step now before I start my human review). I also include instructions in the agents files instructing the agent to maintain the agent files if any relevant changes are made. It seems to work quite well for me.
kaydub 4 days ago | parent
If you got the LLM to generate the docs, they don't need the docs.
01100011 1 day ago | parent
kaydub 1 day ago | parent
mgfist 4 days ago | parent
All code is written under constraints, and most constraints live outside the code.
kaydub 4 days ago | parent
When it's not, there are commit messages.
Please for the love of god, quit generating markdown files (especially having the LLM generate the file, because if it could generate it, it doesn't need it), quit generating "decision" docs, and stop having more comments than code.
mgfist 3 days ago | parent
I agree with all of this. But I disagree that code alone is enough to understand the why.
kaydub 2 days ago | parent
You absolutely need some documentation. Like I originally said, I still do keep a claude/agents.md too, they're just stripped down A LOT.
Human maintained knowledge base and documentation is good. Not even 100% human maintained, just make sure human eyes are reading it before you commit it! And if it's said in code it doesn't need to also be said in the docs, that's how they get stale and you get drift. This is causing LLMs problems.
The docs you don't need are big decision docs that keep getting appended to, multiple long lived markdown files, and verbose comments (I literally saw multiple MRs today with more lines of comments than lines of code, as bad as one file that had a single line changed but then 5 paragraphs of mostly unrelated details, overly specific details, and just plain claude slop). This stuff isn't helping.
And the one issue I'm mainly conflating this with are all the skills/plugins/etc that people are making thinking it's making their claude better. Like the super-powers repo that's been floating around for months, that thing is trash, you don't need it. Maybe you did before (I still don't really think so) but you especially don't need it now.
One guy is talking about running tests and parsing json with claude... but why would you even do that? Just make deterministic tools and then you run those for your testing.
Again, something else I'm seeing, someone wedging claude into ci/cd and then having claude use skills that run linters and trivy. Why is that not just in ci/CD???
The proliferation of prose is maddening
ChimpWithHat 4 days ago | parent
kaydub 4 days ago | parent
It's a LOT of cargo-culting overly complex AI workflows. It's devs/engineers making rube goldberg machines.
Everyone is doing their own little rain dance and when it rains they say "see, I told you it works"
JohnBooty 4 days ago | parent
You don’t need documentation […or…] memory
…oh heck no. Easy to miss at Claude and Codex’s default detail level but if you read your actual session transcripts, you are almost certain to notice the LLM solving lots and lots of the same little problems over and over again. The code IS the documentation
First, lots of things cannot be learned from the code.Trivial example: LLMs struggled with QA on our app. They didn’t know how to find the seeded test accounts. They would create new ones and do it wrong, or find the seeded test accounts but not know their passwords because they were encrypted, so they’d change the passwords but not tell the other agents. Shitloads of tokens burned. It was a no-brainer to just give them the credentials in a skill that gets loaded when they do QA.
You could say that’s an environment issue, not a code issue. But as far as actual code IME at a minimum we have to tell the agents our general repo structure and architecture patterns.
The days of “you are the world’s greatest Python programmer, write good code” or whatever are over (if that style of prompting even worked in the first place) and as I said less is more. But, still….
kaydub 4 days ago | parent
Yeah, that's exactly what I'd say. Or maybe you're just approaching the problem now.
You have to prompt these QA agents, correct? Why not give the instructions on where to get credentials in the original prompt?
> But as far as actual code IME at a minimum we have to tell the agents our general repo structure and architecture patterns.
I did say I'll keep an AGENTS.md or CLAUDE.md. I keep that SUPER high level. The most depth I'll give is info about example projects (That the llm can reach using an MCP) to follow for architectural patterns.
JohnBooty 4 days ago | parent
Why not give the instructions on where to get
credentials in the original prompt?
We don't push code unless it's been QA'd, and the LLMs need to know the credentials every time they do automated QA. It's very rare for me have a session in that repo where they wouldn't need that info. So it's a great candidate for AGENTS.mdAnother concrete example would be codebase conventions. We prefer lean models. Cross-model concerns go into service objects. Without this direction LLMs tend to default to stuffing too much code into the models themselves, as is the de facto standard for most MVC apps and therefore this is how LLMs are trained.
Even if they could discover our large codebase's conventions flawlessly on their own in every session, this absolutely would require nontrivial work repeated in every session: quite a few turns grepping, conversing with LSPs, or whatever.
So yes... we could describe our conventions in every single session by typing it right into the prompts... right after typing the directions to find the test credentials... and the other ten or twelve things we'd be telling it every single time...
kaydub 4 days ago | parent
Even with your documentation, the llm is gonna do a lot of that grepping and discovery. Unless you have such comprehensive documentation that it's basically code itself... in which case, it should just use the code as documentation.
The good news is that I don't think what you guys are doing is going to be really bad. It's just not near optimal and it's creating this weird dogma around all these "tools"
JohnBooty 4 days ago | parent
kaydub 4 days ago | parent
Locally? Our devs can do whatever they want. For anything I'm working on, for local deployments and testing, I generally build it out so it's set in Makefile/Taskfile. If you're running your determinstic tests locally it should really just be a single command that bootstraps everything and runs the tests, or updates a certain part of your app and runs the tests. The LLM shouldn't need credentials in that instance.
Regardless I'm deploying a local stack of some sort all the credentials and everything are probably stored locally or in an env var where the llm will have access. So if I was having the LLM drive a browser during active development, it can look at the files.
Sure, I guess we could put in the top level markdown more details about this... but why? It takes little time or context for it to figure it out. We have shit change so frequently that it's just something else we have to maintain.
soltanov 4 days ago | parent
kaydub 4 days ago | parent
You guys are just reinventing the wheel and it's fucking square.
perrygeo 3 days ago | parent
spamizbad 3 days ago | parent
kaydub 3 days ago | parent
So many people producing documents, comments, prose and it's just unnecessary. The LLMs don't do well keeping it up to date too. It's the snake eating its tail.
johnyzee 4 days ago | parent
MaurizioFratell 4 days ago | parent
Genuine question: how is this different or better than existing context and info-about-the-project management systems like for example GSD (formerly get shit done) and others?
dyauspitr 4 days ago | parent
nelaggy 4 days ago | parent
ozgung 4 days ago | parent
There is a sprint based roadmap doc. We do sprint planning and each sprint has multiple sessions with session numbers. There is a backlog document to keep track of all the bugs and feature ideas. There are many ADR documents (Architectural Decision Records) which I admit can become stale in time, but Claude is quick to notice because it actually reads these. They are the main contract between us. For a new feature an ADR is written before writing any code or an old one is amended.
I assumed this was a common workflow because I just prompted Claude to setup the project using its own best practices for a lightweight document-driven development.
I believe asking the model itself is better than using a random repo. These things have access to and trained on an enormous number of projects. They know what they need.
vistdev 3 days ago | parent
That said - I personally ended up saving my plans and status in my second brain app via MCP. Having that available to me on the road when I'm in the car brainstorming with Claude over voice is a big win.
jwpapi 4 days ago | parent
I only do runbooks for things that I have to run again in the future and potentially mentioned (could be better in code, too tbh, but somehow I like to store these as runbooks, as sometimes infrastucture changes are mixed with a lot of explanation, scraping operations or something)
One off scripts are done in /tmp/
mk_chan 4 days ago | parent
Documentation was always a proxy for the code so the people who didn’t have context could get started. Obviously if reading the code and reading the doc have the same cost, the doc is completely worthless. This was always the case. You could never depend only on the docs. It’s always the code that actually mattered.
_zoltan_ 4 days ago | parent
aarontian0 4 days ago | parent
trinsic2 4 days ago | parent
nialv7 4 days ago | parent
syngrog66 4 days ago | parent
marcus_holmes 4 days ago | parent
Inside the docs folder is an archive folder. Stale and completed plans and docs get moved there.
I generate a schema.md that describes the database schema in LLM-friendly terms that lives in docs.
If there's a gnarly design or implementation design made that the LLM keeps tripping up on, I get it to document that and put it in docs.
The handoff.md doc lives in docs, and gets moved to archive once it's no longer relevant. Same for todo.md
My agents.md instructs the LLM to read the docs but ignore the archive, and acknowledge the docs it has read. So the start of every session gets a "I have read <date>design.md, <date>plan.md, schema.md, notes.md, handoff.md". It's a decent chunk of context but as the OP says, this is necessary.
I also have a skill called "assessing project drift" that looks at the archive and assesses the project on how far the code has moved from the intention, if there are any chunks of code that were relevant but have been superceded and can be removed, and if there's any egregious tech debt that should be dealt with now. The docs archive is really useful for this.
kaydub 4 days ago | parent
I think a lot of people are stuck on patterns that "used to work" (and I use that loosely because I really feel like LLMs are getting work done IN SPITE of using all these additional skills/plugins/etc). Go ahead, delete all that shit and try building without. Yeah, sometimes you may have to hand hold the LLM, but that hand holding is a LOT less than doing whatever this is.
This all just sounds like a rube goldberg machine you've made.
marcus_holmes 4 days ago | parent
And yes, very much a Rube Goldberg machine ;)
nullbio 4 days ago | parent
abhinav_sk 4 days ago | parent
contentkraft 4 days ago | parent
stefan_iarca 2 days ago | parent
CodeyTours 22 hours ago | parent