/open-second-brain:decision-model-setupfrom open-second-brain
Guides setup, evaluation, or disabling of the Open Second Brain decision-model feature (typed judgments for search, skill selection, and note filtering). Walks through provider selection and configuration.
Ships in open-second-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.
A decision model answers typed questions (yes/no probability, one of a list, a position on a scale) about text Open Second Brain hands it, and never generates text. Open Second Brain uses it only to choose among candidates its own code produced: which search results come first, which skills to offer, which transcript turns the host should mine, which recalled notes to inject, and advisory verdicts next to dedup, tension, label and answerable proposals. It never writes to the vault.
The feature is off by default. Without it Open Second Brain behaves
exactly as it does today and makes no network call. Full reference:
docs/decision-models.md (the hub, with the per-use table) and
docs/decision-models/providers.md (every route).
For a conceptual question ("what is Jev", "is this worth it", "which route is cheaper") answer from the docs and change nothing. Walk the steps below only when the user wants to set it up, measure it or turn it off.
checko2b decision-model check
It prints the status (disabled, no_key, disabled_by_vault,
invalid, active), the provider and processor, the key variable's
NAME and whether it is set (never the value), every use with its
configured mode, the threshold profile, the uses whose enforce runs as
shadow, the daily cost gate, and a hint: line naming only what is
missing. Exit 1 means an invalid config or a failed ping; fix the named
key first.
Ask the user which route they want; never pick one for them.
typesafe): the model vendor, directly.openrouter): the same model through OpenRouter.vercel for the compatible route,
vercel-evaluate for the gateway's own evaluate endpoint).opencode-zen).laya, openjev, or compatible with
decision_model_base_url on localhost, 127.0.0.1 or ::1):
nothing leaves the machine. laya and openjev need no key on
loopback. Check the model's licence (check prints a licence note
where the weights carry a restriction). Installing the server is the
user's job; this skill does not download weights.llm-emulation: a generative chat endpoint asked only for
probabilities. Uncalibrated, costs far more, and meant for shadow
evaluation only. Never suggest it as the default.converse): a bearer-authenticated gateway
speaking the Bedrock-style Converse protocol. Uncalibrated like
llm-emulation (the model behind the gateway writes its own
probabilities), so enforce needs
decision_model_allow_uncalibrated, and its converse threshold
profile has no tuned uses yet, so every enforce runs as shadow
until tuned from this route's own shadow data. The base URL, model id
and key variable are the user's to set. Never suggest it as the
default.A compatible server enforces nothing until
decision_model_threshold_profile names the model family it serves;
until then every enforce runs as shadow, and check says so.
The key lives in an environment variable of the environment that runs Open Second Brain (a shell profile, the host's env file, a secrets manager). The machine config holds only the variable's name:
decision_model_enabled: "true"
decision_model_provider: <preset>
decision_model_env_key: <VARIABLE_NAME> # the name, never the key
decision_model_uses: "<use>:shadow"
check.decision_model.enabled can only turn the feature off,
never on.http:// is accepted only on loopback. For another host without
TLS, explain what decision_model_allow_insecure_http means (text and
key cross the network unencrypted) before the user sets it.Then verify connectivity with one synthetic request that carries no vault content:
o2b decision-model check --ping
Start with ONE use in shadow. Shadow sends and records every request
but returns today's result unchanged, so the user sees no difference yet.
Pick the use that matches what the user wants to improve:
rerank: search ordering (needs search_rerank_enabled: "true" and
search_rerank_kind: decision-model; pays off with a semantic lane).answerable: an advisory "can these results answer the question"
signal, carried by the rerank request.skills: which skills skills_attach offers.extract_prefilter: which user turns the extract-signals envelope
carries.recall_inject: which notes the prompt-time recall hook injects. It
adds a request to every prompt that injects; mention the latency.dedup, tension, labels: advisory verdicts on proposals the
deterministic detectors made (brain_hygiene scan, brain_tension verify, brain_labels suggest).topic_route: which topic an unassigned record lands on in the dream
pass. Mention that the planner's word overlap stays the fallback.event_kind: which item a record a topic holds derives.human_readable: which notes stay in the weekly history page.topic_new: whether a qualifying cluster becomes a topic this pass.topic_same: which topic pairs the dream report proposes for a merge.question_resolved: which open question a record answers (a proposal
only).milestone_done: whether a milestone looks done (a proposal only).head_select: which topic heads lead the session start digest.neighbour_relevant: which neighbour records reach the agent before a
turn. The nine topic and agent-context uses are not covered by the
shipped baseline: enforce needs a thresholds-store entry first,
and the value set there is the threshold the use applies to that
model's answers.Each use has its own page under docs/decision-models/; the nine new ones
share one page, docs/decision-models/topics-and-agent-context.md.
After about a week of normal use, read the numbers:
o2b decision-model report --use <use>
o2b search rerank-eval --dataset <queries.json> --kind decision-model --compare-local # rerank only
report prints the calls, outcomes, latency, tokens and cost, plus the
use's own evaluation metric. Recommend enforce only when that metric
shows a gain against the deterministic baseline without a regression.
The nine topic and agent-context uses (head_select among them) have no
per-use metric yet: report prints only the generic summary for them, so
keep them in shadow and do not recommend enforce from report alone.
Their shadow records are written to the vault's log, so a store-only
machine records none.
For extract_prefilter, enforce needs zero regret (no committed signal
from a turn the filter would have dropped); otherwise stay in shadow.
Switching to enforce is the user's decision, one use at a time:
decision_model_uses: "<use>:enforce"
Any one of these:
decision_model_uses (or set it to off);decision_model_enabled: "false" in the machine config;decision_model.enabled to false,
which turns the feature off on every machine of this brain:
o2b brain settings set decision_model.enabled false. That is the
operator's command, and only the operator can run it: the key is
operator-only, so the brain_settings tool refuses an agent's write
to it with operator_only_setting on every machine, switched or not.
Ask the operator to run the command; never try to turn the feature
back on.Unsetting the key variable also stops every request, except to a keyless
loopback laya or openjev server, which needs none.
shadow or enforce carries
vault text (candidates, turns or notes) to the processor check names.visibility: private and
<private> regions are never sent. Everything else is masked, clipped
and passed through the shared secret redaction, but names, e-mail
addresses or paths inside a non-private note are sent as they are;
mark such text <private> if it must stay on the machine.decision_model_call records, and
the main hosted vendor's terms forbid training a model that imitates its
outputs. Tell operators not to build that on the records.enforce without the user's decision and the
shadow numbers.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
open-second-brain, decision-model, jev, typesafe, openrouter, vercel-ai-gateway
6 skills in this plugin
/brain-memoryRecord taste signals and apply-evidence events into the Brain observing-memory layer of Open Second Brain. INVOKE this skill (and call `brain_feedback`) the moment the user expresses a preference, dislike, correction, or rule in dialogue — "don't do X", "use A instead of B", "I prefer Y", "X is wrong here", or any explicit imperative that should outlive the current turn. SEPARATELY invoke (and call `brain_apply_evidence`) right after you produce a durable artifact (code shipped, file written, content drafted, config change) and at least one active preference (`brain_context` lists them) has a `scope` that plausibly applies — record whether you `applied` or `violated` it. SKIP only for casual chat, exploration without a stated rule, read-only inspection, and trivial edits. When a preference plausibly applies but you are unsure, RECORD with `note: "speculative; <reason>"` rather than skipping — the dream pass discards single-event speculative entries that do not recur, so coverage costs less than missing the signal. WRITE the `principle` and `note` fields in the same natural language the user has been speaking in this session; technical identifiers (`topic` slug, `pref_id`, `scope`) stay English./codegraph-partnerUse when the user explicitly mentions codegraph, asks structural code questions such as callers/callees/impact, asks where a symbol is defined, asks what breaks if a symbol changes, or asks for an architectural overview of a code repository. Skip for prose-only or vault-only questions.npx claudepluginhub itechmeat/open-second-brain --plugin open-second-brainOther plugins' skills for the same job