session-reflection
Structured session analysis and project instruction refinement using a five-type intervention taxonomy (Correction, Repetition, Role Redirect, Frustration Escalation, Workaround) with severity scoring to categorize process gaps. Refines project instructions (CLAUDE.md, AGENTS.md, .team/coordinator-instructions.md) with structural (not advisory) language, maintains WORKING_STATE.md for crash recovery (read-first-after-any- interruption protocol), and implements a self-reminder protocol (re-read constraints every 5-10 messages to prevent role drift). Includes advisory- to-structural promotion pattern for recurring gaps. Activate after milestones, repeated user corrections, session restarts, crash recovery, every 5 completed tasks, or on user request. Triggers on: "reflect on this session", "why do I keep correcting you", "update project instructions", "update working state", "session retrospective", "crash recovery", "context compaction", "role drift", "I keep telling you the same thing", "analyze my corrections". Also relevant when the agent notices repeated corrections, needs to resume after compaction, or wants to prevent known failure modes from recurring.
NPX Install
npx skill4agent add jwilger/agent-skills session-reflectionTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Session Reflection
Purpose
Practices
Reflection Triggers
Analyze Session History
- Correction: Agent did the wrong thing (instruction gap)
- Repetition: Agent was told the same thing again (emphasis gap)
- Role Redirect: Agent stepped outside its role (boundary gap)
- Frustration Escalation: User became more forceful (decay problem)
- Workaround: User did it themselves (skill gap)
references/analysis-framework.mdGenerate or Refine Project Instructions
- CLAUDE.md — Session management (startup procedure, compaction recovery, state tracking), harness-specific configuration
- AGENTS.md — General project rules, dos/don'ts, coding conventions, workflow configuration
- .team/coordinator-instructions.md — Coordinator/pipeline-controller role distinctions, build pre-flight gates, spawn discipline, domain review checklists
references/system-prompt-patterns.mdreferences/launcher-templates.mdSelf-Reminder Protocol
Working State Persistence
.factory/WORKING_STATE.mdreferences/working-state-schema.md- Update on task start, phase change, decision made, blocker encountered
- Overwrite with current state (not append)
- Read FIRST after any interruption
- Guess state from memory after a compaction or restart
- Use as a journal -- keep it concise and current
- Skip updates because "nothing important changed"
Post-Session Learning Loop
Enforcement Note
Verification
- Reflection performed at every trigger point (milestone, repeated correction, restart)
- User interventions categorized using the five-type taxonomy
- Project instructions refined with structural (not just advisory) language
- Directives routed to correct file (CLAUDE.md / AGENTS.md / coordinator-instructions.md)
- Self-reminder protocol followed (state re-read every 5-10 messages)
- WORKING_STATE.md current and accurate
- State re-read after every context compaction (not guessed)
Dependencies
- memory-protocol: Persistent storage for session learnings and working state
- agent-coordination: Coordination patterns referenced in instruction generation
- pipeline: Pipeline controller benefits from self-reminder and crash recovery
- ensemble-team: Team retrospectives feed into session reflection analysis
npx skills add jwilger/agent-skills --skill memory-protocol