logoalt Hacker News

ksajadi • today at 6:14 AM • 0 replies • view on HN

i find the best way to think about this (and build around it) is to think how we as humans learn by doing: we have an idea of what to do (plan), then do, and then learn from what we did (right or wrong). you can also extend this to the entire team/company through what's usually called "institutional knowledge".

here is how i approach it in practice:

i've seen many try to generalize rules before doing things (design principles, guidelines, architecture,...) but often the best way is to start small, guide the agent step by step and (this is the most important part) at the end ask the agent to summarize what it learned and write it down.

then on the next cycle, ask the agent to read the previous notes and do this again: read, do, write.

i've been doing this for about 14 months now and have ended up with 2 categories of "knowledge": general (runs across multiple projects) and specific (per project).

these are kept in two formats: markdown and "decision records". each decision is a markdown but has meta data around its state: approved, rejected, failed, etc.

this growing body of knowledge works very similar to experience.

one note about agent memory: first i find it opaque, secondly not sharable across team members, and thirdly not very human friendly (basically as the agent does more, you learn less about your own project due to the opacity of the memory).

one thing i haven't been able to do figure out well yet is how to extract this from an existing codebase into this structured library of markdown and decisions. i'm keen to see how others do this.

once you have this library, you can get your agents to respond to inbound signals (slack, sentry, axiom alerts, etc) and work with a high level of quality and confidence, provided that they follow the read, do, write cycle EVERY TIME.

when i started this system, i used a committed markdown in git, then moved it to an obsidian (with MCP), then to Notion (so it's available team-wide) and finally built a product around it (bench47.com, if you care to check it out, disclosures, etc)