Saltar al contenido principal
C

clearai-dsh

clearailhc/clearai-dsh

ClearAI: The Epistemic Loop, nativo de DSH.

Instalar

dsh plugin --profile web add github:clearailhc/clearai-dsh

README

ClearAI

English · 中文

From answers to evidence. From evidence to improvement.

ClearAI is a native DSH plugin that brings the Epistemic Loop to DeepSeek Harness.

A language model can produce a plausible answer in seconds. ClearAI is about what happens next: stating what would test the idea, running the work, recording what happened, evaluating the evidence, and revising what is believed — so that a conclusion has to earn its status instead of asserting it.

The Epistemic Loop

Let the model explore. Let the mechanism protect the boundary of fact.


Install

One command, and it needs nothing but Node:

npx clearai-dsh install

It resolves the DSH CLI (from your PATH, or through npx), installs the plugin into your web profile, and reads the composed config back so you are not taking "success" on faith. Underneath it is the host's own install, so this is the same command: dsh plugin --profile web add clearai-dsh.

Restart dsh web after that (npx @deepseek-ai/dsh web). Both halves of the plugin are cached inside the running process, so refreshing the browser is not enough. Then open a session and pick ClearAI in the preset picker.

If it stops because pnpm is not on your PATH: DSH manages a profile by driving pnpm, so it needs one. Install it with npm install -g pnpm, or your system package manager. Prefer that to corepack enable, which installs a version router rather than pnpm, and the corepack shipped with current Node can fetch a pnpm it is unable to launch.

From a checkout (development, not the install path):

npm test                       # 13 suites — the list lives in test/run.sh
node tools/build-package.mjs   # assemble dist/ from source
node tools/verify-package.mjs  # rebuild and compare byte-for-byte
node tools/verify-clean-install.mjs   # install into an empty DSH_HOME through the real CLI
node docs/diagrams/build.mjs   # regenerate the loop diagram (needs google-chrome)

dist/ is generated and never committed. See DSH integration.

Why this is not just another agent loop

Most agent loops track one thing: whether the task is done. The Epistemic Loop also tracks how a conclusion came to be trusted:

Task loopEpistemic Loop
Driving questionWhat do I do next?What do we know, and on what grounds?
CompletionThe model declares itThe system computes it from delivered evidence
JudgmentWhoever did the workSeparated — above a level, the doer cannot judge its own result
FailureDeleted, retried, forgottenKept: a refuted hypothesis is a result, not noise

ClearAI implements that loop as mechanism, not advice. State is derived from the session record rather than stored twice, progress and phases are computed, and the tools the model holds contain no field in which it could declare a step complete.

ClearAI does not claim recursive self-improvement. It provides the epistemic substrate that a self-improving system would need: an honest account of what changed, what supports it, who evaluated it, and what failed. See Positioning and the OpenRSI survey for where that boundary sits.

The loop, stage by stage

The Epistemic Loop has seven stages. At runtime, these stages compress into four beats—plan, execute, observe, reflect—for a simpler operating rhythm.

StageWhat the model doesWhat the mechanism guaranteesWhat you see
FrameBounds the question, assumptions, scope, and outcomeThe inquiry starts with an explicit frameScope and assumptions
HypothesizeRecords candidate explanations or routesPropositions remain distinct from admitted factsHypotheses
PlanDefines executable, evidence-bearing steps and criteriaCompletion is advanced only through governed pathsInspectable plan
ObserveRuns permitted work and records what happenedAdmission checks eligibility, never truthObservations and artifacts
VerifyTests observations against the stated criteriaVerification remains tied to the proposition and its limitsChecks and evidence
EvaluateAssesses support, uncertainty, and conflictsHigher-level work can require independent evaluationEvaluation and basis
Record and actPreserves the result and chooses the next bounded actionHistory is retained; unresolved claims stay qualifiedFacts, limits, and next step

Full version: The Epistemic Loop

What it looks like

The plugin contributes three surfaces on top of stock DSH: a deliverables view in the middle column, and worldlines / propositions & facts / external brain panes on the right.

Propositions and facts — every claim is one row: its current standing, its level, and who judged it. Confirmed conclusions move to the shelf with their scope; refuted ones stay, with the evidence that refuted them.

Propositions and facts

Worldlines — when two routes genuinely disagree, they run as separate branches with their own readings; the record keeps the ones that lost, and adoption is a human decision.

Worldlines

Deliverables — the middle column shows what a plan declared and what actually exists on disk, and refuses to conflate the two.

Deliverables

External brain — skills and memory appear as native DSH entries in one merged catalogue, with the usage of this session next to them.

External brain

Where it lands in DSH

ClearAI adds an epistemic layer on the DSH composition surface — one host package, one agent preset, one client module. The DSH engine is not modified. /goal /plan /evidence /worldline /plan-review are the human's read-only state windows in the / menu (computed from the ledger on the spot); todo, subagents, workflows and model switching are DSH-native — working style is unbounded, but none of it can write the authoritative ledger (the authority boundary is pinned by tests).

ClearAI in DSH

Cases

Three cases, written to show what the loop does on questions where the honest answer is not a clean result:

  • AI for Science — convergence order of WENO reconstructions near critical points, and what "we could not resolve it" honestly means.
  • Mathematics — keeping finite numerical evidence strictly separate from proof.
  • Physical-world process experiment — keeping the loop intact when execution leaves the computer.

They are illustrations of the mechanism, not shipped run records.

Documentation

Work attribution

This project is developed and maintained under the work attribution of 基点起源.

Star history

Star History Chart

License

Apache-2.0. See LICENSE.

Status

This repository is the DSH-native ClearAI plugin library: a local-first epistemic workspace delivered through DSH. What is not implemented, and what has not yet been verified in a real browser, is listed explicitly in known gaps.

Plugins relacionados