Core Principle: Transform your AGENTS.md
file from a static instruction set into a dynamic, self-updating knowledge base that grows with your project.
Why This Matters: Traditional documentation quickly becomes outdated as projects evolve. By instructing your AI agent to append discoveries, insights, and useful resources directly to AGENTS.md
, you create a centralised record of the project’s journey. This approach is particularly valuable for smaller projects where maintaining a separate wiki would be excessive overhead.
How to Implement: Add meta-instructions to your AGENTS.md
file that define how the agent should manage the document itself:
# Living Documentation
- This file serves as the project’s living documentation.
- As you work, if you discover useful information—such as links to
documentation, tutorials, or key insights about the code—append them
to a ‘Learnings’ section in this file.
- Important: Only ever append to this file. Do not modify or delete
the existing instructions I have provided.
What Gets Recorded: Instruct your agent to document:
Links to relevant API documentation or tutorials
Code patterns or conventions that emerge during development
Solutions to tricky problems encountered along the way
Performance insights or optimization discoveries
Integration quirks with third-party libraries
Key Guidelines:
Append-only rule: Prevent the agent from modifying existing instructions by explicitly stating it should only add new content
Structured sections: Create designated areas (like “Learnings” or “Resources”) where new information should be added
Timestamp entries: Consider having the agent date-stamp additions to track when insights were discovered
Review regularly: Periodically review accumulated learnings to identify patterns or consolidate related findings
This technique creates a collaborative feedback loop where the agent contributes to its own instruction set, making future work more efficient and preserving institutional knowledge that might otherwise be lost.
Super interesting!