/sci-brain:how-to-flowfrom sci-brain
Autonomous search solver for hard, testable goals. Iterates decide-simulate-learn-backjump cycles, modeled on CDCL SAT solvers, to find solutions when direct approaches fail.
Ships in sci-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.
Read when SKILL.md points to them.
Keep the working directory at the user's project. Resolve this loaded SKILL.md
with Path(path).resolve() before locating resources; follow symlinks. Bare
helpers/, references/, and template paths are relative to that real skill
directory. A path written as skills/<name>/... means the installed <name>
skill's directory from the agent's skill catalog, not a path in the user's project.
Locate each dependency by its public skill name; copied skills need not be siblings.
If a dependency is absent, report the missing skill and install it before that step.
Shared writing files are bundled in how-to-write-ideas-report/references/.
A deep-thinker that conquers one hard problem by autonomous search, modeled on a CDCL/DPLL SAT solver. Given a goal, it iterates — assume, follow consequences, hit walls, learn from the walls, jump back, and re-aim when truly stuck — until a solution emerges or it converges on an equally-valuable reachable goal.
Scope. Goal-locked, fully autonomous, domain-agnostic. This is not brainstorm-ideas
(open-ended, collaborative, research-only). Use how-to-flow when you already have a specific hard target
and want a relentless solver thrown at it. KB-optional: if <project>/.knowledge/INDEX.md exists,
treat its papers as a fact source for propagation; never require it.
| Solver concept | Here |
|---|---|
| Variable assignment (Decide) | what-if: assume a new condition |
| Unit propagation (BCP) | simulate: run consequences forward, reflect |
| Conflict | a contradiction or dead-end on the current branch |
| Conflict analysis + learned clause | the note taken after every trial |
| Non-chronological backtracking | backjump to the real cause, not one step |
| Restart (clauses kept) | pivot: re-aim the goal; notes survive |
| Decision heuristic (VSIDS) | pick the lever that shrinks distance most + is easiest; favor conditions seen in recent conflicts |
Maintain these throughout (in the journal file, see below):
trigger conditions → outcome → reusable lesson. These are the
whole point — they prune future search and guide backjumps.A solver loads every known fact before it searches. Before the first trial, ask yourself two questions and do not proceed until both are honestly answered:
Am I clear about the goal? Can I state GOAL in one sentence and write a success test that would unambiguously tell me it is solved? If not — the goal is underspecified. Resolve it: derive the missing constraint from context if you can, otherwise ask the user one sharp clarifying question. A blurry goal makes every later distance estimate noise.
Have I gathered every piece of information I already have? Sweep all available sources before assuming anything:
<project>/.knowledge/INDEX.md + NOTES.md, and
relevant rendered papers) — these become facts/unit clauses on the TRAIL for free,Anything you assume that was actually knowable up front is a self-inflicted dead-end. List what you found in the journal's "Levers & facts" section.
Only when GOAL is testable and the known facts are loaded do you enter Setup and the loop.
docs/flow/<goal-slug>.md (relative to the project working directory).
Create it from skills/how-to-flow/journal-template.md and fill the header (GOAL, success test, date).<project>/.knowledge/ if present). Estimate the initial distance.Run autonomously, one trial per iteration, until SOLVED / PIVOTED-SOLVED / EXHAUSTED.
1. ASSESS Estimate distance to GOAL given the current TRAIL.
Success test appears to pass? → run the FINAL CHECK (below)
before declaring SOLVED.
2. SELECT Choose the move via the heuristic:
· a promising untried lever exists → WHAT-IF
· you just made a decision → SIMULATE
· current branch is a dead-end/conflict → ANALYZE → NOTE → BACKJUMP
· no_progress ≥ 3 → PIVOT
3. EXECUTE Carry out the move (below).
4. NOTE Append a trial entry to the journal — ALWAYS, even on success.
5. UPDATE no_progress: reset to 0 if distance dropped, else +1. Loop.
Heuristic for picking the next what-if (VSIDS analogy): prefer conditions that (a) most shrink distance to GOAL if true, (b) are easiest to achieve, and (c) involve variables that showed up in recent conflicts (bump their priority). Break ties toward conditions that, if false, also teach you something.
Pick a candidate condition C and apply two tests:
Add C to the TRAIL at a fresh decision level either way.
From the current assumptions, follow the forced or strongly-implied consequences forward several
steps (if C then likely D, then E…). At each step, feel and reflect: note surprises, tensions,
symmetries, emerging structure — insight often arrives here, not at the decision.
Parallel paths (optional, for wide forks). When a fork has 2–3 genuinely competing continuations and choosing blindly would waste effort, dispatch one subagent per path to simulate it independently, then compare their reflections and adopt the most promising (and note the others' dead-ends so they are never re-tried). Use this only when the fork is wide enough to justify the token cost; otherwise simulate one path at a time.
On a conflict:
{X, Y} ⇒ dead-end because Z. This is the learned clause;
it must be general enough to fire again later.Trigger when no_progress ≥ 3 across the whole search, or conflicts stop teaching anything new. Step
out of the search and ask, in order:
Auto-select the most promising re-aimed/relaxed goal, keep all NOTES (they carry over — that is what makes this CDCL, not a fresh start), reset the TRAIL, update GOAL/GOAL_STACK, log the pivot rationale, and continue the loop.
A solver that claims SAT verifies the assignment satisfies every clause before stopping. Do the
same: the last round is always a simulate pass over the candidate solution, not a decision.
Take the proposed solution as the starting statement and run it forward, asking:
"Is this solution clear, actionable, and does it actually achieve the GOAL?"
If any answer is no, the check is a conflict: ANALYZE → NOTE the gap → BACKJUMP and keep searching (do not declare SOLVED). Only when all three hold do you settle. Record this final verification as the last trial in the journal.
Always end by ensuring the journal's final section is filled in.
Append a trial entry after every trial (this is the user's standing rule and the solver's clause
store). Format in skills/how-to-flow/journal-template.md. Keep entries terse — one block per trial — so the
file stays scannable and survives context compaction (the journal is the recoverable state of the run).
GOAL: prove a given graph property P holds for all planar graphs. Success test: a complete argument with no unjustified step.
- Trial 1 — what-if: assume the graph is a maximal planar triangulation. Relevance: yes (general case reduces to it). Tractability: easier (extra edges only help). → subgoal pushed. distance ↓.
- Trial 2 — simulate: propagate Euler's formula on triangulations → degree-sum bound emerges. Insight noted. distance ↓.
- Trial 3 — simulate: push the bound toward P → contradiction with a degree-2 vertex case. conflict.
- Trial 4 — analyze/note/backjump: note
{triangulation assumption} ⇒ misses low-degree vertices. Backjump to Trial 1's level; refine assumption to "triangulation after removing degree-≤2 vertices."- Trial 5 — simulate: re-propagate → P follows by induction on vertex removal. Success test appears to pass.
- Trial 6 — final-check: simulate the full argument forward — clear? actionable? meets the original GOAL with no NOTE still firing? Yes on all three. SOLVED.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
problem-solving, search, sat-solver, goal-oriented, autonomous-agent
npx claudepluginhub quantumbfs/sci-brain --plugin sci-brain16 skills in this plugin
/autoresearchUser trigger. Use when starting, resuming, or checking an autoresearch campaign — topics, evidence base, sealed validator, then validator-scored attempt loops./brainstorm-ideasUser trigger. Use when brainstorming research ideas with a Socratic collaborator who learns your background and helps find a problem worth attacking./create-advisorUser trigger. Use when creating or updating a named advisor profile from a researcher's conversation history./dump-chat-historyUser trigger. Use when exporting original conversations from selected harnesses and dates as a faithful transcript or a topic-titled Typst and PDF field note./how-to-analyze-dialogAgentic trigger. Use when classifying exported research conversations by topic and analyzing their prompting patterns across six academic dimensions./how-to-build-kbAgentic trigger. Use when turning a list of picked papers into verified knowledge-base entries — references.bib, INDEX.md, and NOTES.md.Other plugins' skills for the same job