بنقرة واحدة
continuous-learning-v2
Cross-session instinct learning with confidence-based promotion and global scope
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Cross-session instinct learning with confidence-based promotion and global scope
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Convert PDF/EPUB library to Markdown and generate Obsidian MOC notes
Hook-based compaction suggestions at logical task boundaries
Context window management — track spend, decide when to compact, preserve state
Session-start orientation — loads context, surfaces learnings, confirms registry
Quality and semantic review — catches what automated tools miss
Planner → Architect → Critic deliberation loop — produces a formally validated ADR
| name | continuous-learning-v2 |
| description | Cross-session instinct learning with confidence-based promotion and global scope |
| version | 0.1.0 |
| level | 3 |
| triggers | ["/instinct-status","/instinct-export","/instinct-import","/evolve","learned patterns","session observations"] |
| context_files | ["context/learnings.md","context/project.md"] |
| steps | [{"name":"Load Instincts","description":"Read project instincts from ~/.claude/homunculus/"},{"name":"Filter by Domain/Confidence","description":"Apply filters if specified"},{"name":"Display or Modify","description":"List, add, apply, or promote instincts"},{"name":"Update Storage","description":"Persist changes to JSON with atomic writes"},{"name":"Evaluate for Promotion","description":"Check if confidence >= 0.8 for global promotion"},{"name":"Cluster into Skills","description":"Group related instincts for /evolve command"}] |
Cross-session learning system that captures behavioral patterns as instincts with confidence scoring and automatic promotion to global scope.
Without continuous learning, Claude:
Continuous learning tracks what works, increases confidence with successful applications, and promotes proven patterns globally.
Instinct: Atomic behavioral unit with trigger (when), action (what), and confidence (0.0-1.0).
Example:
{
"id": "inst_001",
"trigger": "writing test file",
"action": "colocate test next to source (src/user.ts -> src/user.test.ts)",
"confidence": 0.85,
"domain": "testing",
"evidence": ["2026-03-28: Created tests/user.test.ts next to src/user.ts"],
"scope": "project",
"apply_count": 12
}
Key Fields:
trigger: Natural language condition for when to applyaction: Specific, actionable instructionconfidence: 0.3 (new) to 0.95 (max), increases +0.05 per applicationdomain: Category (testing, security, architecture, style, etc.)scope: "project" or "global"apply_count: Successful application countPurpose: Display all instincts with filters.
Usage:
/instinct-status - Show all/instinct-status --domain testing - Filter by domain/instinct-status --confidence 0.7 - Minimum confidenceOutput: Lists PROJECT and GLOBAL instincts with confidence, domain, apply count.
Purpose: Export instincts to JSON for sharing.
Usage:
/instinct-export - Export to stdout/instinct-export --output instincts.json - Save to fileFormat: Portable JSON with project metadata removed.
Purpose: Import instincts from teammates or other projects.
Usage:
/instinct-import instincts.json - Merge imported instinctsConflict Resolution: If ID exists, keep higher confidence version.
Purpose: Cluster related instincts into skill suggestions.
Algorithm:
Output: Proposed SKILL.md structure for manual review.
Purpose: Manually promote project instinct to global.
Requirements:
Effect: Moves instinct to global_instincts array, applies to all projects.
Purpose: List all projects with learned instincts.
Output: Project names, remote URLs, instinct counts, last updated.
Location: ~/.claude/homunculus/projects/<git-remote-hash>/instincts.json
Why git-remote-hash: Unique per repository, consistent across local clones and team members.
Fallback: If no git remote, use directory path hash.
Structure:
{
"project": {
"name": "psc_comet",
"git_remote": "https://github.com/...",
"remote_hash": "a3f5b9c2",
"created": "2026-03-28T20:00:00Z"
},
"instincts": [...], // project-scoped
"global_instincts": [...] // applies to all projects
}
Atomic Writes: Write to temp file, then rename to prevent corruption.
Trigger: Instinct applied in 2+ projects AND confidence >= 0.8.
Process:
Manual Override: User can run /promote inst_NNN to force promotion.
Hook: observe-instinct.sh runs at session Stop (end).
Current: Logs that observation occurred (Phase 8.0.1 stub).
Future Phases:
Frequency: Stop-only (v0.1.0). Higher frequency optional later (trade-off: interruptions vs learning rate).
Over-promoting: Promoting instincts with confidence < 0.8. Premature globalization spreads unvalidated patterns.
Ignoring low-confidence instincts: Not reviewing instincts with confidence < 0.5. May indicate conflicting patterns or context-specific exceptions.
No evidence review: Accepting instinct suggestions without checking evidence field. Evidence shows when/where pattern was observed.
Manual skill writing instead of /evolve: Writing skills from scratch when instincts exist. /evolve generates skill scaffolds automatically.
No confidence decay: (Not implemented v0.1.0). Future: Confidence should decay if not applied for 30+ days (pattern no longer relevant).
Exporting without review: Sharing instincts.json without removing project-specific secrets or proprietary patterns.
Dependencies: Python 3.6+, jsonschema (validation), watchdog (optional, Linux only).
Bootstrap: bash scripts/bootstrap-phase8.sh detects Python, installs deps, validates CLI.
Graceful Degradation: If Python unavailable, hook exits silently. Core psc_comet features unaffected.
Cross-Platform: Tested on Windows (Python 3.14.1) and Linux (Python 3.6+).