Rational Delirium

unlisted

by MkaliezZ

Read-only CASE workspace projection: context, relations and native navigation for the Rational Delirium vault.

Updated 17d agoMIT
View on GitHub

Rational Delirium · 理性失序

English · 简体中文

A local-first knowledge workspace for humans and agents. Obsidian is optional.

Keep your material in Markdown. Use CASE / EVIDENCE / HYPOTHESIS / LOOP to connect experiences, inspect supporting and opposing evidence, compare explanations, and revisit recurring patterns.

v1.11.0 is an engineering preview. It is intended for local text knowledge and users comfortable with Markdown or existing agent clients.

Download the preview · Current validation · Usage and recovery

What you can do

  • Collect Markdown or plain text, preserve the original, and review paragraph-level role suggestions.
  • Build a knowledge base from an explicit local/GitHub scope with an existing Agent: collect source snapshots, extract important four-role knowledge, review directed relations and retain uncertain candidates.
  • Organize cases, evidence, hypotheses, and recurring patterns without duplicating a note's identity.
  • Browse a case index and directed relation views with excerpts, support, contradiction, supplements, and missing evidence.
  • Search saved content, aliases, declared relationships, and source references. Search relevance is lexical ranking, not a truth score.
  • Edit notes, review an agent's concrete change proposal, inspect history, and recover interrupted writes with version checks.
  • Export Markdown knowledge packages and JSON, CSV, Markdown, or Mermaid relationship files.
  • Connect an existing agent through CLI, the Node SDK, or MCP. Check citations, formal relationships, candidate status, and current/historical version coverage before delivery.

Roles describe how knowledge is used; they do not certify its truth. Similarity does not automatically become support, contradiction, or a confirmed recurring pattern. Uncertain relationships stay candidates.

Start with the download

Install Node.js 24+, then unpack the standalone ZIP from the release page. The runtime includes its dependencies; it needs no runtime npm installation, Python, database, or Obsidian.

On Windows, double-click Start-RD.cmd. It creates a knowledge folder beside the package by default. Keep the service window open. Node itself is not bundled.

For an explicit synthetic example, run from the unpacked directory:

node dist-agent/rd.mjs demo --root ./example-knowledge
node dist-agent/rd.mjs serve --root ./example-knowledge

Open the printed local URL, normally http://127.0.0.1:4399. If the port is occupied, add --port 4400. demo accepts only an empty directory.

To use your own Markdown directory:

node dist-agent/rd.mjs init --root ./my-knowledge
node dist-agent/rd.mjs serve --root ./my-knowledge

Initialization adds workspace metadata and an external approval key while preserving existing notes. Keep a full backup of important material. Read-only viewing uses serve --read-only.

Build from source

npm ci
npm run build
node dist-agent/rd.mjs demo --root ./example-knowledge
node dist-agent/rd.mjs serve --root ./example-knowledge

The optional Obsidian plugin is built separately into dist/ by the same build. The standalone workspace does not require the plugin.

Connect an agent

Build your knowledge base with one entry

Copy and edit scope.json, or use Agent 自动建库 in the local UI to generate it. Specify the material paths, public GitHub repository, document patterns, historical refs and purpose. Then let your local Agent run:

node dist-agent/rd.mjs intake --root ./my-knowledge --manifest ./scope.json --dsh-entry /absolute/path/dsh/lib/bin.js --serve

RD initializes the destination, collects the selected source text, calls your configured DSH Agent to judge importance and classify CASE / EVIDENCE / HYPOTHESIS / LOOP, checks citations, independently reviews proposed relationships, writes Markdown and opens the local service. Source locations, hashes, GitHub commits and historical snapshots are retained. Candidates carry missing evidence and remain separate from formal edges. Repeat the command for incremental collection; matching processed sources are reused and existing notes are preserved.

For another Agent, use --adapter /path/to/adapter.mjs or SDK runIntake. Without an Agent adapter, the command only collects sources and returns awaiting-agent; it does not claim semantic organization is complete. Input supports UTF-8 Markdown/plain text and common visible-message JSON/JSONL exports. PDF/Office files and other chat stores need a text export first. GitHub intake currently uses public repositories; private repositories can be exported locally.

Scope, adapters, limits, statuses and recovery

Use existing knowledge

Start a local MCP stdio server from a compatible client:

node dist-agent/rd.mjs mcp --root /absolute/path/knowledge

MCP defaults to read-only. --write exposes proposals and application of approved changes; it never exposes approval or direct-save tools. Full host filesystem access remains outside this cooperative boundary.

For host-enforced answer checks, use SDK runAgentTask or the optional installed-DSH adapter:

node dist-agent/agent-run.mjs --root /absolute/path/knowledge --questions /path/questions.json --output /path/new-run --dsh-entry /path/installed/dsh/lib/bin.js

The host preflights source coverage, checks the complete draft, returns concrete errors for repair, and retains explicit uncertainty when evidence is insufficient. Consume the returned delivery, rather than unchecked model output. Direct prepare_answer clients must supply the original questions.

Rational Delirium does not bundle a model or API credentials. An external agent/model may process the supplied context according to that client's configuration.

Agent workflow · Delivery contract · Source reading

Validation and scope

  • 726 Vitest + 62 Python checks; the full validation workflow passes on Windows and Ubuntu.
  • New real DSH intake: 4 sources → 16 knowledge units, 50 exact citations, 15 formal complements and 3 candidates; original personal knowledge is preserved. Evaluation.
  • The historical v1.10.0 local DSH answer re-evaluation covers 14 existing personal-material questions: 77 exact citations and 23 formal relationships align with saved sources and declarations. Two questions retain source-coverage uncertainty.
  • Independent-runtime, MCP, HTTP, knowledge-package, and recovery scenarios have engineering checks. These do not establish long-term reliability or real-world outcomes.

The current preview focuses on local text knowledge. PDF/OCR, attachment previews, cloud synchronization, and built-in model chat are future work. Manual paragraph suggestions use rules; automatic intake uses your configured external Agent with host source checks and a second relation-review call. A reviewed relation is a scoped interpretation, not proof that its source is true. Fourteen existing questions are not a new blind benchmark or a general accuracy guarantee.

Knowledge ZIPs migrate indexed Markdown and declared relationships. They exclude attachments, approval keys, and complete execution history; keep the workspace and external keys separately for full recovery.

Release validation · Source/version evaluation · Four-role formats · Three-layer design

Package a release

From a clean source checkout with Node 24+ and build dependencies installed:

npm run validate > validation.log
npm run package:agent -- --output ../release-output --validation-log ./validation.log

Use a new output directory. Packaging preserves earlier deliveries, records the source commit and file hashes, and creates standalone/plugin ZIPs plus SHA256SUMS.txt. The packaging step uses Node and does not require Python; running the Python test suites requires Python and the declared test dependencies.

License

MIT. Bundled dependencies retain their licenses in THIRD_PARTY_NOTICES.txt; the icon assets include their own license.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.