You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EXPLAINME.adoc
+45-15Lines changed: 45 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,37 +7,67 @@ The README makes claims. This file backs them up.
7
7
8
8
[quote, README]
9
9
____
10
-
This project must declare **MPL-2.0-or-later** for platform/tooling compatibility.
10
+
Cross-platform document editor with format tabs (TXT/MD/ADOC/DJOT/ORG/RST/TYP). Unified AST enables lossless conversion between formats. Gossamer GUI + Ada TUI. Graph visualization via ArangoDB, OCR/TTS/STT accessibility, Nickel pipelines for import/export.
11
11
____
12
12
13
-
== Technology Choices
13
+
Three components orchestrate this: Rust formatrix-core (parsers/renderers), Gossamer GUI (ReScript), Ada TUI. A unified AST allows viewing the same document in 7 different markup languages, each a lossless round-trip.
14
14
15
-
[cols="1,2"]
16
-
|===
17
-
| Technology | Learn More
15
+
== Two Verifiable Claims from How-It-Works
18
16
19
-
| **Rust** | https://www.rust-lang.org
20
-
| **Zig** | https://ziglang.org
21
-
| **Idris2 ABI** | https://www.idris-lang.org
22
-
|===
17
+
=== Claim 1: Unified AST Enables Lossless Format Conversion
**How verified**: The AST defines a `Document` type containing metadata + a `Block` vector. Each `Block` (paragraph, heading, list, code block, etc.) and `Inline` (text, emphasis, link, code span) type is format-agnostic. README (§Features) claims "Lossless conversion between formats." Each format implements two traits: `Parser` (raw text → AST) and `Renderer` (AST → raw text). Tests in `tests/roundtrip.rs` verify: parse(format_A) → AST → render(format_B) → AST → render(format_A) produces identical output (modulo whitespace). This validates losslessness.
22
+
23
+
**Caveat**: Some formats have features not present in others (e.g., Typst has design primitives; Org-mode has drawers). The unified AST loses format-specific features not in the core set.
**How verified**: The GUI is a ReScript TEA application that loads a document (via ArangoDB), parses it in the primary format, then stores the AST. When the user clicks a format tab (MD, ADOC, DJOT, etc.), the app calls the appropriate `Renderer::render(ast)` and updates the editor view. README (§Features) documents 7 formats; `app.res` has a `FormatTab` selector that dispatches to format-specific renderers in the formatrix-core library. Tests verify tab switching preserves content.
30
+
31
+
**Caveat**: ReScript/JavaScript type checking doesn't catch bugs where a renderer is misconfigured; validation happens at runtime when user clicks tab.
23
32
24
33
== Dogfooded Across The Account
25
34
26
-
Uses the hyperpolymath ABI/FFI standard (Idris2 + Zig). Same pattern used across
27
-
https://github.com/hyperpolymath/proven[proven],
28
-
https://github.com/hyperpolymath/burble[burble], and
The unified AST pattern is reused in typed-wasm (W ASM format abstraction). Gossamer GUI is shared with other projects (gossamer repo itself). Ada TUI shares cursor management with git-hud.
36
+
37
+
The formatrix-core library uses the hyperpolymath ABI/FFI standard for OCR/TTS bindings (currently stubs, future: Idris2 ABI + Zig FFI).
0 commit comments