Case Study

Legwork

My manual outbound process, productized in a weekend. The agent is one of the users.

An outbound-process composer: I write a prose runbook for a five-stage pipeline (Gather, Qualify, Resolve, Enrich, Launch), an LLM agent works the stages through 16 run-addressed MCP tools behind real OAuth 2.1, and Legwork holds the durable record and the human gate at launch. It started at 1:42am when I pasted the outbound runbook I'd been running by hand. Claude Opus 4.8 drove the build; I typed 2.1% of the characters. By day two it was gating my real prospects, and overturning my own guesses.

1 weekend
Build Time
7
Stories
47
BDD Criteria
2.1%
Typed by John

What is Legwork?

The machine does the grunt work; the human keeps the outreach personal. An operator authors a pipeline with a free-text target type and a five-stage markdown runbook. An agent connects over MCP, reads the runbook, and figures out the how: it gathers targets, qualifies them with its own judgment, resolves decision-makers, enriches contacts, and drafts the outreach. Every send waits at a human approval gate. Two personas drove the stories, and one of them is the agent itself: The Pipeline Agent has its own story, its own rules, and its own research.

MCP (anubis)

16 run-addressed tools: record findings, qualify, annotate, draft. The agent is a first-class user

OAuth 2.1

A real authorization server with discovery, consent, and registration. One-time connect, no secrets in config

Gmail

The agent drafts the outreach; nothing sends before the human approves

Cloak

Run secrets encrypted at rest, hashed for constant-time auth

Phoenix PubSub

Every MCP write broadcasts; runbook edits fan out to every open run page

Wallaby

Four headless-Chrome journeys codifying the cross-story QA runs

Key Features

  • Five-stage pipelines with prose runbooks: the model figures out the how
  • Runs mint an ID and a secret; edits to a live runbook reach in-flight runs in real time
  • Targets advance by data, never by manual done-marking; a stage that produces nothing holds the run
  • The agent records opportunistically: find the person and the contact in one pass, record both
  • Qualification is the agent's judgment, recorded with verdicts and annotations
  • The human launch gate: draft creation is refused until the operator approves
  • Free-text target types: companies, locations, books, whatever the runbook says
  • Clone a pipeline to start from an existing playbook
  • Multi-tenant, account-scoped, with forced onboarding

User Stories

All seven stories, complete and unexcerpted: persona, Three Amigos rules with full given-when-then scenarios, acceptance criteria, and browser-QA history, exported straight from the harness database. One of the seven belongs to the AI persona: as an agent, I want to execute each stage of a pipeline run.

7
Stories
47
Acceptance Criteria
7
With Three Amigos

Open Source Repository

Legwork is public in the Code-My-Spec org. The build transcripts stay private: they contain the real prospect data from the first live runs. Every number here is from the harness records and the git history.

View on GitHub
Elixir / Phoenix
Language
60 green
BDD Spex
119
Unit Tests
16
MCP Tools

The Dev Story

The Good, The Bad, and The Ugly

Friday night I told the agent to get the repo on Elixir 1.20. At 1:42am Saturday I pasted the outbound runbook I run by hand, and dictated one design principle: don't encode the how, let the model figure it out. One overnight /loop prompt built and QA'd everything while I slept. Sunday it gated my real prospects. Opus 4.8 wrote 1.47 million characters; I typed 31,855, which is 2.1%: between Cleaner CRM's 0.4% autonomous run and Keel's 2.9% collaboration. Plenty broke, and three times I had to ask the agent whether it had actually done what it claimed.

  • Empty repo Friday night; by Sunday: 7 stories, 47 green criteria, 119 tests, 4 Wallaby journeys, 7/7 browser QA, and a live product gating real prospects
  • One /loop prompt ('continue to write all the code, and QA everything') ran the overnight build while I slept
  • The code-writer refused to implement my own bad spec because it demanded a cross-tenant hole: it left the spec red rather than open one
  • Persona research: 4 parallel miners, ~55 triangulated sources, one fake-review plant caught; it independently landed on the product's exact wedge, autonomy vs human-in-the-loop
  • Dogfooding drove every real fix shipped on day two: retrievable secret, start-run button, review link, onboarding, update_runbook, real-time, real OAuth
  • First real use overturned my own judgment: GATE 1 flipped 8 of 12 likely-keep prospects to exclude
  • The human launch gate held under live fire: the Gmail-draft tool refused to run before approval
  • Building Legwork improved the platform: a generator bug was fixed upstream and published to hex mid-build, and the agent forensically diagnosed two bugs in CodeMySpec itself

One weekend. 7 stories, 47 BDD criteria, 60 spex, 119 tests, 16 MCP tools behind real OAuth 2.1. I typed 2.1% of the characters; Opus 4.8 wrote the rest, and slept-through-it autonomy handed me a product that gated 12 real prospects on day two and held the launch gate on every one. The trilogy now has three points on the dial: 0.4% autonomous, 2.1% product-owner-present, 2.9% domain-collaborative. The pattern that held all three times: the suite goes green, and the human still has to ask the questions no test encodes. That's the loop that ships.