rea.run

← Showcase

case-study 2026-10-13 evidencegameeditorwebauthorized

Two REA labs: a Contra web remake, then an upgrade to your own editor

REA (Reverse Engineer Anything) is the local MCP/CLI that lets a coding agent inspect a target you are allowed to analyze and return Evidence plus unknowns. This page records two labs from one session: a teaching remake of a ROM the operator may study, and an upgrade to an editor the operator already owns. The clip above is the playable Contra page. The grids below are the session boards. rea.run did not re-execute the ROM for this write-up.

Source meta

— GitHub stars (snapshot)

Language: —

License: —

Updated: —

GitHub source: —

rea.run rating

4/5 — Two Evidence labs, gaps left open

Quality. Two timed labs with a scope table, findings boards, a playable web demo, and an explicit taste gap.

Evidence. Boards separate confirmed rules from unknowns. The 30-life sequence is from the local Evidence ledger, not a web guide.

Limits. Not a ROM pack and not a Notion clone recipe. The 80% and 70% figures are session estimates. UI polish stays human work.

For. Builders who want an Evidence workflow on a ROM they may study, or on their own editor after authorized analysis.

Playable first-stage Contra remake in the browser (~20s). Self-hosted on rea.run.
Diagram: forward development follows a written recipe; reverse engineering infers the recipe from the finished dish.
Diagram: forward development follows a written recipe; reverse engineering infers the recipe from the finished dish.
Session header: a browser Contra remake beside an editor slash menu, with the two lab claims side by side.
Session header: a browser Contra remake beside an editor slash menu, with the two lab claims side by side.
Opening card that frames REA as a local tool a coding agent can call. Promotional tone; the lab table is what this page stands behind.
Opening card that frames REA as a local tool a coding agent can call. Promotional tone; the lab table is what this page stands behind.
Card on the old threshold: specialist tools, nameless symbols, and a chat window that cannot hold a whole desktop package.
Card on the old threshold: specialist tools, nameless symbols, and a chat window that cannot hold a whole desktop package.
Three-step loop for this session: ask in plain language, pull Evidence through REA, then explain or rewrite.
Three-step loop for this session: ask in plain language, pull Evidence through REA, then explain or rewrite.
Warm-up card: Windows Calculator percent branches, and TH04 storing a full circle as 256 angle units.
Warm-up card: Windows Calculator percent branches, and TH04 storing a full circle as 256 angle units.
Lab A prompt: REA on the local Contra ROM, no original-ROM playback, first third of stage 1 as a standalone web page.
Lab A prompt: REA on the local Contra ROM, no original-ROM playback, first third of stage 1 as a standalone web page.
Findings board, part 1: run and jump, weapons, and level rules marked confirmed or still open.
Findings board, part 1: run and jump, weapons, and level rules marked confirmed or still open.
Findings board, part 2: level data, bullet limits, and unknowns that were not written up as facts.
Findings board, part 2: level data, bullet limits, and unknowns that were not written up as facts.
Stage 1 opening map from the session: terrain, platforms, and the bridge section used by the web remake.
Stage 1 opening map from the session: terrain, platforms, and the bridge section used by the web remake.
Playtest notes: about 80% core feel; death animation and the weapon-capsule pickup still incomplete.
Playtest notes: about 80% core feel; death animation and the weapon-capsule pickup still incomplete.
Title-screen sequence from the Evidence ledger: up up down down left right left right B A, then Start; spare lives change from 2 to 29.
Title-screen sequence from the Evidence ledger: up up down down left right left right B A, then Start; spare lives change from 2 to 29.
Dual-track clipboard already on rea.run: full block tree in memory, clean HTML on the system clipboard, hidden id comment.
Dual-track clipboard already on rea.run: full block tree in memory, clean HTML on the system clipboard, hidden id comment.
One-page brief: an authorized desktop-app study compared with the operator’s own Mac editor, naming four upgrade levers.
One-page brief: an authorized desktop-app study compared with the operator’s own Mac editor, naming four upgrade levers.
Upgrade prompt: unified edit transactions, selection, shortcut formatting, and undo, keeping documents, Markdown export, and offline writing.
Upgrade prompt: unified edit transactions, selection, shortcut formatting, and undo, keeping documents, Markdown export, and offline writing.
Slash-menu comparison: the generated menu inserts blocks, but spacing, grouping, and chrome still lag product taste.
Slash-menu comparison: the generated menu inserts blocks, but spacing, grouping, and chrome still lag product taste.
Motive card from the session. This page keeps only the lawful subset: own product, allowed study, clean rewrite.
Motive card from the session. This page keeps only the lawful subset: own product, allowed study, clean rewrite.
Session close: reconstructing logic is no longer the scarce part; product taste, definition, and a real data ecosystem stay human work.
Session close: reconstructing logic is no longer the scarce part; product taste, definition, and a real data ecosystem stay human work.
Closing card: install from the REA repository, keep a question list, and separate confirmed findings from unknowns.
Closing card: install from the REA repository, keep a question list, and separate confirmed findings from unknowns.

Short version

Two labs, same rule: ask, take Evidence, rewrite clean code, and leave unknowns written down.

  1. Lab A — Contra. A local Contra (USA).nes (about 128KB). The agent tracked about 24,000 frames, then rewrote the first third of stage 1 as standalone JavaScript. No emulator. About 20 minutes. Session estimate of core feel: about 80%.
  2. Lab B — own editor. About 3 hours comparing an authorized Notion desktop study with the operator’s own Mac text editor. Session estimate of the core upgrade: about 70% (unified edit transactions, stable block ids, incremental local save, block-level merge). The generated slash menu still lags product taste.
LabTargetTimeScopeSession estimate
A. Web remakeLocal Contra (USA).nes, ~128KB~20+ minutesStage 1, first ~1/3 (~4 of 12 screens)~80% core feel
B. Own editorOperator’s Mac text editor, after an authorized desktop study~3 hoursTransactions, block ids, incremental save, block merge~70% of the core
TrackingSame ROM, REA-only passDuring lab A~24,000 framesUnknowns kept on the board

Session header: a browser Contra remake beside an editor slash menu, with the two lab claims side by side.

The opening card is promotional. This page does not adopt its tone as a site metric. The numbers above are the session record: time, scope, frame count, and the operator’s own completion estimates.

Opening card that frames REA as a local tool a coding agent can call. Promotional tone; the lab table is what this page stands behind.

What REA is in this session

REA is not a vibe decompiler. It is a local Evidence ledger for a coding agent. The useful loop is short: ask in plain language → pull Evidence through REA → explain the rule or rewrite it in your tree. If a slice is not nailed down, the board says so.

Diagram: forward development follows a written recipe; reverse engineering infers the recipe from the finished dish.

Forward work starts from a recipe you are allowed to read: source, tests, a spec. Reverse work starts from a finished build you are allowed to study. The old threshold was real. Specialist interfaces (Ghidra and similar) show nameless symbols and machine code, and a desktop package can unpack to more text than a chat window can hold. Stuffing the whole unpack into the prompt either blows the context or invites a guess.

Card on the old threshold: specialist tools, nameless symbols, and a chat window that cannot hold a whole desktop package.

  1. Local ledger. The unpack stays on disk. The agent does not have to live in the disassembler UI.
  2. Short catalog, then a slice. A question such as “how does jump gravity work?” or “how does clipboard HTML keep block structure?” pulls the cited lines, not the whole package.
  3. Evidence or unknown. Every conclusion needs a source in the program. Unconfirmed spots stay unconfirmed.

Three-step loop for this session: ask in plain language, pull Evidence through REA, then explain or rewrite.

Warm-ups already on rea.run

Before the two labs, the same shape shows up in two published cards. Read those pages for the longer Evidence; this section only points at them.

  1. Windows Calculator percent. 200 × 10% is 20, while 200 + 10% is 220, not 200.1. After an add or subtract, the percent key takes a percent of the first operand (tip or tax style), then applies it. Card: Windows Calculator %. Microsoft publishes the Calculator sources, so that card can be checked against the open tree.
  2. TH04 bullet ring. A 1998 DOS game stores one full turn as 256 angle units, not 360 degrees. Sixteen bullets step by 256 / 16 = 16. One byte holds 0–255 and wraps. Card: How TH04 aims a ring of bullets. That page is a historical reconstruction with compiler checks. It is not a modern DRM-strip guide.
Warm-upQuestionWhat the on-site card keeps
Calculator %Why does 200 + 10% equal 220?Operator-dependent branch; arbitrate with the public sources
TH04 ringWhy 256 units in a circle?Index × 256 / count, then an aim offset; 16 bullets → step 16

Warm-up card: Windows Calculator percent branches, and TH04 storing a full circle as 256 angle units.

Lab A: Contra stage 1, first third

The file in the session was a US NES Contra ROM, about 128KB, that the operator is allowed to study. The ask was a teaching remake: do not boot the original ROM in an emulator, cover only the first third of stage 1, and emit a standalone web page. This site does not host the ROM.

The agent first reached for an existing Contra disassembly on GitHub. The session closed that shortcut and required a REA-only pass on the local file. That constraint is the point of the lab. A third-party dump is not Evidence for this ROM until you have checked it yourself, and it is the wrong artifact when the exercise is “read this file.”

Use REA to open a project on this local Contra ROM. Do not run the original ROM. Cover only the first third of stage 1, as a standalone playable web page.

Lab A prompt: REA on the local Contra ROM, no original-ROM playback, first third of stage 1 as a standalone web page.

  1. Force the local file. Refuse the pre-made disassembly. Point REA at the ROM on disk.
  2. Track, then separate. About 24,000 frames went through the local pass. Confirmed rules and still-open data were written on different parts of the board.
  3. Rewrite. Pure JavaScript. No emulator runtime. Run, eight-way aim, jump, shoot, prone, the opening enemies, and the bridge burst through the first third of the stage.
  4. Play it. The clip at the top of this page is that page, about 20 seconds, self-hosted here.

Findings board, part 1: run and jump, weapons, and level rules marked confirmed or still open.

Findings board, part 2: level data, bullet limits, and unknowns that were not written up as facts.

What the board treated as confirmed for the opening of stage 1:

  1. Run, jump, gravity. Jump height, hang time, per-frame fall, what counts as landing, and the prone hitbox.
  2. Weapons. The default gun, the held-fire machine gun (M), and the five-way spread (S): how a shot is spawned, how many bullets may live at once, and how a hit is decided.
  3. Stage slice. Terrain, platforms, and the bridge section for that first third, drawn as a map the rewrite could read.

Stage 1 opening map from the session: terrain, platforms, and the bridge section used by the web remake.

From analysis to a playable page was about 20 minutes. The session estimate after hands-on play: about 80% of the core feel (run, aim, jump, shoot, prone, the opening fight, the bridge). The other 20% was named, not waved through. Death animation is thin. The flying weapon capsule — shoot it down, collect the pickup, switch ammo — is incomplete, so weapon changes sit on a side menu. Twenty minutes is enough to stand up the spine. It is not a finished port.

Playtest notes: about 80% core feel; death animation and the weapon-capsule pickup still incomplete.

The 30-life sequence, from Evidence

After the playtest, the session asked whether the ROM contained a cheat, and required the answer to come from the REA record rather than a web guide. The ledger had the full title-screen sequence and the branch that consumes it.

StepWhat the Evidence ledger recorded
WhereTitle screen, before Start
Sequence↑ ↑ ↓ ↓ ← → ← → B A, then Start
WriteSpare lives change from the default 2 to 29
On screen29 spare + the active player = 30
Not usedA web guide or a third-party FAQ

Konami-style input, read out of the program. That is the standard this page wants: a table in the binary, a branch, a number before and after. A remembered childhood code without that table would have stayed an unknown.

Title-screen sequence from the Evidence ledger: up up down down left right left right B A, then Start; spare lives change from 2 to 29.

Lab B: upgrade your own editor

Lab A asks whether a classic game file can become a small, clean web page. Lab B is the product shape: study a mechanism you are allowed to inspect, then spend the implementation budget on your editor. About three hours went to an authorized look at Notion desktop, set next to the operator’s own Mac text editor. The goal was not a second Notion. Terms that forbid unauthorized decompilation still apply; this lab stays inside an inspection the operator is allowed to do, and the code that landed is new code in the operator’s tree.

The narrow clipboard story is already a card on this site: How Notion copies text and HTML. Copy keeps a full block tree in the app’s own memory, writes ordinary text and HTML to the system clipboard, and hides an id comment (<!-- notionvc: id -->) so an internal paste can restore structure while a paste into another app stays clean. Lab B used that idea as one input, then asked for a wider upgrade of the editor the operator ships.

Dual-track clipboard already on rea.run: full block tree in memory, clean HTML on the system clipboard, hidden id comment.

The comparison came back as a one-page brief: Notion text system as a reference, the current editor as the tree that must change. Four levers, each tied to a defect already in that tree:

LeverWhat the current editor was doingDirection after the authorized study
Unified edit transactionBold, shortcuts, paste, and AI edits each mutated state their own way, so undo driftedOne undoable transaction, shared selection, shared undo stack
Stable block idsAsync AI edits could move the cursorA stable blockId on text, images, and in-flight AI edits
Incremental local saveThe UI sent deltas, but disk still rewrote the whole workspaceAppend deltas to a local store and a pending queue
Block-level mergeWhole-document overwriteMerge per block; keep offline writing with no account, and Markdown export

One-page brief: an authorized desktop-app study compared with the operator’s own Mac editor, naming four upgrade levers.

The implementation prompt stayed narrow. It names the editor that already exists. It does not say “reproduce the other product.”

Apply that plan to the Mac text-editing stack in this project. Prioritize a unified edit transaction, selection, shortcut formatting, and undo. Keep existing documents, Markdown export, and offline writing without an account.

Upgrade prompt: unified edit transactions, selection, shortcut formatting, and undo, keeping documents, Markdown export, and offline writing.

With follow-up wiring, the upgrade sat at about three hours. The session estimate: about 70% of the core path actually runs — connector editing, split and merge of blocks, bold across paragraphs, the shortcut menu, and one undo stack. The working habit from the session is worth keeping: do not open with “copy this entire application.” Point at one mechanism (block editing, or the clipboard), read it, then change your own project. That is the pass with the highest chance of staying lawful and of landing.

The slash menu, and the taste gap

The same session then opened the slash menu the model had written and put it next to the product menu. Inserts work: paragraph, headings, quote, code. The chrome does not. Heavy frame, flat hierarchy, and a blue capsule with a white “A” that reads as an old web button. The comparison menu has a rounded popover, room to breathe, quiet gray groups, small icons, and shortcut hints that line up.

That gap is the model’s default UI polish. It is not a hole in the Evidence pass. REA can make the mechanism legible in a few hours and can carry a core path to a session estimate around 70%. Spacing, restraint, and the last interaction details still need a human eye. When the spine is cheap to reconstruct, taste and the data around the product are the part that stays scarce.

Slash-menu comparison: the generated menu inserts blocks, but spacing, grouping, and chrome still lag product taste.

What to copy

One card in the session lists commercial motives: inspect small tools, absorb architecture ideas, migrate an old codebase. Treat the card as a motive list, then apply the boundary under it. The lawful subset is narrower.

  1. Your product, or a study you are allowed to do. A performance pass on your own app, an open-source project whose license allows it, or a system under written permission. Unauthorized decompilation of commercial software is out of scope even when the mechanism is interesting.
  2. Ideas, then a clean rewrite. “A hidden id ties clipboard HTML to an in-memory tree.” “Jump hang time is a per-frame rule.” Close the report and write new code. Do not paste proprietary source, and do not ship someone else’s assets.
  3. A legacy tree you own or are contracted to migrate. Evidence can become a behavior note for that tree. It is not a license to republish a third party’s install.
  4. One feature at a time. A single question with a ledger beats a request to clone a flagship app over a weekend.

Motive card from the session. This page keeps only the lawful subset: own product, allowed study, clean rewrite.

Session close: reconstructing logic is no longer the scarce part; product taste, definition, and a real data ecosystem stay human work.

  • [ ] The ROM, app, or firmware is yours, the license allows the study, or you have written permission
  • [ ] You do not redistribute the ROM or proprietary assets
  • [ ] You do not accept a third-party disassembly as a substitute for a REA pass on the local file
  • [ ] You ask for Evidence and an explicit unknown list
  • [ ] You rewrite clean code in your tree
  • [ ] You read the terms before opening a commercial desktop app
  • [ ] A core-percent estimate is not a shipped design; UI taste stays a human review
  • [ ] You do not publish a clone recipe, an account bypass, or a DRM bypass

Install

Setup on this site is one command, then a client restart: npx rea-agents@latest setup. Walkthrough: /docs/install/. Codex demo: /docs/install-demo/. The agent can also be pointed at github.com/morluto/rea and asked to install from that repository. After setup, give an absolute path to a target you may analyze, and ask for Evidence plus unknowns.

Nearby pages, same wall: Calculator percent, TH04’s 256-angle ring, Notion clipboard, DX-Ball, and the legal boundary.

Closing card: install from the REA repository, keep a question list, and separate confirmed findings from unknowns.

Next step

Similar browser session records can become AgentEnv replay environments

This case is not a claim that it is a specific Hugging Face environment. When REA records an authorized browser session, Scale AgentEnv can expose replay as MCP tools. rea.run mirrors the catalog only — we do not host the RL runtime.

Environments catalog → What is AgentEnv + REA? HF collection ↗ Introducing AgentEnv

Compliance

Lawful RE only: software you own, open-source the license allows, or a system you have written permission to study. The Contra lab is a teaching Evidence demo on a ROM the operator is allowed to study. This page does not distribute that ROM, does not teach piracy, and does not bypass DRM. The editor lab upgrades the operator’s own Mac text editor after authorized analysis of a desktop app they are allowed to inspect. Learn mechanism ideas, then rewrite clean code in your own tree. Do not copy proprietary source or assets, and do not treat this page as a recipe for cloning a commercial product or breaking its terms.

Takeaways

  • Lab A: local Contra ROM, REA-only, first third of stage 1 as a web page in about 20 minutes, about 80% core feel, with death animation and the weapon capsule left open.
  • The 30-life sequence (spare lives 2 → 29, plus the active player) came from the Evidence ledger, not from a web guide.
  • Lab B: about 3 hours and about 70% of the core on the operator’s own editor. The slash menu still lags product taste. This page is not a ROM pack or a clone recipe.

Related on rea.run

More on-site cases