CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

continuous-learning-v2

tessl i github:ysyecust/everything-claude-code --skill continuous-learning-v2

Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

53%

Overall

SKILL.md
Review
Evals

Continuous Learning v2 - Instinct-Based Architecture

An advanced learning system that turns your Claude Code sessions into reusable knowledge through atomic "instincts" - small learned behaviors with confidence scoring.

What's New in v2

Featurev1v2
ObservationStop hook (session end)PreToolUse/PostToolUse (100% reliable)
AnalysisMain contextBackground agent (Haiku)
GranularityFull skillsAtomic "instincts"
ConfidenceNone0.3-0.9 weighted
EvolutionDirect to skillInstincts → cluster → skill/command/agent
SharingNoneExport/import instincts

The Instinct Model

An instinct is a small learned behavior:

---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
---

# Prefer Functional Style

## Action
Use functional patterns over classes when appropriate.

## Evidence
- Observed 5 instances of functional pattern preference
- User corrected class-based approach to functional on 2025-01-15

Properties:

  • Atomic — one trigger, one action
  • Confidence-weighted — 0.3 = tentative, 0.9 = near certain
  • Domain-tagged — code-style, testing, git, debugging, workflow, etc.
  • Evidence-backed — tracks what observations created it

How It Works

Session Activity
      │
      │ Hooks capture prompts + tool use (100% reliable)
      ▼
┌─────────────────────────────────────────┐
│         observations.jsonl              │
│   (prompts, tool calls, outcomes)       │
└─────────────────────────────────────────┘
      │
      │ Observer agent reads (background, Haiku)
      ▼
┌─────────────────────────────────────────┐
│          PATTERN DETECTION              │
│   • User corrections → instinct         │
│   • Error resolutions → instinct        │
│   • Repeated workflows → instinct       │
└─────────────────────────────────────────┘
      │
      │ Creates/updates
      ▼
┌─────────────────────────────────────────┐
│         instincts/personal/             │
│   • prefer-functional.md (0.7)          │
│   • always-test-first.md (0.9)          │
│   • use-zod-validation.md (0.6)         │
└─────────────────────────────────────────┘
      │
      │ /evolve clusters
      ▼
┌─────────────────────────────────────────┐
│              evolved/                   │
│   • commands/new-feature.md             │
│   • skills/testing-workflow.md          │
│   • agents/refactor-specialist.md       │
└─────────────────────────────────────────┘

Quick Start

1. Enable Observation Hooks

Add to your ~/.claude/settings.json.

If installed as a plugin (recommended):

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh pre"
      }]
    }],
    "PostToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh post"
      }]
    }]
  }
}

If installed manually to ~/.claude/skills:

{
  "hooks": {
    "PreToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh pre"
      }]
    }],
    "PostToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh post"
      }]
    }]
  }
}

2. Initialize Directory Structure

mkdir -p ~/.claude/homunculus/{instincts/{personal,inherited},evolved/{agents,skills,commands}}
touch ~/.claude/homunculus/observations.jsonl

3. Use the Instinct Commands

/instinct-status     # Show learned instincts with confidence scores
/evolve              # Cluster related instincts into skills/commands
/instinct-export     # Export instincts for sharing
/instinct-import     # Import instincts from others

Commands

CommandDescription
/instinct-statusShow all learned instincts with confidence
/evolveCluster related instincts into skills/commands
/instinct-exportExport instincts for sharing
/instinct-import <file>Import instincts from others

Configuration

Edit config.json in this skill directory.

File Structure

~/.claude/homunculus/
├── identity.json           # Your profile, technical level
├── observations.jsonl      # Current session observations
├── observations.archive/   # Processed observations
├── instincts/
│   ├── personal/           # Auto-learned instincts
│   └── inherited/          # Imported from others
└── evolved/
    ├── agents/             # Generated specialist agents
    ├── skills/             # Generated skills
    └── commands/           # Generated commands

Confidence Scoring

ScoreMeaningBehavior
0.3TentativeSuggested but not enforced
0.5ModerateApplied when relevant
0.7StrongAuto-approved for application
0.9Near-certainCore behavior

Privacy

  • Observations stay local on your machine
  • Only instincts (patterns) can be exported
  • No actual code or conversation content is shared
  • You control what gets exported
Repository
github.com/ysyecust/everything-claude-code
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.