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
72 changes: 56 additions & 16 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,37 @@ setup:
deno task setup
rustup target add wasm32-unknown-unknown || true

# Build the project (ReScript compile + esbuild web bundle)
build:
deno task build

# Build the Rust core to WASM for the browser
build-wasm:
deno task build:wasm

# Build the project (ReScript compile + esbuild web bundle)
# Depends on build-wasm: esbuild resolves web/wasm/nexia_core.js when it bundles.
build: build-wasm
deno task build

# Run all tests (Rust core + UI)
test:
# Depends on build: the UI tests import the generated *.res.js and the wasm
# bindings, so a clean checkout cannot go straight to `just test` without them.
# Both builds are incremental — a warm no-op costs well under a second.
test: build
deno task test

# Rust core tests only — no build step, for a tight inner loop
test-rust:
deno task test:rust

# Run the development server (http://localhost:5173)
run:
deno task dev

# Static checks — Deno lint, rustfmt, clippy
# Mirrors rust-ci.yml exactly: --all-targets --features wasm, run from the
# workspace root. A narrower clippy here would pass locally and fail in CI.
check:
deno lint
cd core && cargo fmt --check && cargo clippy -- -D warnings
cargo fmt --check
cargo clippy --all-targets --features wasm -- -D warnings

# Publish docs/wikis/*.md to the GitHub wiki (docs/wikis/ is the source of truth)
# just wiki-sync dry # preview what would change, push nothing
Expand Down Expand Up @@ -78,10 +89,35 @@ doctor:
@command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found"
@command -v deno >/dev/null 2>&1 && echo " [OK] deno" || echo " [FAIL] deno not found (need Deno 2.x)"
@command -v cargo >/dev/null 2>&1 && echo " [OK] cargo" || echo " [FAIL] cargo not found (need Rust stable)"
@echo "Checking the WASM toolchain (the browser build depends on it)..."
@rustup target list --installed 2>/dev/null | grep -q wasm32-unknown-unknown \
&& echo " [OK] wasm32-unknown-unknown target" \
|| echo " [FAIL] wasm32-unknown-unknown target missing — run 'just setup'"
@just _wasm-bindgen-check
@echo "Checking for hardcoded paths..."
@grep -rn '/var/mnt/eclipse' --include='*.rs' --include='*.ex' --include='*.res' --include='*.gleam' --include='*.sh' --include='*.toml' . 2>/dev/null | grep -v 'Justfile' | head -5 || echo " [OK] No hardcoded paths in source"
@echo "Diagnostics complete."

# The wasm-bindgen CLI must match the wasm-bindgen crate in Cargo.lock exactly;
# a mismatch fails the browser build with a confusing schema error, so report
# the drift and the exact command that fixes it.
[private]
_wasm-bindgen-check:
#!/usr/bin/env bash
set -uo pipefail
lock="$(grep -A1 '^name = "wasm-bindgen"$' Cargo.lock 2>/dev/null | grep '^version' | head -1 | cut -d'"' -f2)"
cli="$(wasm-bindgen --version 2>/dev/null | awk '{print $2}')"
if [ -z "${lock}" ]; then
echo " [WARN] wasm-bindgen not found in Cargo.lock — skipping version check"
elif [ -z "${cli}" ]; then
echo " [FAIL] wasm-bindgen CLI not found — cargo install wasm-bindgen-cli --version ${lock} --locked"
elif [ "${cli}" != "${lock}" ]; then
echo " [FAIL] wasm-bindgen CLI ${cli} != Cargo.lock ${lock}"
echo " cargo install wasm-bindgen-cli --version ${lock} --locked --force"
else
echo " [OK] wasm-bindgen ${cli} (matches Cargo.lock)"
fi

# Guided tour of key features
tour:
@echo "=== nexia-list Tour ==="
Expand Down Expand Up @@ -121,17 +157,21 @@ llm-context:

# Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line)
crg-grade:
@grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
[ -z "$$grade" ] && grade="X"; \
echo "$$grade"
#!/usr/bin/env bash
set -uo pipefail
grade="$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1)"
echo "${grade:-X}"

# Generate a shields.io badge markdown for the current CRG grade
# Looks for '**Current Grade:** X' in READINESS.md; falls back to X
crg-badge:
@grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \
[ -z "$$grade" ] && grade="X"; \
case "$$grade" in \
A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;; \
D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
*) color="lightgrey" ;; esac; \
echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
#!/usr/bin/env bash
set -uo pipefail
grade="$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1)"
grade="${grade:-X}"
case "${grade}" in
A) color="brightgreen" ;; B) color="green" ;; C) color="yellow" ;;
D) color="orange" ;; E) color="red" ;; F) color="critical" ;;
*) color="lightgrey" ;;
esac
echo "[![CRG ${grade}](https://img.shields.io/badge/CRG-${grade}-${color}?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
2 changes: 1 addition & 1 deletion QUICKSTART-DEV.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ deno task dev # dev server on http://localhost:5173
[source]
----
nexia-list/
├── core/ # Rust core engine (12 passing unit tests)
├── core/ # Rust core engine + λδ substrate (90 passing tests)
├── ui/ # ReScript TEA-style UI
│ └── src/bindings/ # DOM bindings
├── scripts/ # Deno build/dev scripts (esbuild)
Expand Down
28 changes: 18 additions & 10 deletions READINESS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
<!-- READINESS.md — Component Readiness Grade (CRG) for nexia-list -->
<!-- Last updated: 2026-07-02 -->
<!-- Last updated: 2026-07-17 -->

# Readiness

**Current Grade:** D

> **Re-audit due — this grade is probably stale.** Every criterion listed under
> *Path to C* below now appears to be met (see the checklist). The grade is
> assigned by audit, not by this file, so it is left at D pending a maintainer
> re-audit rather than self-promoted. `just crg-badge` publishes this letter, so
> the badge is understating the project until that happens.

Graded per the hyperpolymath
[Component Readiness Grades](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)
standard. Grade assigned in the
Expand All @@ -16,21 +22,23 @@ standard. Grade assigned in the

| Aspect | Status |
| --- | --- |
| Builds from source | Yes — `deno task build` (ReScript + esbuild bundle); Rust core builds and its 12 unit tests pass |
| Builds from source | Yes — `deno task build` (ReScript + esbuild bundle); Rust core builds and its **90 tests** pass (81 unit + 3 exchange + 2 golden + 2 property + 2 doc) |
| Lockfiles | Yes — `deno.lock`, `Cargo.lock` |
| CI | Estate governance/scanning workflows only; product CI (rust-ci.yml, ui-ci.yml) landing in a parallel workstream |
| Tests | Rust core unit tests only; no UI or integration tests yet |
| Docs | Truth-reset 2026-07-02; roadmap and topology reflect actual state |
| CI | Estate governance/scanning **plus product CI**: `rust-ci.yml` (fmt, clippy `--all-targets --features wasm`, tests, wasm32 build) and `ui-ci.yml` (ReScript, wasm, Deno tests, bundle, lint) — both on every PR, SHA-pinned, green on main |
| Tests | Rust core (90) **and** UI (10, via `deno task test:ui`), including a TEA↔WASM contract test. No browser-level integration test yet |
| Docs | Truth-reset 2026-07-02; TOPOLOGY re-derived 2026-07-17 after the λδ merges (#35, #36, #43) had gone unrecorded |
| Known debt | unwrap/expect calls in core and desktop; unsafe `get` in View.res (see audit report) |

## Path to C

- Product CI running on every PR (Rust build+test, ReScript build, lint)
- Tests beyond the core crate: UI unit tests exercised in CI
- WASM bridge built and smoke-tested in CI
All three appear **met** as of 2026-07-17 — a re-audit should confirm and regrade:

- [x] Product CI running on every PR (Rust build+test, ReScript build, lint) — `rust-ci.yml` + `ui-ci.yml`, both `on: pull_request`
- [x] Tests beyond the core crate: UI unit tests exercised in CI — 10 tests via `ui-ci.yml`
- [x] WASM bridge built and smoke-tested in CI — `rust-ci.yml` builds wasm32 + generates bindings; `ui-ci.yml` runs the `TEA update delegates to the wasm core` contract test against the real bundle

## Path to B

- Integration tests covering the UI → WASM core → persistence path
- Canvas interaction coverage (pan/zoom, note creation, drag-and-drop once implemented)
- Integration tests covering the UI → WASM core → persistence path (the UI → WASM half is covered; the IndexedDB persistence half needs a browser-level test)
- Canvas interaction coverage (pan/zoom, note creation, drag — all now implemented; geometry is unit-tested, direct interaction is not)
- Known-debt items from the audit resolved or explicitly waived
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ Download it and you have the file to keep, yourself, forever.
|Note/Notebook model, backlinks reverse index, substring search, JSON storage

|Browser Bridge
|wasm-bindgen (in progress)
|Compiles the Rust core to WASM so the browser runs the real engine
|wasm-bindgen (wired)
|Compiles the Rust core to WASM so the browser runs the real engine; loaded at boot and covered by a CI contract test

|Tooling
|Deno 2 tasks + esbuild
Expand Down Expand Up @@ -196,7 +196,7 @@ a parenthesis, while power users gain the full expressive reach of Lisp.
[source]
----
nexia-list/
├── core/ # Rust — note/notebook engine (~623 LOC, 12 unit tests)
├── core/ # Rust — note/notebook engine + λδ substrate (5,344 LOC, 90 tests)
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs # Crate root
Expand Down
27 changes: 20 additions & 7 deletions ROADMAP.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@

This document outlines the development phases for Nexia-List, from MVP to full-featured knowledge management platform.

.Revised sequencing (2026-07)
.Revised sequencing (updated 2026-07-17)
[NOTE]
====
Nexia-List is now **web-first**: the Rust core is compiled to WASM and the browser
is the primary target (see link:docs/adr/0001-wasm-core-web-first.md[ADR-0001]).
The desktop shell (Gossamer) is optional and external. Current sequencing:
The desktop shell (Gossamer) is optional and external.

Every item in the previous sequencing block has now shipped:

. Build resurrection (Deno 2 tasks, ReScript compile, esbuild bundle) — ✅ done
. WASM core integration (wasm-bindgen bridge, IndexedDB/file persistence) — in progress
. Product CI (rust-ci.yml, ui-ci.yml — landing in a parallel workstream)
. Tests beyond the core unit suite
. Canvas drag-and-drop + accessibility + PWA (service worker)
. Wiki-links, graph view, agents, import/export
. WASM core integration (wasm-bindgen bridge, IndexedDB autosave + file save/load) — ✅ done
. Product CI (rust-ci.yml, ui-ci.yml) — ✅ done, green on main
. Tests beyond the core unit suite — ✅ done (10 UI tests incl. a TEA↔WASM contract test)
. Canvas drag + accessibility (WCAG 2.2 AA) + PWA (service worker) — ✅ done
. Wiki-links, graph view, agents, import/export — ✅ done
. **λδ (LambdaDelta) substrate** — ✅ largely done, and unrecorded until now: L0 kernel,
notebook host seam, hygienic macros, multimethods, prelude (~64% of the core)

Next sequencing:

. Bind the dormant WASM exports in ReScript — 10 of 31 are unbound, including both
λδ entry points (`lambdadeltaEval`, `evalLambdadelta`)
. Give λδ a door: L1 fx-fields → L2 action hooks → L3 REPL, gated by progressive
disclosure (see link:docs/design/mind-management-plan.md[the mind-management plan])
. Headless `index.rs` (concordance/BM25/See-Also) — zero UI, zero on-disk change
. UI surface: multi-pane, command palette, inspector, markdown render
====

toc::[]
Expand Down
Loading
Loading