Stop Re-Explaining Yourself to Your AI: The Power of “Comment to Change”
We’ve all been there. You open up a new session with your AI agent whether it’s Claude, Cursor, or an MCP-powered tool and you spend the first ten minutes doing the inevitable ritual dance: context setting.
Learn more at- https://spiderbrain.ai/
“Remember, we are using JWT with RS256, not SHA256.” “Don’t forget all database writes must go through the repository layer.” “Wait, scratch that last part, we actually shifted to a JWKS endpoint yesterday.”
It works, but it’s exhausting. The moment a project decision changes, you’re stuck re-explaining the new constraints every single time you start a new thread. It feels less like working with a brilliant engineering partner and more like onboarding a new junior developer every single morning.
There is a better way. Instead of rewriting your prompts from scratch, what if you could just edit the AI’s memory directly?
Enter Spiderbrain’s comment-to-change mechanism.
The Problem: The Empty Context Trap
The fundamental issue with traditional re-prompting is that every new AI session starts with an empty slate. You have to rebuild the context from scratch: which decisions were made, which constraints apply, and which architectural patterns the team follows.
As a project grows, this manual reconstruction becomes error-prone and time-consuming. You forget to mention a minor constraint, the AI hallucinates an old pattern, and suddenly you’re debugging code that shouldn’t have been written in the first place.
Trying to solve this by dumping everything into a massive, global system prompt doesn’t work either. It clogs the AI’s context window with irrelevant details and dilutes its focus.
Instead of floating around in ephemeral chat histories or bloated system prompts, authoritative project data belongs in a Memory Tree.
The Memory Tree is a hierarchical, persistent record of your project’s decisions, constraints, patterns, and preferences. Each node in the tree is a structured fact that your AI recalls over the Model Context Protocol (MCP) in every single session.
These aren’t passing instructions; they are foundational truths about your codebase. For example:
“The auth module uses JWT with RS256. Never SHA256.”
“The API response envelope uses data and error fields. No other top-level keys.”
“All database writes must go through the repository layer. Direct ORM calls from controllers are not allowed.”
How “Comment-to-Change” Actually Works
When engineering decisions inevitably shift, you shouldn’t have to rewrite a master prompt document. With a Memory Tree, you just leave a comment on the specific memory node that needs updating.
Let’s say your team decides to migrate to a JWKS endpoint. Instead of worrying about how to phrase this to the AI next time, you simply annotate the existing memory node:
Comment: “Update this: we’re migrating to a JWKS endpoint, not a static public key.”
On your very next AI session, the magic happens behind the scenes:
The Client Reads the Tree: Your connected client (Claude, Cursor, Claude Code, etc.) scans the Memory Tree.
It Finds the Flag: It spots the node with the unresolved comment.
It Rewrites the History: The AI reads the original memory, processes your comment, applies the update to the node content, and marks the comment as resolved.
The next time the AI references that architectural rule, the memory automatically reads: “The auth module uses JWT verified against the JWKS endpoint at /auth/.well-known/jwks.”
You didn’t have to explain how to change it. You just ratified the change by leaving a quick note.
Why This Changes the Game
Shifting from prompt engineering to memory annotation provides three massive advantages for developers:
1. Scoped Steering (No More Global Noise)
The comment-to-change mechanism isn’t global. Memory nodes are anchored to specific files or modules. If you leave a comment on a memory node anchored to auth/, only AI sessions working within the auth/ directory will see and resolve that comment. The AI working on your frontend UI won't be bogged down by data-layer architecture changes. Your steering is precise and targeted.
2. Radical Efficiency & Auditability
Updating the Memory Tree is significantly cheaper than updating a prompt because you change exactly one node, not every future chat thread. Furthermore, because the tree maintains a history, your AI’s “brain” becomes entirely auditable. You can see exactly when a constraint changed and why.
A common fear with AI memory is “auto-extraction” — the idea that an AI might misunderstand a hypothetical conversation and permanently save a wrong fact.
Spiderbrain relies on a strict design principle: You ratify memory. Nothing is stored without your intent. The AI doesn’t automatically pull facts from your chats. If it discovers something worth remembering, it proposes a memory, and you confirm it. The same goes for comment-to-change: you write the comment, the AI interprets it, and you review the resolution before it’s locked in.
We need to stop treating AI context as something we build up and tear down with every single task. By moving our architectural constraints into a persistent, scoped Memory Tree and using a simple comment-to-change workflow to keep it updated we can finally stop onboarding our AI tools, and just start coding.
Have you experimented with persistent memory or MCP in your current development workflow? Let’s talk about it in the comments below!