Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ Cross-platform document editor with format tabs, allowing users to view and edit
## Architecture

- **Core**: Rust library with unified AST for format conversion
- **GUI**: Gossamer with ReScript frontend (not TypeScript!)
- **GUI**: Gossamer with AffineScript frontend (not TypeScript!)
- **TUI**: Ada with AdaCurses (matches git-hud pattern)
- **Storage**: ArangoDB for graph + document hybrid
- **Pipelines**: Nickel for import/export transformations

## Language Policy

### ALLOWED
- ReScript (UI components)
- AffineScript (UI components)
- Rust (core, GUI backend)
- Ada (TUI)
- Nickel (pipelines, config)
- Guile Scheme (SCM files)
- Deno (runtime)

### BANNED - Do Not Use
- TypeScript (use ReScript)
- TypeScript (use AffineScript)
- Node.js/npm/bun (use Deno)
- Go (use Rust)
- Python (not applicable here)
Expand All @@ -43,11 +43,11 @@ crates/
└── formatrix-pipeline/ # Nickel executor

tui/src/ # Ada TUI source
ui/src/ # ReScript components
ui/src/ # AffineScript components
pipelines/ # Nickel pipeline definitions
container/ # Wolfi container configs
guix/ # Guix channel + packages
nix/ # Nix flake (fallback)
guix/ # Guix flake (fallback)
```

## Build Commands
Expand All @@ -56,7 +56,7 @@ nix/ # Nix flake (fallback)
just build # Build all
just build-core # Build Rust core only
just build-tui # Build Ada TUI only
just build-ui # Build ReScript UI only
just build-ui # Build AffineScript UI only
just test # Run all tests
just fmt # Format all code
just lint # Lint all code
Expand All @@ -83,9 +83,9 @@ Each format implements:
- `Parser` trait: raw content → AST
- `Renderer` trait: AST → raw content

## ReScript Conventions
## AffineScript Conventions

- Use `@rescript/core` for stdlib
- Use `@affinescript/core` for stdlib
- TEA pattern: Model.res, Msg.res, Update logic in App.res
- Components in `src/components/`
- Bindings in `src/bindings/`
Expand All @@ -102,7 +102,7 @@ Each format implements:
```bash
just test-core # Rust unit tests
just test-tui # Ada compilation check
just test-ui # ReScript tests
just test-ui # AffineScript tests
just test-integration # Full integration tests
```

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/governance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# in hyperpolymath/standards instead of carrying per-repo copies.
#
# Replaces the per-repo governance scaffolding removed in the same commit:
# quality.yml, guix-nix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml,
# quality.yml, guix-guix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml,
# security-policy.yml, rsr-antipattern.yml, wellknown-enforcement.yml,
# workflow-linter.yml
#
Expand Down
4 changes: 2 additions & 2 deletions .machine_readable/6a2/PLAYBOOK.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml"
# .github/ CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, workflows/
# .machine_readable/ AI manifests (0.1-AI-MANIFEST.a2ml), 6a2/ checkpoints,
# contractiles/, configs/, anchors/, policies/, scripts/, svc/
# build/ contractile.just, flake.nix, guix.scm, Containerfile,
# build/ contractile.just, flake.guix, guix.scm, Containerfile,
# just/*.just (Justfile section imports)
# docs/ onboarding/, status/, architecture/, governance/ (all .adoc)
# session/ dispatch.sh, custom-checks.k9, local-hooks.sh
Expand Down Expand Up @@ -103,7 +103,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml"
# build/just/groove.just Groove protocol setup (after zig removed)
#
# Daily-use recipes (BUILD, TEST, LINT, RUN, DEPS, DOCS, CONTAINER, CI,
# SECURITY, STATE, GUIX/NIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION)
# SECURITY, STATE, GUIX/GUIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION)
# stay in the root Justfile where users expect to find them.

# === 5-PR cleanup pattern ===
Expand Down
4 changes: 2 additions & 2 deletions ABI-FFI-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
┌─────────────────────────────────────────────┐
│ Any Language via C ABI │
│ - Rust, ReScript, Julia, Python, etc. │
│ - Rust, AffineScript, Julia, Python, etc. │
└─────────────────────────────────────────────┘
```

Expand Down Expand Up @@ -79,7 +79,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
└── bindings/ # Language-specific wrappers (optional)
├── rust/
├── rescript/
├── affinescript/
└── julia/
```

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
git clone https://github.com/hyperpolymath/formatrix-docs.git
cd formatrix-docs

# Using Nix (recommended for reproducibility)
nix develop
# Using Guix (recommended for reproducibility)
guix develop

# Or using toolbox/distrobox
toolbox create formatrix-docs-dev
Expand Down Expand Up @@ -45,7 +45,7 @@ formatrix-docs/
├── MAINTAINERS.md
├── README.adoc
├── SECURITY.md
├── flake.nix # Nix flake (Perimeter 1)
├── flake.guix # Guix flake (Perimeter 1)
└── justfile # Task runner (Perimeter 1)
```

Expand Down
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Cross-platform document editor with format tabs (TXT/MD/ADOC/DJOT/ORG/RST/TYP).

* *Format Tabs* - View and edit the same document in multiple markup formats
* *Unified AST* - Lossless conversion between formats
* *GUI* - Gossamer with ReScript frontend
* *GUI* - Gossamer with AffineScript frontend
* *TUI* - Ada with AdaCurses for terminal usage
* *Graph Visualization* - ArangoDB for document relationships
* *Accessibility* - OCR, TTS, STT support
Expand Down Expand Up @@ -75,7 +75,7 @@ crates/
└── formatrix-pipeline/ # Nickel executor

tui/src/ # Ada TUI source
ui/src/ # ReScript components
ui/src/ # AffineScript components
pipelines/ # Nickel pipeline definitions
container/ # Wolfi container configs
----
Expand All @@ -96,7 +96,7 @@ container/ # Wolfi container configs
just build # Build all
just build-core # Build Rust core only
just build-tui # Build Ada TUI only
just build-ui # Build ReScript UI only
just build-ui # Build AffineScript UI only
just test # Run all tests
just fmt # Format all code
just lint # Lint all code
Expand Down Expand Up @@ -135,7 +135,7 @@ Automation scripts from https://github.com/hyperpolymath/scripts[hyperpolymath/s
| `touchscreen_hunter_killer.sh` | Touchscreen calibration/management
|===

These scripts follow the same language policy (Bash, Rust, ReScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy.
These scripts follow the same language policy (Bash, Rust, AffineScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy.

== License

Expand Down
4 changes: 2 additions & 2 deletions RSR_COMPLIANCE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This document certifies that *formatrix-docs* complies with the Rhodium Standard
| TUI implementation
| COMPLIANT

| ReScript
| AffineScript
| UI components
| COMPLIANT

Expand Down Expand Up @@ -94,7 +94,7 @@ No banned languages (TypeScript, Node.js, npm, Go, Python) are present in this r
- `build-core` - Rust core
- `build-gui` - Tauri GUI
- `build-tui` - Ada TUI
- `build-ui` - ReScript UI
- `build-ui` - AffineScript UI
- `build-release` - Release mode

=== Quality Recipes
Expand Down
8 changes: 4 additions & 4 deletions RSR_OUTLINE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ project/

=== Language Tiers

* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript
* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix
* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript
* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix
* **Infrastructure**: Guix channels, derivations

=== Required Files
Expand All @@ -163,12 +163,12 @@ project/
* `.well-known/security.txt`
* `.well-known/ai.txt`
* `.well-known/humans.txt`
* `guix.scm` OR `flake.nix`
* `guix.scm` OR `flake.guix`

=== Prohibited

* Python outside `salt/` directory
* TypeScript/JavaScript (use ReScript)
* TypeScript/JavaScript (use AffineScript)
* CUE (use Guile/Nickel)
* `Dockerfile` (use `Containerfile`)

Expand Down
4 changes: 2 additions & 2 deletions TOPOLOGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ GUI (TAURI 2.0) │ │ TUI (ADA) │
│ (ReScript / React)│ │ (AdaCurses) │
│ (AffineScript / React)│ │ (AdaCurses) │
└──────────┬────────┘ └──────────┬────────┘
│ │
└──────────┬───────────┘
Expand Down Expand Up @@ -66,7 +66,7 @@ CORE ENGINE (RUST)
ArangoDB Client ██████████ 100% Document persistence stable

USER INTERFACES
Tauri 2.0 GUI ████████░░ 80% ReScript UI components active
Tauri 2.0 GUI ████████░░ 80% AffineScript UI components active
Ada TUI (AdaCurses) ██████░░░░ 60% Layout logic in progress
Graph Visualization ████░░░░░░ 40% Initial D3.js prototyping

Expand Down
8 changes: 4 additions & 4 deletions docs/MOSCOW-REQUIREMENTS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This document defines Must/Should/Could requirements for each component of the d
|✅ Done

|FD-M08
|Format tabs component (ReScript)
|Format tabs component (AffineScript)
|🔲 Pending

|FD-M09
Expand Down Expand Up @@ -242,7 +242,7 @@ This document defines Must/Should/Could requirements for each component of the d
|✅ Done

|RSA-M13
|WASM bindings for ReScript
|WASM bindings for AffineScript
|✅ Done

|RSA-M14
Expand Down Expand Up @@ -365,7 +365,7 @@ This document defines Must/Should/Could requirements for each component of the d
|ID |Requirement |Status

|DB-M01
|Module structure with ReScript types
|Module structure with AffineScript types
|🔲 Pending

|DB-M02
Expand Down Expand Up @@ -484,7 +484,7 @@ This document defines Must/Should/Could requirements for each component of the d
|ID |Requirement |Status

|DD-M01
|Module structure with ReScript types
|Module structure with AffineScript types
|🔲 Pending

|DD-M02
Expand Down
8 changes: 4 additions & 4 deletions docs/SEAM-CHECK-MUSTS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This document validates integration seams between ecosystem components after imp

[cols="2,2,1"]
|===
| Rust (commands.rs) | ReScript (Protocol.res) | Status
| Rust (commands.rs) | AffineScript (Protocol.res) | Status

| `DocumentEvent::Created { hash, path, format, timestamp }` | `documentEvent { id, eventType: Created, hash, path, format, timestamp, source }` | ⚠️ GAP
| `DocumentEvent::Modified { hash, old_hash, path, format, timestamp }` | Uses `oldHash: option<string>` | ✓ ALIGNED
Expand All @@ -46,7 +46,7 @@ The Rust `DocumentEvent` lacks `id` and `source` fields that Protocol.res expect

[cols="2,2,1"]
|===
| Rust (ffi.rs) | ReScript Usage | Status
| Rust (ffi.rs) | AffineScript Usage | Status

| `FfiFormat` enum (7 variants) | `Protocol.documentAst.format: string` | ⚠️ GAP
|===
Expand All @@ -61,7 +61,7 @@ Rust uses enum `FfiFormat`, Protocol uses plain strings. Need mapping layer.

[cols="2,2,1"]
|===
| Rust (ast.rs) | ReScript (Protocol.res) | Status
| Rust (ast.rs) | AffineScript (Protocol.res) | Status

| `Document` struct | `documentAst` type | ⚠️ NEEDS BRIDGE
| `Block` enum | `blockElement` type | ✓ ALIGNED (conceptually)
Expand All @@ -76,7 +76,7 @@ Direct AST interchange requires serialization/deserialization. Current implement

[cols="2,2,1"]
|===
| Rust (commands.rs) | ReScript (Protocol.res) | Status
| Rust (commands.rs) | AffineScript (Protocol.res) | Status

| SHA-256 via `sha2` crate | `hashAlgorithm = "sha256"` constant | ✓ ALIGNED
|===
Expand Down
8 changes: 4 additions & 4 deletions docs/V1-PUBLISH-ROADMAP.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ For v1 publish, the following are **required**:

=== Phase 2: GUI/TUI Implementation

.Formatrix GUI (Tauri 2.0 + ReScript)
.Formatrix GUI (Tauri 2.0 + AffineScript)
* [ ] Basic shell with format tabs
* [ ] Editor component (CodeMirror 6)
* [ ] File operations dialog
Expand Down Expand Up @@ -112,7 +112,7 @@ For v1 publish, the following are **required**:
* [ ] Wolfi container image for all components
* [ ] nerdctl-compose.yml for full stack
* [ ] Guix channel with packages
* [ ] Nix flake (fallback)
* [ ] Guix flake (fallback)
* [ ] CI/CD pipelines

.Documentation
Expand Down Expand Up @@ -178,7 +178,7 @@ For v1 publish, the following are **required**:
----
formatrix-core
├── formatrix-gui (Tauri)
│ └── ui/ (ReScript)
│ └── ui/ (AffineScript)
├── formatrix-tui (Ada)
├── formatrix-db
│ └── arangodb
Expand Down Expand Up @@ -288,7 +288,7 @@ docudactyl
|Abstract provider layer
|Planned

|ReScript ecosystem
|AffineScript ecosystem
|Low
|Fallback to JS if needed
|Monitor
Expand Down
4 changes: 2 additions & 2 deletions docs/reports/audit/audit-2026-04-15-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

## Findings Summary
- 11 unwrap/expect calls in crates/formatrix-core/src/file_ops.rs
- flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in nix/flake.nix
- flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in guix/flake.guix
- 14 TODO/FIXME/HACK markers in contractiles/self-validating/template-hunt.k9.ncl
- flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.nix
- flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.guix

## Final Grade
- **CRG Grade:** D (Promoted from E/X) - CI and lockfiles are in place.
16 changes: 8 additions & 8 deletions examples/web-project-deno.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"// NOTE": "Example deno.json for ReScript web projects",
"// NOTE": "Example deno.json for AffineScript web projects",
"tasks": {
"build": "deno run -A npm:rescript",
"clean": "deno run -A npm:rescript clean",
"watch": "deno run -A npm:rescript -w",
"build": "deno run -A npm:affinescript",
"clean": "deno run -A npm:affinescript clean",
"watch": "deno run -A npm:affinescript -w",
"serve": "deno run -A jsr:@std/http/file-server .",
"test": "deno test --allow-all"
},
"imports": {
"rescript": "^12.0.0",
"@rescript/core": "npm:@rescript/core@^1.6.0",
"safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/",
"proven/": "../proven/bindings/rescript/src/"
"affinescript": "^12.0.0",
"@affinescript/core": "npm:@affinescript/core@^1.6.0",
"safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/affinescript-dom-mounter/main/src/",
"proven/": "../proven/bindings/affinescript/src/"
},
"compilerOptions": {
"allowJs": true,
Expand Down
Loading
Loading