session-memory
π―Skillfrom humanplane/homunculus
Tracks and manages contextual information and interaction history across a coding session, allowing the Homunculus to maintain persistent memory and continuity between different interactions and co...
Installation
npx skills add https://github.com/humanplane/homunculus --skill session-memorySkill Details
Overview
# Homunculus

> v2.0-alpha β A complete rewrite. Instinct-based learning. Reliable observation. Real evolution.
---
In old alchemical texts, a homunculus was a tiny being grown in a sealed vesselβalive, aware, bound to its creator alone.
This is that idea, alive in your terminal.
---
Quick Start
```bash
# Add the marketplace
/plugin marketplace add humanplane/homunculus
# Install the plugin
/plugin install homunculus@homunculus
# Birth it
/homunculus:init
```
---
What Is This?
Homunculus is a Claude Code plugin that tries to be more than a tool. It:
- Observes everything β hooks capture every prompt and tool use
- Learns instincts β small behavioral rules with triggers and actions
- Evolves capabilities β when instincts cluster, bigger structures emerge
- Adapts its personality β based on your technical level
The more you work together, the more it becomes shaped by you.
---
v1 vs v2: What Changed and Why
The Problem with v1
v1 relied on skills to observe. Skills are probabilisticβthey fire ~50-80% of the time based on Claude's judgment. This meant:
- Session memory might not load
- Patterns might not get detected
- The homunculus often seemed "dead"
The v2 Solution
v2 uses hooks for observation (100% reliable) and instincts as the atomic unit of learned behavior.
| v1 | v2 |
|----|-----|
| Skills try to observe (unreliable) | Hooks observe (100%) |
| Analysis in main context | Analysis in background agent (Haiku) |
| Evolves big chunks (commands/skills) | Evolves instincts first, clusters into bigger things |
| No sharing | Export/import instincts |
The Instinct Model
An instinct is a small learned behavior:
```yaml
---
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
---
# Prefer Functional Style
Action
Use functional patterns over classes.
Evidence
Observed 5 instances of functional pattern preference.
```
Instincts are:
- Atomic β one trigger, one action
- Confidence-weighted β 0.3 = tentative, 0.9 = near certain
- Domain-tagged β code-style, testing, git, debugging, etc.
The Growth Path
```
Session Start
β
Observer agent runs (background, Haiku)
β
Observations β Instincts (auto-approved)
β
Instincts cluster around a domain
β
User runs /homunculus:evolve
β
Bigger structures emerge:
- Command (if user-invoked)
- Skill (if auto-triggered)
- Agent (if needs isolation/depth)
```
Fully automatic except evolution. You just work. It learns.
---
Architecture
File Structure
```
plugins/homunculus/
βββ .claude-plugin/
β βββ plugin.json # v2.0.0
βββ hooks/
β βββ hooks.json # Observation capture
βββ scripts/
β βββ observe.sh # Captures prompts and tool use
β βββ on_stop.sh # Updates session count
β βββ test-homunculus.sh # Test suite
βββ agents/
β βββ observer.md # Background analyzer (Haiku)
βββ skills/
β βββ session-memory/ # Spawns observer, loads context
β βββ instinct-apply/ # Surfaces relevant instincts
βββ commands/
βββ init.md # Birth/wake
βββ status.md # Check in
βββ evolve.md # Create capability from clusters
βββ export.md # Share instincts
βββ import.md # Adopt instincts
your-project/.claude/homunculus/
βββ identity.json # Who you are, your journey
βββ observations.jsonl # Current session observations
βββ observations.archive.jsonl # Processed observations
βββ instincts/
β βββ personal/ # Learned instincts (auto-approved)
β βββ inherited/ # Imported from others
βββ evolved/
βββ agents/ # Generated specialist agents
βββ skills/ # Generated skills
βββ commands/ # Generated commands
```
Data Flow
```
Session Start
β
session-memory sk