Overview
After any meaningful task, run a short retrospective. Useful questions include:
- What did the agent attempt that did not contribute to the result?
- Which tool calls were repeated or avoidable?
- Which project fact had to be rediscovered?
- Which capability was available but not used?
- Which sequence could have been collapsed into one operation?
- Which failure should future runs stop retrying?
- Which successful method is likely to recur?
Convert only reusable answers into instructions. A good rule is short, specific enough to change behavior, and broad enough to apply again. A poor rule is a detailed narrative of one incident or a command that only applies to a file that will never be touched again.
Use separate places for local and global learning. A project-specific API failure belongs locally. A repeated tendency to skip documentation across unrelated integrations may belong globally. Promote a rule only after enough evidence shows that it is not a one-off.
Review the instruction set periodically. Merge overlapping rules, remove obsolete ones, and look directly for contradictions. The review should preserve high-value constraints while preventing the file from becoming an unfiltered history of every interaction.