Step 4 of the improvement loop: once reading transcripts by hand gets tedious, automate it. The agent reads its own session, finds every backtrack, and tells you what to add or fix in the repo (docs, AGENTS.md, build warnings, stale commands) so the next run goes smoother. The output compounds: each fix makes the codebase teach the next agent.
Prompt
Analyze the previous session transcript. Find all places where the agent went in a wrong direction only to later figure out the correct one.
For each friction point, recommend what I could have added or changed in the repo to have prevented it. Present as HTML.
Related
- Agent-Friendly Codebase — the full five-step improvement loop