How They Use AI  |  Newest

<< Home  |  Work

Rule-following improved from 85% to 98%

AreaWork
AI usedClaude Code
Sourcer/BuildWithClaude
Posted2026-11-09

The move

Create a local tool that parses your AI session logs to extract correction patterns and inject them back into the AI's system instructions.

Steps

  1. Install the learn-from-lessons tool via pipx.
  2. Run the scan command to parse your local Claude Code session logs.
  3. Review the generated lessons to identify recurring AI errors.
  4. Configure your CLAUDE.md or MCP server to load these lessons as system instructions.

Prompt for your AI

Analyze my previous session logs in [path/to/logs] to identify recurring patterns where I had to correct your output. Create a list of 'lessons' that summarize these mistakes and provide specific rules to prevent them in future sessions.

What happened

The user noticed Claude Code repeatedly made the same three mistakes across 1,000 sessions. They built a Python tool to scan local session logs, identify where they corrected the AI, and convert those moments into actionable lessons. These lessons were then injected into the AI's context, significantly increasing its accuracy.

Watch out

Ensure your session logs do not contain sensitive credentials or proprietary code before processing them. The tool requires local storage access to read your session history.

Give it to your agent

Read https://howtheyuse.ai/p/rule-following-improved-from-85-to-98.md and help me do this.

Sources



Last updated November 26, 2026.