{"slug": "two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification", "title": "Two Months of Markdown, 63 Hours of Agents: The ROI of a Long Specification", "summary": "A professional internal product rebuild was completed by a team of AI agents in 63 hours after roughly two months of markdown specification work, delivering a new back end, a new interface, 147 API operations and more than 11,000 passing tests, the author reports. The specification grew to about 290 markdown files and about 540,000 words, and the agent run cost about $8,800 in tokens, against an original plan of four senior engineers for about six months. The agents ran on the pi harness with the pi-subagents extension from T3 Code, using Claude Opus for planning and review, Claude Sonnet for code and scenario runs, and Claude Haiku for cheap reading tasks.", "body_md": "[← All technical posts](https://patrickdesjardins.com/blog)\n\n# Two Months of Markdown, 63 Hours of Agents: The ROI of a Long Specification\n\nPosted on:\n\nFor [AudioRouter](https://patrickdesjardins.com/blog/audiorouter-two-hours-of-spec-a-week-of-agents-and-the-last-ten-percent), I wrote two hours of specification and let agents run for a week. For a professional project at work, I did the opposite. I spent about two months writing the specification in markdown using AI, then handed it to a team of AI agents on a Friday at noon. Sixty-three hours later, before Monday morning, the agents handed back a working product: a new back end, a new interface, 147 API operations, and more than 11,000 passing tests.\n\nThe original plan for the same work was four senior engineers for about six months. Instead, the tokens cost about $8,800.\n\nThis article explains how the work was set up, what the Slack thread looked like while it ran, the video the agents produced at the end, and the token and cache numbers behind the cost. I keep the project generic: it is the rebuild of an existing internal product, about five years old, into a new service with a much more flexible architecture.\n\n## Two months of specification\n\nThe specification is the part that took the longest, and it is the reason everything after it went fast. By the end, it was about 290 markdown files and about 540,000 words, which is more than a thousand pages. I did not write that alone. I wrote it with AI, discussion after discussion, over about two months. But every decision in it went through me.\n\nEach milestone of the project has the same shape:\n\n- **Current behavior** : what the existing product does today, including the rules that live outside the obvious code paths (soft delete, time-sliced rows, feature flags, field-level policies).\n- **Proposal** : the domain model, the design decisions, the API, and the admin UI of the new version.\n- **Migration plan** : how data and behavior move from the old system to the new one.\n- **AI-Plans** : small, ordered, executable plans that an agent can build one at a time, each with prerequisites and an exit check.\n- **Open questions** : every unresolved point, each with a recommended default.\n\nOn top of the milestones sit the rules shared by every agent: how to build (build fast, then validate the milestone), the test order, a UI grading rubric of 12 categories where each one must score at least 7 out of 10, the parallelism rules, and 55 user scenarios that define what \"working\" means from a person's point of view. Finally, a master plan of about 2,500 words defines the phases, what is authorized, what is never allowed, when to stop and ask, and what \"done\" means.\n\nThe open questions with recommended defaults turned out to be one of the most valuable parts. An agent that finds a gap in a specification usually does one of two bad things: it stops and waits, or it invents something. With a default already written down, it does neither. It applies the default, writes the decision in a log, and keeps going.\n\n## The kickoff: one prompt, a whole organization\n\nThe kickoff prompt was about 150 lines. It does not restate the specification; it points to it. It names the master plan as the contract, lists the rules to apply, and describes the organization of agents, the durable state, the gates, and the reporting.\n\nThe harness is [pi](https://pi.dev) with the pi-subagents extension, driven from T3 Code. The models were Claude Opus for planning and review, Claude Sonnet for writing code and running scenarios, and Claude Haiku for cheap reading tasks.\n\n- **The conductor** plans, decides, gates and integrates. It does not write much code itself, which keeps its context small for three days.\n- **Phase owners** each work in their own git worktree. Each one runs a small team through pi-subagents.\n- **A scout** compresses the plan, the old code and its tests into a cold-start packet, so a 540,000-word corpus never has to be loaded at once.\n- **Workers** write code and tests, one writer per seam: contract, migrations, domain module, API, fakes and seed, UI package, host integration.\n- **A fresh reviewer** , who never saw the code being written, returns must-fix findings only.\n- **A scenario tester** drives the API and the browser through the user scenarios and saves the evidence.\n\nTwo rules made the parallelism work. The first is \"stack, do not wait\": as soon as a phase was built and its validation was running, the next phase started on a branch stacked on top. The second is the gate: a phase is done only when every test level and every scenario passes from a clean clone with an empty database, and a fresh reviewer finds nothing that must be fixed. No gate, no next phase.\n\nAll the state lived in files outside the repositories: a board with one row per plan, a decision log, a build report, a question list for me, a spec ledger with evidence for every specification item, and a progress file. When an agent's context was compacted or a process restarted, it recovered from those files instead of from memory.\n\n## The Slack thread\n\nI did not want to sit in front of my laptop all weekend. So the kickoff prompt asked the conductor to post a message in our team's Slack channel and then reply in that thread every 60 to 90 minutes, driven by a 75-minute heartbeat from the T3 Code scheduler. Every message starts with the line that marks it as an AI message written on my behalf.\n\nI first thought about sending the updates to myself in a direct message. I made it public instead, because I thought the experiment, success or not, would be more useful to the team if they could follow it. A colleague called it a \"public progress feed\", which is exactly what it became.\n\nEach update follows a fixed format, under about 120 words: overall progress and per-phase progress, the ETA with a confidence level, what was done since the last update written for a teammate rather than as a log dump, the test and scenario counts, and the blockers. Here is a real one from the second night:\n\nProgress: overall 55% (previous 50%). P0 100%, P1 100%, P2 85%, P3 60%, P4 2%, P5–P7 0%. ETA: Nov 27, medium confidence. Done since last update: phase 3 landed most of the toolkit framework (21 commits)... Unit tests are at 1,886. Phase 4 started on top of it. Tests/scenarios: unit 1,886; scenarios 57/57. Blockers/questions: 0 blocking.\n\nBy the end, the thread had 86 replies, 65 of them automated updates. The same content was committed to a progress log in the repository after each update, so the history also lives next to the code.\n\nThree things stand out when I read the thread again:\n\n1. **The agents beat their own estimate.** The first message estimated November 26 with low confidence. The build finished on November 23, three days early.\n2. **Progress was steady through the nights.** Half of the work was done 14 hours after the kickoff, mostly overnight. The long flat line at the end is not idle time; it is the gates doing their job: full test suites on clean clones, review rounds, and fixes.\n3. **Failures were reported, not hidden.** A few heartbeats failed because of a transport error in the harness. The next update said so, and the work continued. Reporting never blocked the build.\n\n## The video\n\nWhen the build finished, the AI built a video that shows what was built, so people could see it without cloning anything. It produced a 36-minute narrated video with burned-in captions, built with HyperFrames, a voice generated locally, and a music bed generated locally and ducked under the voice.\n\nThe video has 11 chapters: why the rebuild, how it was built, which existing features moved, what is new, the admin side, the participant side, the APIs, quality, and what comes next. It contains 35 screen recordings of the real UI running on a local copy of the full system with synthetic people and data, recorded with Playwright scripts written by the agents. Every number on screen comes from a facts file that cites its source: the progress log, the git history, the test reports, or the session logs.\n\nThe video turned out to be the best review tool of the whole project. Reading 26 stacked pull requests is a lot. Watching 36 minutes of the product working, with the narration pointing at each feature, gives a reviewer the map before the details. A teammate's reaction when I said I would rewatch it before reviewing the pull requests: \"I'll watch the video as well.\"\n\n## The output\n\nHere is what came out of the 63 hours, all running locally on synthetic data, with nothing deployed:\n\n| What | Count | \n|---|---|\n| Commits | 1,367 | \n| Back-end code | about 200,000 lines of C# | \n| Front-end code | about 120,000 lines of TypeScript | \n| Database migrations | 59 | \n| API operations | 147, each exposed as gRPC and REST | \n| Automated tests | 11,657 (unit, database, UI and browser) | \n| Scenario files | 194 of 194 passing | \n| User scenarios | 51 pass, 0 fail | \n| Recorded decisions | about 906 | \n| Questions for me | 64, each with a default already applied | \n| Existing features | 21 of 32 fully moved, 5 partly, 6 next in line | \n\nAfter the build, I answered the open questions on Monday. The agents then rebuilt the work as 26 stacked draft pull requests, each under 300 files so our organization's linter could check it, and by Tuesday every check on every pull request was green, including the full local-stack job in CI. Nothing is merged without a human: that was a rule from the start.\n\n## Tokens and cache\n\nThe run used about 15.5 billion tokens across 703 agent sessions, 61,242 model calls, and 64,308 tool calls (builds, tests, the browser, git).\n\n| Model | Role | Sessions | Model calls | Total tokens | \n|---|---|---|---|---|\n| Claude Opus | conductor, phase owners, reviewers | 200 | 17,163 | 4.00 B | \n| Claude Sonnet | workers, scenario testers | 387 | 42,576 | 11.40 B | \n| Claude Haiku | scouts | 116 | 1,498 | 0.07 B | \n| **Total** |  | **703** | **61,242** | **15.51 B** | \n\nThe split of those tokens is the interesting part:\n\n| Token type | Count | Share | \n|---|---|---|\n| Cache read | 14.94 B | 96% | \n| Cache write | 0.51 B | 3% | \n| Output | 62.1 M | 0.4% | \n| Fresh input | 0.13 M | ~0% | \n\nNinety-six percent of all tokens were cached reads. That is the agents re-reading the specification, the rules and the code they had already loaded, over and over, call after call. A cached read costs about a tenth of a fresh input token. The agents wrote only 62 million tokens of output, which is less than half a percent of the total. Agentic work is mostly reading, and with caching, reading is cheap.\n\nThis is also where the long specification pays a second time. A big specification gets re-read billions of times. Without a cache, that would be the expensive part. With a cache, it is the cheapest part of the bill. At public list prices, the same tokens without any caching would have cost about $55,000. With caching, the run cost about $8,800.\n\n## The return on investment\n\nThe plan was four senior engineers for six months. At about $500,000 of loaded cost per engineer per year, that is about $1,000,000. The AI run cost about $8,800 in tokens, less than 1% of that, or about 114 times cheaper. On the calendar, 63 hours against about 182 days is about 70 times faster.\n\nTo be fair, the tokens are not the only cost. The two months of specification were my time, and there are still a couple of weeks of fine-tuning and human review ahead. Even if I add all of that to the AI side, the result is still an order of magnitude cheaper than the plan, and months earlier. The specification is also not a sunk cost: it is now the documentation of the product, the baseline for every review, and the input for the next round of agents.\n\n## Why the long specification worked\n\nLooking back, the two months were not slow. They moved the hard work to the place where it is cheapest to change: text. A design decision changed in a markdown file costs a few minutes. The same decision changed in 200,000 lines of code costs days, for humans or agents.\n\nThe specification made five things possible:\n\n- **Agents never had to stop.** Every gap had a default or a rule for choosing one. More than 900 decisions were made and logged without waking me up.\n- **Done was checkable.** Exit checks, scenarios, and the UI rubric meant a gate could say pass or fail without a human opinion.\n- **Work could run in parallel.** Clear seams and milestone order let several writers work at once without stepping on each other.\n- **Reviewers had something to compare against.** A fresh reviewer with the plan and the spec items finds real problems, not style preferences.\n- **Recovery was cheap.** After a context compaction or a crash, the agent re-read the board and the plan and continued where it was.\n\n## Conclusion\n\nTwo months of markdown felt long while I was writing it. Sixty-three hours of agents, a Slack thread that let the team follow along all weekend, and a 36-minute video at the end showed me it was the best investment of the project. The more the specification answers before the agents start, the less the agents have to guess, and the more of the run turns into cheap cached reads instead of expensive rework.\n\nThis project leads me to believe that the cost-effective way to work with AI is not a long back and forth with an agent, one prompt and one correction at a time. It is to plan carefully, with AI, until the plan answers the questions, and then to execute in one long run. Every round of back and forth re-sends context, produces code that gets thrown away, and pays for output that a better plan would have made unnecessary. A plan is written once and then re-read from the cache for almost nothing.\n\nI see it in the numbers at work. I am far from being the engineer with the highest AI bill this quarter, and yet I am the one who generated the most features, code and tests. The difference is not the model or the harness, which everyone has access to. It is where the time goes: most of mine went into the plan, and the agents spent theirs executing it.\n\nPros:\n\n- A product that was planned for a team and six months was built in a weekend for less than 1% of the cost.\n- The specification doubles as documentation, review baseline, and input for the next run.\n- The public Slack thread gave visibility with zero effort from me, and the video made the review approachable.\n- Caching turns a huge specification from a cost into a bargain.\n\nCons:\n\n- Two months of specification is a real upfront investment, and it needs someone who knows the domain deeply.\n- The output is large: 26 pull requests and hundreds of recorded decisions still need careful human review.\n- Local, synthetic-data success is not production. Deployment, sign-offs, and fine-tuning are still ahead.\n\nIf I had to do it again, I would spend the two months again. I would maybe even spend a little more.\n\n## Discussion\n\nReplies are loaded from the public Mastodon thread for this article.\n\nLoading replies from Mastodon...", "url": "https://wpnews.pro/news/two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification", "canonical_source": "https://patrickdesjardins.com/blog/two-months-of-markdown-63-hours-of-agents", "published_at": "2026-12-02 00:00:00+00:00", "updated_at": "2026-12-02 14:48:01.033559+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools"], "entities": ["pi", "pi-subagents", "T3 Code", "Claude Opus", "Claude Sonnet", "Claude Haiku", "AudioRouter"], "also_reported_by": [], "takeaway": "Writing open questions with recommended defaults into the spec stops agents from halting or inventing when they hit a gap: they apply the default, log the decision and continue, which let a 540,000-word spec be executed by agents in 63 hours for about $8,800 in tokens.", "recommendation": {"advice": "Write each unresolved spec question with a recommended default so agents apply it and log the decision instead of stopping or inventing; pair this with a conductor that plans and gates while phase owners work in separate git worktrees.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification", "markdown": "https://wpnews.pro/news/two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification.md", "text": "https://wpnews.pro/news/two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification.txt", "jsonld": "https://wpnews.pro/news/two-months-of-markdown-63-hours-of-agents-the-roi-of-a-long-specification.jsonld"}}