End-to-End Investigation Workflow
A practical tutorial on using REA with AI coding agents to discover implementation details and replicate software mechanics without source access.
Step 1: Frame the Problem as an Investigation
Do not ask your agent to "guess" how an app works. Instead, point it directly to the local application directory or binary and ask for evidence-backed discovery:
"Investigate how search and local indexing work in the Notes app at /Applications/Notes.app.
Use REA tools to trace the internal SQLite schema and relevant binary symbols.
Show me the exact evidence, and draft a clean reimplementation for our project."
Step 2: Inspecting Electron & Web Boundaries
If the target is built on Electron, REA maps the communication bridge between the renderer UI and main process:
What REA extracts: Preload scripts, ipcRenderer.send / ipcMain.handle channels, Webpack chunk maps, and local database storage structures.
Step 3: Clean Reimplementation in Your Project
Once REA extracts the core mathematical formula, state transitions, or protocol specifications:
- Review the returned pseudocode and constraints.
- Have your agent write modern TypeScript or Python implementations matching the behavior.
- Verify with deterministic unit tests against edge cases discovered in the binary.