[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BFSHRN1DC6CX3SVHZGR9K3":3,"skill-same:01M7BFSHRN1DC6CX3SVHZGR9K3":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7BFSHRN1DC6CX3SVHZGR9K3","continuous-learning-v2",null,"Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills\u002Fcommands\u002Fagents. v2.1 adds project-scoped instincts to prevent cross-project contamination.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: continuous-learning-v2\ndescription: Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills\u002Fcommands\u002Fagents. v2.1 adds project-scoped instincts to prevent cross-project contamination.\norigin: ECC\nversion: 2.1.0\n---\n\n# Continuous Learning v2.1 - Instinct\n-Based Architecture\n\nAn advanced learning system that turns your Claude Code sessions into reusable knowledge through atomic \"instincts\" - small learned behaviors with confidence scoring.\n\n**v2.1** adds **project-scoped instincts** — React patterns stay in your React project, Python conventions stay in your Python project, and universal patterns (like \"always validate input\") are shared globally.\n\n## When to Activate\n\n- Setting up automatic learning from Claude Code sessions\n- Configuring instinct-based behavior extraction via hooks\n- Tuning confidence thresholds for learned behaviors\n- Reviewing, exporting, or importing instinct libraries\n- Evolving instincts into full skills, commands, or agents\n- Managing project-scoped vs global instincts\n- Promoting instincts from project to global scope\n\n## What's New in v2.1\n\n| Feature | v2.0 | v2.1 |\n|---------|------|------|\n| Storage | Global (`~\u002F.claude\u002Fhomunculus\u002F`) | Project-scoped (`${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002Fprojects\u002F\u003Chash>\u002F`) |\n| Scope | All instincts apply everywhere | Project-scoped + global |\n| Detection | None | git remote URL \u002F repo path |\n| Promotion | N\u002FA | Project → global when seen in 2+ projects |\n| Commands | 4 (status\u002Fevolve\u002Fexport\u002Fimport) | 6 (+promote\u002Fprojects) |\n| Cross-project | Contamination risk | Isolated by default |\n\n## What's New in v2 (vs v1)\n\n| Feature | v1 | v2 |\n|---------|----|----|\n| Observation | Stop hook (session end) | PreToolUse\u002FPostToolUse (100% reliable) |\n| Analysis | Main context | Background agent (Haiku) |\n| Granularity | Full skills | Atomic \"instincts\" |\n| Confidence | None | 0.3-0.9 weighted |\n| Evolution | Direct to skill | Instincts -> cluster -> skill\u002Fcommand\u002Fagent |\n| Sharing | None | Export\u002Fimport instincts |\n\n## The Instinct Model\n\nAn instinct is a small learned behavior:\n\n```yaml\n---\nid: prefer-functional-style\ntrigger: \"when writing new functions\"\nconfidence: 0.7\ndomain: \"code-style\"\nsource: \"session-observation\"\nscope: project\nproject_id: \"a1b2c3d4e5f6\"\nproject_name: \"my-react-app\"\n---\n\n# Prefer Functional Style\n\n## Action\nUse functional patterns over classes when appropriate.\n\n## Evidence\n- Observed 5 instances of functional pattern preference\n- User corrected class-based approach to functional on 2025-01-15\n```\n\n**Properties:**\n- **Atomic** -- one trigger, one action\n- **Confidence-weighted** -- 0.3 = tentative, 0.9 = near certain\n- **Domain-tagged** -- code-style, testing, git, debugging, workflow, etc.\n- **Evidence-backed** -- tracks what observations created it\n- **Scope-aware** -- `project` (default) or `global`\n\n## How It Works\n\n```\nSession Activity (in a git repo)\n      |\n      | Hooks capture prompts + tool use (100% reliable)\n      | + detect project context (git remote \u002F repo path)\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Cproject-hash>\u002Fobservations.jsonl  |\n|   (prompts, tool calls, outcomes, project)   |\n+---------------------------------------------+\n      |\n      | Observer agent reads (background, Haiku)\n      v\n+---------------------------------------------+\n|          PATTERN DETECTION                   |\n|   * User corrections -> instinct             |\n|   * Error resolutions -> instinct            |\n|   * Repeated workflows -> instinct           |\n|   * Scope decision: project or global?       |\n+---------------------------------------------+\n      |\n      | Creates\u002Fupdates\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Cproject-hash>\u002Finstincts\u002Fpersonal\u002F |\n|   * prefer-functional.yaml (0.7) [project]   |\n|   * use-react-hooks.yaml (0.9) [project]     |\n+---------------------------------------------+\n|  instincts\u002Fpersonal\u002F  (GLOBAL)               |\n|   * always-validate-input.yaml (0.85) [global]|\n|   * grep-before-edit.yaml (0.6) [global]     |\n+---------------------------------------------+\n      |\n      | \u002Fevolve clusters + \u002Fpromote\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Chash>\u002Fevolved\u002F (project-scoped)   |\n|  evolved\u002F (global)                           |\n|   * commands\u002Fnew-feature.md                  |\n|   * skills\u002Ftesting-workflow.md               |\n|   * agents\u002Frefactor-specialist.md            |\n+---------------------------------------------+\n```\n\n## Project Detection\n\nThe system automatically detects your current project:\n\n1. **`CLAUDE_PROJECT_DIR` env var** (highest priority)\n2. **`git remote get-url origin`** -- hashed to create a portable project ID (same repo on different machines gets the same ID)\n3. **`git rev-parse --show-toplevel`** -- fallback using repo path (machine-specific)\n4. **Global fallback** -- if no project is detected, instincts go to global scope\n\nEach project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file at `${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002Fprojects.json` maps IDs to human-readable names.\n\n### Data Directory\n\nContinuous-learning-v2 stores observer data outside `~\u002F.claude` so Claude Code's sensitive-path guard does not block background instinct writes:\n\n1. `CLV2_HOMUNCULUS_DIR` when set to an absolute path\n2. `$XDG_DATA_HOME\u002Fecc-homunculus`\n3. `$HOME\u002F.local\u002Fshare\u002Fecc-homunculus`\n\nExisting users with data at `~\u002F.claude\u002Fhomunculus` can migrate once:\n\n```bash\nbash skills\u002Fcontinuous-learning-v2\u002Fscripts\u002Fmigrate-homunculus.sh\n```\n\n## Quick Start\n\n### 1. Enable Observation Hooks\n\n**If installed as a plugin** (recommended):\n\nNo extra `settings.json` hook block is required. Claude Code v2.1+ auto-loads the plugin `hooks\u002Fhooks.json`, and `observe.sh` is already registered there.\n\nIf you previously copied `observe.sh` into `~\u002F.claude\u002Fsettings.json`, remove that duplicate `PreToolUse` \u002F `PostToolUse` block. Duplicating the plugin hook causes double execution and `${CLAUDE_PLUGIN_ROOT}` resolution errors because that variable is only available inside plugin-managed `hooks\u002Fhooks.json` entries.\n\n**If installed manually** to `~\u002F.claude\u002Fskills`, add this to your `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [{\n      \"matcher\": \"*\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \"~\u002F.claude\u002Fskills\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh\"\n      }]\n    }],\n    \"PostToolUse\": [{\n      \"matcher\": \"*\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \"~\u002F.claude\u002Fskills\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh\"\n      }]\n    }]\n  }\n}\n```\n\n### 2. Initialize Directory Structure\n\nThe system creates directories automatically on first use, but you can also create them manually:\n\n```bash\n# Global directories\nmkdir -p \"${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fecc-homunculus\"\u002F{instincts\u002F{personal,inherited},evolved\u002F{agents,skills,commands},projects}\n\n# Project directories are auto-created when the hook first runs in a git repo\n```\n\n### 3. Use the Instinct Commands\n\n```bash\n\u002Finstinct-status     # Show learned instincts (project + global)\n\u002Fevolve              # Cluster related instincts into skills\u002Fcommands\n\u002Finstinct-export     # Export instincts to file\n\u002Finstinct-import     # Import instincts from others\n\u002Fpromote             # Promote project instincts to global scope\n\u002Fprojects            # List all known projects and their instinct counts\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `\u002Finstinct-status` | Show all instincts (project-scoped + global) with confidence |\n| `\u002Fevolve` | Cluster related instincts into skills\u002Fcommands, suggest promotions |\n| `\u002Finstinct-export` | Export instincts (filterable by scope\u002Fdomain) |\n| `\u002Finstinct-import \u003Cfile>` | Import instincts with scope control |\n| `\u002Fpromote [id]` | Promote project instincts to global scope |\n| `\u002Fprojects` | List all known projects and their instinct counts |\n\n## Configuration\n\nEdit `config.json` to control the background observer:\n\n```json\n{\n  \"version\": \"2.1\",\n  \"observer\": {\n    \"enabled\": false,\n    \"run_interval_minutes\": 5,\n    \"min_observations_to_analyze\": 20\n  }\n}\n```\n\n| Key | Default | Description |\n|-----|---------|-------------|\n| `observer.enabled` | `false` | Enable the background observer agent |\n| `observer.run_interval_minutes` | `5` | How often the observer analyzes observations |\n| `observer.min_observations_to_analyze` | `20` | Minimum observations before analysis runs |\n\nOther behavior (observation capture, instinct thresholds, project scoping, promotion criteria) is configured via code defaults in `instinct-cli.py` and `observe.sh`.\n\n## File Structure\n\n```\n${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002F\n+-- identity.json           # Your profile, technical level\n+-- projects.json           # Registry: project hash -> name\u002Fpath\u002Fremote\n+-- observations.jsonl      # Global observations (fallback)\n+-- instincts\u002F\n|   +-- personal\u002F           # Global auto-learned instincts\n|   +-- inherited\u002F          # Global imported instincts\n+-- evolved\u002F\n|   +-- agents\u002F             # Global generated agents\n|   +-- skills\u002F             # Global generated skills\n|   +-- commands\u002F           # Global generated commands\n+-- projects\u002F\n    +-- a1b2c3d4e5f6\u002F       # Project hash (from git remote URL)\n    |   +-- project.json    # Per-project metadata mirror (id\u002Fname\u002Froot\u002Fremote)\n    |   +-- observations.jsonl\n    |   +-- observations.archive\u002F\n    |   +-- instincts\u002F\n    |   |   +-- personal\u002F   # Project-specific auto-learned\n    |   |   +-- inherited\u002F  # Project-specific imported\n    |   +-- evolved\u002F\n    |       +-- skills\u002F\n    |       +-- commands\u002F\n    |       +-- agents\u002F\n    +-- f6e5d4c3b2a1\u002F       # Another project\n        +-- ...\n```\n\n## Scope Decision Guide\n\n| Pattern Type | Scope | Examples |\n|-------------|-------|---------|\n| Language\u002Fframework conventions | **project** | \"Use React hooks\", \"Follow Django REST patterns\" |\n| File structure preferences | **project** | \"Tests in `__tests__`\u002F\", \"Components in src\u002Fcomponents\u002F\" |\n| Code style | **project** | \"Use functional style\", \"Prefer dataclasses\" |\n| Error handling strategies | **project** | \"Use Result type for errors\" |\n| Security practices | **global** | \"Validate user input\", \"Sanitize SQL\" |\n| General best practices | **global** | \"Write tests first\", \"Always handle errors\" |\n| Tool workflow preferences | **global** | \"Grep before Edit\", \"Read before Write\" |\n| Git practices | **global** | \"Conventional commits\", \"Small focused commits\" |\n\n## Instinct Promotion (Project -> Global)\n\nWhen the same instinct appears in multiple projects with high confidence, it's a candidate for promotion to global scope.\n\n**Auto-promotion criteria:**\n- Same instinct ID in 2+ projects\n- Average confidence >= 0.8\n\n**How to promote:**\n\n```bash\n# Promote a specific instinct\npython3 instinct-cli.py promote prefer-explicit-errors\n\n# Auto-promote all qualifying instincts\npython3 instinct-cli.py promote\n\n# Preview without changes\npython3 instinct-cli.py promote --dry-run\n```\n\nThe `\u002Fevolve` command also suggests promotion candidates.\n\n## Confidence Scoring\n\nConfidence evolves over time:\n\n| Score | Meaning | Behavior |\n|-------|---------|----------|\n| 0.3 | Tentative | Suggested but not enforced |\n| 0.5 | Moderate | Applied when relevant |\n| 0.7 | Strong | Auto-approved for application |\n| 0.9 | Near-certain | Core behavior |\n\n**Confidence increases** when:\n- Pattern is repeatedly observed\n- User doesn't correct the suggested behavior\n- Similar instincts from other sources agree\n\n**Confidence decreases** when:\n- User explicitly corrects the behavior\n- Pattern isn't observed for extended periods\n- Contradicting evidence appears\n\n## Why Hooks vs Skills for Observation?\n\n> \"v1 relied on skills to observe. Skills are probabilistic -- they fire ~50-80% of the time based on Claude's judgment.\"\n\nHooks fire **100% of the time**, deterministically. This means:\n- Every tool call is observed\n- No patterns are missed\n- Learning is comprehensive\n\n## Backward Compatibility\n\nv2.1 is fully compatible with v2.0 and v1:\n- Existing global instincts can be migrated from `~\u002F.claude\u002Fhomunculus\u002Finstincts\u002F` with `scripts\u002Fmigrate-homunculus.sh`\n- Existing `~\u002F.claude\u002Fskills\u002Flearned\u002F` skills from v1 still work\n- Stop hook still runs (but now also feeds into v2)\n- Gradual migration: run both in parallel\n\n## Privacy\n\n- Observations stay **local** on your machine\n- Project-scoped instincts are isolated per project\n- Only **instincts** (patterns) can be exported — not raw observations\n- No actual code or conversation content is shared\n- You control what gets exported and promoted\n\n## Related\n\n- [ECC-Tools GitHub App](https:\u002F\u002Fgithub.com\u002Fapps\u002Fecc-tools) - Generate instincts from repo history\n- Homunculus - Community project that inspired the v2 instinct-based architecture (atomic observations, confidence scoring, instinct evolution pipeline)\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) - Continuous learning section\n\n---\n\n*Instinct-based learning: teaching Claude your patterns, one project at a time.*\n","# Continuous Learning v2.1 - Instinct\n-Based Architecture\n\nAn advanced learning system that turns your Claude Code sessions into reusable knowledge through atomic \"instincts\" - small learned behaviors with confidence scoring.\n\n**v2.1** adds **project-scoped instincts** — React patterns stay in your React project, Python conventions stay in your Python project, and universal patterns (like \"always validate input\") are shared globally.\n\n## When to Activate\n\n- Setting up automatic learning from Claude Code sessions\n- Configuring instinct-based behavior extraction via hooks\n- Tuning confidence thresholds for learned behaviors\n- Reviewing, exporting, or importing instinct libraries\n- Evolving instincts into full skills, commands, or agents\n- Managing project-scoped vs global instincts\n- Promoting instincts from project to global scope\n\n## What's New in v2.1\n\n| Feature | v2.0 | v2.1 |\n|---------|------|------|\n| Storage | Global (`~\u002F.claude\u002Fhomunculus\u002F`) | Project-scoped (`${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002Fprojects\u002F\u003Chash>\u002F`) |\n| Scope | All instincts apply everywhere | Project-scoped + global |\n| Detection | None | git remote URL \u002F repo path |\n| Promotion | N\u002FA | Project → global when seen in 2+ projects |\n| Commands | 4 (status\u002Fevolve\u002Fexport\u002Fimport) | 6 (+promote\u002Fprojects) |\n| Cross-project | Contamination risk | Isolated by default |\n\n## What's New in v2 (vs v1)\n\n| Feature | v1 | v2 |\n|---------|----|----|\n| Observation | Stop hook (session end) | PreToolUse\u002FPostToolUse (100% reliable) |\n| Analysis | Main context | Background agent (Haiku) |\n| Granularity | Full skills | Atomic \"instincts\" |\n| Confidence | None | 0.3-0.9 weighted |\n| Evolution | Direct to skill | Instincts -> cluster -> skill\u002Fcommand\u002Fagent |\n| Sharing | None | Export\u002Fimport instincts |\n\n## The Instinct Model\n\nAn instinct is a small learned behavior:\n\n```yaml\n---\nid: prefer-functional-style\ntrigger: \"when writing new functions\"\nconfidence: 0.7\ndomain: \"code-style\"\nsource: \"session-observation\"\nscope: project\nproject_id: \"a1b2c3d4e5f6\"\nproject_name: \"my-react-app\"\n---\n\n# Prefer Functional Style\n\n## Action\nUse functional patterns over classes when appropriate.\n\n## Evidence\n- Observed 5 instances of functional pattern preference\n- User corrected class-based approach to functional on 2025-01-15\n```\n\n**Properties:**\n- **Atomic** -- one trigger, one action\n- **Confidence-weighted** -- 0.3 = tentative, 0.9 = near certain\n- **Domain-tagged** -- code-style, testing, git, debugging, workflow, etc.\n- **Evidence-backed** -- tracks what observations created it\n- **Scope-aware** -- `project` (default) or `global`\n\n## How It Works\n\n```\nSession Activity (in a git repo)\n      |\n      | Hooks capture prompts + tool use (100% reliable)\n      | + detect project context (git remote \u002F repo path)\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Cproject-hash>\u002Fobservations.jsonl  |\n|   (prompts, tool calls, outcomes, project)   |\n+---------------------------------------------+\n      |\n      | Observer agent reads (background, Haiku)\n      v\n+---------------------------------------------+\n|          PATTERN DETECTION                   |\n|   * User corrections -> instinct             |\n|   * Error resolutions -> instinct            |\n|   * Repeated workflows -> instinct           |\n|   * Scope decision: project or global?       |\n+---------------------------------------------+\n      |\n      | Creates\u002Fupdates\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Cproject-hash>\u002Finstincts\u002Fpersonal\u002F |\n|   * prefer-functional.yaml (0.7) [project]   |\n|   * use-react-hooks.yaml (0.9) [project]     |\n+---------------------------------------------+\n|  instincts\u002Fpersonal\u002F  (GLOBAL)               |\n|   * always-validate-input.yaml (0.85) [global]|\n|   * grep-before-edit.yaml (0.6) [global]     |\n+---------------------------------------------+\n      |\n      | \u002Fevolve clusters + \u002Fpromote\n      v\n+---------------------------------------------+\n|  projects\u002F\u003Chash>\u002Fevolved\u002F (project-scoped)   |\n|  evolved\u002F (global)                           |\n|   * commands\u002Fnew-feature.md                  |\n|   * skills\u002Ftesting-workflow.md               |\n|   * agents\u002Frefactor-specialist.md            |\n+---------------------------------------------+\n```\n\n## Project Detection\n\nThe system automatically detects your current project:\n\n1. **`CLAUDE_PROJECT_DIR` env var** (highest priority)\n2. **`git remote get-url origin`** -- hashed to create a portable project ID (same repo on different machines gets the same ID)\n3. **`git rev-parse --show-toplevel`** -- fallback using repo path (machine-specific)\n4. **Global fallback** -- if no project is detected, instincts go to global scope\n\nEach project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file at `${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002Fprojects.json` maps IDs to human-readable names.\n\n### Data Directory\n\nContinuous-learning-v2 stores observer data outside `~\u002F.claude` so Claude Code's sensitive-path guard does not block background instinct writes:\n\n1. `CLV2_HOMUNCULUS_DIR` when set to an absolute path\n2. `$XDG_DATA_HOME\u002Fecc-homunculus`\n3. `$HOME\u002F.local\u002Fshare\u002Fecc-homunculus`\n\nExisting users with data at `~\u002F.claude\u002Fhomunculus` can migrate once:\n\n```bash\nbash skills\u002Fcontinuous-learning-v2\u002Fscripts\u002Fmigrate-homunculus.sh\n```\n\n## Quick Start\n\n### 1. Enable Observation Hooks\n\n**If installed as a plugin** (recommended):\n\nNo extra `settings.json` hook block is required. Claude Code v2.1+ auto-loads the plugin `hooks\u002Fhooks.json`, and `observe.sh` is already registered there.\n\nIf you previously copied `observe.sh` into `~\u002F.claude\u002Fsettings.json`, remove that duplicate `PreToolUse` \u002F `PostToolUse` block. Duplicating the plugin hook causes double execution and `${CLAUDE_PLUGIN_ROOT}` resolution errors because that variable is only available inside plugin-managed `hooks\u002Fhooks.json` entries.\n\n**If installed manually** to `~\u002F.claude\u002Fskills`, add this to your `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [{\n      \"matcher\": \"*\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \"~\u002F.claude\u002Fskills\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh\"\n      }]\n    }],\n    \"PostToolUse\": [{\n      \"matcher\": \"*\",\n      \"hooks\": [{\n        \"type\": \"command\",\n        \"command\": \"~\u002F.claude\u002Fskills\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh\"\n      }]\n    }]\n  }\n}\n```\n\n### 2. Initialize Directory Structure\n\nThe system creates directories automatically on first use, but you can also create them manually:\n\n```bash\n# Global directories\nmkdir -p \"${XDG_DATA_HOME:-$HOME\u002F.local\u002Fshare}\u002Fecc-homunculus\"\u002F{instincts\u002F{personal,inherited},evolved\u002F{agents,skills,commands},projects}\n\n# Project directories are auto-created when the hook first runs in a git repo\n```\n\n### 3. Use the Instinct Commands\n\n```bash\n\u002Finstinct-status     # Show learned instincts (project + global)\n\u002Fevolve              # Cluster related instincts into skills\u002Fcommands\n\u002Finstinct-export     # Export instincts to file\n\u002Finstinct-import     # Import instincts from others\n\u002Fpromote             # Promote project instincts to global scope\n\u002Fprojects            # List all known projects and their instinct counts\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `\u002Finstinct-status` | Show all instincts (project-scoped + global) with confidence |\n| `\u002Fevolve` | Cluster related instincts into skills\u002Fcommands, suggest promotions |\n| `\u002Finstinct-export` | Export instincts (filterable by scope\u002Fdomain) |\n| `\u002Finstinct-import \u003Cfile>` | Import instincts with scope control |\n| `\u002Fpromote [id]` | Promote project instincts to global scope |\n| `\u002Fprojects` | List all known projects and their instinct counts |\n\n## Configuration\n\nEdit `config.json` to control the background observer:\n\n```json\n{\n  \"version\": \"2.1\",\n  \"observer\": {\n    \"enabled\": false,\n    \"run_interval_minutes\": 5,\n    \"min_observations_to_analyze\": 20\n  }\n}\n```\n\n| Key | Default | Description |\n|-----|---------|-------------|\n| `observer.enabled` | `false` | Enable the background observer agent |\n| `observer.run_interval_minutes` | `5` | How often the observer analyzes observations |\n| `observer.min_observations_to_analyze` | `20` | Minimum observations before analysis runs |\n\nOther behavior (observation capture, instinct thresholds, project scoping, promotion criteria) is configured via code defaults in `instinct-cli.py` and `observe.sh`.\n\n## File Structure\n\n```\n${XDG_DATA_HOME:-~\u002F.local\u002Fshare}\u002Fecc-homunculus\u002F\n+-- identity.json           # Your profile, technical level\n+-- projects.json           # Registry: project hash -> name\u002Fpath\u002Fremote\n+-- observations.jsonl      # Global observations (fallback)\n+-- instincts\u002F\n|   +-- personal\u002F           # Global auto-learned instincts\n|   +-- inherited\u002F          # Global imported instincts\n+-- evolved\u002F\n|   +-- agents\u002F             # Global generated agents\n|   +-- skills\u002F             # Global generated skills\n|   +-- commands\u002F           # Global generated commands\n+-- projects\u002F\n    +-- a1b2c3d4e5f6\u002F       # Project hash (from git remote URL)\n    |   +-- project.json    # Per-project metadata mirror (id\u002Fname\u002Froot\u002Fremote)\n    |   +-- observations.jsonl\n    |   +-- observations.archive\u002F\n    |   +-- instincts\u002F\n    |   |   +-- personal\u002F   # Project-specific auto-learned\n    |   |   +-- inherited\u002F  # Project-specific imported\n    |   +-- evolved\u002F\n    |       +-- skills\u002F\n    |       +-- commands\u002F\n    |       +-- agents\u002F\n    +-- f6e5d4c3b2a1\u002F       # Another project\n        +-- ...\n```\n\n## Scope Decision Guide\n\n| Pattern Type | Scope | Examples |\n|-------------|-------|---------|\n| Language\u002Fframework conventions | **project** | \"Use React hooks\", \"Follow Django REST patterns\" |\n| File structure preferences | **project** | \"Tests in `__tests__`\u002F\", \"Components in src\u002Fcomponents\u002F\" |\n| Code style | **project** | \"Use functional style\", \"Prefer dataclasses\" |\n| Error handling strategies | **project** | \"Use Result type for errors\" |\n| Security practices | **global** | \"Validate user input\", \"Sanitize SQL\" |\n| General best practices | **global** | \"Write tests first\", \"Always handle errors\" |\n| Tool workflow preferences | **global** | \"Grep before Edit\", \"Read before Write\" |\n| Git practices | **global** | \"Conventional commits\", \"Small focused commits\" |\n\n## Instinct Promotion (Project -> Global)\n\nWhen the same instinct appears in multiple projects with high confidence, it's a candidate for promotion to global scope.\n\n**Auto-promotion criteria:**\n- Same instinct ID in 2+ projects\n- Average confidence >= 0.8\n\n**How to promote:**\n\n```bash\n# Promote a specific instinct\npython3 instinct-cli.py promote prefer-explicit-errors\n\n# Auto-promote all qualifying instincts\npython3 instinct-cli.py promote\n\n# Preview without changes\npython3 instinct-cli.py promote --dry-run\n```\n\nThe `\u002Fevolve` command also suggests promotion candidates.\n\n## Confidence Scoring\n\nConfidence evolves over time:\n\n| Score | Meaning | Behavior |\n|-------|---------|----------|\n| 0.3 | Tentative | Suggested but not enforced |\n| 0.5 | Moderate | Applied when relevant |\n| 0.7 | Strong | Auto-approved for application |\n| 0.9 | Near-certain | Core behavior |\n\n**Confidence increases** when:\n- Pattern is repeatedly observed\n- User doesn't correct the suggested behavior\n- Similar instincts from other sources agree\n\n**Confidence decreases** when:\n- User explicitly corrects the behavior\n- Pattern isn't observed for extended periods\n- Contradicting evidence appears\n\n## Why Hooks vs Skills for Observation?\n\n> \"v1 relied on skills to observe. Skills are probabilistic -- they fire ~50-80% of the time based on Claude's judgment.\"\n\nHooks fire **100% of the time**, deterministically. This means:\n- Every tool call is observed\n- No patterns are missed\n- Learning is comprehensive\n\n## Backward Compatibility\n\nv2.1 is fully compatible with v2.0 and v1:\n- Existing global instincts can be migrated from `~\u002F.claude\u002Fhomunculus\u002Finstincts\u002F` with `scripts\u002Fmigrate-homunculus.sh`\n- Existing `~\u002F.claude\u002Fskills\u002Flearned\u002F` skills from v1 still work\n- Stop hook still runs (but now also feeds into v2)\n- Gradual migration: run both in parallel\n\n## Privacy\n\n- Observations stay **local** on your machine\n- Project-scoped instincts are isolated per project\n- Only **instincts** (patterns) can be exported — not raw observations\n- No actual code or conversation content is shared\n- You control what gets exported and promoted\n\n## Related\n\n- [ECC-Tools GitHub App](https:\u002F\u002Fgithub.com\u002Fapps\u002Fecc-tools) - Generate instincts from repo history\n- Homunculus - Community project that inspired the v2 instinct-based architecture (atomic observations, confidence scoring, instinct evolution pipeline)\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) - Continuous learning section\n\n---\n\n*Instinct-based learning: teaching Claude your patterns, one project at a time.*\n",{"name":5,"origin":24,"version":25,"description":7},"ECC","2.1.0","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill continuous-learning-v2",{"tool":41,"command":42},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill continuous-learning-v2",{"tool":44,"command":45},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill continuous-learning-v2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002FSKILL.md",true,[49,55,61,65,69,73,77,81,85,89,93],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"agents\u002Fobserver-loop.sh","SCRIPT","脚本",10724,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fagents\u002Fobserver-loop.sh",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"agents\u002Fobserver.md","REFERENCE","参考文档",7504,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fagents\u002Fobserver.md",{"path":62,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":63,"sourceHtmlUrl":64},"agents\u002Fsession-guardian.sh",6392,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fagents\u002Fsession-guardian.sh",{"path":66,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":67,"sourceHtmlUrl":68},"agents\u002Fstart-observer.sh",7690,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fagents\u002Fstart-observer.sh",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"config.json",135,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fconfig.json",{"path":74,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":75,"sourceHtmlUrl":76},"hooks\u002Fobserve.sh",18468,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh",{"path":78,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Fdetect-project.sh",9494,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fscripts\u002Fdetect-project.sh",{"path":82,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Finstinct-cli.py",60923,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fscripts\u002Finstinct-cli.py",{"path":86,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Flib\u002Fhomunculus-dir.sh",1009,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fscripts\u002Flib\u002Fhomunculus-dir.sh",{"path":90,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":91,"sourceHtmlUrl":92},"scripts\u002Fmigrate-homunculus.sh",1785,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fscripts\u002Fmigrate-homunculus.sh",{"path":94,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Ftest_parse_instinct.py",34272,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fskills\u002Fcontinuous-learning-v2\u002Fscripts\u002Ftest_parse_instinct.py",[98,105,112,119,126,133],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]