substrate · v1.0 rccausal-consequence scaffolding & protocol synthesis

Athinkingframeworkfortheagentsyoualreadyship.

episteme is a sovereign cognitive kernel that extracts context-fit protocols from conflicting information, records every decision on a tamper-evident hash chain, and actively guides execution when the reasoning surface goes thin.

pillars03
blueprints04
tests green565 / 565
protocols synthesizedlive
01 / three pillarsnot a library, a substrate

The kernel is small on purpose.
Three pillars. Everything else is scaffolding.

Agents fail confidently when they confuse fluent pattern-match with reasoning. episteme does not block that failure mode — it makes the mode structurally unavailable. Pillars below.

  1. pillar 0101

    Cognitive Blueprints

    Forcing functions, not policies.

    Four named blueprints (Fence, Consequence-Chain, Kernel-Adjacent, Architectural-Cascade) intercept writes at the exact point where patterns of confident-wrongness historically emerge. Each blueprint has a validator, a fallback, and a dogfood test — the kernel runs against itself before it runs against you.

  2. pillar 0202

    Append-Only Hash Chain

    Tamper-evident memory, not a log.

    Every Reasoning Surface seal, protocol synthesis, and deferred discovery writes one line to a SHA-256-linked JSONL chain. A corrupted past is not just noticed — it is unprovable to replay. Session boot walks the chain and fails closed on mismatch.

  3. pillar 0303

    Framework Synthesis & Active Guidance

    Protocols from practice, not from doctrine.

    The kernel observes decisions, extracts context-fit protocols, and injects them back into the next cycle through session digests and guide CLIs. The framework gets sharper every time you use it — not because you trained it, but because the chain made the lessons auditable.

02 / the reasoning surfacedistinction, not decoration

Four quadrants. Four categories of truth.
No proceeding while Unknowns is empty.

Every non-trivial decision is written onto a Reasoning Surface before execution. Knowns are facts with current evidence. Unknowns are named, not hidden. Assumptions are declared as assumptions. Disconfirmation states what evidence would prove the plan wrong. The chain records the seal.

kernel · uninitialized

No active reasoning surface

Run `episteme init` in your project root, then write a Reasoning Surface for your current core question. The kernel's guard creates .episteme/reasoning-surface.json on the next high-impact op.

kernel · uninitialized

Chain genesis pending

No hash-chained records under $EPISTEME_HOME/framework/. The first protocol synthesized on a successful op (Fence removal, Axiomatic judgment, Blueprint D firing) lands as the chain's first record.

03 / the loopframe · decompose · execute · verify · handoff

Five stages. None optional.
The kernel refuses to skip ahead.

Speed comes from loop completion, not step-skipping. The agent that consistently closes Observe → Orient → Decide → Act outruns the one that collapses stages to feel fast.

  1. stage 01

    frame

    Name the core question. Declare the uncomfortable friction driving the work. Build the distinction map — facts / unknowns / assumptions / preferences — before planning touches code.

  2. stage 02

    decompose

    Convert non-linear context into explicit tasks. Translate 'why' into 'how'. For major choices, state method, alternatives considered, and why this one fits the governing intent.

  3. stage 03

    execute

    One bounded lane per owner. Reversible moves first. Record assumptions when data is incomplete. The hash chain seals each step.

  4. stage 04

    verify

    Validate against success metric, not effort spent. Distinguish proven facts from inference. Evaluate the hypothesis — validated, refined, or invalidated.

  5. stage 05

    handoff

    Update authoritative docs. Capture unresolved risks and exact next action. Residual unknowns marked, not hidden.

04 / synthesized protocolsextracted, not authored

The framework sharpens itself.
Every decision becomes a protocol.

Hover any node to surface its because-chain: the signal that was observed, the cause that was inferred, the decision that landed. Every protocol is chain-linked — provenance is non-optional.

  • pr-cascade-degrade

    cascade-graceful-degrade

    88%

    Dispatch cascade detector before Fence via try/except ImportError so detector absence never breaks the guard pipeline.

    scenario_detector.py editedblueprint_d module referencedhot_path_import change detected
    invocations · 4b13e4a
  • pr-fence-pattern

    fence-pattern-validate

    94%

    Preserve unexplained kernel constraints until their purpose is reconstructed. Removal requires named reason.

    kernel-adjacent deletioncross-ref count > 2unchanged-since-N commits
    invocations · 11eac761
  • pr-self-verify

    hash-chain-self-verify

    91%

    On session start, walk the chain and report any prev_hash mismatch before admitting new writes.

    session startprotocols.jsonl modified out-of-bandprev_hash ≠ prior this_hash
    invocations · 269a432
  • pr-disc-required

    disconfirmation-required

    82%

    Reject a Reasoning Surface whose disconfirmation field is empty or tautological. A hypothesis without a failure mode is not a bet.

    surface sealeddisconfirmation emptytautological pattern match
    invocations · 6ffd39e
05 / active guidancethe kernel speaks

episteme guide
reads your surface and tells you what's missing.

One CLI. No config. Reads reasoning-surface.json, walks the hash chain, surfaces active protocols, and names the unknowns that are blocking the next step.

$ episteme guide
EPISTEME · active guidance · v1.0-rc
 
▶ surface: 8m fresh · domain=complicated · tacit_call=false
 
core question
Does the CP10 scaffolding land the four-trigger detector, six-field
validator, and hash-chained writer without orphan regression?
 
▲ unknowns (3) — proceed blocked until ≥1 cleared:
1. hot-path latency under 100ms p95 on non-cascade ops?
2. sensitive-path coverage vs. kernel-adjacent UPPERCASE docs?
3. deferred-discovery writer: one hash-chained record per entry?
 
✓ disconfirmation declared · 3 conditions
✓ hypothesis stated · confidence=0.82
 
active protocols (4)
· cascade-graceful-degrade (conf 88% · invoked 4)
· fence-pattern-validate (conf 94% · invoked 11)
· hash-chain-self-verify (conf 91% · invoked 2)
· disconfirmation-required (conf 82% · invoked 6)
 
↳ chain head: a3c9f1b2 · seq 0013 · 12s ago
06 / install

Install the substrate.
Then keep shipping — with a chain behind every decision.

$ pipx install episteme
$ episteme init # creates .episteme/ + chain genesis
$ episteme guide