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.
tools
Use only on the Codex CLI for native image generation or image editing without an API key. Save final PNG files under ~/.cli-jaw/uploads, report web-ready absolute-path markdown, and send to Telegram or Discord only when explicitly requested.
tools
Ranked repository structure map via `cli-jaw map`. Use for codebase overview, structure map, symbol overview, unfamiliar codebase exploration, architecture orientation. Triggers: repo map, structure map, codebase overview, 와꾸, project structure, unfamiliar code.
tools
cli-jaw Design workspace: create, preview, run, and export design pages from the right sidebar. Covers panel UX, direct-write workflow, artifact lifecycle, wireframe generation, design system, and Open Design adapter.
development
MUST USE for infrastructure and delivery work — container builds, deploy pipelines, Kubernetes, Infrastructure as Code, SRE foundations, edge/serverless, ML infrastructure. Triggers: Dockerfile, K8s manifests, CI/CD pipeline, Terraform/IaC, release/deploy, devops/infra/deploy or release_cd task_tags.