‹ BackHN Continuity

Thread

Agents don't need memory, they need documentation

365 points · 261 comments · kmeh

  1. kaydub · · focus · HN ↗
    You don't need documentation or the 3rd party memory systems. The code IS the documentation.

    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.

    1. rectang · · focus · HN ↗
      Haha, all the software devs who hate writing documentation are naturally finding their preexisting beliefs reinforced when the LLM is able to discern intent without docs. An LLM can be spooky impressive at reading minimized or obfuscated code, for example.

      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.

      1. kaydub · · focus · HN ↗
        Don't agree. LLM generated docs are some of the worst because like I said, the LLM never trims, only amends. So we used to do X but now we've had an architectural change or some type of change where we should never do X. Instead of just removing the instructions to do X in the docs, it amends them, "we made the decision to no longer do X because of Y". Now it has X multiple times in context instead of just not having X in context at all.
        1. icedchai · · focus · HN ↗
          I hesitate to make blanket statements, since this is quickly evolving, but in general I agree. LLM generated docs will quickly degrade to overly verbose, unreadable crap.
          1. joquarky · · focus · HN ↗
            Created a skill to prune them appropriately and run it every evening.
            1. kaydub · · focus · HN ↗
              Nope. Doesn't work. Not consistently. Not without overhead or maintenance.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.