/gabbe-brain:self-improvementfrom gabbe-brain
Proposes gated, reversible edits to the agent's own prompts or skills based on successful runs. Only activates when a human explicitly asks the system to evolve its instructions.
Ships in gabbe-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
"The software that writes itself."
Propose small, reversible edits to the agent's own instructions, based on successful runs, and only when the human asked for this.
Treat the system_prompt and skill.md files as DNA.
When the agent encounters a novel failure or success:
The agent may edit its own skill files only when the human asked for it in this request. Edit on a branch named evolve/<name>, never on main (update-scan.skill).
Protocol:
<skill-name>.skill.md) on the evolve/<name> branch.To prevent "Cancer" (Runaway bad mutations):
success_rate drops after a mutation, auto-revert.def optimize_prompt(task_history):
# 1. Analyze Failure
failure_pattern = find_pattern(task_history, status="failed")
# 2. Propose Mutation
new_instruction = llm.generate_fix(failure_pattern)
# 3. Simulate (Mental Sandbox)
predicted_success = llm.simulate(new_instruction)
# 4. Integrate
if predicted_success > threshold:
update_skill_file(new_instruction)
Self-improvement (prompt/gene evolution) only runs inside GABBE_AUTONOMY + budget bounds:
brain/learning-adaptation.skill).AUDIT_LOG.md; humans must be able to see and revert what evolved (update-scan.skill).For each proposed edit: the skill file, the old and new text, the successful run that motivates it, and the check that shows no regression. Log adopted and rejected edits in AUDIT_LOG.md.
evolve/<name>, never on main.What SKILL.md sets; muted values are Claude Code's defaults
16 skills in this plugin
/active-inferenceFrames an agent's predict, act, compare loop as surprise minimisation (conceptual, not a solver). Use when a tool result contradicts the agent's expectation and it must choose between probing and fixing./brain-modeAdds a plan-and-review layer over the normal work loop. Picks the cheapest strategy that passes, watches a Loki run, and records one decision-log entry. Use when the human says "brain mode" or "activate brain" for a task that needs a chosen strategy and cost control./cognitive-architecturesDescribes SOAR, ACT-R and LIDA patterns (propose, evaluate, select; activation-based retrieval; workspace broadcast) as ideas for agent design. Use when designing an agent's reasoning cycle or memory retrieval and you want a named pattern as a starting point./cognitive-testingTests cognitive and agentic loops by invariants, convergence, memory integrity and loop guards instead of exact output. Use when you must test an autonomous loop whose output varies, or check that its guards fire./consciousness-loopAdds an explicit observe, orient, decide, act trace with a breakout after 3 idle spins. Use when an agent keeps reasoning without calling a tool, or when a decision trace is needed./cost-benefit-routerChooses a local or remote model and a model tier for a task from complexity, privacy and context size. Use when asked to route a task, choose a model or cut cost, or when the task may involve sensitive data.npx claudepluginhub andreibesleaga/gabbe --plugin gabbe-brainOther plugins' skills for the same job