Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. Project-scoped instincts prevent cross-project contamination.
From forgebeenpx claudepluginhub forbee-dev/forgebee --plugin forgebeeThis skill uses the workspace's default tool permissions.
agents/observer.mdconfig.jsonscripts/detect-project.jsscripts/instinct-cli.jsscripts/observe.jsSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Ingests video/audio from files, URLs, RTSP, desktop; indexes/searches moments with timestamps/clips; transcodes/edits timelines (subtitles/overlays/dubbing); generates assets and live alerts.
Turn session observations into reusable knowledge through atomic instincts — small learned behaviors with confidence scoring that persist across sessions.
An advanced learning system that turns your ForgeBee sessions into reusable knowledge through atomic "instincts" — small learned behaviors with confidence scoring.
Project-scoped instincts keep React patterns in your React project, Python conventions in your Python project, and universal patterns (like "always validate input") shared globally.
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
Properties:
project (default) or globalSession Activity (in a git repo)
|
| Hooks capture tool use (PreToolUse + PostToolUse)
| + detect project context (git remote / repo path)
v
+-----------------------------------------+
| projects/<hash>/observations.jsonl |
| (tools, inputs, outputs, timestamps) |
+-----------------------------------------+
|
| /learn analyzes patterns
v
+-----------------------------------------+
| projects/<hash>/instincts/personal/ |
| * prefer-functional.yaml (0.7) |
| * use-react-hooks.yaml (0.9) |
+-----------------------------------------+
| instincts/personal/ (GLOBAL) |
| * always-validate-input.yaml (0.85) |
| * grep-before-edit.yaml (0.6) |
+-----------------------------------------+
|
| /evolve clusters + /promote
v
+-----------------------------------------+
| evolved/ |
| * commands/new-feature.md |
| * skills/testing-workflow.md |
| * agents/refactor-specialist.md |
+-----------------------------------------+
The system automatically detects your current project:
CLAUDE_PROJECT_DIR env var (highest priority)git remote get-url origin — hashed to create a portable project IDgit rev-parse --show-toplevel — fallback using repo pathEach project gets a 12-character hash ID. A registry at ~/.claude/forgebee-learning/projects.json maps IDs to human-readable names.
| Command | Description |
|---|---|
/learn | Analyze current session and extract patterns as instincts |
/evolve | Cluster related instincts into skills/commands/agents |
/instinct-status | Show all instincts (project + global) with confidence |
/instinct-export | Export instincts (filterable by scope/domain) |
/instinct-import | Import instincts with scope control |
The observation hooks fire on every tool call (100% reliable — unlike skills which are probabilistic):
{
"PreToolUse": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning/scripts/observe.js\"" }] }],
"PostToolUse": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning/scripts/observe.js\"" }] }]
}
| Score | Meaning | Behavior |
|---|---|---|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved for application |
| 0.9 | Near-certain | Core behavior |
| 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", "Always handle errors" |
| Tool workflow preferences | global | "Grep before Edit", "Read before Write" |
| Git practices | global | "Conventional commits", "Small focused commits" |
When the same instinct appears in 2+ projects with average confidence ≥ 0.8, it's a candidate for global promotion. Run /evolve to see promotion candidates.
~/.claude/forgebee-learning/
├── projects.json # Registry: project hash → name/path/remote
├── observations.jsonl # Global observations (fallback)
├── instincts/
│ ├── personal/ # Global auto-learned instincts
│ └── inherited/ # Global imported instincts
├── evolved/
│ ├── agents/ # Global generated agents
│ ├── skills/ # Global generated skills
│ └── commands/ # Global generated commands
└── projects/
└── <project-hash>/
├── observations.jsonl
├── observations.archive/
├── instincts/
│ ├── personal/
│ └── inherited/
└── evolved/