/gabbe-brain:cognitive-architecturesfrom gabbe-brain
Provides SOAR, ACT-R, and LIDA patterns for structuring agent reasoning, memory retrieval, and decision-making cycles. Useful when designing an agent's cognitive loop or memory system.
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.
Structure agent reasoning, memory, and decision-making with patterns from classic cognitive architectures (SOAR, ACT-R, LIDA) — beyond ad-hoc prompting.
Break "think" into a proposal-evaluation cycle rather than one step: Elaborate (infer from state) → Propose candidate operators → Evaluate by heuristics → Select best → Apply to change state.
def cognitive_cycle(state):
state = enrich_context(state) # 1. elaborate
options = generate_candidates(state) # 2. propose
scored = evaluate_candidates(options, state.goal) # 3. evaluate
return apply_operator(state, select_winner(scored)) # 4-5. select + apply
Retrieve by activation (recency + frequency + relevance), not "load everything": base-level activation (how often/recently used) + associative activation (relatedness to current focus). Below threshold → retrieval failure (don't fabricate).
def retrieve_memory(query, store):
for c in store:
c.activation = log(c.frequency) - log(time_since_last_use(c)) + similarity(query, c)
top = max(store, key=lambda c: c.activation)
return top if top.activation > THRESHOLD else None
Perceive → understand → "consciousness" → act. Parallel preconscious buffers form coalitions that compete; the winner is broadcast globally, recruiting resources for the current situation (the "spotlight" of attention).
Laird (2012) The Soar Cognitive Architecture · Anderson (2007) ACT-R · Franklin (2006) The LIDA Architecture.
cognitive-testing.skill.A short design note: the decision, the chosen pattern, the cycle as instructions, and the round limit.
rm -rf, DROP TABLE) before scoring, whatever its score.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub andreibesleaga/gabbe --plugin gabbe-brain16 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-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./episodic-consolidationTurns a finished task's audit log into reusable rules and prunes scratch files. Use at the end of a long task to record lessons and to detect drift in the project's world model. Use when: episodic consolidation, consolidate lessons, end of long task, prune scratch files, world model drift.Other plugins' skills for the same job