--- status: current version: 0.5.0 canonical: true audience: [ai, human] last_updated: 2026-10-05 --- # Design History The version lineage of EveGlyph Editor across five milestones: v0.1, v0.2, v0.3, v0.4 and v0.5. v0.1 – v0.4 have shipped (dates are given where they are recorded). v0.5.0 is the current **preview**; its release date is set when it is published. Nothing here describes work that has not been built; items that are intended but not built are called out separately at the end. ## v0.1 — prototype The initial build: the editor core (CodeMirror 6 + `marked` + KaTeX), a file tree and tabs, a Settings panel, the local-agent bridge (with Claude Code / Codex / Gemini support), AI presets, and agent detection. ## Internal rename — 2026-06-25 Before the v0.2 cleanup, the project was internally renamed from an earlier codename — **Noema/Noesis Studio**, with the bridge/package internally code-named **`cogniflow`** — to **EveGlyph Editor**, and its document format was named **EveGlyph-MD**. The rename is complete in code. ## v0.2 — open-source cleanup (`0.2.0`) The hardening pass that made the project ready to publish: - **DOMPurify** XSS guard on the preview. - Origin/CSRF guard (the `isLocalRequest` gate on the bridge). - Monitor log rotation. - Encoding support — detection plus a per-file menu, and a Settings default as a soft fallback. - The internal `cogniflow` → `eveglyph` rename. - **PatchMD** git diff-review (the first version of the diff-based accept/reject flow). - In-file find/replace. - README and SECURITY.md written and fact-checked. ## v0.3 — agent-native workspace (`0.3.0`, 2026-06-18) The milestone the project's own progress notes called "the main line" — the release that made the workspace itself agent-aware: - **`.eveglyph/` workspace memory + context compiler** (`src/context.js`) — injecting `rules.md`, `glossary.md`, `memory/pitfalls.md`, and `memory/recent.md` into every agent run, editable in-app via the file tree. - **Agent modes** — Suggest (advise only), Patch (edit plus diff-review, the default), and Direct (apply plus one-click revert). - **Built-in presets** — clean-up, academic-expand, preserve-voice, fix-katex, normalize-headings, extract-whitepaper, plus workspace-scoped generate-changelog and workspace-audit presets, and an import-fix preset. - **Workspace search** (`src/search.js`) — exact string/regex, case and whole-word options, current-file or workspace scope, with a results list and click-to-jump. Explicitly a human-owned navigator, not an AI feature. - **Workspace replace** — in-file replace is `Ctrl+Z`-undoable; workspace-wide replace goes through a git snapshot, diff, and revert, with a confirmation step, a regex warning, and per-file failure tracking. - **Config layer** (`src/config.js`) as the system's explicit contract for every configurable variable and its default. - **Settings UI** — theme, editor font size and family, memory master and per-layer toggles, agent permission, run timeout, and show-raw-output. - **Agent permission tiers introduced** — Cautious / Standard / Trusted — but at this stage they were **advisory only**: they changed the wording of a capability clause added to the agent's prompt, and "Trusted" only skipped a re-confirmation step. They did not yet change what the underlying CLI was actually allowed to do. - **DOCX → MD import** (`src/import.js`) via `mammoth` and `turndown`, with a three-stage workflow: import, then a rules cleanup pass, then an optional AI preset. - **Print/PDF output** via `@media print` and `window.print()`. - **EveGlyph-MD frontmatter schema** (`src/frontmatter.js`) — `type` / `status` / `tags`, with a round-trip-safe line-based YAML-subset parser, a status-bar chip and popover, preview schema badges, and new-file stamping. The active document's class is injected into agent context as fenced, enum-clamped, sanitized metadata. - **Monitor log viewer** (`src/monitorview.js`) reading the diagnostic stream, plus Gemini CLI parity. - **Product identity/licensing** — a single `CONFIG.product` source feeding an About panel (version, `EG-MD-2026`, author, company, license) and a topbar version badge; MIT `LICENSE`, real `package.json` metadata, and the README's "About & License" section. ## v0.4 — review UX + real permission-tier enforcement (`0.4.0`, 2026-06-27) Described in the project's progress notes as the "0.4-lite" line — deliberately decoupled from a larger desktop rewrite that was then planned. What shipped as 0.4.0: - **Bug-fix and cleanup batch** — a corrected `.eveglyph/memory/pitfalls.md` path; a failed diff-read now surfaces a warning instead of a false "no changes" result; whole-word regex search groups its pattern correctly; the agent output stream now uses a **stateful UTF-8 decoder**, fixing CJK mojibake caused by multi-byte sequences split across stream chunks; and `Ctrl+F` behavior made coherent (CodeMirror's in-file search inside the editor, the workspace Find panel everywhere else). - **Diff-review UX unification** (`src/diffview.js`) — one shared renderer used by both the agent panel and workspace replace-all: a unified diff grouped into per-file cards with +/− counts, collapsible, and fully escaped since it renders untrusted agent/git output. - **Real permission-tier enforcement** — Cautious / Standard / Trusted now flow to the bridge and map to actual CLI behavior: Claude Code's `--permission-mode` plus a tool allow-list, Codex's `--full-auto` (or a sandbox bypass at Trusted), and Gemini's `--approval-mode`. This replaced the v0.3 tiers, which had only changed prompt text. - **Live agent activity panel** — a transient "working…" view streaming the agent's output tail (respecting the quiet setting), replaced by the diff view once the run completes. - **Onboarding and a bundled `examples/` workspace** — a three-step empty state for a fresh clone, plus a sample workspace containing EveGlyph-MD documents and a starter `.eveglyph/` directory. ## v0.5 — computable documents, publishing and MCP (`0.5.0`, preview) Where v0.3 made the workspace agent-aware and v0.4 made review trustworthy, v0.5 makes the *document itself* computable and publishable, and lets other AI clients work with a workspace directly. By theme: - **Computable documents.** A first spreadsheet-style `::: aimd :::` block was replaced by **AIMD-C** — typed values, pure functions, a real dependency graph, assertions, and live re-evaluation, with `@id.field` and `{{ id.field }}` references, evaluated by a closed-grammar evaluator with no `eval`. **Dynamic Logic** added claim / evidence / judgment / history blocks with a deterministic reducer, UI-local replay, and an event-driven browser renderer (autoplay, timeline, reduced-motion aware). - **Math you can trust.** A math **diagnostics panel** (formulas no longer fail silently), **Safe Rewrite** for syntax aliases KaTeX lacks, and an automatic lazy **MathJax fallback**. - **Publishing.** **PDF export via Typst** (client-side WebAssembly), with named themes (`typst_theme`) and layout profiles (`typst_layout`), real typeset AIMD-C output, sequentially numbered Theorem / Lemma / Definition callouts and Traditional Chinese support. **Visual IR** `chart` and `plot` blocks render in the preview as SVG. - **MCP.** A stdio **MCP server** (list / read / write files, evaluate AIMD-C, validate World IR), a loopback-HTTP **remote MCP** variant with mandatory bearer-token auth and a Settings toggle, and a headless **publication runtime** (inspect, validate and render a document to a temporary PDF artifact with source/artifact hashes) built on the same Typst conversion as the browser export. - **Capability sandbox foundation.** AIMD-C computation now enters through a deny-by-default `document-only` capability profile with actor-aware audit evidence; the same vocabulary maps the MCP tools' authority needs as groundwork for later authorization. - **Worlds.** **World IR** views for `state_machine` / `entity` / `entity_list` YAML (folded back from a separate fork), a **Studio** AI draft panel with bounded, locally validated drafts and controlled randomness, and an opt-in advanced World Studio surface with guided write-back to the editor buffer. - **Search and assist.** An **AI semantic search** mode kept separate from exact search, and a **RigorLoop audit** preset (a heuristic scanner, not a theorem prover). - **Interface.** English / 繁體中文 interface, Studio / Paper / Midnight themes, Custom CSS, a full h1–h6 heading scale, a consolidated topbar, resizable panes, and in-app Changelog and User Guide tabs. - **Desktop.** A Windows desktop app: an Electron shell over the same local bridge and frontend (loopback-only server, per-launch API token, sandboxed window), built into a per-user installer and a zip by `desktop/build.mjs`. Unsigned. - **Fixes.** World Studio no longer blocks Apply for valid state machines that infer their states from transitions; a single-paragraph callout no longer renders a stray `` block. ## Intended but not built - **Code signing, auto-update, and macOS / Linux desktop builds.** The Windows installer is unsigned; the earlier Tauri idea was not pursued. - **OS-keychain API-key storage**; today API keys remain in `localStorage` in plaintext, in the browser build and in the desktop app (see `SECURITY.md`). - **Chart / plot PDF export** and a diagram IR for them. - **A user-facing capability-grant flow** and authorization middleware that consumes the capability model; OS-level sandboxes and credential brokerage as separate layers behind it. ## See also - [origin.md](./origin.md) — the problem this project addresses. - [current.md](./current.md) — the authoritative description of v0.5.0. - [public-summary.md](./public-summary.md) — a short citable summary.