Skip to content

Latest commit

 

History

History
135 lines (115 loc) · 12.8 KB

README.md

File metadata and controls

135 lines (115 loc) · 12.8 KB

WebFront architecture decision records

This directory describes WebFront’s architectural choices and the constraints to preserve when making changes or generating code. It contains 27 ADRs, with unique numbers. The accepted baseline corresponds to commit b031ab5 dated 2026-10-19; the developer environment proposals are dated 2026-10-20, the direct frontend access proposal 2026-10-24, the DOM access proposal 2026-10-26, the developer automation proposal 2026-10-28, accepted 2026-10-29, the system services proposal 2026-10-31, and the developer environment publication proposal 2026-11-02. Each ADR is versioned according to the decision’s creation and its significant changes in the Git history. The ADRs themselves are written in French.

The compiler support policy was accepted on 2026-11-11 (ADR-022).

Reading guide and scope

The format draws on MduX’s ADR register: context, decision, alternatives, positive and negative consequences, implementation rules and references. Its structure was consulted in the neighbouring checkout at MduX/docs/adr. MduX’s medical requirements and technology choices do not carry over to WebFront.

The version tables track architectural decisions: version 1.0 is their initial creation, dated to the first corresponding commit; subsequent versions record significant changes, with their Git date, status, author and a link to the commit. Each ADR’s body describes its latest version. A compatible addition or clarification increments the minor version; replacing a backend or contract may introduce a major version. The status “Acceptée” (Accepted) means that the choice recorded in that version has been integrated into the project.

The author of every version is Ambroise Leclerc. Dates of accepted historical versions come from the commits (git show --format=%as), searched across all retained branches. The founding intent around 2020 — targeting C++23, anticipating its networking facilities through standalone ASIO and decoupling web resources from storage — remains described in the relevant ADRs’ context. Versions use specific Git milestones: they do not invent a day for an intention whose year alone is known.

Commit bbe4913, dated 2025-08-16, brings together earlier work; such an integration does not itself create a new decision version. The tables record architectural changes; Git retains the detailed history of fixes and integrations.

WebFront remains experimental. These records do not establish production readiness, isolation of third-party code or regulatory compliance. Detailed limitations and platform verification evidence remain in PROJECT_STATUS.

Index

ADR Decision Status Initial creation Current version
ADR-001 A header-only C++23 core embedded in the application Accepted 2020-04-19 1.5 — 2026-10-13
ADR-002 An abstract, composable filesystem as the foundation for portability Accepted 2023-03-16 3.0 — 2026-11-05
ADR-003 A shared, typed and bounded binary protocol Accepted 2022-02-06 1.19 — 2026-11-05
ADR-004 Asynchronous calls with deliberately asymmetric contracts Accepted 2022-02-06 2.6 — 2026-11-05
ADR-005 From standalone ASIO to stdnet: anticipating standard networking without blocking progress Accepted through 3.1; 3.2 proposed 2022-01-21 3.2 — 2026-10-26
ADR-006 Owning, cancelling and joining every task Accepted 2026-10-13 2.1 — 2026-10-25
ADR-007 Explicit frontend selection and a shared lifecycle contract Accepted through 1.12; 1.13 proposed 2026-05-31 1.13 — 2026-11-16
ADR-008 Restricting bridge origins without promising a sandbox Accepted through 1.0; 1.1 and 1.2 proposed 2026-10-18 1.2 — 2026-11-04
ADR-009 Serving modules locally and regenerating assets reproducibly Accepted 2023-03-16 2.5 — 2026-10-25
ADR-010 Extending WebFront through optional components and development tools Accepted 2026-10-14 1.8 — 2026-11-09
ADR-011 Confining mddlog behind an optional diagnostics façade Accepted 2026-10-01 1.2 — 2026-10-02
ADR-012 Demonstrating contracts through deterministic tests and browser integration Accepted 2020-04-19 1.9 — 2026-11-25
ADR-013 Bootstrapping a downloaded developer environment Accepted 2026-10-20 1.0 — 2026-10-24
ADR-014 Resolving npm dependencies and building inside the browser Accepted 2026-10-20 1.0 — 2026-10-24
ADR-015 Generating application-owned embedded resources Accepted 2026-10-20 1.0 — 2026-10-24
ADR-016 The bootstrap environment as WebFront's foundation Accepted 2026-10-22 1.8 — 2026-11-28
ADR-017 Direct access to embedded frontends, with HTML kept normative Proposed 2026-10-24 1.1 — 2026-10-25
ADR-018 DOM access from C++ through a bounded mutation stream, without contesting the DOM of UI libraries Proposed, partially superseded, partially delivered 2026-10-26 1.5 — 2026-10-30
ADR-019 Automating the developer environment through shared operations and an optional local MCP adapter Accepted (1.2); amendment 1.5 by ADR-025 proposed 2026-10-28 1.5 — 2026-11-21
ADR-020 System services (files, clipboard, shell, notifications…) through optional C++ portals with per-connection backends, granting handles rather than paths Proposed 2026-10-31 1.8 — 2026-11-09
ADR-021 Simplifying the publication of the developer environment: automate the release, keep pinned hashes, no dedicated server Accepted (domain delivered; phase 1 to implement) 2026-11-02 1.0 — 2026-11-02
ADR-022 Compiler profiles, GCC 13 S2 minimum, exit clause and LTS build tools Accepted 2026-11-11 1.1 — 2026-11-11
ADR-023 Terminal command names: wf stays the prefix of project commands, read-only file commands (ls, cat, tree, mounts), file command names reserved ahead, dependency graph with wf list --tree, wf why, wf info Accepted 2026-11-14 1.0 — 2026-11-14
ADR-024 Optional integrated TLS 1.3 server Proposed 2026-11-21 1.0
ADR-025 The application serves MCP over Streamable HTTP on its own loopback listener, with a session Bearer token, strict Host/Origin checks, per-instance discovery and no automation in distribution builds; the webfront-agent launcher is removed; amends ADR-019 Accepted (delivery in progress) 2026-11-21 1.4 — 2026-11-28
ADR-026 Stable MCP client configuration with explicit development security modes Accepted 2026-11-22 1.2 — 2026-11-22
ADR-027 Application state inspectors in the developer environment only: reserved webfront.inspector.* functions refused to unproven views unless the application trusts loopback clients, tree nodes on existing bridge types with paged reads and paged differences, observer operations run whole under the application's lock or on its executor, writes only when the application provides them, one inspector.html page, shown in a floating window of the page and, for a detached panel only, in the first container that grants access (a native secondary window, else a system-browser tab); an introspectable registry of the registered C++ functions, of the JavaScript functions C++ calls and of the connected browsers, counted with relaxed atomics and timed only while an inspector reads Accepted 2026-11-25 1.6 — 2026-11-28

Numbering follows the reading topics; milestones and individual file histories provide the chronology, which does not follow the numerical order.

Using the ADRs when making changes or generating code with an LLM

  1. Read AGENTS.md, ADR-001, ADR-002 and ADR-012, then the ADRs covering the change.
  2. Identify object ownership, execution threads, transferable types and failure paths before proposing code. Follow each ADR’s implementation rules.
  3. Check the referenced API and tests: a name mentioned here does not justify inventing an overload, a remote cancellation guarantee or an unsupported result type.
  4. Add appropriate verification and keep sources, embedded assets and documentation in sync.
  5. If a change contradicts a decision, make that explicit in a new ADR; do not silently reintroduce a rejected alternative.
Planned work ADRs to read in addition to the 001/002/012 baseline
Bridge, codecs or new data types 003, 004, 006, 009
Networking, concurrency, lifetimes or shutdown 005, 006
Files, resources and modules 009, 010
A new engine or changes to window lifecycle 006, 007, 008
Components, the terminal or installed tools 004, 006, 008, 010
A direct transport, a mobile frontend or a microcontroller target 003, 004, 006, 007, 008, 017
DOM access from C++, generated interfaces, React or other UI library integration 003, 004, 006, 008, 010, 016, 018
Diagnostics and log transport 006, 011
Downloaded development environment, npm libraries and generated application assets 008, 009, 010, 013, 014, 015, 016
Developer automation, agent access, MCP and consumer UI tests 004, 006, 008, 012, 013, 014, 016, 019, 025
System services: file dialogs, host files, clipboard, notifications, opening links 002, 003, 006, 007, 008, 010, 017, 020
Developer environment inspectors, observers and the registry of C++ functions 003, 004, 006, 008, 016, 020, 023, 027

ADRs explain decisions; AGENTS.md sets out working instructions, the README provides the user journey, and specialist documents define the detailed contracts. If text and code disagree, report the discrepancy and resolve it with tests; do not implicitly change the contract to make the contradiction disappear.

Maintaining the register

Proposals use their actual proposal date and remain proposed until integration/validation. Each ADR starts with a Versions table listing version, date, status, author, change and commit. Version 1.0 corresponds to the decision’s initial creation, dated to the historical commit that introduces it. Each significant architectural change adds a row dated to its corresponding commit, with Ambroise Leclerc as the author. Do not replace historical dates with the date of an editorial change to the document. Keep previous rows and update the current version in the index.

  • Use one ADR-NNN-description.md file per decision and one row in this index. The next number is ADR-028. Retain historical numbers and files.
  • For a new decision that has not been integrated, use Proposée (Proposed), its actual proposal date and validation criteria; do not assign an artificial historical commit date.
  • After integration, record the date and supporting commits, the accepted negative consequences and the required tests.
  • If a decision is replaced, mark it Remplacée par ADR-NNN (Superseded by ADR-NNN), link in both directions and identify exactly which part changes. A compatible clarification may extend an existing ADR’s history without erasing its previous state.
  • A future possibility mentioned here is not an accepted decision: general DOM abstractions (proposed in ADR-018, not accepted), tool isolation and response deadlines require their own decisions. The validated decoding cache is specified in ADR-009 and HTTP_ASSETS.md.

Chemins depuis la version 0.4

Les exemples publics résident dans examples/ et les ressources web lisibles dans js/. Les mentions de src/ dans les décisions précédentes décrivent l’ancienne organisation ; elles ne changent pas les contrats. Les démonstrations supprimées restent consultables dans l’historique Git.