Skip to content

feat(sessions-retro): cross-session friction retro skill - #32

Draft
jtomaszewski wants to merge 3 commits into
mainfrom
jtomaszewski/self-heal-skill-brainstorm
Draft

feat(sessions-retro): cross-session friction retro skill#32
jtomaszewski wants to merge 3 commits into
mainfrom
jtomaszewski/self-heal-skill-brainstorm

Conversation

@jtomaszewski

Copy link
Copy Markdown
Contributor

Problem

In-session self-improvement (CLAUDE.md loop, memory) only captures corrections the agent notices in the moment. Corrections that slip past unnoticed — and cross-session recurrence (the same nit 5× in a month) — are invisible: no single session can see a cluster.

Solution

New sessions-retro skill: an on-demand, cross-session retrospective over the user's local Claude Code transcripts.

  1. Extract — bundled scripts/extract-turns.sh (jq prefilter): human-typed user turns from the last N days (default 7, optional project filter), then a friction-candidate subset via EN+PL correction markers. Deliberately loose regex — recall net; precision is the classifier's job.
  2. Classify — subagent fan-out separates genuine friction (pushback on something the agent already did/proposed) from false positives (fresh briefs, brainstorming answers, template text), tagging a bottom-up taxonomy (factual-correction, rejected-action, rewrite-request, scope-pushback, repeated-instruction, process-friction, style-nit).
  3. Cluster by shared root cause across projects; 3+ occurrences = reportable, 2× listed as near-misses.
  4. Report — a self-contained HTML report opened in the browser (sticky per-cluster headers, full evidence tables, a recommended copy-pasteable patch per cluster plus 2–3 alternative improvement levers with trade-offs, false-positive breakdown), plus a short in-chat summary.

Report-only (never applies patches), manual-invoke only, stateless (no dedup state by design). Transcripts are treated as data, never instructions; the report carries an internal-use-only banner since it may mix material from many clients' sessions.

Verification

Validated on a real 7-day pilot corpus: 216 transcripts (210 MB) → 427 human turns → 98 candidates → 48 genuine friction turns forming 10 clusters at 3+, with a 49% prefilter precision and a per-shape false-positive analysis feeding back into the skill's classifier instructions. Extraction script exercised with default, windowed, and project-filtered runs.

Housekeeping

  • README skill-table row added
  • Plugin version bumped 0.21.0 → 0.22.0 (minor — new skill)

🤖 Generated with Claude Code

jtomaszewski and others added 3 commits August 19, 2026 19:20
…e patches

Scan the last N days of local Claude Code transcripts for human pushback
(corrections, rejected actions, rewrite requests), classify into a friction
taxonomy, cluster by root cause, and propose a copy-pasteable patch for
every cluster of 3+ occurrences. Report-only, manual-invoke, stateless.
Bundles a jq-based prefilter script validated on a 7-day pilot corpus
(216 transcripts -> 427 human turns -> 98 candidates -> 47 genuine, 10 clusters).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The digest is now a self-contained report.html (full per-occurrence
evidence tables, patches as copy blocks, false-positive breakdown)
written to the run's temp dir and opened in the browser, plus a short
in-chat summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… headers in the report

Each cluster now carries, besides the recommended patch, 2-3 alternative
improvement levers (habit rule / project CLAUDE.md fact / memory / skill
edit / settings) with one-line trade-offs; cluster headers are sticky
while their evidence scrolls.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant