[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS2PGAPK10VS5GMAKSYZDA":3,"skill-same:01M7CS2PGAPK10VS5GMAKSYZDA":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":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CS2PGAPK10VS5GMAKSYZDA","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.","Henrique1601\u002FSkiilsToIAs","Henrique1601","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F92006691?v=4","01M7CRXVT0GVXVK80JT1GR687S","Henrique Bezerra Dos Santos","01M7CRXVTN5Y8TMWJ1MDSKCQ1T",0,"MIT","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\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.\nmetadata:\n  origin: 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,"version":24,"metadata":25,"description":7},"2.1.0",{"origin":26},"ECC","main","a73152352c0612252131e5cf84e91312a6cf17dc","ai-agents\u002Fcontinuous-learning-v2","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs","https:\u002F\u002Fgithub.com\u002FHenrique1601","https:\u002F\u002Fbezerraportifolio.netlify.app\u002F","Full Stack Developer | React, Next.js, TypeScript, Node.js & IA | Construindo produtos digitais e soluções SaaS","2026-11-15 02:56:04",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Henrique1601\u002FSkiilsToIAs --skill continuous-learning-v2",{"tool":41,"command":42},"bunx","bunx skills add Henrique1601\u002FSkiilsToIAs --skill continuous-learning-v2",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Henrique1601\u002FSkiilsToIAs --skill continuous-learning-v2","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\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","脚本",13265,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fagents\u002Fobserver-loop.sh",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"agents\u002Fobserver.md","REFERENCE","参考文档",6892,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\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\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fagents\u002Fsession-guardian.sh",{"path":66,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":67,"sourceHtmlUrl":68},"agents\u002Fstart-observer.sh",8116,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fagents\u002Fstart-observer.sh",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"config.json",135,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fconfig.json",{"path":74,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":75,"sourceHtmlUrl":76},"hooks\u002Fobserve.sh",23080,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fhooks\u002Fobserve.sh",{"path":78,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Fdetect-project.sh",10479,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fscripts\u002Fdetect-project.sh",{"path":82,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Finstinct-cli.py",78332,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fscripts\u002Finstinct-cli.py",{"path":86,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Flib\u002Fhomunculus-dir.sh",1010,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fscripts\u002Flib\u002Fhomunculus-dir.sh",{"path":90,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":91,"sourceHtmlUrl":92},"scripts\u002Fmigrate-homunculus.sh",2256,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fscripts\u002Fmigrate-homunculus.sh",{"path":94,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Ftest_parse_instinct.py",51338,"https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Fcontinuous-learning-v2\u002Fscripts\u002Ftest_parse_instinct.py",[98,105,112,120,127,134],{"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},"01M7E2ANBW9V6AVX5JXNCEAWF8","rag-architect-agent","Agente Arquiteto de RAG, Embeddings & Busca Vetorial. Especialista em design e implementação de pipelines de Retrieval-Augmented Generation de alta fidelidade: chunking semântico, modelagem pgvector no PostgreSQL (Neon\u002FSupabase), busca híbrida (cosseno + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fcustom-agents\u002Frag-architect-agent\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},"01M7E29KKF8R02ZRGYE2MJM67G","rag-architecture-patterns","Padrões arquiteturais e implementação de pipelines RAG (Retrieval-Augmented Generation) de alta fidelidade para qualquer projeto ou sistema. Cobre chunking semântico, embeddings, busca híbrida (pgvector + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Frag-architecture-patterns\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":116,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7CWRA8E3BJ7CPY8N8EG28J1","skill-repair","Use this to fix and re-install agent skills that have failed installation.\nThis skill provides the necessary context and permissions to surgically update\nthe `manifest.json` after a fix has been applied.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fskill-repair\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7CWR66FZP8FA47WVZ4Z2EXC","security-scan","Scan your Claude Code configuration (.claude\u002F directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-scan\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M7CWR0QPY58QPTR1P759TFNG","security-review","Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment\u002Fsensitive features. Provides comprehensive security checklist and patterns.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M7CWQXCE40XWT4FZ3VWZFGDP","security-bounty-hunter","Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-bounty-hunter\u002FSKILL.md",[],[]]