affaan-m/ECC

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.

78Collecting
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-TW/skills/continuous-learning-v2"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn continuous-learning-v2's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: 進階學習系統,透過原子「本能」(帶信心評分的小型學習行為)將你的 Claude Code 工作階段轉化為可重用知識。

npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-TW/skills/continuous-learning-v2"
Check the pinned source

Best fit

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

Bring this context

  • A concrete task that matches the documented purpose of continuous-learning-v2.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned continuous-learning-v2 instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read continuous-learning-v2 through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

v2 的新功能

Review the “v2 的新功能” section in the pinned source before continuing.

SKILL.md · v2 的新功能
Review and apply the “v2 的新功能” source section.
02

本能模型

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

SKILL.md · 本能模型
yaml --- id: prefer-functional-style trigger: "when writing new functions" confidence: 0.7 domain: "code-style" source: "session-observation" ---
03

偏好函式風格

工作階段活動 │ │ Hooks 捕獲提示 + 工具使用(100% 可靠) ▼ ┌─────────────────────────────────────────┐ │ observations.jsonl │ │ (提示、工具呼叫、結果) │ └─────────────────────────────────────────┘ │ │ Observer agent 讀取(背景、Haiku) ▼ ┌─────────────────────────────────────────┐ │ 模式偵測 │ │ • 使用者修正 → 本能 │ │ • 錯誤解…

SKILL.md · 偏好函式風格
觀察到 5 次函式模式偏好使用者在 2025-01-15 將基於類別的方法修正為函式- 觀察到 5 次函式模式偏好 - 使用者在 2025-01-15 將基於類別的方法修正為函式
04

動作

Review the “動作” section in the pinned source before continuing.

SKILL.md · 動作
Review and apply the “動作” source section.
05

證據

屬性: - 原子性 — 一個觸發器,一個動作 - 信心加權 — 0.3 = 試探性,0.9 = 近乎確定 - 領域標記 — code-style、testing、git、debugging、workflow 等 - 證據支持 — 追蹤建立它的觀察

SKILL.md · 證據
觀察到 5 次函式模式偏好使用者在 2025-01-15 將基於類別的方法修正為函式原子性 — 一個觸發器,一個動作

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use continuous-learning-v2 to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned continuous-learning-v2 source to [task]. Pay particular attention to these source sections: “v2 的新功能”, “本能模型”, “偏好函式風格”, “動作”, “證據”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current continuous-learning-v2 result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “v2 的新功能” has been checked.

The source section “本能模型” has been checked.

The source section “偏好函式風格” has been checked.

The source section “動作” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does continuous-learning-v2 do?

進階學習系統,透過原子「本能」(帶信心評分的小型學習行為)將你的 Claude Code 工作階段轉化為可重用知識。

How do I start using continuous-learning-v2?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-TW/skills/continuous-learning-v2". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
78/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

78/100
Documentation28/30
Specificity15/25
Maintenance20/20
Trust signals15/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 2 min

持續學習 v2 - 基於本能的架構

進階學習系統,透過原子「本能」(帶信心評分的小型學習行為)將你的 Claude Code 工作階段轉化為可重用知識。

v2 的新功能

功能v1v2
觀察Stop hook(工作階段結束)PreToolUse/PostToolUse(100% 可靠)
分析主要上下文背景 agent(Haiku)
粒度完整技能原子「本能」
信心0.3-0.9 加權
演化直接到技能本能 → 聚類 → 技能/指令/agent
分享匯出/匯入本能

本能模型

本能是一個小型學習行為:

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

# 偏好函式風格

## 動作
適當時使用函式模式而非類別。

## 證據
- 觀察到 5 次函式模式偏好
- 使用者在 2025-01-15 將基於類別的方法修正為函式

屬性:

  • 原子性 — 一個觸發器,一個動作
  • 信心加權 — 0.3 = 試探性,0.9 = 近乎確定
  • 領域標記 — code-style、testing、git、debugging、workflow 等
  • 證據支持 — 追蹤建立它的觀察

運作方式

工作階段活動
      │
      │ Hooks 捕獲提示 + 工具使用(100% 可靠)
      ▼
┌─────────────────────────────────────────┐
│         observations.jsonl              │
│   (提示、工具呼叫、結果)               │
└─────────────────────────────────────────┘
      │
      │ Observer agent 讀取(背景、Haiku)
      ▼
┌─────────────────────────────────────────┐
│          模式偵測                        │
│   • 使用者修正 → 本能                   │
│   • 錯誤解決 → 本能                     │
│   • 重複工作流程 → 本能                 │
└─────────────────────────────────────────┘
      │
      │ 建立/更新
      ▼
┌─────────────────────────────────────────┐
│         instincts/personal/             │
│   • prefer-functional.md (0.7)          │
│   • always-test-first.md (0.9)          │
│   • use-zod-validation.md (0.6)         │
└─────────────────────────────────────────┘
      │
      │ /evolve 聚類
      ▼
┌─────────────────────────────────────────┐
│              evolved/                   │
│   • commands/new-feature.md             │
│   • skills/testing-workflow.md          │
│   • agents/refactor-specialist.md       │
└─────────────────────────────────────────┘

快速開始

1. 啟用觀察 Hooks

如果作為外掛安裝(建議):

不需要在 ~/.claude/settings.json 中額外加入 hook。Claude Code v2.1+ 會自動載入外掛的 hooks/hooks.json,其中已經註冊了 observe.sh

如果你之前把 observe.sh 複製到 ~/.claude/settings.json,請移除重複的 PreToolUse / PostToolUse 區塊。重複註冊會造成重複執行,並觸發 ${CLAUDE_PLUGIN_ROOT} 解析錯誤;這個變數只會在外掛自己的 hooks/hooks.json 中展開。

如果手動安裝到 ~/.claude/skills,新增到你的 ~/.claude/settings.json

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

2. 初始化目錄結構

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

3. 執行 Observer Agent(可選)

觀察者可以在背景執行並分析觀察:

# 啟動背景觀察者
~/.claude/skills/continuous-learning-v2/agents/start-observer.sh

指令

指令描述
/instinct-status顯示所有學習本能及其信心
/evolve將相關本能聚類為技能/指令
/instinct-export匯出本能以分享
/instinct-import <file>從他人匯入本能

設定

編輯 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/"
  }
}

檔案結構

~/.claude/homunculus/
├── identity.json           # 你的個人資料、技術水平
├── observations.jsonl      # 當前工作階段觀察
├── observations.archive/   # 已處理觀察
├── instincts/
│   ├── personal/           # 自動學習本能
│   └── inherited/          # 從他人匯入
└── evolved/
    ├── agents/             # 產生的專業 agents
    ├── skills/             # 產生的技能
    └── commands/           # 產生的指令

與 Skill Creator 整合

當你使用 Skill Creator GitHub App 時,它現在產生兩者

  • 傳統 SKILL.md 檔案(用於向後相容)
  • 本能集合(用於 v2 學習系統)

從倉庫分析的本能有 source: "repo-analysis" 並包含來源倉庫 URL。

信心評分

信心隨時間演化:

分數意義行為
0.3試探性建議但不強制
0.5中等相關時應用
0.7強烈自動批准應用
0.9近乎確定核心行為

信心增加當:

  • 重複觀察到模式
  • 使用者不修正建議行為
  • 來自其他來源的類似本能同意

信心減少當:

  • 使用者明確修正行為
  • 長期未觀察到模式
  • 出現矛盾證據

為何 Hooks vs Skills 用於觀察?

"v1 依賴技能進行觀察。技能是機率性的——它們根據 Claude 的判斷觸發約 50-80% 的時間。"

Hooks 100% 的時間確定性地觸發。這意味著:

  • 每個工具呼叫都被觀察
  • 無模式被遺漏
  • 學習是全面的

向後相容性

v2 完全相容 v1:

  • 現有 ~/.claude/skills/learned/ 技能仍可運作
  • Stop hook 仍執行(但現在也餵入 v2)
  • 漸進遷移路徑:兩者並行執行

隱私

  • 觀察保持在你的機器本機
  • 只有本能(模式)可被匯出
  • 不會分享實際程式碼或對話內容
  • 你控制匯出內容

相關

  • Skill Creator - 從倉庫歷史產生本能
  • Homunculus - 啟發 v2 架構的社區專案(原子觀察、信心評分、本能演化管線)
  • Longform Guide - 持續學習章節

基於本能的學習:一次一個觀察,教導 Claude 你的模式。

Source repo
affaan-m/ECC
Skill path
docs/zh-TW/skills/continuous-learning-v2/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected