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.
다음 행동
/continuous-learning-v2기술 README 원문 보기
설치 옵션, 예시 코드, 세부 사용법을 영어 README 원문 그대로 확인합니다.
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
| Feature | v1 | v2 |
|---|---|---|
| Observation | Stop hook (session end) | PreToolUse/PostToolUse (100% reliable) |
| Analysis | Main context | Background agent (Haiku) |
| Granularity | Full skills | Atomic "instincts" |
| Confidence | None | 0.3-0.9 weighted |
| Evolution | Direct to skill | Instincts → cluster → skill/command/agent |
| Sharing | None | Export/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:
{
"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.jsonl3. Run the Observer Agent (Optional)
The observer can run in the background analyzing observations:
# Start background observer ~/.claude/skills/continuous-learning-v2/agents/start-observer.sh
Commands
| Command | Description |
|---|---|
/instinct-status | Show all learned instincts with confidence |
/evolve | Cluster related instincts into skills/commands |
/instinct-export | Export instincts for sharing |
/instinct-import <file> | Import instincts from others |
Configuration
Edit config.json:
{
"version": "2.0",
"observation": {
"enabled": true,
"store_path": "~/.claude/homunculus/observations.jsonl",
"max_file_size_mb": 10,
"archive_after_days": 7
},
"instincts": {
"personal_path": "~/.claude/homunculus/instincts/personal/",
"inherited_path": "~/.claude/homunculus/instincts/inherited/",
"min_confidence": 0.3,
"auto_approve_threshold": 0.7,
"confidence_decay_rate": 0.05
},
"observer": {
"enabled": true,
"model": "haiku",
"run_interval_minutes": 5,
"patterns_to_detect": [
"user_corrections",
"error_resolutions",
"repeated_workflows",
"tool_preferences"
]
},
"evolution": {
"cluster_threshold": 3,
"evolved_path": "~/.claude/homunculus/evolved/"
}
}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 commandsIntegration with Skill Creator
When you use the Skill Creator GitHub App, it now generates both:
- Traditional SKILL.md files (for backward compatibility)
- Instinct collections (for v2 learning system)
Instincts from repo analysis have source: "repo-analysis" and include the source repository URL.
Confidence Scoring
Confidence evolves over time:
| Score | Meaning | Behavior |
|---|---|---|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |
Confidence increases when:
- Pattern is repeatedly observed
- User doesn't correct the suggested behavior
- Similar instincts from other sources agree
Confidence decreases when:
- User explicitly corrects the behavior
- Pattern isn't observed for extended periods
- Contradicting evidence appears
Why Hooks vs Skills for Observation?
> "v1 relied on skills to observe. Skills are probabilistic—they fire ~50-80% of the time based on Claude's judgment."
Hooks fire 100% of the time, deterministically. This means:
- Every tool call is observed
- No patterns are missed
- Learning is comprehensive
Backward Compatibility
v2 is fully compatible with v1:
- Existing
~/.claude/skills/learned/skills still work - Stop hook still runs (but now also feeds into v2)
- Gradual migration path: run both in parallel
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
Agent Memory Integration
continuous-learning-v2의 instinct 시스템은 에이전트의 Self-Evolution Protocol과 상호보완적으로 동작한다.
관계도
Continuous Learning v2 (세션 관찰 기반)
└─ observations.jsonl → instincts/personal/ → evolved/
↕ 상호 참조
Agent Self-Evolution (작업 완료 기반)
└─ 에이전트 작업 결과 → ~/.claude/agent-memory/{agent-name}/차이점
| 차원 | Continuous Learning v2 | Agent Self-Evolution |
|---|---|---|
| 트리거 | 세션 관찰 (hooks) | 에이전트 작업 완료 |
| 저장소 | ~/.claude/homunculus/instincts/ | ~/.claude/agent-memory/ |
| 형태 | 원자적 instinct (trigger + action) | Learnings 리스트 (발견/개선) |
| 대상 | 전체 (범용) | 개별 에이전트 |
| 자동화 | Hook → Observer → Instinct (자동) | 에이전트 작업 완료 후 자체 기록 |
통합 사용 시나리오
- 세션 중: continuous-learning-v2 hooks가 관찰 데이터 수집
- 에이전트 작업 후: 에이전트가 Self-Evolution으로 자체 memory 업데이트
- 세션 종료:
/session-wrap이 양쪽 데이터를 종합하여 정리 - 다음 세션 시작:
/sync로 프로젝트 문서 동기화
Related
- Skill Creator - Generate instincts from repo history
- Homunculus - Inspiration for v2 architecture
- The Longform Guide - Continuous learning section
*Instinct-based learning: teaching Claude your patterns, one observation at a time.*
이것도 같이 보면 좋다
같은 업무 태그와 카테고리가 겹치는 항목부터 보여줍니다.

agents-sdk
Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.

beauty-reel
퍼스널컬러별 디즈니 공주 변신 릴스(9:16)를 Higgsfield + ffmpeg로 제작하는 파이프라인. "같은 얼굴 한 명이 봄웜/여쿨/가을웜/겨쿨 공주로 변신" 컨셉의 인스타 릴스를 만든다. 베이스 가상얼굴 1장 고정 → 4톤 실사 공주 생성 → Kling 무빙 클립 → Noto 다국어 자막 → 빛번짐 전환으로 합성. "퍼스널컬러 공주 릴스", "디즈니 공주 변신 영상", "퍼스널컬러 릴스 만들어", "공주 메이크업 릴스", "봄웜 여쿨 공주" 류 요청에 사용. "뷰티릴스", "뷰티 릴스 만들어", "메이크업 변신 영상", "비포애프터 릴스" 등 인물 일관성이 필요한 변신·비포애프터 뷰티 릴스 전반에 응용 가능(베이스 얼굴 고정 → 룩 N개 → 무빙 → 자막 → 합성 파이프라인 그대로). 발행(업로드)은 포함 안 함 — 컨펌 게이트.

build-system
프로젝트 빌드 시스템 자동 감지 및 실행 스킬