Reverse engineer an app. Keep what it does. Leave the code.

What to write down after you take an app apart, and what to look up before you start.

12 minutes to read

The useful part of taking an app apart fits on an index card: what it does when you use it.

Reverse Engineer Anything (REA) is an open-source tool. We use it to reverse engineer an app into a spec: a written account of what the app does, with checks, and without a copy of its source. The usual goal is to rebuild a product you already use, on your own stack. Spec-driven development is writing those decisions down before an agent builds, so the agent does not guess. This page is the second part of that series. It is about how to reverse engineer anything you can run, and which notes are worth keeping.

What REA is

We read the repository and rea.tools on 20 November 2026. This section only repeats what those pages say.

The repository calls REA one MCP server for reverse engineering across binaries, applications, and runtime behavior. MCP is the protocol a coding agent uses to call a tool. Runtime behavior means what the program does while it runs. They put it this way: see a feature you like, and understand how it works, down to the binary level. rea.tools says reverse engineering means learning how software works by inspecting the program itself. With REA, your agent can follow the code, explain a feature, and help you rebuild it.

Your agent calls REA. REA returns findings, and the evidence for each one. The agent can then explain what the program does, or write and test an implementation. The analysis runs on your machine.

The npm package is rea-agents, under the MIT licence. With Node.js and npm installed, the README's quick start is npx rea-agents setup. You choose which agents to configure, review the proposed changes, approve them, and restart the agent. The README lists Claude Code, Codex, Cursor, Gemini CLI, and Grok Build. The installation guide covers the rest.

The same README links a Discord server and the repository's issues for questions about REA. We have not asked the maintainers whether to share this guide there, so this page does not ask you to post it.

Get REA only from its official sources: github.com/morluto/rea and rea.tools. The repository is morluto/rea. The site is rea.tools.

What it does, or how it is built?

Sort these 12 findings about a changelog badge. The badge is the number that says how many new changelog entries you have not opened. The panel is the list of those entries. Unseen means published, and not opened yet.

7 findings are rules a person can check. 5 are choices about how to build the badge. Those are labelled Example. We wrote them. They are not from the published spec.

Press Keep when a rebuild has to do the same thing for the person using it. Press Leave when the finding is only one way to build that thing.

  1. A new account starts with nothing unseen.

    Answer

    Keep. A rebuild has to do this.

    A new person sees no unseen entries. A rebuild has to do the same.

  2. Example

    Seen state is kept in the browser's localStorage.

    Answer

    Leave. This is one way to build it, not a rule a person can check.

    Where you store which entries are already seen is your choice. Write down only what the person sees.

  3. Opening the panel marks everything as seen up to that moment.

    Answer

    Keep. A rebuild has to do this.

    Open the list and the badge clears. A person can check that, and it is easy to get wrong.

  4. The count is at most 9. Above that the badge shows 9+.

    Answer

    Keep. A rebuild has to do this.

    Ten unseen entries still show as 9+. A test can check the number.

  5. Example

    New entries arrive over a websocket.

    Answer

    Leave. This is one way to build it, not a rule a person can check.

    A websocket is one way to deliver the update. The rule is that a new entry raises the count by one.

  6. The panel lists the newest 5 unseen entries.

    Answer

    Keep. A rebuild has to do this.

    The open panel shows the five newest unseen entries. A rebuild has to show the same five.

  7. Example

    The badge component is written in React.

    Answer

    Leave. This is one way to build it, not a rule a person can check.

    React is a framework choice. A person using the badge cannot tell.

  8. Changing a published entry's title leaves its address as it was.

    Answer

    Keep. A rebuild has to do this.

    A link someone already shared still opens the same entry after the title changes.

  9. Example

    The count comes from a SQL query over two tables.

    Answer

    Leave. This is one way to build it, not a rule a person can check.

    How you store the rows is your choice. The person only sees the count.

  10. A taken-down entry's address answers 410.

    Answer

    Keep. A rebuild has to do this.

    Open the old address and the server answers 410, which means gone. A test can check that status.

  11. Example

    The server caches the count in Redis for 30 seconds.

    Answer

    Leave. This is one way to build it, not a rule a person can check.

    A cache is a performance choice. If the delay matters, write the wait a person can notice, such as within N seconds.

  12. An entry published after you open the panel makes the count one.

    Answer

    Keep. A rebuild has to do this.

    This is the check that says the badge is done. Publish one entry after the panel is open, and the count becomes 1.

From notes to a spec

On Spekkr we call that document a behavior spec. REA does not use the name. A behavior spec says what the product does from the outside. It does not contain copied code.

Keep the inputs, the outputs, the edge cases, and the checks. Do not keep how it is built. That document lets you rebuild on your own stack, avoids copying someone's code, and can be shared.

A faded function beside an index card. The card lists three rules of a changelog badge: a new account has no unseen entries, opening the panel marks current entries seen, and the count never shows more than 9. fn badge(unseen: u32) -> String { if unseen > 9 { return "9+".into(); } unseen.to_string() } A new account starts with nothing unseen. Opening the panel marks everything seen. The count is at most 9.
The faded function is one way to code the badge. The card is what we keep: three rules you can check without reading that function. Unseen means a published entry the person has not opened.
Four steps. Start with an app that exists. Look at it with REA. Split the notes into rules a person can check and choices about how it is built. The rules go into spec.md. The rest is left out or rewritten in your own words. An app that exists → Look with REA → Notes: what it does, and how it is built → A person can check it: write it in spec.md Otherwise leave it out, or rewrite it yourself
Start with an app that exists. Look with REA. Split the notes. A rule a person can check goes into spec.md, with an Accept when line that says when the rule is done. Anything else stays out, or you rewrite the idea in your own words.

Here is one we published. rook/changelog version 0.1.2 is a small app part: one piece of an app, not a whole product. It is a public changelog plus a badge. A requirement is one numbered rule in the spec. R5 is the badge. Below is that requirement, quoted in full from the published spec.md. The last line, Accept when, is the check that says the requirement is done.

### R5. The badge

Only if `in_app_badge` is on.

- `GET /api/changelog/unseen` answers a signed-in person with the number of
  entries published since they last looked, and the newest 5 of them.
- Opening the panel marks everything as seen up to that moment.
- A new account starts with nothing unseen. People do not sign up to find years
  of old news waiting.
- The count is at most 9. Above that the badge shows `9+`.

Accept when: a person who signed up after an entry was published does not have it
counted, opening the panel sets the count to zero, and an entry published
afterwards makes it one.

Notes from a real investigation are messier than this. The list below is not those notes. It is an example of that split, labelled so it is not mistaken for the spec.

Four of those lines became R5. The storage key and the 30-second poll are left out. A rebuild can show the same badge and store "already seen" somewhere else, or hear about a new entry some other way. If the delay matters, write the wait a person can notice ("within N seconds"), not the timer you happened to pick.

When you want a different product, not a straight account of the original, edit the spec before anyone builds it. Change the stack, drop a feature, add a limit, and say so in the requirement and in its Accept when line. That edit is a different job from the investigation. Spec an existing app follows two specs we have published: a hand-drawn whiteboard, and product analytics that speaks the posthog-js protocol. Both run on Cloudflare.

Search before you investigate

The thing you want may already be written as a spec. Search Spekkr before you spend an afternoon taking an app apart. The box loads the public catalogue, index.json, the first time you focus the field, and not before. Every word you type has to match the start of a word in a spec's id, name, summary, or keywords.

Without JavaScript, browse by kind or the catalogue on the homepage. A kind is a group such as "app part". Spekkr has no separate search address on the server. The form sends what you type to that catalogue.

Where the line is

Sometimes how it is built is the thing you came for. A clever algorithm, or a way to make something fast, can be the whole point. What a product does can also be protected, by a patent or by terms that forbid reverse engineering.

When the trick matters, we rewrite it as a rule in our own words. We check the licence and the terms first, and we get advice when it matters.

That is clean-room design, in outline. One person writes what the product does. A different person builds from that description, without the original source. We are not naming a court case. We are not telling you that your investigation is allowed.

This is not legal advice. Check the licence and terms of anything you investigate, and ask a lawyer when it matters.

A spec you publish on Spekkr is public. It should not include someone else's source, product names, icons, or copy. If you want a changed version rather than a straight account of the original, write the differences down. The next guide does that with two apps we have already published. It says to check the original project's licence and trademarks before you publish a spec based on it.

Publish what you learned

Publishing is optional. The files are already useful in your own repo.

When you do want the spec on Spekkr, check_spec reads the manifest and lists every problem. The manifest is manifest.json. It says what the spec builds, which choices a person can change, and which commands it may run. publish_spec then takes the manifest and the files. Publishing needs sign-in. Spekkr emails you a code. There is no password. Publishing makes the files public.

To build, paste the prompt at the bottom of this page into Claude Code, Cursor, or Codex after Spekkr is connected. The agent setup has the command or the settings file for each one. The endpoint those agents connect to is https://spekkr.com/mcp. Searching the catalogue, reading a spec, and pulling its files need no account. The tool the agent calls is pull_spec. It checks the choices and returns the files, including BUILD.md. BUILD.md says how to build. A choice you leave out keeps the spec's default. If the manifest lists commands under safety, the agent asks before it runs them.

Put your own changes in the spec, not in a chat after the fact. Change a requirement, change its Accept when line, and say why. Spec an existing app is that edit. The examples are a whiteboard and a product-analytics spec.

FAQ

Is Spekkr part of REA?

No. REA is a separate open-source project. Spekkr is a registry of specs. A spec is a document that says what to build, with checks.

Do I have to publish what I learn?

No. The files are useful in your own repo. Publishing is optional, and it makes the files public.

What is a behavior spec?

Our name for a spec that says what something does from the outside, with checks, and with no copied code. REA does not use this name.

Where do I get official REA?

From github.com/morluto/rea and rea.tools. The npm package is rea-agents.

Can I change the app while I write the spec?

Yes. Edit the spec before you build. Change the stack, the features, and the checks. The guide on speccing an existing app shows two we published.

How do I build the spec?

Connect https://spekkr.com/mcp in Claude Code, Cursor, or Codex. Then paste the prompt at the bottom of this page. The agent pulls the spec and follows BUILD.md. Searching, reading, and pulling need no sign-in.

Paste this into an agent that already has Spekkr connected. It pulls rook/changelog, turns the in-app badge on, and follows BUILD.md.

Use Spekkr to pull the rook/changelog spec, turn on the in-app badge, and build it by following BUILD.md.

Not connected yet? Set up your agent

Setup connects the agent to https://spekkr.com/mcp. Searching, reading, and pulling need no account. Publishing needs sign-in and makes the files public. Questions: support@spekkr.com.

Exact tool call
pull_spec {"id": "rook/changelog", "choices": {"in_app_badge": true}}

How to publish