theory-grounding-reflector

Official

Learn from failures, improve accuracy, prevent repeats.

Authordoctorduke
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill systematically analyzes task failures to extract actionable lessons, preventing repeated mistakes and boosting AI accuracy by 10%. It uses a "Reflector" agent for root cause analysis and a "Curator" agent to merge insights without context bloat, ensuring continuous self-improvement.

Core Features & Use Cases

  • Root Cause Analysis: The Reflector agent identifies what went wrong and why, classifying errors and determining their underlying causes.
  • Actionable Lesson Formulation: Transforms failures into specific, actionable lessons that include prevention strategies and applicability to future tasks.
  • Context-Aware Merging: The Curator agent intelligently merges new lessons, avoiding duplicates and pruning low-value insights to prevent context collapse.
  • Use Case: If an AI task fails with a "KeyError" when accessing API data, the Reflector analyzes it to determine the root cause (e.g., "assumed nested structure without validation"). The Curator then stores this lesson, which is applied as context to future similar tasks, preventing the same mistake.

Quick Start

Example: When a task fails, the Reflector analyzes it

task = "Extract user emails from API response" attempt = "response = requests.get(api_url); emails = response.json()['users']['email']" outcome = {'status': 'exception', 'error': "KeyError: 'email'", 'success': False}

reflector = Reflector() lesson = reflector.analyze_failure(task, attempt, outcome)

curator = Curator() curator.merge_lesson(lesson) # Lesson stored as a delta item for future use

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: theory-grounding-reflector
Download link: https://github.com/doctorduke/seashells/archive/main.zip#theory-grounding-reflector

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository