Get the FREE Ultimate OpenClaw Setup Guide →

reflecting

npx machina-cli add skill wayne930242/Reflexive-Claude-Code/reflecting --openclaw
Files (1)
SKILL.md
6.8 KB

Reflecting

Overview

Reflecting IS converting experience into reusable knowledge.

Analyze what worked, what failed, and encode learnings into the appropriate component (law, skill, rule, or documentation).

Core principle: Experience without reflection is wasted. Capture it before context is lost.

Violating the letter of the rules is violating the spirit of the rules.

Task Initialization (MANDATORY)

Before ANY action, create task list using TaskCreate:

TaskCreate for EACH task below:
- Subject: "[reflecting] Task N: <action>"
- ActiveForm: "<doing action>"

Tasks:

  1. Analyze conversation
  2. Identify learnings
  3. Classify each learning
  4. Integrate into components
  5. Verify integration
  6. Generate summary

Announce: "Created 6 tasks. Starting execution..."

Execution rules:

  1. TaskUpdate status="in_progress" BEFORE starting each task
  2. TaskUpdate status="completed" ONLY after verification passes
  3. If task fails → stay in_progress, diagnose, retry
  4. NEVER skip to next task until current is completed
  5. At end, TaskList to confirm all completed

Task 1: Analyze Conversation

Goal: Review the conversation to identify significant events.

Look for:

  • Successes: Patterns that led to good outcomes
  • Failures: Errors, multiple attempts, dead ends
  • Discoveries: New insights about the project/domain
  • Repetitions: Actions performed multiple times

Document each event:

Event: [What happened]
Context: [When/where it occurred]
Outcome: [Success/failure/discovery]

Verification: Listed at least 3 significant events.

Task 2: Identify Learnings

Goal: Extract actionable learnings from events.

For each event, ask:

  • What would have prevented this failure?
  • What made this succeed that could be repeated?
  • What did we learn that applies beyond this task?

Learning format:

Learning:
  context: [When this applies]
  insight: [What was learned]
  evidence: [Specific event that taught this]

Verification: Each event has at least one learning.

Task 3: Classify Each Learning

Goal: Determine where each learning belongs.

Classification Decision Tree

Is it IMMUTABLE (must enforce every response)?
├─ Yes → LAW in CLAUDE.md
└─ No → Is it a CAPABILITY (how to do)?
    ├─ Yes → SKILL
    │   └─ Is it SHARED across multiple skills?
    │       ├─ Yes → Also extract to RULE
    │       └─ No → Keep in Skill only
    └─ No → Is it a CONVENTION (what to do)?
        ├─ Yes → RULE in .claude/rules/
        └─ No → DOCUMENTATION only

Classification Guide

TypeCharacteristicsExample
LawImmutable, every response, critical"Always display laws"
SkillHow to do something, reusable"How to write tests"
RuleConvention, path-scoped"API responses use { data, error }"
DocumentationReference, not actionable"Architecture overview"

Verification: Each learning has a classification.

Task 4: Integrate Into Components

Goal: Add learnings to the appropriate components.

For Laws

Invoke writing-claude-md skill or edit CLAUDE.md directly:

**Law N: [Name]** - [Specific, verifiable constraint]

For Skills

Invoke writing-skills skill to create/update skill.

For Rules

Invoke writing-rules skill to create rule file.

For Documentation

Add to appropriate references/ or docs/ location.

CRITICAL: Invoke the appropriate skill—don't create components directly.

Verification: All learnings integrated into components.

Task 5: Verify Integration

Goal: Confirm learnings are correctly integrated.

Check:

  • New laws appear in <law> block
  • New skills pass validation
  • New rules have correct paths: scope
  • Documentation is in correct location

Test:

  • Laws: Verify they display in responses
  • Skills: Verify they activate on triggers
  • Rules: Verify they inject on matching files

Verification: All integrated components work correctly.

Task 6: Generate Summary

Goal: Document what was captured.

Summary Format

## Reflection Summary

### Session Context
[What work was done]

### Learnings Captured

| Learning | Classification | Location |
|----------|----------------|----------|
| [insight] | law/skill/rule/doc | [path] |

### Components Modified
- Laws: [new/updated laws]
- Skills: [new/updated skills]
- Rules: [new/updated rules]

### Recommendations
- [Future improvements]

Verification: Summary accurately reflects all changes.

When to Reflect

Trigger reflection after:

  • Completing a significant feature
  • Resolving a difficult bug
  • Multiple failed attempts → eventual success
  • Discovering something unexpected
  • End of long working session

Don't wait for "later"—context fades quickly.

Red Flags - STOP

These thoughts mean you're rationalizing. STOP and reconsider:

  • "Nothing worth capturing"
  • "I'll remember this"
  • "Too small to document"
  • "Reflection is overhead"
  • "Skip classification, just document"

All of these mean: You're about to lose valuable learnings. Follow the process.

Common Rationalizations

ExcuseReality
"Nothing learned"Every session has learnings. Look harder.
"I'll remember"You won't. Context fades. Capture now.
"Too small"Small learnings compound. Capture them.
"Overhead"10 minutes now saves hours later.
"Skip classification"Wrong location = unfindable. Classify properly.

Flowchart: Reflection Process

digraph reflecting {
    rankdir=TB;

    start [label="Reflect on work", shape=doublecircle];
    analyze [label="Task 1: Analyze\nconversation", shape=box];
    identify [label="Task 2: Identify\nlearnings", shape=box];
    classify [label="Task 3: Classify\neach learning", shape=box];
    integrate [label="Task 4: Integrate into\ncomponents", shape=box];
    verify [label="Task 5: Verify\nintegration", shape=box];
    works [label="All\nworking?", shape=diamond];
    summary [label="Task 6: Generate\nsummary", shape=box];
    done [label="Reflection complete", shape=doublecircle];

    start -> analyze;
    analyze -> identify;
    identify -> classify;
    classify -> integrate;
    integrate -> verify;
    verify -> works;
    works -> summary [label="yes"];
    works -> integrate [label="no\nfix"];
    summary -> done;
}

References

  • Use writing-claude-md for laws
  • Use writing-skills for capabilities
  • Use writing-rules for conventions
  • Use agent-architect for classification help

Source

git clone https://github.com/wayne930242/Reflexive-Claude-Code/blob/main/plugins/rcc/skills/reflecting/SKILL.mdView on GitHub

Overview

Reflecting turns experiences from significant work into actionable learnings and reusable components. It emphasizes capturing what worked, what failed, and encoding insights into laws, skills, rules, or documentation before context is lost.

How This Skill Works

The process follows a task-driven workflow: initialize six tasks (analyze conversation, identify learnings, classify each learning, integrate into components, verify integration, generate summary), updating task statuses as work progresses. Learnings are classified via a decision tree into laws, skills, rules, or documentation and then integrated using the appropriate writer tools, with verification ensuring each learning is properly incorporated.

When to Use It

  • When finishing a significant project or task and you want to extract and codify learnings
  • When a user asks to reflect, summarize learnings, or says 'what did we learn' or 'capture learnings'
  • After resolving complex problems or discovering recurring patterns
  • When converting experience into reusable knowledge for future tasks
  • When preparing a retrospective or knowledge-base update

Quick Start

  1. Step 1: Run TaskCreate for EACH required task and announce: 'Created 6 tasks. Starting execution...'
  2. Step 2: For each task, update status to in_progress before starting; complete only after verification; retry on failure
  3. Step 3: For each identified learning, classify, integrate into the correct component (LAW/SKILL/RULE/DOC), and verify all learnings are captured

Best Practices

  • Document events with clear context, outcomes, and evidence
  • For each event, extract actionable learnings with context, insight, and evidence
  • Classify learnings first (LAW, SKILL, RULE, DOCUMENTATION) before integration
  • Verify integration by confirming each learning is reflected in the appropriate component
  • Summarize the overall reflection and maintain a running log to prevent context loss

Example Use Cases

  • After delivering a client project, extract lessons learned and update a lessons-learned document.
  • In a product sprint, analyze decision outcomes and encode repeatable patterns as new rules.
  • During AI model tuning, capture effective approaches and create a new skill for tuning strategies.
  • Following a data migration, document pitfalls and preventive steps as documentation entries.
  • In customer support, identify recurring questions and create knowledge-base entries to reduce repeat inquiries.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers