All builds

Sourcing workspace / 2026 / In progress · Anonymized work

Research Workflow Engine.

A research tool that saves each observation as a new version, and can carry on exactly where a paused session stopped

The hard part
Letting research carry on after a pause or a lost browser tab, without the search quietly changing along the way.
Works today
Each observation is saved as a version that cannot be changed, and written tests cover recovery after a pause and new sessions.
Role
Software engineering
Built with
TypeScript · Node.js · MCP · Zod · SQLite · Drizzle · decimal.js · MCP SDK · esbuild · Vitest

01What I built

The problem.

Research in a web browser rarely fits in one sitting. A site may ask you to prove you are a person. A tab may disappear, or a source may need another look later. Without a saved place, you either start again or carry on from a slightly different search without noticing.

What I built.

Research Workflow Engine keeps one piece of research, called a run, going across many browser sessions. Observations arrive through its A technical wordMCPModel Context Protocol. A standard way for AI apps to find and use tools that other programs offer. tool service, Research MCP Service, in a fixed shape. At each step the engine saves a checkpoint, a record of where the research has got to. One part decides whether a new checkpoint may follow on from the last one. If it may, the engine adds it as a new version, with a record of the change for later checking. Other parts work out assessments without changing what was collected. The core never sends anything over a network.

The core

TypeScript, Node.js, Zod, SQLite, Drizzle, decimal.js

Checkpoint rules
Decide whether a checkpoint is a proper new session, or a true recovery of a paused one.The storyLetting a research run outlast its browser sessions
Version store
Adds each accepted version, and its record of the change, under the one checkpoint ID for that source.
Calculations
Work out assessments, and costs with no rounding errors, from saved observations. They never rewrite those observations.
Versioned exports
Give the dashboard a copy it can read but not change, without opening the research database.

The server

TypeScript, Node.js, MCP SDK, Zod, esbuild, Vitest

Research MCP Service
Tool registry
Holds each tool’s version, its strict input rules and output rules, and short notes that describe it.
Shared service
Reads the input and limits how deeply data can sit inside other data. Then it hands the work to the engine and checks the result.The storyReturning useful errors without recording a failed save twice
Error mapping
Sorts known failures into types, each with retry advice. Any unknown failure becomes one fixed internal error.The storyReturning useful errors without recording a failed save twice
Output streams
Sends protocol messages on the standard output channel, and start and stop logs on the error channel. The logs leave out file paths and the computer’s settings.
Packaged process
Ships as one bundle, with the piece that lets it use SQLite and the steps that set up the database. It keeps saved data away from the installed code.

Confidential work. Names and identifying business details have been changed.

02The journey

What broke, and what changed.

Broke, then fixedA decisionA milestone

  1. 01 of 08BrokeResearch Workflow Engine

    The tab was gone, so the run looked lost for good

    What went wrongResearch paused for a human check, where a site asks a person to prove they are not a program. Carrying on depended on finding the original browser tab. The person passed the check, but the next session couldn’t find that tab. So the run was treated as lost, even though its exact place was saved.

    What changedResearch Workflow Engine · The coreCheckpoint rulesDecide whether a checkpoint is a proper new session, or a true recovery of a paused one.See it in the map above now starts from the saved checkpoint, not the tab. After a person confirms, a matching tab or a fresh one can carry on. But the search, the place in it and the counts must not change. The limits and the expiry time must not change either. If the site blocks access again, the run stops.

    ProofThe tests accept a proper replacement tab. They refuse a changed checkpoint, and a recovery after its time ran out.

03Today

Where it stands.

The rules mean the research history can be got back. But they can’t tell whether an observation from the browser is true. Some of this code is not saved in the project history yet. I also haven’t checked the installed plugin against it.