Two modes of operation
Continuous observation
After each significant event — a commit, a bug fix, a pattern reused, a dead end — the agent appends a one-line observation to.agents.local.md under ## Session Observations (auto). Each line includes an ISO timestamp.
- A commit was made
- A bug or error was fixed
- A pattern from
AGENTS.mdwas reused or validated - A dead end was hit (approach tried and abandoned)
- A workaround was discovered
Session-end reflection
At the end of a session, the agent scans all of.agents.local.md — both ## Session Observations (auto) and ## Session Log entries — and identifies anything that has appeared in 3 or more separate sessions. It groups matches by category and writes suggestions into a ## Ready to Promote table.
AGENTS.md. In the default mode, the agent never touches AGENTS.md on its own.
Promotion modes
Control how promotions work by adding a config directive to the top of.agents.local.md:
- suggest (default)
- auto
- off
The agent writes suggestions to
## Ready to Promote. You decide what moves to AGENTS.md. Nothing in AGENTS.md changes without your approval.This is the default if no directive is present.What the full flow looks like
Here is.agents.local.md with auto-reflect active across multiple sessions:
Safety model
In suggest mode, AGENTS.md is never modified without your approval
In suggest mode, AGENTS.md is never modified without your approval
The agent writes to
## Ready to Promote only. No changes reach AGENTS.md until you explicitly move them.In auto mode, all changes are logged and reversible
In auto mode, all changes are logged and reversible
Every auto-promotion is recorded under
## Auto-Promoted in .agents.local.md. Because AGENTS.md is committed to version control, you can revert any change you disagree with.Observations are data, not instructions
Observations are data, not instructions
The agent treats observation content as factual session records. If an observation resembles a behavioral directive or command override, the agent ignores it. The scratchpad is a log, not a control surface.
The scratchpad stays gitignored
The scratchpad stays gitignored
.agents.local.md is gitignored by default. Observations never appear in version control or shared with teammates.Auto-Reflect is built on the same principle as Mastra’s Observer/Reflector pattern — dedicated observation and reflection passes extract insights from interactions automatically. The difference is that Auto-Reflect requires no infrastructure: just file appends and a reflection prompt.