continuous-learning-v2/SKILL.md
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.
npx skillsauth add lidge-jun/cli-jaw-skills continuous-learning-v2Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
An advanced learning system that turns agent sessions into reusable knowledge through atomic "instincts" — small learned behaviors with confidence scoring.
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.
| Feature | v2.0 | v2.1 | |---------|------|------| | Storage | Global only | Project-scoped (projects/<hash>/) | | Scope | All instincts apply everywhere | Project-scoped + global | | Detection | None | git remote URL / repo path | | Promotion | N/A | Project → global when seen in 2+ projects | | Commands | 4 | 6 (+promote/projects) |
| Feature | v1 | v2 | |---------|----|----| | Observation | Stop hook (session end) | PreToolUse/PostToolUse (100% reliable) | | Analysis | Main context | Background agent (fast model) | | Granularity | Full skills | Atomic "instincts" | | Confidence | None | 0.3–0.9 weighted | | Evolution | Direct to skill | Instincts → cluster → skill/command/agent |
An instinct is a small learned behavior:
---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
scope: project
project_id: "a1b2c3d4e5f6"
project_name: "my-react-app"
---
# Prefer Functional Style
## Action
Use functional patterns over classes when appropriate.
## Evidence
- Observed 5 instances of functional pattern preference
- User corrected class-based approach to functional on 2025-01-15
Properties:
project (default) or globalSession Activity (in a git repo)
|
| Hooks capture prompts + tool use (100% reliable)
| + detect project context (git remote / repo path)
v
+---------------------------------------------+
| projects/<project-hash>/observations.jsonl |
+---------------------------------------------+
|
| Observer agent reads (background, fast model)
v
+---------------------------------------------+
| PATTERN DETECTION |
| * User corrections -> instinct |
| * Error resolutions -> instinct |
| * Repeated workflows -> instinct |
| * Scope decision: project or global? |
+---------------------------------------------+
|
| Creates/updates
v
+---------------------------------------------+
| projects/<hash>/instincts/personal/ |
| * prefer-functional.yaml (0.7) [project] |
+---------------------------------------------+
| instincts/personal/ (GLOBAL) |
| * always-validate-input.yaml (0.85) |
+---------------------------------------------+
The system automatically detects your current project:
AGENT_PROJECT_DIR env var (highest priority)git remote get-url origin — hashed for a portable project IDgit rev-parse --show-toplevel — fallback using repo pathEach project gets a 12-character hash ID (e.g., a1b2c3d4e5f6).
Add observation hooks to your agent settings. The hooks call observe.sh on every tool use:
{
"hooks": {
"PreToolUse": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "<skills-path>/continuous-learning-v2/hooks/observe.sh"
}]
}],
"PostToolUse": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "<skills-path>/continuous-learning-v2/hooks/observe.sh"
}]
}]
}
}
| Command | Description |
|---------|-------------|
| /instinct-status | Show all instincts (project-scoped + global) with confidence |
| /evolve | Cluster related instincts into skills/commands, suggest promotions |
| /instinct-export | Export instincts (filterable by scope/domain) |
| /instinct-import <file> | Import instincts with scope control |
| /promote [id] | Promote project instincts to global scope |
| /projects | List all known projects and their instinct counts |
Edit config.json to control the background observer:
{
"version": "2.1",
"observer": {
"enabled": false,
"run_interval_minutes": 5,
"min_observations_to_analyze": 20
}
}
~/.config/agent/homunculus/
+-- identity.json
+-- projects.json # Registry: hash -> name/path/remote
+-- observations.jsonl # Global observations (fallback)
+-- instincts/
| +-- personal/ # Global auto-learned
| +-- inherited/ # Global imported
+-- evolved/
| +-- agents/
| +-- skills/
| +-- commands/
+-- projects/
+-- a1b2c3d4e5f6/ # Per-project directory
| +-- project.json
| +-- observations.jsonl
| +-- instincts/personal/
| +-- evolved/
+-- f6e5d4c3b2a1/
+-- ...
| Pattern Type | Scope | Examples |
|-------------|-------|---------|
| Language/framework conventions | project | "Use React hooks", "Follow Django REST patterns" |
| File structure preferences | project | "Tests in __tests__/", "Components in src/components/" |
| Code style | project | "Use functional style", "Prefer dataclasses" |
| Security practices | global | "Validate user input", "Sanitize SQL" |
| General best practices | global | "Write tests first", "Handle errors explicitly" |
| Tool workflow preferences | global | "Grep before Edit", "Read before Write" |
When the same instinct appears in multiple projects with high confidence, promote it to global scope.
Auto-promotion criteria:
python3 instinct-cli.py promote prefer-explicit-errors # specific
python3 instinct-cli.py promote # auto-promote all
python3 instinct-cli.py promote --dry-run # preview
| Score | Meaning | Behavior | |-------|---------|----------| | 0.3 | Tentative | Suggested, not enforced | | 0.5 | Moderate | Applied when relevant | | 0.7 | Strong | Auto-approved for application | | 0.9 | Near-certain | Core behavior |
Confidence increases when: pattern is repeatedly observed, user accepts the behavior, similar instincts agree.
Confidence decreases when: user explicitly corrects, pattern goes unobserved, contradicting evidence appears.
development
Goal execution guidelines with PABCD integration, verification tiers, documentation workflow, and AI-driven planning
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
development
Use this skill any time a spreadsheet file is the primary input or output (.xlsx, .xlsm, .csv, .tsv). This includes: creating, reading, editing, analyzing, or formatting spreadsheets; cleaning messy tabular data; converting between formats; and data visualization with charts. Also use for pandas-based data analysis when the deliverable is a spreadsheet. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration.
tools
Use this skill when the user wants to build a financial model, 3-statement model, DCF valuation, cap table, scenario analysis, or financial projections in Excel. Trigger on: 'financial model', '3-statement model', 'DCF', 'cap table', 'pro forma', 'projections', 'sensitivity analysis', 'waterfall', 'debt schedule', 'break-even', 'discounted cash flow', 'capitalization table', 'fundraising model', 'WACC calculation', 'scenario analysis model'. Input is a text prompt with assumptions. Output is a single .xlsx file with formula-driven, interconnected statement sheets.