Versioned dotfiles for the OpenCode CLI and the stable parts of ~/.claude. Ships:
- A primary agent + 10 specialist sub-agents (planner, architect, code/security/database review, TDD, build-fix, e2e, doc, refactor, git).
- Slash-command templates that route to those specialists.
- Always-on skills (Socratic design, security, coding standards, git, Serena bootstrap).
- OpenCode plugins: ECC hooks, continuous-learning v2 (homunculus), worktree spawner, auto-compact, caveman ultra, Figma RAG trigger, notifications, startup bootstrap.
- Custom OpenCode tools (run-tests, check-coverage, security-audit) and codemap generator.
- A
.claude/mirror with hooks, rules, and learned skills for Claude Code.
If you just want to install it on your own machine, jump straight to Public install.
This setup is opinionated but standalone. Follow the steps in order. Anything ending in ~/.config/opencode/... or ~/.claude/... is the OpenCode/Claude convention — the repo is meant to become (or symlink into) those directories.
- macOS or Linux (the worktree plugin and notification plugin assume macOS — works on Linux with minor degradation).
- OpenCode CLI installed and on your
PATH. - Claude Code installed if you want the
.claude/half. - Either Bun (recommended —
bun.lockis what's checked in) or Node.js 20+ withnpm. git,uv/uvx(for the Serena MCP server), andnpx(for Context7 / Wallaby MCP).
OpenCode loads ~/.config/opencode/opencode.jsonc at startup, so the simplest install is to clone (or symlink) the repo there.
# Back up anything you already have there
mv ~/.config/opencode ~/.config/opencode.bak 2>/dev/null || true
# Clone
git clone https://github.com/fmflurry/settings-opencode.git ~/.config/opencode
cd ~/.config/opencodePrefer keeping the repo elsewhere? Symlink it instead:
git clone https://github.com/fmflurry/settings-opencode.git ~/Workspace/settings-opencode
ln -s ~/Workspace/settings-opencode ~/.config/opencodebun install # uses bun.lock
# or
npm ciThe agent block in opencode.jsonc is parameterized via env vars so you can swap providers without editing the config. Add these to your shell profile (~/.zshrc, ~/.bashrc, etc.):
# Required (OpenCode model identifiers — adjust to whatever provider you use)
export OPENCODE_MODEL_PRIMARY="anthropic/claude-sonnet-4-6"
export OPENCODE_MODEL_SUBAGENT_PLANNER="anthropic/claude-opus-4-7"
export OPENCODE_MODEL_SUBAGENT_WORKER="anthropic/claude-sonnet-4-6"
export OPENCODE_MODEL_SUBAGENT_MINI="anthropic/claude-haiku-4-5"
# Reasoning effort tiers
export OPENCODE_REASONING_PRIMARY="high"
export OPENCODE_REASONING_SECONDARY="medium"
export OPENCODE_REASONING_TERTIARY="low"If your provider doesn't support reasoningEffort, OpenCode silently ignores it — pick any value.
opencode.jsonc declares four MCP servers. Serena is required — instructions/serena.md is loaded on every session and will fail to activate without it. The others are optional but documented here so you know what you're opting into.
| Server | Install | Status |
|---|---|---|
| serena | pip install uv (or brew install uv) — the config invokes uvx --from git+https://github.com/oraios/serena serena start-mcp-server |
Required. IDE-grade semantic code retrieval used by instructions/serena.md. |
| context7 | nothing — npx -y @upstash/context7-mcp@latest is auto-installed at session start |
Live docs lookup. Auto-bootstraps on first use. |
| wallaby | install Wallaby.js and run wallaby update-mcp |
Optional. Runtime-test introspection. |
| Figma | enabled: false by default |
Optional. Flip enabled: true and set up Figma MCP for design-system tools. |
The repo ships a .claude/ subtree. If you also use Claude Code, link or copy it into ~/.claude/. The two halves don't depend on each other — install only what you need.
# Back up
mv ~/.claude ~/.claude.bak 2>/dev/null || true
# Symlink approach (recommended — stays in sync with the repo)
ln -s ~/.config/opencode/.claude ~/.claude
# Or copy approach (independent of the repo)
cp -R ~/.config/opencode/.claude ~/.claudeWhat this installs:
.claude/CLAUDE.md— global user instructions Claude Code reads on every session..claude/settings.json— permissions, hooks, env vars (API_TIMEOUT_MS, autocompact threshold, etc.)..claude/hooks/*.sh— pre-tool-use security warnings + stop hook..claude/rules/{common,typescript}/*.md— coding-style/testing/security rule packs..claude/commands/*.md— extra slash commands (/create-pull-request,/curate-learned-skills,/update-codemaps)..claude/skills/**— a curated catalog of "learned" skills (project-specific patterns, debugging recipes)..claude/homunculus/— the shared instinct store used by continuous-learning v2 (kept empty in fresh installs; populated by the OpenCode plugins as you work).
opencodeYou should see:
- The caveman ultra TUI sidebar plugin show up (or be silent if you're not in a caveman session).
instructions/serena.mdask Serena to activate the project on first user message.- The continuous-learning v2 injector preload high-confidence instincts into the system prompt.
Then drop a slash command:
/plan add a TODO list to my homepage
It should route to the planner sub-agent and return a structured plan without writing code.
cd ~/.config/opencode
git pull
bun install # or: npm ciIf a new plugin shows up, OpenCode picks it up on the next restart. If an env var is added to opencode.jsonc, this README will mention it in the changelog section above.
Dotfiles for OpenCode + the stable parts of ~/.claude. Ships a primary build agent, ten specialist sub-agents, always-on skills, slash commands, OpenCode plugins (hooks, instincts, worktrees, auto-compact, caveman, figma RAG, notifications), custom tools, and a Claude Code mirror.
- Reproducibility: same agent behavior across machines/sessions.
- Quality: on-demand TDD, frequent verification, centralized conventions.
- Security:
security-reviewskill loaded by default + pre-tool-use hooks. - Continuous improvement: instincts captured into
~/.claude/homunculus, surfaced into the system prompt on the next session.
- Configs:
opencode.jsonc,dcp.jsonc(dynamic context pruning),ocx.jsonc(OCX registries),tui.json(TUI theme). - Profiles:
profiles/<name>/(per-profile overrides +AGENTS.md, run withocx opencode -p <name>). - Skills:
skills/*/SKILL.md(plus auxiliary docs). - Agent prompts:
prompts/agents/*.txt. - Slash commands:
commands/*.md. - OpenCode plugins:
plugins/*.{ts,js}+plugins/kdco-primitives/,plugins/worktree/. - TUI plugins:
tui-plugins/*.tsx. - Custom tools:
tools/*.ts. - Mode notes:
contexts/*.md. - Global instructions:
instructions/serena.md,instructions/caveman-ultra.md. - Scripts:
scripts/setup-package-manager.js,scripts/codemaps/generate.ts. - Claude mirror:
.claude/CLAUDE.md,.claude/settings.json,.claude/hooks/,.claude/rules/,.claude/skills/,.claude/commands/,.claude/homunculus/. - Intentional exclusions (
.gitignore):node_modules,bun.lockcache,antigravity-*,.instinct-digest-state.json.
Five concerns wired in one file:
instructions: always-on skills loaded at session start. Currently:instructions/serena.md— auto-activates Serena MCP.skills/socratic-design/SKILL.md— evidence-first decision gating.skills/security-review/SKILL.md— OWASP checklist.skills/coding-standards/SKILL.md— code conventions.skills/git-workflow/SKILL.md— branches, commits, PRs.
default_agent:build.agent: sub-agent definitions (model + reasoning effort + prompt + tool allowlist). All models are env-driven (OPENCODE_MODEL_*,OPENCODE_REASONING_*) — see Public install § 4.command: maps/<name>-> template + sub-agent +subtask.mcp: serena, context7, wallaby, Figma (disabled).plugin: external marketplace plugins (@tarquinen/opencode-dcp@latest).
dcp.jsonc configures the Dynamic Context Pruning plugin. ocx.jsonc registers OCX registries.
Defined in opencode.jsonc under agent:
| Agent | Mode | Role |
|---|---|---|
build |
primary | Shipping-focused (read/write/edit/bash). |
planner |
subagent | Plan + risks before large changes. Read+bash, no edit. |
architect |
subagent | System design / scalability decisions. Read+bash only. |
code-reviewer |
subagent | Quality review over diffs and conventions. |
security-reviewer |
subagent | OWASP/secrets/deps review. Can patch (read+write+edit+bash+grep+glob). |
tdd-guide |
subagent | RED -> GREEN -> REFACTOR + 80% coverage. |
build-error-resolver |
subagent | Build/TS error fixes with minimal diffs. |
e2e-runner |
subagent | Playwright E2E tests. |
doc-updater |
subagent | Documentation + codemaps. |
refactor-cleaner |
subagent | Dead-code removal + consolidation. |
database-reviewer |
subagent | PostgreSQL / Supabase schema, perf, security. |
git-specialist |
subagent | Branches, commits, pushes, PRs (mini model). |
Templates in commands/. Most run as subtask: true (delegated to a specialist).
| Command | Sub-agent | Purpose |
|---|---|---|
/git |
git-specialist | Bounded git ops (branches, commits). |
/push-changes |
git-specialist | Commit + push with upstream guard. |
/plan |
planner | Implementation plan. |
/tdd |
tdd-guide | TDD cycle with coverage. |
/code-review |
code-reviewer | Quality review. |
/security |
security-reviewer | Security audit. |
/build-fix |
build-error-resolver | Build/TS error resolution. |
/e2e |
e2e-runner | E2E test generation/run. |
/refactor-clean |
refactor-cleaner | Dead-code cleanup. |
/orchestrate |
planner | Multi-agent orchestration. |
/update-docs |
doc-updater | Doc updates. |
/update-codemaps |
doc-updater | Generates docs/CODEMAPS/. |
/test-coverage |
tdd-guide | Coverage analysis. |
/learn |
(primary) | Extract reusable patterns from the session. |
/checkpoint |
(primary) | Save verification + progress state. |
/verify |
(primary) | Verification loop. |
/eval |
(primary) | Evaluate against criteria. |
/setup-pm |
(primary) | Configure package manager. |
/skill-create |
(primary) | Generate a skill from git history. |
/instinct-status |
(primary) | Inspect learned instincts. |
/instinct-import |
(primary) | Import instincts. |
/instinct-export |
(primary) | Export instincts. |
/evolve |
(primary) | Cluster instincts into skills. |
Always-on (declared in instructions):
skills/socratic-design/SKILL.md— evidence-first decision gating.skills/security-review/SKILL.md— security checklist + scenarios.skills/coding-standards/SKILL.md— naming, immutability, file size, error handling.skills/git-workflow/SKILL.md— branches, conventional commits, push guards.instructions/serena.md— connects Serena MCP per session.
On-demand (loaded by description / by command):
skills/tdd-workflow/SKILL.md— full TDD methodology.skills/caveman/SKILL.md,caveman-commit,caveman-review— terse mode.skills/strategic-compact/SKILL.md— manual compaction at logical breakpoints.skills/dotnet-clean-architecture/SKILL.md(+ playbooks) — .NET 8 BFF scaffolding.skills/angular-clean-architecture/SKILL.md(+ store, migration, testing) — Angular 18 standalone scaffolding.skills/angular-accessibility/SKILL.md— Angular ARIA audit.skills/compress/SKILL.md— context compression.skills/flurryx/SKILL.md— domain-specific patterns.skills/continuous-learning/SKILL.md— learned-draft schema.skills/learned/— auto-generated drafts from the stop hook.
All TypeScript plugins use @opencode-ai/plugin@1.4.6.
plugins/ecc-hooks.ts— Prettier on edited JS/TS,console.logdetection,tsc --noEmitafter edit, sensitive-command reminders (git pushetc.).plugins/instinct-injector.ts— reads~/.claude/homunculus, filters by confidence, injects instincts into the system prompt (continuous-learning v2 read side).plugins/instinct-observer.ts— capturestool.execute.before/afterevents and appends toobservations.jsonl(write side).plugins/instinct-digest.ts— session-start diff: surfaces new/updated instincts since last session.plugins/continuous-learning-stop-hook.js— legacy v1 stop hook, callsskills/continuous-learning/bin/evaluate-session.jsto write a draft intoskills/learned/.plugins/auto-compact.js— auto-compacts onceOC_COMPACT_THRESHOLDtool calls are reached, only while idle.plugins/notification.js— macOS notification + sound onsession.idle.plugins/caveman-server.ts+tui-plugins/caveman.tsx— injects caveman instructions into the system prompt + TUI sidebar showing active mode.plugins/figma-mcp-trigger.js— Figma RAG: readsfigma-rag.md(orOPENCODE_FIGMA_RAG_PATHS) and injects snippets when designs are referenced.plugins/worktree.ts(+plugins/worktree/) — creates an isolated git worktree for the session and spawns a terminal (mac/Win/Linux). Inspired by opencode-worktree-session.plugins/startup-bootstrap.ts— runsserena_activate_projecton the first tool call of a session.plugins/kdco-primitives/— shared utilities (mutex, shell, terminal-detect, project-id resolver, types).@tarquinen/opencode-dcp@latest(external, declared inopencode.jsonc › plugin) — Dynamic Context Pruning. Trims stale tool results and large files from the live context window so long sessions don't blow past the model's limit. Configured viadcp.jsoncat the repo root.
Reusable OpenCode tools exposed via tools/index.ts:
tools/run-tests.ts— detects package manager + framework and builds the test command.tools/check-coverage.ts— reads coverage reports and compares against a threshold.tools/security-audit.ts— scans deps + secrets + risky patterns.
tui-plugins/caveman.tsx — React sidebar that shows a "CAVEMAN ULTRA" badge when the mode is active (flag file written by caveman-server.ts).
Two pipelines coexist (backwards compat):
- v1 (legacy) —
plugins/continuous-learning-stop-hook.js->skills/continuous-learning/stop.sh->skills/continuous-learning/bin/evaluate-session.jswrites at most one draft intoskills/learned/. - v2 (homunculus, shared with Claude Code) —
plugins/instinct-observer.tswrites to~/.claude/homunculus/projects/<id>/observations.jsonl. A daemon (ECC side) clusters observations into instincts.plugins/instinct-injector.tsinjects them into the system prompt.plugins/instinct-digest.tsproduces a session-start diff.
Curation:
/curate-learned-skills(Claude Code side) — reviews drafts inlearned/and promotes the valuable ones into real skills./instinct-status//evolve— inspect and evolve instincts into skills.
CLAUDE.md— global user instructions (noany, facade != UseCase).settings.json— allow/deny permissions, env (API_TIMEOUT_MS=3000000,CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=80),PreToolUse/PostToolUse/Stophooks.hooks/pre-tool-use.sh— warning-only checks on sensitive commands/files.hooks/stop.sh— Claude Code stop hook.rules/common/*.md+rules/typescript/*.md— rule packs (style, testing, security, patterns, hooks, agents).commands/{create-pull-request,curate-learned-skills,update-codemaps}.md— Claude commands.skills/**— curated catalog of "learned" skills.homunculus/{instincts,evolved,observations.archive}— store shared with OpenCode.
- Startup: OpenCode loads
opencode.jsonc-> always-on instructions ->instinct-injectorpreloads instincts ->instinct-digestproduces a diff ->caveman-serveradds caveman preamble if active. - First user action:
startup-bootstraptriggersserena_activate_project. - Dev:
buildexecutes.ecc-hooksformats / type-checks / flagsconsole.log.instinct-observerarchives events. - Workflow:
/plan,/tdd,/security, etc. route to the right specialist. - Idle:
auto-compacttriggers when the tool-call threshold is reached;notificationpings macOS. - Stop: v1 hook writes a draft; v2 daemon clusters observations into instincts for the next session.
Depot "dotfiles" pour OpenCode + la partie stable de ~/.claude. Embarque un agent principal build, dix sous-agents specialises, des skills toujours actives, des commandes slash, des plugins (hooks, instincts, worktrees, auto-compact, caveman, figma RAG), des outils custom et un mirror Claude Code.
- Reproductibilite: meme comportement entre machines/sessions.
- Qualite: TDD a la demande, verification reguliere, conventions centralisees.
- Securite: skill
security-reviewchargee par defaut + hooks pre-tool-use. - Apprentissage continu: capture automatique des "instincts" dans
~/.claude/homunculus, surface dans le system prompt a la session suivante.
- Configs:
opencode.jsonc,dcp.jsonc(dynamic context pruning),ocx.jsonc(registries OCX),tui.json(theme TUI). - Profils:
profiles/<name>/(overrideopencode.jsonc+AGENTS.mdpar profil, lance viaocx opencode -p <name>). - Skills:
skills/*/SKILL.md(+ ressources auxiliaires). - Prompts agents:
prompts/agents/*.txt. - Commandes slash:
commands/*.md. - Plugins OpenCode:
plugins/*.{ts,js}(+plugins/kdco-primitives/,plugins/worktree/). - TUI plugins:
tui-plugins/*.tsx(sidebar React rendue par OpenCode). - Outils custom:
tools/*.ts. - Contextes (memos de mode):
contexts/*.md. - Instructions globales:
instructions/serena.md,instructions/caveman-ultra.md. - Scripts:
scripts/setup-package-manager.js,scripts/codemaps/generate.ts. - Mirror Claude Code:
.claude/CLAUDE.md,.claude/settings.json,.claude/hooks/,.claude/rules/,.claude/skills/,.claude/commands/,.claude/homunculus/. - Exclusions volontaires (
.gitignore):node_modules,bun.lockcache,antigravity-*,.instinct-digest-state.json.
Le fichier orchestre quatre choses:
instructions: skills toujours chargees au demarrage. Aujourd'hui:instructions/serena.md-> active Serena MCP automatiquement.skills/socratic-design/SKILL.md-> gating evidence-first sur les decisions design.skills/security-review/SKILL.md-> checklist OWASP.skills/coding-standards/SKILL.md-> conventions code.skills/git-workflow/SKILL.md-> branches, commits, PRs.
default_agent:build.agent: definitions des sous-agents (modele + reasoning effort + prompt + outils autorises). Tous les modeles passent par variables d'environnement (OPENCODE_MODEL_*,OPENCODE_REASONING_*).command: mappe/<name>-> template + sous-agent +subtask(delegation).mcp: serena, context7, wallaby, Figma (desactive par defaut).plugin: marketplace plugins externes (@tarquinen/opencode-dcp@latest).
dcp.jsonc configure le plugin Dynamic Context Pruning. ocx.jsonc declare les registries pour le wrapper OCX.
Definis dans opencode.jsonc (champ agent):
| Agent | Mode | Role |
|---|---|---|
build |
primary | Agent principal "livre la feature" (read/write/edit/bash). |
planner |
subagent | Plan + risques avant grosse modif. Read+bash, pas d'edit. |
architect |
subagent | Decisions de design / scalabilite. Read+bash uniquement. |
code-reviewer |
subagent | Revue qualite (diff, conventions, tests). Read+bash+grep. |
security-reviewer |
subagent | Revue OWASP/secrets/deps. Read+write+edit+bash+grep+glob (peut patcher). |
tdd-guide |
subagent | RED -> GREEN -> REFACTOR + 80% coverage. |
build-error-resolver |
subagent | Fix build/TS errors avec diff minimal. |
e2e-runner |
subagent | Tests E2E Playwright. |
doc-updater |
subagent | Documentation et codemaps. |
refactor-cleaner |
subagent | Suppression code mort + consolidation. |
database-reviewer |
subagent | PostgreSQL / Supabase: schema, perfs, securite. |
git-specialist |
subagent | Branches, commits, push, PRs (modele mini). |
Templates dans commands/. La plupart sont subtask: true -> elles s'executent dans un sous-agent isolé.
| Commande | Sous-agent | But |
|---|---|---|
/git |
git-specialist | Operations git encadrees (branche/commit). |
/push-changes |
git-specialist | Commit + push (avec garde sur upstream). |
/plan |
planner | Plan d'implementation. |
/tdd |
tdd-guide | Cycle TDD avec coverage. |
/code-review |
code-reviewer | Revue qualite. |
/security |
security-reviewer | Audit securite. |
/build-fix |
build-error-resolver | Resolution build/TS errors. |
/e2e |
e2e-runner | Generation/run tests E2E. |
/refactor-clean |
refactor-cleaner | Nettoyage code mort. |
/orchestrate |
planner | Orchestration multi-agents. |
/update-docs |
doc-updater | Mise a jour de la doc. |
/update-codemaps |
doc-updater | Genere docs/CODEMAPS/. |
/test-coverage |
tdd-guide | Analyse coverage. |
/learn |
(primary) | Extrait patterns reutilisables de la session. |
/checkpoint |
(primary) | Sauvegarde verification + progress. |
/verify |
(primary) | Boucle de verification. |
/eval |
(primary) | Evaluation contre criteres. |
/setup-pm |
(primary) | Configure le package manager. |
/skill-create |
(primary) | Genere une skill depuis l'historique git. |
/instinct-status |
(primary) | Affiche les instincts appris. |
/instinct-import |
(primary) | Import d'instincts. |
/instinct-export |
(primary) | Export d'instincts. |
/evolve |
(primary) | Cluster instincts -> skills. |
Skills toujours actives (declared dans instructions):
skills/socratic-design/SKILL.md— decision-gating "evidence-first".skills/security-review/SKILL.md— checklist securite + scenarios.skills/coding-standards/SKILL.md— naming, immutabilite, taille fichier, error handling.skills/git-workflow/SKILL.md— branches, conventional commits, garde-fous push.instructions/serena.md— connecte Serena MCP a chaque session.
Skills sur demande (chargees par leur description / par une commande):
skills/tdd-workflow/SKILL.md— methode TDD detaillee.skills/caveman/SKILL.md,caveman-commit,caveman-review— mode terse.skills/strategic-compact/SKILL.md— compaction manuelle aux paliers logiques.skills/dotnet-clean-architecture/SKILL.md(+ playbooks) — scaffold .NET 8 BFF.skills/angular-clean-architecture/SKILL.md(+ store, migration, tests) — scaffold Angular 18 standalone.skills/angular-accessibility/SKILL.md— audit ARIA Angular.skills/compress/SKILL.md— compression de contexte.skills/flurryx/SKILL.md— patterns specifiques.skills/continuous-learning/SKILL.md— schema des drafts learned.skills/learned/— drafts produits par le stop-hook.
Tous les plugins TypeScript utilisent @opencode-ai/plugin@1.4.6.
plugins/ecc-hooks.ts— Prettier sur fichiers JS/TS edites, detectionconsole.log,tsc --noEmitpost-edit, rappels sur commandes sensibles (git pushetc.).plugins/instinct-injector.ts— lit~/.claude/homunculus, filtre par confidence, injecte les instincts dans le system prompt (continuous-learning v2 read-side).plugins/instinct-observer.ts— capture les eventstool.execute.before/afteret append dansobservations.jsonl(write-side).plugins/instinct-digest.ts— diff session-start: surface les instincts nouveaux/modifies depuis la derniere session.plugins/continuous-learning-stop-hook.js— stop hook v1 (legacy) qui appelleskills/continuous-learning/bin/evaluate-session.jspour produire un draft dansskills/learned/.plugins/auto-compact.js— auto-compaction quandOC_COMPACT_THRESHOLDest atteint, en idle uniquement.plugins/notification.js— notification macOS (osascript + Glass.aiff) sursession.idle.plugins/caveman-server.ts+tui-plugins/caveman.tsx— injecte les instructions caveman dans le system prompt + sidebar TUI qui affiche le mode actif.plugins/figma-mcp-trigger.js— RAG figma: litfigma-rag.md(ouOPENCODE_FIGMA_RAG_PATHS) et injecte des snippets quand des designs sont referencés.plugins/worktree.ts(+plugins/worktree/) — cree un git worktree isolé pour la session et spawn un terminal (mac/Win/Linux). Inspiré d'opencode-worktree-session.plugins/startup-bootstrap.ts— declencheserena_activate_projectla premiere fois qu'un outil est appelé dans la session.plugins/kdco-primitives/— utilities partages (mutex, shell, terminal-detect, project-id resolver, types).@tarquinen/opencode-dcp@latest(externe, declare dansopencode.jsonc › plugin) — Dynamic Context Pruning. Coupe les tool results stagnants et les gros fichiers dans la fenetre de contexte pour que les sessions longues ne depassent pas la limite modele. Configure viadcp.jsonca la racine du repo.
Outils OpenCode reutilisables exposes via tools/index.ts:
tools/run-tests.ts— detecte package manager + framework et construit la commande de test.tools/check-coverage.ts— lit les rapports coverage et compare a un seuil.tools/security-audit.ts— scan deps + secrets + patterns a risque.
tui-plugins/caveman.tsx — sidebar React qui affiche un badge "CAVEMAN ULTRA" quand le mode est actif (drapeau ecrit par caveman-server.ts).
Deux pipelines coexistent (compatibilite ascendante):
- v1 (legacy) —
plugins/continuous-learning-stop-hook.js->skills/continuous-learning/stop.sh->skills/continuous-learning/bin/evaluate-session.jsecrit au plus un draft dansskills/learned/. - v2 (homunculus, partagé avec Claude Code) —
plugins/instinct-observer.tsecrit dans~/.claude/homunculus/projects/<id>/observations.jsonl. Un daemon (cote ECC) cluster les observations en "instincts".plugins/instinct-injector.tsles injecte dans le system prompt.plugins/instinct-digest.tsproduit un diff session-start.
Curation:
/curate-learned-skills(cote Claude Code) — relit les drafts danslearned/et promeut les bons en vraies skills./instinct-status//evolve— inspecte et fait evoluer les instincts en skills.
CLAUDE.md— instructions globales (noany, facade != UseCase).settings.json— permissions allow/deny, env vars (API_TIMEOUT_MS=3000000,CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=80), hooksPreToolUse/PostToolUse/Stop.hooks/pre-tool-use.sh— warnings sur commandes/fichiers sensibles (warn only).hooks/stop.sh— stop hook Claude Code.rules/common/*.md+rules/typescript/*.md— packs de regles (style, tests, securite, patterns, hooks, agents).commands/{create-pull-request,curate-learned-skills,update-codemaps}.md— commandes Claude.skills/**— catalogue de skills "learned" (debugging, project-specific, user-corrections).homunculus/{instincts,evolved,observations.archive}— store partagé avec OpenCode.
- Demarrage: OpenCode charge
opencode.jsonc-> instructions globales -> plugininstinct-injectorinjecte les instincts ->instinct-digestproduit un diff ->caveman-serverajoute le preamble si actif. - Premiere action utilisateur:
startup-bootstrapdeclencheserena_activate_project. - Dev:
buildexecute.ecc-hooksformate / type-check / loue lesconsole.log.instinct-observerarchive les events. - Workflow:
/plan,/tdd,/security, etc. routent vers le bon sous-agent. - Idle:
auto-compactdeclenche un compact quand le seuil de tool calls est atteint.notificationping macOS. - Stop: hook v1 produit un draft, hook v2 cluster les observations en instincts pour la session suivante.