Self Improving Claude Code Sessions
原始來源與檔名:2026-08-11T094455+0800-Self Improving Claude Code Sessions.md
SOURCE | 資訊源評估
- 作者:Alex Dunlop
- 來源:Medium
- 核心主題:Claude Code, Workflow Optimization, Self-Improving Feedback Loops
NAPKIN | 餐巾紙
餐巾紙公式
Strong AI Implementation + Weak Human Scoping = Broken Workflow Structured Workflow Pipeline + TSV Feedback Log = Continuous Process Improvement
一句話
By implementing a rigorous, multi-stage workflow pipeline for Claude (from scoping to self-verification) and embedding a structured, tab-separated feedback log to track and consolidate repeated corrections into rules, a developer can create continuously self-improving AI coding sessions.
餐巾紙草圖
+---------+ +---------+ +----------------+
| Scoping |--->| Kickoff |--->| Implementation |
| (Grill) | | (Plan) | | (Claude Code) |
+---------+ +---------+ +-------+--------+
|
+------------------+ +-------v--------+
| Self-Verify |<---------| Feedback Log |
| (MCP/CheckRules) | | (TSV: Date, |
+--------+---------+ | Tag, Mistake, |
| | Correction) |
+--------v---------+ +----------------+
| PR Review Stages |
| (Draft -> Ready) |
+------------------+
ROUND 1: SKELETON | 骨架掃描
- Survivorship bias analogy: reinforce what is weak, not just what is already strong.
- Pre-AI process: strong QA/review, weak scoping/kickoff.
- Post-AI process initially: Claude is so good at implementation that everything else (scoping, review) feels weak.
- The New Workflow: Scoping (grilling), Kickoff (planning), Implementation, Self-verification (MCPs + critical rules), Draft PR/Review, Ready PR/Review, Feedback/Learning.
- The Lunchtime Idea: Adding a formal
/feedbackand/learnmechanism. - Feedback Log format: TSV file tracking date, tag, mistake, correction. Once a tag hits 3 entries,
/learnproposes a durable rule. - Why not just use Claude’s built-in memory? Built-in memory is unpredictable. The manual feedback log allows intentional review and deliberate rule creation without bloating
CLAUDE.md. - Findings: Feedback log caught issues like over-commenting, bad dev server teardown, and MCP worktree errors.
ROUND 2: DISSECTION | 血肉解剖
- Workflow Pipeline Breakdown:
- Scoping & Kickoff: High-level grilling sessions to solidify plans, test plans, and smoke tests before any code is written.
- Implementation & Self-Verification: Claude does the coding, but must verify its work via MCPs (Model Context Protocol) and self-review against predefined critical rules.
- Review Stages: Draft PRs for initial checks, followed by a ‘Ready PR’ stage executing E2E tests, PR templates, and architecture reviews.
- The Feedback Mechanism:
- Instead of relying on auto-memory, the author uses a TSV file.
- Columns:
date,tag,mistake,correction. - The 3-strike rule: If a tag appears 3 times, it signals a pattern, triggering a process to encode a formal, durable rule (like a
check-rules.shgrep).
- Curation over Automation: The developer manually reviews this TSV log every 1-2 weeks. Only truly repeated and verified issues get promoted to the project’s permanent instructions (avoiding
CLAUDE.mdbloat for minor issues like Tailwind pixel values).
ROUND 3: SOUL | 靈魂提取
The essence of this approach is treating AI interactions not as one-off conversations, but as a system requiring intentional governance. By formalizing a feedback loop with a strict schema (the TSV log) and a threshold for rule creation (the 3-strike rule), the developer avoids the chaos of unpredictable AI memory and instead engineers a deterministic, self-improving development factory.
DEEP READ | 精讀指引
- “Because implementation is extremely strong everything feels weak in comparison.”
- “Durable corrections only - one per line, tab-separated… date -> tag -> mistake -> correction.”
- “A tag that reaches 3 lines is a pattern;
/learnthen proposes the smallest durable rule for it.” - Difference from built-in memory: “memory will pick something up on its own right, which I don’t always like. I want a log of the feedback, so I get to review it.”
- Guarding against bloat: “For the things I don’t want bloating the
CLAUDE.md, I add to critical paths which is picked up in self-review and pr-ready.”
