Skip to content

ADR 0009: Research pipeline: Browser Rendering, injected model backends ​

  • Status: Accepted
  • Date: 2026-11-19
  • Spec version: 1.1.0

Context ​

Reroot researched a business from its URL: fetch pages, discover social profiles, then a Claude run with WebFetch/WebSearch produced findings, in Rust, with the user's own claude CLI (never an API key). shoot&grow-crew needs the same for leads and for clients, on Cloudflare Workers, with the Claude app in development and the Claude Platform in production. A Worker cannot spawn a process, run a headless browser, or run for long inside a request.

Decision ​

  • One pipeline, two subjects. ResearchSubject.kind is lead or client; same job, brief, storage and panel.
  • Rendering: Cloudflare Browser Rendering through the BROWSER binding and its content quick action (no puppeteer dependency). Replaces Reroot's plain HTTP fetch, which could not read script-rendered sites.
  • The model is injected. LlmProvider has two implementations: claude-cli (a loopback bridge to the developer's own Claude app) and anthropic (Messages API + web search tool, API key). selectLlm chooses; production refuses the bridge.
  • Runs on the jobs queue as research.run v1, idempotent by job status.
  • Briefs are versioned JSON and every figure must be verifiable against a rendered page.
  • No backend, no fake result. Unconfigured research is refused with the reason.

Consequences ​

  • Developers need bun run claude:bridge running to research locally; CI and tests use fakes.
  • Production needs an ANTHROPIC_API_KEY secret and Browser Rendering enabled on the Cloudflare account (billed per browser time).
  • Reroot's multi-pass critique loop and persona/brand-kit findings are not ported: the spec asks for creators, competitors, similar businesses, socials, videos, process and market, not onboarding prefill. The repair retry is the only second pass.
  • Figures found only by the model's own search are dropped. The cost is completeness; the gain is the spec's "never invent figures".

Revisit when ​

A source of real metrics exists (then keep verified figures from it), a run needs more than five minutes (move to Workflows), or the bridge becomes a burden (replace with the API key in development too).

Internal documentation. Not for clients.