Skip to content

Commit 1ca6110

Browse files
committed
docs: define beta evidence and revise the research manuscript
1 parent c16a5f3 commit 1ca6110

20 files changed

Lines changed: 590 additions & 288 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ promote adjacent profiles or prove the overall thesis. The
189189
[`standards roadmap`](docs/STANDARDS-ROADMAP.md) records what must happen before
190190
any standards claim.
191191

192-
The release number is therefore intentionally modest: `0.1.0-alpha.3` says
193-
that the editor is an alpha development tool. It is not evidence that the
194-
format, adapters, resource system, reconstruction work, or governance are
195-
alpha-standardized.
192+
The [developer beta contract](docs/BETA.md) defines the initial source-edit
193+
workflow, automated acceptance evidence and remaining external evaluation.
194+
The editor application remains `0.1.0-alpha.3`; no beta or specification
195+
promotion follows from a passing local verification run.
196196

197197
## Verification
198198

docs/BETA.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Developer beta scope and acceptance
2+
3+
Status: proposed acceptance contract, 2026-09-06. The editor remains
4+
`0.1.0-alpha.3`. Passing the automated checks below does not change that version
5+
or establish external usability.
6+
7+
## Workflow and compatibility boundary
8+
9+
The candidate developer beta supports a local authored-document workflow:
10+
import a declared HTML/CSS profile, inspect its fidelity report, edit supported
11+
properties through the reference editor, synchronize those properties into the
12+
retained source, and re-import the result. The initial profiles are
13+
[`nuif-html-css-0`](../adapters/html-css/PROFILE.md) and
14+
[`nuif-html-css-v0`](../adapters/html-css/V0-PROFILE.md).
15+
16+
Profile identifiers and their fixtures define compatibility. The v0 profile
17+
carries model fields that the browser cannot render; those fields remain
18+
explicitly classified. Structural source edits, arbitrary React execution,
19+
live Figma/Canva interoperability and screenshot reconstruction are outside
20+
this beta acceptance contract. Their research continues under separate
21+
profiles. No later dependency update may silently broaden or reinterpret an
22+
existing profile's accepted semantics.
23+
24+
Canonical text and CBOR are the review and persistence boundaries for this
25+
workflow. Resource packages retain their separate experimental capability
26+
requirements. The reference editor's application version does not version the
27+
specification, and a beta label would not declare an externally standardized
28+
format.
29+
30+
## Automated acceptance evidence
31+
32+
Every release candidate requires a clean revision, passing checks and archived
33+
reports from that revision. A missing, stale or failed report is not a passing
34+
result.
35+
36+
| Criterion | Reproduction command or test | Acceptance |
37+
|---|---|---|
38+
| Canonical document and operation behavior | `cargo xtask gate-b` | Exact fixture, replay and preservation assertions pass |
39+
| Bounded source synchronization | `cargo xtask gate-f` and `cargo xtask gate-f-v0` | Exact edited-document re-import, deterministic edits, byte locality and declared refusals |
40+
| Generated workflow variation | `cargo xtask source-workflow` | Every generated case and CLI subprocess test passes |
41+
| Native editing and operation replay | `cargo xtask editor-trial` and `cargo xtask editor-gui-trial` | Semantic actions, replay and repeated CPU-render assertions pass |
42+
| File-save failure handling | `cargo test -p nuif-codec --features filesystem` | Staged failures preserve destinations; permissions and unsupported destinations follow the documented contract |
43+
| Hostile inputs | `cargo xtask hostile-inputs`, `cargo xtask editor-hostile-inputs`, `cargo xtask fuzz-smoke` | Resource ceilings and refusal checks pass; fuzz execution has no detected crash |
44+
| Dependency and language compatibility | `cargo xtask dependency-audit`, `cargo deny check`, `cargo audit`, Rust 1.96 workspace check | Reviewed graph, accepted licence policy, no forbidden dependency and no compiler failure |
45+
| Reproducible source-built installation | `cargo xtask editor-install-trial` | Install, smoke test, update and rollback checks pass on the recorded host |
46+
47+
`cargo xtask all` includes the generated source workflow and produces the
48+
verification manifest. Coverage-guided fuzzing and the dependency advisory
49+
check remain separately invoked checks. The manifest identifies the exact
50+
artifacts; it is not an independent evaluation of the project.
51+
52+
## Generated corpus method
53+
54+
`crates/nuif-testing/src/bin/source-workflow.rs` evaluates 48 cases: two HTML
55+
profiles, sibling and grouped containment, 1/8/64/256 text entities, and three
56+
source variants. The variants are canonical source, foreign HTML/CSS regions
57+
with LF endings, and those regions with CRLF endings. Text includes empty
58+
strings, escaped delimiters, combining characters, multiple scripts and emoji.
59+
Groups contain at most eight text children.
60+
61+
Each case checks initial import, no-op identity, scalar edits, repeated edit
62+
planning, a post-import fixpoint, a second edit, byte locality, structural-edit
63+
refusal and stale-span refusal. The report records case dimensions, document
64+
hashes, source size, checks, revision and environment. Separate CLI subprocess
65+
tests check in-place synchronization, unsupported-edit preservation and
66+
report-path alias rejection. Results are written to
67+
`target/source-workflow-report.json` and archived by CI.
68+
69+
This is a generated regression corpus. Its dimensions are selected by the
70+
implementation authors, not sampled from production documents. Export/import
71+
agreement is vulnerable to shared implementation mistakes. It does not measure
72+
browser visual equivalence, real-document acceptance rate or editing success
73+
for unfamiliar users. Independent layout/text oracles in other gates provide
74+
additional evidence only for their own fixture matrices.
75+
76+
## Reproduction workflow
77+
78+
After the [development prerequisites](../CONTRIBUTING.md) are installed, the
79+
following sequence reproduces the editor-to-source path using the committed
80+
responsive-card script:
81+
82+
```sh
83+
cargo build --locked -p nuif-cli -p nuif-editor
84+
mkdir -p target/beta-example
85+
target/debug/nuif fixture v0-responsive-card target/beta-example/input.nuif.json
86+
target/debug/nuif export target/beta-example/input.nuif.json html-css-v0 target/beta-example/source.html target/beta-example/export-report.json
87+
target/debug/nuif-editor --headless --script conformance/fixtures/v0-responsive-card/editor-trial.jsonl --document target/beta-example/input.nuif.json --output target/beta-example/edited.nuif.json
88+
target/debug/nuif sync html-css-v0 target/beta-example/source.html target/beta-example/edited.nuif.json target/beta-example/synchronized.html target/beta-example/sync-report.json
89+
target/debug/nuif import html-css-v0 target/beta-example/synchronized.html target/beta-example/reimported.nuif.json target/beta-example/import-report.json
90+
cmp target/beta-example/edited.nuif.json target/beta-example/reimported.nuif.json
91+
```
92+
93+
A zero exit status from `cmp` establishes canonical byte equality for this
94+
example. The fidelity reports remain necessary: exact model retention includes
95+
opaque fields whose browser rendering is unsupported. The
96+
[file-output contract](../crates/nuif-cli/README.md#output-replacement) describes
97+
single-file replacement and its durability and concurrency limits.
98+
99+
## External acceptance requirements
100+
101+
Beta promotion additionally requires evidence outside the local generated
102+
suite: an independently authored, permission-cleared document corpus; recorded
103+
source import/edit/synchronization outcomes; installation and workflow trials
104+
on each advertised operating system; and external users completing the scoped
105+
workflow without undocumented intervention. Corpus selection, task definitions,
106+
failures and exclusions must be reported with the outcomes. No task-success
107+
rate or representative sample claim exists yet.
108+
109+
The proposed beta scope can be narrowed to the hosts and profiles with such
110+
evidence. General interchange, neutral-standard governance and trained
111+
reconstruction are separate decisions governed by the
112+
[standards roadmap](STANDARDS-ROADMAP.md) and
113+
[research experiment registry](../research/experiments/index.yaml).

docs/PUBLISHING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,13 @@ versioned record. A later citable research release can add `CITATION.cff`, a
107107
Zenodo concept DOI and a version DOI without changing the canonical Markdown
108108
source. Publication prerequisites and venue constraints are recorded in
109109
`research/items/scholarly-publication-and-citation-workflow.md`.
110+
111+
## Search indexing
112+
113+
The compiled manuscript repeats the individual whitepaper chapters. Its body is
114+
excluded from search indexing so results point to the canonical chapter pages.
115+
The manuscript remains available through navigation and printing. The generator
116+
uses mdBook's supported
117+
[per-chapter search configuration](https://rust-lang.github.io/mdBook/format/configuration/renderers.html#outputhtmlsearchchapter);
118+
individual source chapters remain indexed. The full research index can still
119+
be large, and this exclusion does not impose a search-download budget.

docs/catalog.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"title": "NUIF authored-interface interchange research manuscript",
2828
"subtitle": "Architecture, executable profiles, resource packaging, reconstruction research and open risks",
2929
"authors": ["Refpath contributors"],
30-
"version": "working-2026-08-31",
31-
"date": "2026-08-31",
30+
"version": "working-2026-09-06",
31+
"date": "2026-09-06",
3232
"status": "working technical manuscript; not peer reviewed",
3333
"abstract": "This manuscript evaluates a layered authored-interface interchange model through prior-art synthesis, bounded adapter profiles and executable conformance experiments. It also separates proposed resource packaging, source-backed capture and screenshot reconstruction from the narrower implemented alpha evidence. It records the architectural hypothesis, implemented evidence, unresolved risks and governance conditions without claiming specification stability, reconstruction accuracy or universal format coverage.",
3434
"sources": [
@@ -54,6 +54,7 @@
5454
"paths": [
5555
"README.md",
5656
"docs/roadmap.md",
57+
"docs/BETA.md",
5758
"docs/STANDARDS-ROADMAP.md",
5859
"CONTRIBUTING.md",
5960
"GOVERNANCE.md",

docs/whitepaper/00-foundation.md

Lines changed: 92 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,105 @@ id: nuif:whitepaper:foundation
33
kind: whitepaper
44
status: draft
55
version: 0.0.1
6-
updated: 2026-08-29
6+
updated: 2026-09-06
77
---
88

99
# NUIF foundation
1010

11-
NUIF investigates a portable, vendor-neutral draft specification for authored user-interface documents. The candidate model is intended to preserve meaning across editors and implementation targets rather than treating a rendered bitmap, a vendor scene graph, or source-language AST as the universal truth.
12-
13-
## Thesis
14-
15-
A useful portable interface specification must coordinate several representations instead of collapsing them into one:
16-
17-
1. semantic/document containment;
18-
2. component and instance identity;
19-
3. authored layout and responsive constraints;
20-
4. resolved geometry at explicit evaluation contexts;
21-
5. geometry, paint, typography, and assets;
22-
6. design-token references and themes;
23-
7. interaction/state and data-binding graphs;
24-
8. source/tool provenance and correspondence;
25-
9. extension payloads that can survive unknown intermediaries;
26-
10. deterministic operations, diff, patch, and reconciliation.
27-
28-
Portable resources add a second identity boundary: editable semantic assets
29-
retain stable IDs, while exact image/font bytes use immutable content digests.
30-
Package paths and source URLs are locators/provenance, not identity.
31-
32-
NUIF therefore treats portability as a synchronization problem as much as a serialization problem.
11+
NUIF investigates authored user-interface interchange through a draft document
12+
model, a Rust reference implementation and bounded source-adapter experiments.
13+
The research question is whether explicit identity, correspondence and fidelity
14+
records permit useful edits across representations without discarding unrelated
15+
source or unknown extension data. The current evidence concerns named profiles;
16+
it does not establish arbitrary application interchange.
3317

3418
## Architectural hypothesis
3519

36-
The working model is a small canonical core plus coordinated graphs and extension dialects. The containment tree answers ownership and order. Typed relationship graphs express constraints, components, tokens, interactions, provenance, dependencies, and other relationships that do not belong in a tree.
37-
38-
The reference implementation will preserve both authored and resolved state. Resolved state is always scoped to an evaluation context and is never allowed to silently replace authored intent.
20+
The model separates containment, typed relationships, authored properties and
21+
resolved snapshots. A snapshot records an evaluation context rather than
22+
replacing the authored document. Editable entities and assets have stable
23+
identities; immutable resource bytes have content digests. These distinctions
24+
are specified in [identity](../../spec/02-identity-and-properties.md),
25+
[layout](../../spec/04-layout.md) and
26+
[serialization](../../spec/08-serialization.md).
27+
28+
The proposed architecture coordinates components, layout, visual properties,
29+
tokens, behavior, provenance and extensions. These areas have different
30+
implementation maturity. The [adapter inventory](../../adapters/STATUS.md) and
31+
[research coverage contract](../../research/coverage.yaml) delimit the
32+
implemented projections and unresolved questions. The architecture is tested
33+
through the following hypotheses:
34+
35+
- For a declared scalar-edit profile, re-import of synchronized source equals
36+
the requested document, and bytes outside the reported edits remain identical.
37+
- Unknown extension payloads survive supported neighboring edits and canonical
38+
serialization without requiring the editor to interpret those payloads.
39+
- Pinned evaluation contexts allow implementations to compare resolved output
40+
under explicit exact or tolerance-based criteria.
41+
42+
Each hypothesis requires evidence for its own domain. Success for scalar HTML
43+
edits does not establish structural source reconciliation, behavior equivalence
44+
or native rendering portability.
45+
46+
## Research method
47+
48+
The repository combines targeted primary-source review, executable profile
49+
construction, generated tests, differential comparisons and failure analysis.
50+
Research records preserve source locators, retrieval dates, interpretation and
51+
open questions. The search process is iterative and architecture-directed; it
52+
is not a systematic literature review with a preregistered search strategy or
53+
an exhaustive publication census. A `reviewed` record is not an independently
54+
verified result; [the audit policy](../../research/AUDIT.md) defines the stronger
55+
verification conditions.
56+
57+
Evidence is reported at the level of the tested assertion:
58+
59+
| Method | Observation | Limitation |
60+
|---|---|---|
61+
| Reference fixtures | Expected document, operation or encoded bytes agree | Expected values can share an implementation error |
62+
| Generated and metamorphic tests | Declared relations hold across deterministic input variations | Generator coverage does not estimate real-document prevalence |
63+
| Differential comparisons | Named implementations agree on specified outputs | Agreement can reflect shared assumptions or upstream code |
64+
| Repeated local execution | A pinned revision and setup reproduce the same artifact | This establishes local repeatability, not external reproduction |
65+
| Independent external evaluation | Another team executes or implements the protocol | Required evidence remains open where no external result is recorded |
66+
67+
The distinction between local repetition and another team's reproduction follows
68+
[ACM's artifact-review terminology, version 1.1](https://www.acm.org/publications/policies/artifact-review-and-badging-current),
69+
retrieved 2026-09-06. No ACM evaluation or badge is claimed. Profile-specific
70+
scope and conformance clauses follow the approach described in the
71+
[W3C QA Framework, sections 2–3](https://www.w3.org/TR/2005/REC-qaframe-spec-20050817/),
72+
retrieved 2026-09-06; this is a methodological reference, not W3C endorsement.
73+
74+
The verification manifest records revision, environment and artifact hashes.
75+
Performance measurements require a workload, build mode, hardware, sampling
76+
procedure and reference implementation. Timing on one host does not establish
77+
a cross-platform performance bound. A valid research registry establishes
78+
traceability, not resolution of its open experiments.
3979

4080
## Fidelity model
4181

42-
Every adapter and transformation must classify material mappings:
43-
44-
- `lossless` — semantics are preserved exactly;
45-
- `representable` — equivalent target semantics exist, even if encoded differently;
46-
- `approximated` — a declared approximation is produced;
47-
- `preserved_unrenderable` — data survives as an extension but the target cannot render/edit it;
48-
- `unsupported` — data cannot currently be represented or preserved safely.
49-
50-
Silent loss is a conformance failure.
51-
52-
## Explicit non-goals
53-
54-
NUIF does not promise to infer the unique original source program from pixels, reproduce arbitrary JavaScript execution, make every platform text renderer bit-identical, or force every target to support every capability. The draft specification should make such boundaries inspectable and machine-readable.
55-
56-
Screenshot reconstruction is therefore an optional inference client, not a new
57-
canonical truth. It may propose a validated editable hypothesis and calibrated
58-
alternatives, but screenshot-only evidence cannot be classified as lossless
59-
authored source.
60-
61-
## Reference implementation role
62-
63-
The Rust implementation and editor are executable research instruments and conformance references. They do not define semantics by accident; normative behavior belongs in `spec/` and must be testable independently.
82+
The [fidelity specification](../../spec/09-provenance-and-fidelity.md) defines
83+
five classes: `lossless`, `representable`, `approximated`,
84+
`preserved_unrenderable` and `unsupported`. A class applies to a stated mapping
85+
and evidence boundary. Preserving an unknown payload does not establish that a
86+
target renders or edits its meaning. Retaining foreign CSS bytes does not
87+
establish visual equivalence under the browser cascade.
88+
89+
Screenshot reconstruction produces hypotheses about a document. Multiple
90+
programs can render the same pixels, so screenshot-only evidence cannot identify
91+
unique authored source. Reconstruction accuracy, confidence calibration and
92+
edit usefulness require separate held-out evaluation, as described in the
93+
[resource and reconstruction chapter](12-resources-capture-and-reconstruction.md).
94+
95+
## Threats to validity
96+
97+
The implementation and many fixtures share authorship. Generated inputs cover
98+
selected structural families and boundary values, with no claim of sampling
99+
from a deployment population. Dependency pins constrain variation but can mask
100+
host-specific behavior. Small oracle matrices leave untested combinations of
101+
fonts, layout and browser state. The native editor has no completed external
102+
usability study. These limitations prevent extrapolation from passing local
103+
gates to general beta readiness or broad interoperability.
104+
105+
The [developer beta contract](../BETA.md) defines the narrower workflow and the
106+
evidence required for promotion. The [risk register](07-risk-register.md)
107+
identifies observations that would require narrowing or revising the design.

0 commit comments

Comments
 (0)