Files
everything-claude-code/commands/instinct-import.md
Affaan Mustafa e9dfcdffd0 fix: use CLAUDE_PLUGIN_ROOT for continuous-learning-v2 paths
Fixes #113

The instinct commands referenced hardcoded paths that only work with
manual installation (~/.claude/skills/...). When installed as a plugin,
files are at ~/.claude/plugins/cache/.../skills/...

Changes:
- Updated instinct-status, instinct-import, evolve commands to use
  ${CLAUDE_PLUGIN_ROOT} with fallback to manual path
- Updated observe.sh hook documentation with both install methods
- Updated SKILL.md with plugin vs manual installation instructions
- Removed duplicate commands from skills/continuous-learning-v2/commands/
  (already exist in commands/)

Users should use ${CLAUDE_PLUGIN_ROOT} in their hooks config when
installed as a plugin.
2026-01-29 12:23:53 -08:00

3.5 KiB

name, description, command
name description command
instinct-import Import instincts from teammates, Skill Creator, or other sources true

Instinct Import Command

Implementation

Run the instinct CLI using the plugin root path:

python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7]

Or if CLAUDE_PLUGIN_ROOT is not set (manual installation):

python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url>

Import instincts from:

  • Teammates' exports
  • Skill Creator (repo analysis)
  • Community collections
  • Previous machine backups

Usage

/instinct-import team-instincts.yaml
/instinct-import https://github.com/org/repo/instincts.yaml
/instinct-import --from-skill-creator acme/webapp

What to Do

  1. Fetch the instinct file (local path or URL)
  2. Parse and validate the format
  3. Check for duplicates with existing instincts
  4. Merge or add new instincts
  5. Save to ~/.claude/homunculus/instincts/inherited/

Import Process

📥 Importing instincts from: team-instincts.yaml
================================================

Found 12 instincts to import.

Analyzing conflicts...

## New Instincts (8)
These will be added:
  ✓ use-zod-validation (confidence: 0.7)
  ✓ prefer-named-exports (confidence: 0.65)
  ✓ test-async-functions (confidence: 0.8)
  ...

## Duplicate Instincts (3)
Already have similar instincts:
  ⚠️ prefer-functional-style
     Local: 0.8 confidence, 12 observations
     Import: 0.7 confidence
     → Keep local (higher confidence)

  ⚠️ test-first-workflow
     Local: 0.75 confidence
     Import: 0.9 confidence
     → Update to import (higher confidence)

## Conflicting Instincts (1)
These contradict local instincts:
  ❌ use-classes-for-services
     Conflicts with: avoid-classes
     → Skip (requires manual resolution)

---
Import 8 new, update 1, skip 3?

Merge Strategies

For Duplicates

When importing an instinct that matches an existing one:

  • Higher confidence wins: Keep the one with higher confidence
  • Merge evidence: Combine observation counts
  • Update timestamp: Mark as recently validated

For Conflicts

When importing an instinct that contradicts an existing one:

  • Skip by default: Don't import conflicting instincts
  • Flag for review: Mark both as needing attention
  • Manual resolution: User decides which to keep

Source Tracking

Imported instincts are marked with:

source: "inherited"
imported_from: "team-instincts.yaml"
imported_at: "2025-01-22T10:30:00Z"
original_source: "session-observation"  # or "repo-analysis"

Skill Creator Integration

When importing from Skill Creator:

/instinct-import --from-skill-creator acme/webapp

This fetches instincts generated from repo analysis:

  • Source: repo-analysis
  • Higher initial confidence (0.7+)
  • Linked to source repository

Flags

  • --dry-run: Preview without importing
  • --force: Import even if conflicts exist
  • --merge-strategy <higher|local|import>: How to handle duplicates
  • --from-skill-creator <owner/repo>: Import from Skill Creator analysis
  • --min-confidence <n>: Only import instincts above threshold

Output

After import:

✅ Import complete!

Added: 8 instincts
Updated: 1 instinct
Skipped: 3 instincts (2 duplicates, 1 conflict)

New instincts saved to: ~/.claude/homunculus/instincts/inherited/

Run /instinct-status to see all instincts.