From 5065fcd5205ec7c0d259131431c2cf54d9f69cf6 Mon Sep 17 00:00:00 2001 From: Ysopwnable <161784452+N0zoM1z0@users.noreply.github.com> Date: Wed, 7 Oct 2026 23:24:15 +0800 Subject: [PATCH] docs(website): clarify guides and case studies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several guides use broad headings and repeat their summaries, making the main example harder to follow. This change names each task directly, keeps Notion's clipboard investigation in the main reading path, and moves the Markdown example and longer provenance into expandable details. The browser guide now opens the hosted example, and the first native CLI query works without a global install. The existing figures, prompts, source excerpts and comparison controls remain the teaching material. Provider details now fit narrow screens. The repository README links to all Showcases, and the website authoring docs share a signed design principle: a good website is like a good paper—easy to follow, clear and concise, with a clean, refined presentation. A new style guide and scoped AGENTS.md explain how to maintain that approach. Closes #985. Validation: - `python3 scripts/prepare-website.py` and `python3 scripts/verify-website.py`: 12 HTML pages, 183 local references, SVG XML, the six-file ZIP and the sole manual Pages publisher. - Oxfmt checks and `git diff --check`; `npm run check:fast` with Node.js 24.18.0. - Browser checks at both `/` and `/rea/`: 24 routes, 68 copy buttons, 20 comparison steps, two CSV exports, two ZIP downloads and eight viewport widths from 320px to 1440px. - Existing code excerpts, expanded details, keyboard access, no-JavaScript content, continuous cursor animation and reduced motion checked. Existing analysis and compiler-check evidence is retained; real native-provider verification and compiler replay were not rerun for these copy and layout changes. The homepage content and publication triggers are unchanged. --- README.md | 2 +- website/AGENTS.md | 23 ++ website/README.md | 10 +- website/figures.md | 8 + .../dx-ball-sound-pan-investigation.svg | 6 +- website/public/assets/styles.css | 4 +- website/public/get-started/index.html | 253 +++++++++--------- website/public/guides/browser/index.html | 29 +- website/public/guides/index.html | 18 +- website/public/guides/javascript/index.html | 28 +- website/public/guides/native/index.html | 20 +- website/public/showcase/dx-ball/index.html | 22 +- website/public/showcase/index.html | 16 +- website/public/showcase/notion/index.html | 131 ++++----- website/public/showcase/th04/index.html | 40 +-- website/style-guide.md | 199 ++++++++++++++ 16 files changed, 509 insertions(+), 300 deletions(-) create mode 100644 website/AGENTS.md create mode 100644 website/style-guide.md diff --git a/README.md b/README.md index 7166c0c967..896bd4277b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ morluto%2Frea | Trendshift -**[Website](https://morluto.github.io/rea/) · [Guides](https://morluto.github.io/rea/guides/) · [DX-Ball showcase](https://morluto.github.io/rea/showcase/dx-ball/)** +**[Website](https://morluto.github.io/rea/) · [Guides](https://morluto.github.io/rea/guides/) · [Showcases](https://morluto.github.io/rea/showcase/)** [Quick start](#quick-start) · [Current status](#current-status) · [Investigation model](#the-investigation-model) · [Tool catalog](#tool-catalog-for-investigation) · [Roadmap](#roadmap) · [How it works](#how-it-works) diff --git a/website/AGENTS.md b/website/AGENTS.md new file mode 100644 index 0000000000..a4bf9b8dc5 --- /dev/null +++ b/website/AGENTS.md @@ -0,0 +1,23 @@ +# Website maintenance + +> A good website is like a good paper: easy to follow, clear and concise, with a clean, refined presentation. +> +> — N0zoM1z0 + +Read [README.md](README.md) and [style-guide.md](style-guide.md) before changing +website content, layout or figures. Use [figures.md](figures.md) and `evidence/` +for asset notes and the source of case-study claims. + +- Write English, direct headings and concrete instructions. Each paragraph + should explain a new fact or action. +- Reuse the shared styles, prompts, figures and code-step components. Keep a + case study focused on one question, with further examples in native details. +- Show what REA returns and how the agent uses it. Preserve source attribution, + target identity and verification scope. +- Keep personal paths, account data, credentials and raw captures outside the + public assets. Use generic inputs and label shortened display paths. +- Check both local root and `/rea/` paths, mobile layouts, expanded details, + copying and downloads. Run `scripts/prepare-website.py` followed by + `scripts/verify-website.py`. +- Keep `website-pages.yml` as the sole, manual Pages publisher. Follow the + publication procedure in the website README. diff --git a/website/README.md b/website/README.md index 515e772383..b7f8bc668c 100644 --- a/website/README.md +++ b/website/README.md @@ -1,10 +1,17 @@ # REA website +> A good website is like a good paper: easy to follow, clear and concise, with a clean, refined presentation. +> +> — N0zoM1z0 + An English static website with explanatory figures, worked guides and DX-Ball, Notion and TH04 investigations. The public files are in `website/public/`. The site uses HTML, CSS and a small script for copying code and following the assembly-to-C comparison. Python packages the downloadable example; there is no frontend bundler or npm dependency. +[style-guide.md](style-guide.md) explains the writing, page structure, figures, +visual system and review process. Read it before adding or revising a page. + ## Local preview From the repository root: @@ -78,7 +85,8 @@ code; the scoped lint override admits `require` only in that example directory. The Notion case follows the same HTML figure style. Its short excerpts explain the packaged clipboard bridge; separate web-cache probes illustrate the rich -clipboard and Markdown formats. Only selected source details and generic +clipboard format, with Markdown tables available as an additional example in +collapsed details. Only selected source details and generic example data belong on the site. Machine paths, account identifiers, local configuration, complete vendor bundles and raw captured results stay outside the website. diff --git a/website/figures.md b/website/figures.md index ddd2336772..525c3df1c2 100644 --- a/website/figures.md +++ b/website/figures.md @@ -1,5 +1,13 @@ # REA website figures +> A good website is like a good paper: easy to follow, clear and concise, with a clean, refined presentation. +> +> — N0zoM1z0 + +Use [style-guide.md](style-guide.md#make-figures-explain-a-relationship) when adding +or revising a figure. The prompts below are historical layout references; use +the current SVG source for published labels. + The published diagrams are SVG source assets: - `public/assets/figures/rea-investigation-flow.svg` — 1774 × 887 viewBox. diff --git a/website/public/assets/figures/dx-ball-sound-pan-investigation.svg b/website/public/assets/figures/dx-ball-sound-pan-investigation.svg index 103bd751b1..b1a2a51bc1 100644 --- a/website/public/assets/figures/dx-ball-sound-pan-investigation.svg +++ b/website/public/assets/figures/dx-ball-sound-pan-investigation.svg @@ -36,11 +36,11 @@ Maintained C Brick-hit caller 20 + 30 × tile_x - Original-x86 + Original code comparison 3,205 cases - VC4.0 compiler - replay + VC4.0 build + comparison 63 matching bytes diff --git a/website/public/assets/styles.css b/website/public/assets/styles.css index ce65e9ad3b..d184cb31ed 100644 --- a/website/public/assets/styles.css +++ b/website/public/assets/styles.css @@ -689,7 +689,7 @@ pre code { } .provider { display: grid; - grid-template-columns: 105px 1fr; + grid-template-columns: 105px minmax(0, 1fr); gap: 1.3rem; padding-block: 1.2rem; border-top: 1px solid var(--line); @@ -1107,7 +1107,7 @@ pre code { gap: 1rem; } .provider { - grid-template-columns: 1fr; + grid-template-columns: minmax(0, 1fr); gap: 0.25rem; } .guide-entry { diff --git a/website/public/get-started/index.html b/website/public/get-started/index.html index 15314573f4..95b530eaf2 100644 --- a/website/public/get-started/index.html +++ b/website/public/get-started/index.html @@ -32,7 +32,7 @@
-

Start with a question.

+

Set up REA.

Connect REA to your coding agent, or inspect a local app from your terminal. @@ -43,17 +43,17 @@

-

With your agent

+

Connect your coding agent

Run setup to connect REA to your coding agent. Client choices include Claude Code, Codex, Cursor, Gemini CLI, Windsurf and other @@ -118,19 +118,14 @@ involved, with the source locations for your findings.

-

- Replace the path with your local target. Read the findings, then - ask a narrower follow-up about a function or connection you want - to understand. -

+

Replace the path with your local target.

-

From the terminal

+

Use the CLI

- You can start with a JavaScript or Electron application folder or - ASAR archive. This path uses Node.js and npm and reads the app - without running it. + Analyze a JavaScript or Electron application folder or ASAR + archive without running the app:

@@ -153,10 +148,9 @@ "D:/apps/example" works here.

- The result includes the application's identity, recovered module - relationships and evidence locations. It also records - relationships that remain unresolved. Use those findings to choose - where to investigate next. + The result identifies the app, shows connections between modules + and gives their source locations. Connections REA cannot resolve + are marked in the result.

If you'd like a permanent rea command in your shell: @@ -183,116 +177,121 @@

-

Working with native binaries

+

Set up native analysis

- REA connects your agent to a local analysis provider. Choose the - tool you already use, configure its connection, then ask about - your executable or library. + Native binaries need a local analysis tool. Choose and configure + one below, then give REA your executable or library.

-
-
-

Ghidra

-
-

- Use an existing Ghidra 12.1.x installation and a 64-bit JDK - 21 or newer on Linux x64 or macOS x64/arm64. Set the paths - before running setup: -

-
- Connect your Ghidra installation -
-
- Ghidra connection · macOS / Linux -
-
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
+            
+ Choose a tool: Ghidra, Hopper or IDA +
+
+

Ghidra

+
+

+ Use an existing Ghidra 12.1.x installation and a 64-bit + JDK 21 or newer on Linux x64 or macOS x64/arm64. Set the + paths before running setup: +

+
+ Connect your Ghidra installation +
+
+ Ghidra connection · macOS / Linux +
+
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
 export JAVA_HOME=/absolute/path/to/jdk-21
 npx -y rea-agents@latest doctor --provider ghidra --json
 npx rea-agents@latest setup
-
-

- Replace both paths with your existing installations. Setup - checks them and records valid settings for your selected - client. On macOS, use a Ghidra package with the native - decompiler matching your host architecture. -

-
-
-
-
-

Hopper

-
-

- Connect Hopper on macOS or Linux. Run the setup command - above; it detects an existing installation or offers an - installation plan for your approval. -

-

- On macOS, complete Hopper's first-run choice of demo mode or - license activation before an unattended analysis. -

-
-
-
-

IDA

-
-

- The verified IDA setups use Windows, with an existing MCP - registration for an attached GUI or a headless database. - Linux and macOS headless analysis remains unverified. -

-
- Connect an existing IDA MCP registration -

- Keep the upstream server's working command, - args and optional env in a JSON - file. An existing mcpServers object with an - ida-pro-mcp entry is also accepted. Point REA - at that file before setup: -

-
-
- IDA connection · Windows PowerShell
-
$env:REA_IDA_MCP_CONFIG = "C:/analysis/ida-mcp.json"
+                      

+ Replace both paths with your existing installations. + Setup checks them and records valid settings for your + selected client. On macOS, use a Ghidra package with the + native decompiler matching your host architecture. +

+
+
+
+
+

Hopper

+
+

+ Connect Hopper on macOS or Linux. Run the setup command + above; it detects an existing installation or offers an + installation plan for your approval. +

+

+ On macOS, complete Hopper's first-run choice of demo mode + or license activation before an unattended analysis. +

+
+
+
+

IDA

+
+

+ The verified IDA setups use Windows, with an existing MCP + registration for an attached GUI or a headless database. + Linux and macOS headless analysis remains unverified. +

+
+ + Connect an existing IDA MCP registration + +

+ Keep the upstream server's working command, + args and optional env in a + JSON file. An existing mcpServers object + with an ida-pro-mcp entry is also accepted. + Point REA at that file before setup: +

+
+
+ IDA connection · Windows PowerShell +
+
$env:REA_IDA_MCP_CONFIG = "C:/analysis/ida-mcp.json"
 $env:REA_ANALYSIS_PROVIDER = "ida"
 npx -y rea-agents@latest doctor --provider ida --json
 npx rea-agents@latest setup
-
-

- The attached profile uses upstream legacy 1.4.0 tools with - the original binary already open in IDA. The headless - profile uses the upstream database-supervisor API and a - registration with "mode": "headless"; real - verification covers an IDA 9.3 Windows x64 supervisor. - Doctor checks the registration without starting IDA. -

-

- Give REA the original executable path, with - --provider ida in a CLI query. For an agent, - include REA_IDA_MCP_CONFIG in the REA - registration's environment and select IDA when opening the - binary. -

-
+
+

+ The attached profile uses upstream legacy 1.4.0 tools + with the original binary already open in IDA. The + headless profile uses the upstream database-supervisor + API and a registration with + "mode": "headless"; real verification + covers an IDA 9.3 Windows x64 supervisor. Doctor checks + the registration without starting IDA. +

+

+ Give REA the original executable path, with + --provider ida in a CLI query. For an + agent, include REA_IDA_MCP_CONFIG in the + REA registration's environment and select IDA when + opening the binary. +

+
+
-
+

For an existing Ghidra setup, inspect a function with:

@@ -308,15 +307,21 @@ npx rea-agents@latest setup
Copy
-
rea function /absolute/path/to/program main \
+              
npx -y rea-agents@latest function /absolute/path/to/program main \
   --provider ghidra --json

Replace main with the function name or address you - want to inspect. Each CLI invocation imports and analyzes the - target in its own session. Your agent's MCP queries reuse the - imported binary while that session is open. + want to inspect.

+
+ How native analysis sessions work +

+ Each CLI command imports and analyzes the binary, then closes + its session. Your agent's MCP queries reuse the imported binary + while that session is open. +

+

Follow a native analysis example to see how the function result leads to a recovered calculation. @@ -327,8 +332,8 @@ npx rea-agents@latest setup

Getting help

If your agent doesn't see REA

- Restart or reconnect the client after setup. To check its - registration, use a client-scoped report; for Codex: + Restart or reconnect the client after setup. Check its REA + connection with doctor; for Codex:

diff --git a/website/public/guides/browser/index.html b/website/public/guides/browser/index.html index 6c643bd0e8..5924d31ec6 100644 --- a/website/public/guides/browser/index.html +++ b/website/public/guides/browser/index.html @@ -49,7 +49,7 @@
  • Open the browser
  • Ask your agent
  • Capture from CLI
  • -
  • Read and follow
  • +
  • Read the request and script
  • @@ -62,12 +62,8 @@ notes.json, formats the two notes as CSV, and starts a download.

    -

    - We want to see which request the click makes, then use the script - to understand how the response becomes a file. -

    -

    One action, captured while it happens

    +

    From the click to the CSV download

    1. 01 · YouGET notes.json → 200 → notes[] → CSV

      - The request and response metadata come from the capture. CSV - construction is explained by reading the script. + Start the capture before clicking Export notes.
    -

    Open an observable browser

    +

    Open Chrome with remote debugging

    - Start a Chrome-family browser with a dedicated profile and a local - debugging port. On Linux, for this site's local preview: + Open the hosted Notes example with a separate browser profile and + a local debugging port. On Linux:

    @@ -125,12 +120,12 @@
    google-chrome \
       --remote-debugging-port=9222 \
       --user-data-dir=/tmp/rea-notes-browser \
    -  http://127.0.0.1:4173/examples/notes-web/
    + https://morluto.github.io/rea/examples/notes-web/

    Use your installed browser's executable path on macOS or Windows. - The page URL should point to your local preview or - the hosted Notes example. + You can replace the page URL with another page you want to + inspect.

    REA connects to this existing browser. You keep control of the @@ -225,7 +220,7 @@

    -

    Read the result, then follow the code

    +

    Read the request and export script

    @@ -260,6 +255,10 @@
    +

    + The hosted example's request path includes the site's + /rea/ prefix. +

    Read the loaded scripts
    -

    Start with
    an example.

    +

    REA guides.

    - Follow an example from the first prompt to the evidence. Then use the - same approach with your own app. + Analyze a native function, an Electron export or a browser request. + Each guide includes a prompt, code and results.

    @@ -70,7 +70,9 @@ Preload API IPC CSV file
    - Application workflows + JavaScript & Electron guide

    For a larger packaged app, follow Notion's clipboard bridge. @@ -96,12 +98,8 @@

    First investigation

    -

    Connect your agent, then ask.

    -

    - Each guide starts with a plain-language question and follows a - concrete example. If you haven't connected REA yet, setup takes - you through the client and provider choices. -

    +

    Set up REA

    +

    Connect your coding agent or use REA from the terminal.

    Get started with REA
    diff --git a/website/public/guides/javascript/index.html b/website/public/guides/javascript/index.html index f52bb2161a..4c56189ba7 100644 --- a/website/public/guides/javascript/index.html +++ b/website/public/guides/javascript/index.html @@ -35,10 +35,10 @@ Home / Guides / JavaScript & Electron

    -

    Follow a feature
    across the app.

    +

    Trace an Electron
    CSV export.

    - Use a CSV export to see how REA connects JavaScript files, exposed - APIs and Electron process boundaries. + Follow a button click from the page API, through Electron IPC, to the + CSV file writer.

    @@ -47,9 +47,9 @@
    @@ -62,7 +62,9 @@ across several files.

    -

    A feature across two processes

    +

    + The CSV export across Electron processes +

    1. Renderer → preload
    -

    Give your agent one feature

    +

    Ask about the CSV export

    Connect your agent to REA and give it the app directory or ASAR file: @@ -140,7 +142,7 @@

    -

    Connect the pieces

    +

    Trace the export code

    The page calls a small API

    @@ -266,10 +268,10 @@ /absolute/path/to/notes-example --json

    - Replace the path with the folder you unzipped. Look for - normalized_result.summary.ipc and the source - locations in normalized_result.graph. The example has - one channel and one paired invocation. + Replace the path with the folder you unzipped. You should find one + IPC channel and one matching handler in + normalized_result.summary.ipc. Source locations are + in normalized_result.graph.

    For your own app, use the same command with its directory or ASAR @@ -278,7 +280,7 @@

    -

    Ask the next question

    +

    Inspect the CSV writer

    Follow notes:export to its handler. Which inputs diff --git a/website/public/guides/native/index.html b/website/public/guides/native/index.html index 48237b101c..bbb1ece47b 100644 --- a/website/public/guides/native/index.html +++ b/website/public/guides/native/index.html @@ -34,10 +34,10 @@

    -

    Recover a calculation.
    Follow the evidence.

    +

    Recover DX-Ball's
    sound-pan calculation.

    - Use DX-Ball’s sound panning to see how an agent moves from a binary to - an explanation and a checked C function. + Inspect the original instructions, identify the input and constants, + then check the recovered C.

    @@ -46,18 +46,17 @@
    -

    A position becomes a sound

    +

    Calculate left/right sound panning

    In DX-Ball, a brick hit supplies a horizontal screen position. The - sound code turns it into a left/right panning value. We want to - recover that calculation from the executable. + sound code turns it into a left/right panning value.

    The starting function, 0x00406400, has a short @@ -138,14 +137,9 @@ Example prompt. Give your agent the path to your local DX-Ball 1.07 executable.

    -

    - You can start with a feature name. Your agent uses REA to locate - relevant functions, then follows the evidence with more focused - queries. -

    -

    Follow what REA returns

    +

    Read the REA results

    Read the input

    diff --git a/website/public/showcase/dx-ball/index.html b/website/public/showcase/dx-ball/index.html index 7257c30c5b..027547c6d6 100644 --- a/website/public/showcase/dx-ball/index.html +++ b/website/public/showcase/dx-ball/index.html @@ -85,11 +85,11 @@
    45,380
    -
    original-x86 differential cases
    +
    comparisons with original code
    33
    -
    byte-exact functions
    +
    functions with matching compiled bytes

    @@ -112,12 +112,6 @@ game continues with ball and paddle physics, power-up handling and Windows integration.

    -

    - The analysis starts from the DX-Ball 1.07 executable. REA returns - function code, instructions, callers and state references. These - findings guide the C implementation; execution of the original x86 - functions and compiler replay check the result. -

    @@ -267,12 +261,6 @@

    -

    - REA exposes these operations through CLI and MCP, with target - identity and Evidence IDs in the results. The agent can follow up - on a caller or data address directly, then use the findings to - write maintained C. -

    From REA's findings to C

    @@ -523,10 +511,8 @@

    Checking the recovered function

    - The input, caller context and constant values returned through REA - guided the maintained C implementation. The project then checked - it against the original x86 function and the pinned compiler. For - this function, both checks pass. + The recovered function passes two checks: its return values match + the original, and its compiled bytes match the executable.

    diff --git a/website/public/showcase/index.html b/website/public/showcase/index.html index 88bae4637c..71f613ba74 100644 --- a/website/public/showcase/index.html +++ b/website/public/showcase/index.html @@ -32,17 +32,17 @@
    -

    Follow the
    investigation.

    +

    REA case studies.

    - Start with a question about a real application. See what REA finds, - follow the code, and understand how the pieces fit together. + Game reconstruction and Electron analysis, with examples from DX-Ball, + Notion and TH04.

    Native · Reconstruction

    -

    Rebuilding DX-Ball

    +

    DX-Ball's sound-pan calculation

    Recover a sound-pan calculation from a 1996 Windows game. REA's instructions, caller references and numeric constants lead to a @@ -61,7 +61,7 @@

    Electron · Feature tracing

    -

    Following a copy through Notion

    +

    How Notion copies text and HTML

    Trace a page-facing API through Notion's packaged JavaScript. Follow its IPC wrappers to the system clipboard, then see how a @@ -79,7 +79,7 @@

    PC-98 DOS · Reconstruction

    -

    Understanding TH04's bullet patterns

    +

    How TH04 aims a ring of bullets

    Inspect the original 16-bit angle helper with REA. Match its multiply, divide and coordinate operations to readable C++, then @@ -96,12 +96,12 @@

    -

    Try a smaller example first.

    +

    Step-by-step guides

    The guides walk through a native calculation, an Electron export and a browser request. Each starts with a prompt and a concrete target.

    - Explore the worked guides + Read the guides
    diff --git a/website/public/showcase/notion/index.html b/website/public/showcase/notion/index.html index bc4d265a6e..ae9c70e336 100644 --- a/website/public/showcase/notion/index.html +++ b/website/public/showcase/notion/index.html @@ -35,11 +35,10 @@ Home / Showcases / Notion

    Case study · Electron

    -

    Following a copy
    through Notion.

    +

    How Notion copies
    text and HTML.

    - A familiar action leads through several files. Follow Notion's - clipboard API from the page, through Electron, to the system - clipboard. + Trace a clipboard call from Notion's page API, through the preload and + main process, to Electron's clipboard writer.

    Notion Desktop 7.6.1 · JavaScript · REA

    @@ -93,8 +92,7 @@
    @@ -294,14 +292,12 @@ function invokeInMainAndReturnResult(channel, ...args) {

    How does a copied block keep its structure?

    - The cached web editor adds a small detail to programmatic copies. - It sends text and HTML through - electronApi.clipboard.write, while keeping Notion's - private block data in a local virtual clipboard. An ID in the HTML - connects the two. + Notion's web editor sends text and HTML through + electronApi.clipboard.write. It keeps the block data + locally and puts an ID in the copied HTML to connect them.

    -

    One copy, two representations

    +

    HTML links to saved block data

    @@ -313,7 +309,7 @@ html: "<p>Project notes</p>"
    - Kept in the local virtual clipboard + Saved locally by Notion
    id: <copy-id>
     mimeTypes:
    @@ -327,76 +323,59 @@ mimeTypes:
                   >
                     
  • Read the HTML ID
  • Find the same local ID
  • -
  • Restore private formats
  • +
  • Restore Notion block data
  • - Illustrative text and ID. The saved module probe recovered the - private formats when IDs matched; a stale entry left only the - ordinary text and HTML. + Illustrative text and ID. The recorded module test restores the + block data when IDs match; a stale entry returns only text and + HTML.

    - On paste, the reader looks for the marker and checks it against - the saved copy. A matching ID reconnects the text to its richer - representation. This explains why the HTML carries more than - visible content. + On paste, Notion looks for the HTML ID and checks it against the + saved copy. Matching IDs restore the block data.

    - Web assets cached on July 13, 2026. The desktop-package bridge - above and this web-side format are separate pieces of the - investigation. -

    -
    - -
    -

    From Markdown to structured blocks

    -

    - The same investigation also recovered Notion's Markdown - processing. A small table makes the internal format easy to see: - its rows and cells become data that the block renderer can use. -

    -
    -

    - A table through Notion's Markdown parser -

    -
    -
    -
    Markdown input
    -
    | A | B |
    -| - | - |
    -| 1 | 2 |
    -
    -
    -
    - Structured parser output · excerpt -
    -
    table · headerRow: true
    -  table_row
    -    cells: ["A"], ["B"]
    -  table_row
    -    cells: ["1"], ["2"]
    -
    -
    -
    - A saved extracted-module probe of web parser - 422457. Both page and chat filters preserve this - table. The tree shows the recorded rows and cell text. -
    -
    -

    - Finding that transformation required separating the ordinary - paste/import path from the structured Markdown and AI/chat - parsers. Each has its own entry point and intermediate format. + Clipboard format recorded from web assets cached on July 13, 2026.

    -

    Try another question

    -

    - Start with one feature and follow the code that crosses a process - boundary. A named API, a literal channel and its receiver are - useful places to begin. -

    +

    More examples and sources

    +
    + Another example: Markdown tables +

    + Notion parses Markdown into block data. This example shows how a + table becomes header and data rows. +

    +
    +

    + A table through Notion's Markdown parser +

    +
    +
    +
    Markdown input
    +
    | A | B |
    +| - | - |
    +| 1 | 2 |
    +
    +
    +
    + Structured parser output · excerpt +
    +
    table · headerRow: true
    +  table_row
    +    cells: ["A"], ["B"]
    +  table_row
    +    cells: ["1"], ["2"]
    +
    +
    +
    + Recorded output from an extracted Markdown parser. The table + becomes rows and cells. +
    +
    +
    Another path: the offline SQLite connection

    @@ -436,6 +415,12 @@ mimeTypes: matching receiver are connected by reading their wrapper implementations in the package.

    +

    + The Markdown example uses parser module 422457. + Saved module tests show that both page and chat filters preserve + this table. The paste/import, structured Markdown and AI/chat + parsers have separate entry points and intermediate formats. +

    • @@ -454,7 +439,7 @@ mimeTypes:
    Start with your own targetAnalyze your own app
    diff --git a/website/public/showcase/th04/index.html b/website/public/showcase/th04/index.html index 07de3370ae..a5a27b5645 100644 --- a/website/public/showcase/th04/index.html +++ b/website/public/showcase/th04/index.html @@ -54,15 +54,15 @@ 01 · Original gameMAIN.EXEThe PC-98 executable and a reviewed bullet helper.The PC-98 executable and its bullet-angle helper.
  • 02 · Inspect with REAInstructions + referencesCheck the loaded image, read the arithmetic and anchor it to file - bytes.Verify the loaded DOS code and read the angle calculation from + the executable.
  • @@ -76,8 +76,8 @@ 04 · Check the source2,139 matching bytesRecorded compiler checks cover the containing bullet-add - code.Recorded compiler checks cover the bullet-generation code that + contains this helper.
  • @@ -196,11 +196,10 @@ bullet_template_tune();

    What REA returns

    - The project already has a reviewed boundary for - bullet_velocity_and_angle_set(). Inspecting that - original function through REA returns its instructions, pseudocode - and references together. Here are three parts of the result that - explain the pattern. + We inspect bullet_velocity_and_angle_set(), the + function that sets each bullet's velocity and angle. REA returns + its instructions, pseudocode and references. Three parts of that + result explain the pattern.

    1. @@ -499,25 +498,23 @@ no_aim:

      Checking the maintained source

      - The TH04 project checks this compiler-sensitive C++ with its - pinned Turbo C++ 4.0J toolchain. Recorded checks cover the - complete bullet-add source owner containing this helper. + The TH04 project's recorded checks compile the bullet-generation + code, including this helper, with its pinned Turbo C++ 4.0J + toolchain.

      2,139 matching bytes

      - The rebuilt code matches the complete original target extent. - The comparison also checks the MAP contribution and - overlapping relocation. + The compiled bullet-generation code matches a 2,139-byte + section of the original executable.

      Two clean builds

      - Two isolated compiler runs produce the same matching result. - The recorded input hashes match the maintained bullet source - shown here. + Two separate builds produce the same matching bytes. The + recorded input hashes match the maintained source shown here.

      @@ -555,6 +552,11 @@ no_aim:
    +

    + Compiler checks cover the complete bullet-add code section, + including this helper. They also compare its MAP contribution + and overlapping relocation. +

    REA verified the static DOS load image at load segment 0x1000. Its addresses describe that analysis image. diff --git a/website/style-guide.md b/website/style-guide.md new file mode 100644 index 0000000000..f7154a56b7 --- /dev/null +++ b/website/style-guide.md @@ -0,0 +1,199 @@ +# REA website writing and design guide + +> A good website is like a good paper: easy to follow, clear and concise, with a clean, refined presentation. +> +> — N0zoM1z0 + +For REA, that means a concrete question, a figure that explains the process, +evidence the reader can inspect, and a useful next step. A clean, refined +appearance comes from precise wording, readable figures, consistent typography +and deliberate spacing. + +Use this guide for new pages and revisions. Start from an existing page and +reuse `public/assets/styles.css` and `public/assets/main.js`. Local preview and +publication commands are in [README.md](README.md). + +## What a reader should understand + +A reader scanning for five seconds should see the subject and the result. After +ten seconds, the main figure should explain the sequence. After fifteen seconds, +the prompt or first example should show how to start. + +These are reading goals, not a requirement to fit every investigation above the +fold. Keep the main path short and let readers open the supporting details. + +## Write the task directly + +Name the software, behavior or action in headings. Give the opening paragraph +one job: explain what the page covers. Use concrete verbs such as install, trace, +read, compare and calculate. + +| General wording | More useful wording | +| ------------------------------------------------ | ------------------------------------------------------------------ | +| Start with a question. | Set up REA. | +| Follow a feature across the app. | Trace an Electron CSV export. | +| Following a copy through Notion. | How Notion copies text and HTML. | +| A position becomes a sound. | Calculate left/right sound panning. | +| Follow the investigation. | REA case studies. | +| Reviewed boundary / source owner / target extent | The helper / its surrounding code / the code section being checked | + +Questions also work when they name a behavior: “Where is the CSV created?” and +“How does a copied block keep its structure?” give the reader something specific +to look for. + +Explain necessary terms where they first matter. An IPC channel can be described +as a named message between Electron processes. Keep exact API names, addresses +and JSON paths in the code or result they identify. + +Give each paragraph new information. A diagram can summarize a sequence, while +the code below explains individual steps. Repeating that REA supplies +instructions, callers and constants in several surrounding paragraphs adds no +new step. Explain that role once, then show the results. + +Use captions for useful context: which values are illustrative, where an excerpt +comes from, or what a check covers. Scope a claim positively and precisely: +“The compiled function matches 63 bytes” is more useful than a broad claim +followed by several qualifications. + +## Build a page around one question + +### Guides + +1. Name the task and introduce a small example. +2. Show a short flow of the relevant files, calls or observations. +3. Provide a copyable agent prompt and its prerequisites. +4. Explain the important code or returned fields. +5. Let the reader try the example, with a command or one ZIP download. +6. State the expected result and where to find it. +7. Offer a specific follow-up question or another relevant guide. + +A command should work after the steps immediately before it. Use `npx` for a +first CLI query when global installation is optional. Browser examples should +open the hosted fixture by default; a local URL needs a server-start step. Keep +target paths, debugging endpoints and other required inputs explicit. + +### Case studies + +1. Introduce the project and the particular feature being examined. +2. Show a figure that explains the investigation or behavior. +3. Give a short example prompt. +4. Pair important REA queries with selected returned evidence. +5. Connect that evidence to readable source or an explanation. +6. Explain how the result was checked. +7. Link the reconstruction repository and supporting sources. + +Show REA's useful contribution through a concrete finding: a missing stack +argument, a caller, bytes behind a constant, or source ranges in a packaged +bundle. Explain what the agent does with that finding. Credit source +interpretation, reconstruction and external checks to the work that performed +them. + +Keep a second investigation optional. Notion's clipboard path is the main +story; Markdown tables and SQLite are additional examples. Native `

    ` +keeps them available without interrupting the first question. + +Keep the explanation on the website. Repository links provide source, +reproduction instructions and further evidence. Use specific links for those +purposes, and immutable commit links for checkpoint-dependent facts. + +## Make figures explain a relationship + +Each figure should answer a question that a reader can name. Choose the visual +form that fits it: + +| Relationship | Existing example | Useful form | +| ----------------------------------------- | ---------------------------------------- | -------------------------------------------------- | +| Analysis and verification steps | DX-Ball sound pan | Flow with separate verification branches | +| Code across process boundaries | Electron CSV export and Notion clipboard | HTML flow with APIs and channel names | +| A mathematical transformation | TH04's fixed and aimed rings | SVG drawn from the angle formula | +| Original instructions and readable source | DX-Ball and TH04 | Selectable HTML code with matching step highlights | +| A request caused by an action | Notes browser export | Flow, observed result table and script excerpt | + +Use SVG or semantic HTML for diagrams with exact text, numbers and arrows. +Generated illustrations can help explore a layout, but the published labels, +relationships and values need to be checked. [figures.md](figures.md) records the +existing assets and original layout references. + +Keep labels short, align related nodes, and give arrows an explicit direction. +Use color to identify the relevant operation or connection. Add a legend when +the visual encoding needs one. Avoid making the diagram repeat the entire page. + +State illustrative inputs in the caption. TH04's diagram uses a count of 16 and +a player direction of 40; its dots are calculated from those values. Give an +image useful alternative text, and keep source code as selectable HTML. + +On small screens, HTML flows stack. A wide SVG can have its own horizontal scroll +and an “Open figure” link. A diagram should remain readable at its intended +display size; scaling small labels down is not a mobile layout. + +## Use the existing visual system + +The shared stylesheet defines the site. Its core colors are: + +| Token | Value | Use | +| ---------- | --------- | -------------------------------- | +| `--page` | `#ffffff` | Page background | +| `--ink` | `#20252b` | Main text | +| `--muted` | `#5b6570` | Secondary text | +| `--line` | `#e0e5e9` | Section and component boundaries | +| `--soft` | `#f4f6f8` | Code and supporting surfaces | +| `--accent` | `#294f82` | Links and meaningful highlights | + +Use the system sans-serif stack for prose and the shared monospace stack for +code. The current container is at most 1080px wide, with article text limited to +760px. Reuse the existing heading sizes, line heights, section spacing and +component classes. + +Whitespace separates ideas. Thin rules identify sections. Headings establish +hierarchy. The blue accent identifies something useful. Keep these elements +consistent rather than adding a new treatment for each page. Decorative +gradients, large shadows and scroll effects do not help explain the examples. + +Agent terminals contain short, copyable prompts. Use the existing continuous +cursor animation and reduced-motion behavior. Label an example prompt as an +example; a real recorded result belongs in an evidence block. Copy buttons +should copy only the intended text, without the prompt symbol or cursor. + +Use `minmax(0, 1fr)` for grid tracks that contain long commands or nested panels. +Allow code blocks to scroll within their own area. Check expanded details as +well as the default page. Document-level horizontal scrolling usually means a +component needs a width constraint; hiding it can conceal content. + +## Keep evidence accurate and public + +Preserve target identity, source locations, relevant versions and the scope of +checks. Keep observations, interpretation and unknowns distinguishable in plain +language. Put lengthy provenance in an evidence document or collapsed details. + +Label simplified source and selected instruction excerpts. When compiler checks +apply to the maintained project source, say so; a readable summary is a separate +presentation of the calculation. Historical checks and a fresh REA inspection +retain their own dates and attribution. + +Use generic example data and display paths. Machine paths, personal account +identifiers, credentials, local configuration, full vendor bundles and raw +captures belong outside the public website. If a path is shortened in a displayed +query, identify that in its caption and keep the original capture separately. + +## Review and publish + +Before merging a change: + +- Read the default page in order. Check that every section advances the task. +- Open details and confirm that sources and extra examples remain usable. +- Verify commands, prerequisites, expected results and downloadable files. +- Keep links and asset paths working at both `/` and `/rea/`. +- Check desktop, intermediate and mobile widths, including 320px. +- Check copying, downloads, code-step selection, keyboard access and reduced + motion. Core content and native details should work without JavaScript. +- Confirm that figures and code excerpts agree with the supporting evidence. +- Run site preparation, verification and formatting checks. + +Match verification to the change. Copy edits need page and interaction checks. +New analysis or behavior claims need the real evidence that supports them; a mock +or a page-loading check cannot establish those claims. + +Follow the PR review and CI process, then publish using the existing manual +`website-pages.yml` workflow on `main`. Ordinary commits should not publish the +site. After deployment, check the live page and confirm it matches the reviewed +version. The legacy VitePress build remains separate from the Pages publisher.