[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JCT5XGWRSABWNPN9PZ9ZXV":3,"skill-same:01M6JCT5XGWRSABWNPN9PZ9ZXV":111},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":46,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6JCT5XGWRSABWNPN9PZ9ZXV","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.","S3YED\u002Fappie-kit","S3YED","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62743867?v=4","01M6JBKBRRVP6KMS0VWZ27T3R6","01M6JBKBX0KG30284PW1DBYJT1",14,"MIT","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"learning","continuous learning","continuous learning v2","sessions","system","hooks","confidence scoring","scoring","project","commands","contamination","via","learning system","with","atomic","scoped","2026-11-10 10:12:30",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":39,"version":40,"description":7},"ECC","2.1.0","master","8ec37df6d71fb664ea19d32c079e7d3ff931a8e0","skills\u002Fecc\u002Fcontinuous-learning-v2",3,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit","https:\u002F\u002Fweblyfe.ai","https:\u002F\u002Fgithub.com\u002FS3YED","2026-08-27 01:54:02",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add S3YED\u002Fappie-kit --skill continuous-learning-v2",{"tool":55,"command":56},"bunx","bunx skills add S3YED\u002Fappie-kit --skill continuous-learning-v2",{"tool":58,"command":59},"pnpm","pnpm dlx skills add S3YED\u002Fappie-kit --skill continuous-learning-v2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002FSKILL.md",true,[63,69,75,79,83,87,91,95,99,103,107],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"agents\u002Fobserver-loop.sh","SCRIPT","脚本",10724,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fagents\u002Fobserver-loop.sh",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"agents\u002Fobserver.md","REFERENCE","参考文档",7504,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fagents\u002Fobserver.md",{"path":76,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":77,"sourceHtmlUrl":78},"agents\u002Fsession-guardian.sh",6392,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fagents\u002Fsession-guardian.sh",{"path":80,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":81,"sourceHtmlUrl":82},"agents\u002Fstart-observer.sh",7690,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fagents\u002Fstart-observer.sh",{"path":84,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":85,"sourceHtmlUrl":86},"config.json",135,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fconfig.json",{"path":88,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":89,"sourceHtmlUrl":90},"hooks\u002Fobserve.sh",18798,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh",{"path":92,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fdetect-project.sh",10470,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fscripts\u002Fdetect-project.sh",{"path":96,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Finstinct-cli.py",72822,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fscripts\u002Finstinct-cli.py",{"path":100,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Flib\u002Fhomunculus-dir.sh",1009,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fscripts\u002Flib\u002Fhomunculus-dir.sh",{"path":104,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fmigrate-homunculus.sh",1785,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fscripts\u002Fmigrate-homunculus.sh",{"path":108,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Ftest_parse_instinct.py",34272,"https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fecc\u002Fcontinuous-learning-v2\u002Fscripts\u002Ftest_parse_instinct.py",[112,148,182,208,239,264],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":129,"publishedAt":34},"01M6JFD4M6N4DSGC7TXEJ5R3J2","ai-music","AI music generation and audio tools: HeartMuLa lyrics-to-music generation, songwriting craft (+ Suno prompts), and audio spectrogram\u002Ffeature visualization.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fwethlete\u002Fai-music\u002FSKILL.md",[118,123,126],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000013","分析与可视化","SCENARIO","使用场景",{"categoryNo":124,"categoryName":125,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":127,"categoryName":128,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000023","Skill与智能体开发",[130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147],"music","ai music","humanizer","visualization","Tools","Audio","hermes","hermes agent","songwriting","suno","lyrics","prompts","heartmula","craft","generation","feature","ai music generation","music generation",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":162,"publishedAt":34},"01M6JFCZE4XNFQFMNZDHKHT5V5","agentic-webdesign-design-system-ingestion","Use v0 Design Systems 2.0, Bolt Design System Agents, or Lovable to generate production UI from a client's real design system components — not generic Tailwind. Use when building a client website where brand consistency matters.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-design-system-ingestion\u002FSKILL.md",[154,157],{"categoryNo":155,"categoryName":156,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":158,"categoryName":159,"taxonomyType":160,"taxonomyTypeDesc":161},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[163,164,165,22,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181],"design","agentic","design system","ingestion","webdesign","agentic webdesign design system ingestion","components","generate","design systems","website","ui","Tailwind","bolt","lovable","v0","design-system","wed","design system components","appie",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":190,"publishedAt":34},"01M6JFCVPX3913CFAS6QQJ33ZB","agentic-webdesign-agent-elements","Use 21st.dev Agent Elements — 25 shadcn\u002Fui components purpose-built for AI agent UIs. Tool cards (Bash, Edit, Search, Plan, Subagent, MCP), chat, input, streaming. Open source, shadcn-registry install, no runtime lock-in.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fweb-design\u002Fagentic-webdesign-agent-elements\u002FSKILL.md",[188,189],{"categoryNo":127,"categoryName":128,"taxonomyType":121,"taxonomyTypeDesc":122},{"categoryNo":158,"categoryName":159,"taxonomyType":160,"taxonomyTypeDesc":161},[164,191,167,192,193,194,169,195,196,197,198,199,200,201,202,203,204,205,206,207],"elements","agentic webdesign agent elements","MCP","ai agent","registry","search","streaming","open source","open","Bash","plan","subagent","edit","install","input","lock","source",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":218,"publishedAt":34},"01M6JFCQC7H65M9QJ6TRE71BS1","vercel-deployment","Deploy static sites and frontends to Vercel — handles both CLI and REST API paths, including the CLI token sanitization workaround.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fvercel-deployment\u002FSKILL.md",[214,217],{"categoryNo":215,"categoryName":216,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":127,"categoryName":128,"taxonomyType":121,"taxonomyTypeDesc":122},[219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238],"deployment","vercel deployment","vercel","macos","cli","linux","windows","deploy","vercel deploy","REST","api","site","deploy to vercel","token","rest api","host","sites","paths","sanitization","static site",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":243,"categories":244,"keywords":246,"publishedAt":34},"01M6JFCM4SMTXBM5A01BK2YQG1","software-quality-workflows","Umbrella workflow for TDD, debugging, code simplification, spikes, pre-commit review, and debugger-assisted investigation.","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Fsoftware-quality-workflows\u002FSKILL.md",[245],{"categoryNo":127,"categoryName":128,"taxonomyType":121,"taxonomyTypeDesc":122},[247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263],"workflows","quality","software","software quality workflows","review","tdd","workflow","commit","debugging","code","debugger","pre-commit","investigation","code simplification","user","simplification","for",{"skillNo":265,"name":266,"nameZh":6,"description":267,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":268,"categories":269,"keywords":277,"publishedAt":34},"01M6JFCGD0M6CEATY01W7YN6DB","react-component-refactoring","Safely refactor large React components into smaller, maintainable pieces using proven patterns","https:\u002F\u002Fgithub.com\u002FS3YED\u002Fappie-kit\u002Fblob\u002Fmaster\u002Fskills\u002Fsoftware-development\u002Freact-component-refactoring\u002FSKILL.md",[270,273,276],{"categoryNo":271,"categoryName":272,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":274,"categoryName":275,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":127,"categoryName":128,"taxonomyType":121,"taxonomyTypeDesc":122},[278,279,280,281,282,283,284,285,222,286,287,169,288,225,289,256,290,291,292,293],"react","component","refactoring","component refactoring","react component","react component refactoring","frontend","writing","safe","typescript","react components","modular","refactor","simplify","patterns","test-driven-development"]