Project Management and the LLM
The scarce resource on a project that uses a model is not code. It is people’s time, and the rework that follows when code is built on a guess. Five rules:
- Spec before code. Spec is cheap. Write a lot of it.
- The machine asks; people answer. Buy the questions first.
- Turn the reading into tests. Tests outlast code.
- Spend big once, at the gate. The best model reviews the whole package before anything is built.
- Stop when it’s going in circles. The spec is unfinished. Go back to rule 1.
By dweese, written with Claude.
Introduction
What this book is
This is a short book about running a project in which a large language model, an LLM, writes much of the code. It is for project managers and for anyone else answerable for such a project. You don’t need to program. A few chapters show a short test, and each is explained in plain words.
It is not about prompts, and it doesn’t say which model to buy. It is about what the project around the model has to look like for the work to come out right: what is written down, who confirms it, and how the result is checked.
The short version
On a traditional project, writing the code was the long part. Finding out what the business actually does happened along the way: a programmer hit an odd case, walked over and asked, and the answer went into the code.
With the Claude model, or any other, the code comes fast and nobody walks over to ask. The model decides. What didn’t get faster is everything around the code: finding out what the business does, getting the people who know to confirm it, and checking the result. That work is now most of the schedule, and most of it can’t be handed to the machine.
So the scarce resource isn’t code. It is people’s time, and the rework that follows when code is built on a guess. A token, the unit a model is billed in (about three-quarters of a word), is cheap, and it makes both costs visible. A question nobody asked, a decision nobody wrote down, a patch on a patch: each one shows up on the bill. How you spend tokens decides what the project costs in everything else.
Nobody’s first project with an LLM goes quickly. Beginners ask for code. Experienced users ask for spec. Treat the first project as the one where your team learns how. The second pays less of it.
Five rules
- Spec before code. Spec is cheap, so write a lot of it, in markdown only.
- The machine asks; people answer. Buy the questions first: people’s time is the scarce resource.
- Turn the reading into tests. Tests outlast code. Do not hoard code.
- Spend big once, at the gate. Everyday models draft the spec; the best model available reviews the whole package before anything is built.
- Stop when it’s going in circles. If the third patch doesn’t fix it, the spec is unfinished. Go back to rule 1.
The next chapter is a short card for each rule: what to expect from the machine, what your people should expect, and what to expect from the project. The rest of the book takes the ideas one at a time.
How the book runs
The chapters follow the order of a project.
The Premise comes first, because it sets what you are buying. What a model costs and how the bill runs. What happens when its unchecked output gets through. What the agent turned loose without a plan really delivers. And what to tell the sponsor, since the first demo looks nearly finished and isn’t.
Learning and Specifying are the early work. The model has already read the public standards, so have it turn that reading into tests. Then find the spec that lives in people’s heads and beside the system, and have the model ask for it.
The Gate is the one place to spend big. Everyone who owns part of the spec confirms it. Then the best model available reviews the whole package. Only then does building start.
Building covers two sessions of the same model, one to think and one to build, and what passes between them.
What the Model Said closes the book. Its two chapters began as the model’s own account and are now told in the third person. One is about what it sees when it reads a legacy system. The other is about what a project manager can do to get good work from it.
You can read straight through, or take the chapter your project needs this week. Each stands on its own, and where one leans on another, it says so.
Where the examples come from
Most are from jemage, a reader for structured data written for blind users, which I am building with a model. Its code, tests and history are public. The rest come from electronic data interchange, the exchange of business documents such as invoices between trading partners.
Most of this is common sense. This little book is my attempt to make sense of the LLM and transformer movement while it is happening.
I wrote it with Claude, the model I work with every day. The examples name it, but the principles hold for any model built on the transformer.
The Five Basic Considerations
A card for each rule, with the chapters that go deeper named at the bottom of it. The rules themselves are listed in the introduction.
1. Spec before code
Spec is cheap; write a lot of it, in markdown only.
What to expect from the machine
Expect it to forget. Every session starts cold, and what the model knows about your project is what’s written down where it can read it. Expect it to build whatever the page says, and to fill whatever the page doesn’t say with a confident guess.
Expect it to work best from plain text. Markdown in the repository is read in full, versioned by git and diffed line by line. A slide deck, or a wiki page it can’t reach, doesn’t exist for it.
Expect it to read git, the record of every change to the project’s files, for itself: what changed, when, and in what order. It can find the day a function appeared, or prove one never existed, so none of that has to be written down twice. What git cannot hold is the reason. A change shows what moved; only a commit message or a spec says why. So write the why down, in the spec before and in the commit after. Commit small, and say what each commit is for; uncommitted work is invisible to tomorrow’s session, and “fix stuff” tells it nothing.
What your people should expect
Expect to write more than feels necessary, and to see it read. The purpose, who it’s for, the known cases, the doubtful cases and what’s out of scope all go on the page before anyone builds.
Expect setup code early: the project skeleton, the build, an empty test harness. Expect nothing that embodies a decision until the page makes it.
What to expect from the project
A page of spec costs minutes. A page of wrong code usually costs far more, including the time to unmake it. The spec is the cheapest place in the project to change your mind.
Record the why in the spec and in the commit, and tomorrow’s session starts where today’s stopped, instead of asking you the same question again.
Deeper: The Spec Nobody Wrote Down, Don’t Hoard Code.
2. The machine asks; people answer
Buy the questions first. The answers come only from people, and their time is the scarce resource.
What to expect from the machine
Expect questions, not answers. Given a thin request, a model can tell you quickly and cheaply what’s missing: what’s ambiguous, what it would have to assume, where two parts of the request pull against each other. No one writes a request that complete, and finding the gaps is something a model does well. It costs cents.
Don’t expect it to know your business. Ask it something only your people can answer and it will still answer, plausibly and well. So set the expectation up front: at this stage the model’s job is to produce questions, each one with the assumption it would make if nobody answers.
What your people should expect
Expect to be asked specific things. Not “tell us about your process,” but a list: one decision per line, a concrete case, and the model’s guess beside it. Most lines get a yes. The ones that get “no, and here’s why” are the exceptions, and people often manage the exceptions. That’s why these people are the ones asked.
Expect it to be short: an hour with a list, not a week of explaining from scratch. And expect to see the answers again, written into the spec, so they can check they were heard.
What to expect from the project
A question costs cents. An answer costs an hour of someone senior. Code built on a wrong guess costs days, and more to unmake. Buying the questions first means buying the cheapest thing in the project so the expensive things get smaller.
Expect rounds. Answers raise new questions, so run the list again after each round, and stop when the new questions are about details nobody would argue over.
Deeper: Let the Machine Ask, The Spec Nobody Wrote Down.
3. Turn the reading into tests
Let the model read the spec and hand back tests. Tests teach, check and judge, and they outlast the code.
What to expect from the machine
Expect it to have read much of the public spec already: HTML, the RFCs, parts of the EDI standards, many regulations. Expect it to compress that reading into tests, one small test per rule, edge case and ugly corner, faster than anyone could read the first chapter.
Expect its tests to be small, single-purpose and easy to check. If you want to see code you can judge quickly, ask a model for unit tests.
Don’t expect the tests to be right because the machine wrote them. Run them against a second library or real input, and look hard at the ones that disagree.
What your people should expect
Expect to read tests instead of the spec. A test is a rule you can run: it says exactly what goes in and what comes out. A good suite is the fastest way to learn what a format really does.
Expect tools to be chosen by what passes, not by what their documentation claims.
Expect the code to be replaceable. Saved snippets are not an asset; the code can be regenerated from the spec and the tests.
What to expect from the project
Expect the tests to outlast the code. They’re the running record of what the system must do, and they keep checking long after the code that first passed them has been rewritten.
Expect the cadence to change. On a traditional project, writing the code fills most of the schedule and the tests trail behind it. Here the order turns over: a long start of spec and questions, a short build, and then a suite that checks every rule on every change. A full suite can run to thousands of tests. Progress stops being measured in code written and starts being measured in rules passing. The slow part becomes people reading the failures and deciding what each one means.
With a legacy system, expect the idea to run backwards. Characterization tests pin down what the old system actually does, input by input, before anyone changes it, and every place the new system disagrees with them becomes a question for a person, which is rule 2 again.
Deeper: The Tests Are the Textbook, Don’t Hoard Code, The Shadow on the Wall.
4. Spend big once, at the gate
Use everyday models for drafting; before anything is built, the whole package goes to the best reviewer available.
What to expect from the machine
Expect everyday models to draft well. Specs, questions, notes, tests: this is volume work, a cheaper model is good enough, and you’ll iterate anyway.
Expect the best model available to find what the drafting missed, if it comes to the package fresh. Expect the model that helped write the spec to share its blind spots. It is poorly placed to review its own work.
Expect a review, not orders.
What your people should expect
Expect a gate. Nobody generates anything but setup code and tests (throwaway prototypes excepted, and marked as such) until the spec has been blessed by everyone who has to live with it. Then the whole package goes to the reviewer: the spec, the questions and their answers, the tests, the project notes. Send the distillate, not the churn: the finished spec, not the forty chats that produced it.
Expect to read the whole review and decide each point on purpose. Not everything it says needs doing.
What to expect from the project
A strong model reading a fifty-page spec costs a dollar or two. A week of rework costs far more. Expect the spending to be uneven on purpose: cheap and often while drafting, dear and once at the gate.
Deeper: Blessed by Everyone, Spending Tokens Wisely.
5. Stop when it’s going in circles
If the third patch doesn’t fix it, stop. The model is confused, and the confusion is information.
What to expect from the machine
Expect it to circle when it has been handed concepts that don’t integrate. Neither a person nor a model sits down to write bad code. The model is trying to honor all of the concepts at once. Each patch serves one and breaks another, and the same failure comes back in a different form.
Expect to recognize it: the same failure returning in a new form, a fix that needs a fix, the model apologizing and quietly reverting to an earlier version. Any one of these on the third attempt is a sign to stop.
Expect it to show you where it’s stuck, if you ask. Have it state the goal in its own words, then set that beside what you meant. The difference between the two is the missing or contradictory line in the spec.
Don’t expect it to decide which concept governs. It can tell you it is stuck; it can’t settle the question.
What your people should expect
Expect the strategist to step in. Deciding which concept governs is a call for a person with authority over the outcome: this concept rules here, that one rules there, and this is the boundary. Often the answer is to partition: separate the cases up front and give each its own rules, instead of asking one piece of code to reconcile them all.
Expect the fix to go in the spec, not the code. Fix the spec, throw away the patches, and regenerate from the corrected page.
What to expect from the project
Expect every round to cost tokens and to move the code further from the original intent. Each round is billed, and the context only grows. Stop spending.
Don’t expect it to be a verdict on the plan. A plan that circles is often unfinished, not wrong. Often a decision was never made about which concept wins, or where one stops and the other begins. Circling often points to where the spec is thin, so go back to rule 1.
Deeper: The Unplanned Agent, What the Model Needs From You.
Spending Tokens Wisely
How the meter actually runs:
Every model call is billed by the token, roughly three-quarters of a word each, and the bill has two columns: tokens in and tokens out. Output costs several times more per token than input, about 5x as a rule of thumb, partly because the model produces it one token at a time. Model tiers stack on top of that: each step up the ladder, from small to mid to flagship, costs somewhere around 3 to 5 times more per token than the one below.
These ratios, and the dollar figures below, are rough and as of October 2026. They vary by vendor and will change, so check your provider’s current price list. The shape matters more than the numbers.
Two things surprise newcomers. The first is that a conversation doesn’t bill once; it re-bills. The model remembers nothing between calls, so every turn sends the entire history again as input. A chat that grows to 50,000 tokens and runs 40 more turns has paid for roughly two million input tokens, not fifty thousand. Caching softens this: repeated material is re-read at about a tenth of the normal input price, but only if the front of the prompt stays unchanged. The second surprise is that agents multiply everything. Each tool call and each tool result is more context, and every step re-sends it.
For scale, a 50-page spec is about 35,000 tokens. Having a flagship model read it once costs on the order of a dollar. Having a mid-tier model patch the same bug in circles for 30 turns on a 100,000-token context costs 3 million input tokens, which is several dollars uncached, and it produces no progress. Two factors move the total: how many turns you take, and how much context rides along on each one.
Subscriptions are a different animal. A flat monthly plan hides the meter and substitutes usage limits, so the discipline is the same but the penalty is hitting the cap instead of a bill.
Think in smaller chunks
The cost of a thread is a running total: a + (a+b) + (a+b+c). Every turn pays again for everything before it, so a long thread gets expensive faster than it gets useful. The cure is to cut the work into chunks small enough that the total stays small, and to make the cut deliberately instead of waiting for the thread to choke.
Take this example case, 20 turns of 500 tokens. In one thread that is about 105,000 tokens processed. Cut into four chunks of five turns, each chunk costs about 7,500, so the whole job costs about 30,000. That is a 3.5x saving from nothing but where you put the seams. The fixed material you load (instructions, the front page of the docs) costs the same either way, since it rides along on every turn. What chunking adds is the orientation turn at the start of each new chunk, which is small beside the savings.
Chunking has a second benefit that matters more than the money: smaller chunks of thought. One question per turn, and one decision per chunk. A chunk ends when something is settled and written down, not when the window fills. If a chunk is going in circles, that is Rule 5, and the right move is to stop, record what is known, and open a clean one.
Waste also runs into a limit of its own. A session can hold only so much context, and a thread full of failed attempts reaches that limit early. Many tools then compact the conversation: they replace the history with a summary, and whatever the summary leaves out is gone. A deliberate cut, with the front page updated, keeps what matters. Compaction keeps whatever fits.
This only works if the seam is cheap to cross, which is where the docs come in. The test is the welcome: you open a fresh session, say “welcome, new Claude, have a read of the full system,” and within a minute the model knows where the work floor stands. That means the docs have to answer the questions a newcomer would ask, in an order that lets the model stop reading as soon as it knows enough:
- A front page, short and always current. What the project is, what was decided, what is in progress, what is open, and what the next move is. Keep it to about a page; it is the “a” in the sum, so every line on it is paid for on every turn of every chunk.
- Pointers, not contents. The front page names the deeper documents (decision records, specs, notes) and says when to read each one. The newcomer opens them only when the task touches them.
- A close-out habit. The last act of every chunk is to update the front page. The handoff is the product of the chunk; a chunk that ends without one has cost you the next chunk’s first ten minutes.
- Decisions recorded with their reasons. A fresh session that finds “we chose X” will re-argue it; one that finds “we chose X because Y, and rejected Z for this reason” will build on it.
The two halves fit together: small chunks keep the sum low, and good docs make small chunks cheap to start. Neglect the docs and chunking only turns into re-explaining. Neglect the chunking and the best docs in the world still ride along in a thread that keeps growing.
Two practical limits. First, caching lowers the price of the repeated part, but it doesn’t change the shape: the sum still grows with the square of the turns. Second, the welcome only works if the new session can reach the docs, whether through the repo or project files.
What this means for the five considerations
Rules 4 and 5 are billing arguments. A strong model reading the whole package at the gate costs a dollar or two, against hours of rework. Patching in circles is the expensive failure: every round is billed, and the context only grows.
Rules 1 through 3 are about a different cost: people’s time. A person costs perhaps $50 to $150 an hour, loaded.
So the money spent on tokens is often the small part. The large costs are rework and attention, and tokens are the unit that makes them visible. A decision that isn’t written down is paid for twice: once when it’s made, and again when the model has to ask about it next session.
The cheapest token is the one you never had to regenerate.
AI Slop
What stopping it saves
Slop costs nothing when it arrives. It costs when it is found: at integration, in review, in production, after other work has been built on top of it. Found then, the same mistake costs several times what it would have cost early, and everything built on it has to be done again.
Everything in this chapter is a way to keep slop out, or to find it while it is still cheap. What you save is the rework you don’t do, the senior person’s time you don’t spend working out what went wrong, and the rounds you don’t pay for while a model patches a mistake it can’t see.
What slop is
Slop is output that nobody checked against anything, passed along as if someone had.
It reads well. It has the right shape and the right names. A status report, a spec, a block of code, a pile of tests: each looks like the real thing. What’s missing is anything standing behind it. Nobody read it closely, and nothing was run that could have shown it wrong.
The cause is not that a model wrote it. Code a person typed and nobody reviewed is the same. What matters is what stands behind the output. With a model, the output arrives fast and in volume, so it is easy to let it through on how it looks.
Typing got cheap and reading didn’t. Slop is what you get when that gap goes unmanaged.
Things to avoid
- Counting output as progress. Lines written, files touched, errors falling. Ask what was switched off to make the count fall.
- Filler in the spec. “Handle errors appropriately.” “And so on.” “TBD.” Each one is a place where the next model decides for you.
- Adding things because adding is free. A feature that takes two minutes to generate still costs a review, a test and upkeep.
- Pasting chat into a document. The conversation comes along, and a builder may take a leftover question for a requirement.
- Sending on what no one read. A report, an email, a page published for others. Read it first, as if you had written it.
A few best practices
- Ask for evidence up front. Tell the model what proof you will want: a passing test, a command and its output, a file and line. A conclusion without evidence is a guess. Saves: the days spent building on a claim that turns out to be false.
- Watch the test fail. Break the code on purpose and check that the test notices. Then put the code back. A test is shown to work only when it has been seen to fail. Saves: a green suite that checks nothing, which is otherwise found in production.
- Take small steps and read each one. A change, its test, a look. A large change made in one go hides its guesses. Saves: undoing a day of work built on one wrong assumption.
- Review fresh. Give the work to a session that didn’t write it, or to a person. Ask what’s missing and what contradicts. Saves: what the author’s blind spots would have let through to the gate.
- Put a person’s name on each part. Someone confirms the part they own, as at the gate. The review is advice. A person decides. Saves: a missing exception caught as a line in a spec, not as a defect after release.
- Say who wrote what. In the commit message, in the project’s front page, in the book. Honest labels let readers decide how closely to look. Saves: checking everything at the same depth, so attention goes where it is needed.
- Stop when it circles. The same failure returning is a sign that the spec is unfinished. More output won’t fix that. Saves: the rounds that are billed while the context grows and the code drifts from what you meant.
One question
For anything handed to you, ask: who read this, and what would have shown it was wrong?
If the answer is nobody, and nothing, then it is slop, whoever wrote it. If there’s a name and a test that could have failed, you can build on it. The answer also tells you where to spend: on the parts with no name and no test.
The Unplanned Agent
Why would anyone want to develop an agent?
Ask it honestly and there is a good answer, and several bad ones dressed up to look like it. The Unplanned Agent is what you get from the bad ones.
What an agent is
An agent is a loop. The model looks at the situation, chooses a step, takes it, looks at the result, and chooses again. A chat answers you. An agent acts, then decides what to do next from what happened.
That’s all an agent is.
The good reason
An agent earns its keep when the path can’t be known in advance, but the goal and the check can.
Fixing a failing build is the classic case. Nobody can script “read the error, find the cause, change the right file,” because each step depends on what the last one turned up. But people can usually say what done looks like: the tests pass.
I once asked my own agent to find the “single source of truth” in an old workspace of mine. I couldn’t have written its steps down beforehand: search the files, read a README, find a second file claiming the same title, follow the imports to a library in another repository. A dozen steps, each chosen from the one before. But the question was narrow, the stopping point was clear, and I could check the answer. That’s a planned agent.
The rule
- If you can write the steps down, write a script. It’s cheaper, it does the same thing every time, and it doesn’t bill by the token.
- If you can write the goal and the check but not the steps, an agent may be worth it.
- If you can’t write the goal or the check, you don’t need an agent yet. You need rule 1.
Some tasks given to agents could have been a script.
The bad reasons
To avoid writing the spec. “The agent will figure it out.” It will figure out something. Whatever the spec doesn’t say, the agent guesses, and then builds on the guess.
Because it demos well. Watching an agent work feels like progress. Files open, commands run, text scrolls by. Tokens are billed the whole time, and the bill measures activity, not progress.
Because a script felt beneath the project.
To reduce head count. This one gets its own section.
The head count pitch
The pitch is “AI will reduce your head count.” It’s sold to executives, it’s sold hard, and it leaves out the costs that come later.
Here is what the pitch leaves out. An agent removes typing. It does not remove judgment. Every system has exceptions, and people often manage the exceptions: the clerk who knows which orders to hold, the analyst who knows why a field exists. Cut them, and the agent keeps running, still confident, with nobody left who can tell it it’s wrong.
The cost doesn’t disappear either. It moves, from salaries to tokens and from tokens to rework. And when the people leave, what they knew leaves with them, and a model can’t recover what was never written down. A legacy system is hard to replace because its reasons were never written down. Letting go of the people who remember those reasons makes the next project harder still.
That isn’t an argument that nothing changes. Drafting gets cheaper, and a team can do more. But “the same people do more, and better” is a different promise from “fewer people,” and only one of them comes true often enough to plan on.
Per-token billing rewards volume: the more an agent reads, calls and re-sends, the more is billed. The discipline has to come from you.
Paying for I/O
In my experience the valuable insights are short. The bill measures the only thing it can measure: tokens in and tokens out. You are paying for I/O.
An insight is a sentence or two. What costs money is the reading, the tool calls, and the history re-sent on every step (see the chart in “Spending Tokens Wisely”). An agent multiplies all of it. An agent with a clear question spends its I/O getting to the insight, and then stops. An agent without one spends I/O as its product.
The Unplanned Agent
Put the bad reasons together and you get the Unplanned Agent: an agent turned loose with a goal and nothing else. No spec, no budget, no stopping rule, no reviewer. “Go modernize billing.”
It breaks all five considerations at once:
- No spec, so it guesses, and builds on its guesses.
- It doesn’t ask, so it invents the business rules, plausibly and well.
- No tests, so nothing checks what it did.
- No gate, so it builds before anyone has blessed anything.
- No stopping rule, so when it circles, it keeps circling, and every round is billed.
Two more wastes belong to agents in particular:
- Feeding it the churn. Every file, every old chat, the whole repository “for context.” It often costs more and works worse, and the agent re-sends all of it on every step.
- Reviewing its own work. The agent that did the work is also the one reporting that the work is done.
What to expect
From the machine. Expect an agent to act on whatever it’s given and to keep acting until something stops it. Expect it to report success fluently. Don’t expect it to notice that the question was wrong.
From your people. Expect them to write the goal and the check before the agent starts, and to read the result when it stops. Expect the exceptions to stay with them.
What to expect. A planned agent usually costs little and answers one question. An unplanned one can cost a lot and answers whatever it decided the question was. And the head count promise gets paid for later, by the people who are left.
In short
Write the goal and the check first. If you can’t, you don’t need an agent yet. You need a spec.
How to Manage Expectations with an LLM in the Mix
The shape of the problem
An LLM compresses the cheap part of a project, which is typing, and leaves the expensive parts alone: deciding, verifying, integrating. It also makes everything look faster, since the part that got fast is the only part anyone can see.
With an LLM, a plausible skeleton shows up in minutes, and the schedule gets set from the skeleton.
A slide-rule view: the first demo costs about a tenth of the calendar and looks like sixty to eighty percent of the product. The factor that moves this most is how much of the real work is exceptions and edge cases rather than the happy path. The more exceptions, the wider the gap.
Expectation 1: The demo is not the estimate
Say this out loud, early, and in writing: the first working demo is a drawing of the product, not a fraction of it. Ask the sponsor to hold all dates until the exception list exists.
The exception list comes from the person who handles all the exceptions today. Pair a junior business analyst with that person on day one. They carry the specification nobody wrote down, and an LLM will not ask them for it; it will guess and proceed with confidence.
Expectation 2: Typing got cheaper; reading did not
Code you write is code you understand. Code that arrives from a model has to be read cold, and reading someone else’s work is slower than writing your own. The volume is also higher. So the reviewer becomes the bottleneck.
Order of magnitude: typing time drops by ten; comprehension time barely moves. Budget for review as the main cost line, not as a closing step. If you have one senior reviewer, that person sets your throughput, not the model.
Expectation 3: The expensive bugs look correct
A human’s mistakes tend to look like mistakes. A model’s mistakes have the right shape and the right names and the wrong behavior. They survive review and surface in integration or production, where fixes cost the most.
Late discovery is the largest schedule multiplier in this kind of project, probably three to ten times on the affected items. The single number worth flagging to a sponsor is this one: any item first found wrong at integration should be costed at a multiple, not at face value.
Expectation 4: Tests come first, or nothing is verified
With a human team, tests are a by-product of someone understanding the code. With a model, tests are the evidence that the thing works. Write them first, or at least alongside, and treat them as the project’s real specification.
A team that leaves testing for the end discovers the whole problem at once, with the whole body of generated code needing checks at the same time. That is the project that runs long.
Expectation 5: There is no sprint boundary unless you build one
A sprint forces a scope cut, a demo and a retrospective on a fixed cadence. An LLM session has no natural end: one more tweak is always cheap in the moment, so work expands to fill the available tokens.
Impose the boundary yourself. Pick a time box and a defined set of passing checks, and stop when either one is reached. Write the stop condition down before the session starts, not during it, since the middle of a good run is the worst time to decide you have had enough.
What to tell the sponsor
Keep it short, and say it before the first demo, not after:
- The first demo will look nearly finished. It is not.
- The schedule gets set after the exception list exists, not before.
- Review and verification are the main cost, not generation.
- We will stop on a written condition, not on a feeling.
- Anything found wrong at integration costs several times what it would have earlier.
What to track
Three numbers are enough for a status call:
- Passing checks, and whether the count is growing.
- Items waiting on review, since that queue is the real throughput limit.
- Decisions written down versus decisions made.
If those three look healthy, the project is probably healthy, whatever the transcript volume says.
The one-sentence version
An LLM makes the cheap part of the project very fast and leaves the expensive parts untouched, so the manager’s job is to keep everyone from confusing the two.
The Tests Are the Textbook
A first test
This test comes from jemage, a reader for structured data written for blind users. It is in tests/lines.rs.
#![allow(unused)]
fn main() {
#[test]
fn keys_keep_the_authors_order() {
assert_eq!(
lines(r#"{"zebra": 1, "apple": 2, "mango": 3}"#),
["object, 3 members", "zebra: 1", "apple: 2", "mango: 3"]
);
}
}
The name states the rule: keys keep the author’s order. The input is one line of JSON with three keys, zebra, apple and mango. The expected output is what a blind reader hears, one line at a time, in the order the author wrote them. (r#"…"# is how Rust writes a string that contains quote marks.)
You don’t need the program’s source code to understand it. The test says what goes in and what comes out.
A second test
This one checks someone else’s code. serde_json is the most widely used JSON library in Rust, and this test, also from jemage, records what it does with the same kind of input. It is in tests/serde_pitfalls.rs.
The file it reads, 01_key_order.json, holds one line:
{"zebra": 1, "mango": 2, "apple": 3}
#![allow(unused)]
fn main() {
// Value stores objects in a BTreeMap: author's order is lost, keys come back
// sorted. With the `preserve_order` feature this test FAILS, correctly.
#[test]
fn key_order_is_sorted_not_preserved() {
let v: Value = serde_json::from_slice(fixture!("01_key_order.json")).unwrap();
let keys: Vec<&String> = v.as_object().unwrap().keys().collect();
assert_eq!(
keys,
["apple", "mango", "zebra"],
"written as zebra, mango, apple"
);
}
}
The first line of the test reads the file into serde_json’s general-purpose Value. The second collects the keys. The assertion says they come back as apple, mango, zebra: sorted, not in the order they were written.
Put the two tests side by side. The same three keys go in. jemage gives them back in the author’s order; serde_json sorts them. The library’s documentation does mention this, along with the preserve_order setting that changes it, but the test states it in one line and fails if it ever stops being true.
A third test
HTML has a rule many people never read. It sits in the tokenizer section of the HTML standard: anything that starts with <!, <?, or </ followed by something unexpected is treated as a comment, and that comment ends at the next >. The standard calls these bogus comments.
This test, from jemage’s HTML tokenizer, states the rule with five examples. It is in tests/html_tokenizer.rs.
#![allow(unused)]
fn main() {
#[test]
fn bogus_comments_are_comments_that_run_to_the_next_gt() {
assert_eq!(
pieces("<?xml version='1.0'?>x"),
[(Comment, "<?xml version='1.0'?>"), (Text, "x")]
);
assert_eq!(pieces("<!foo>x"), [(Comment, "<!foo>"), (Text, "x")]);
assert_eq!(pieces("</ x>y"), [(Comment, "</ x>"), (Text, "y")]);
assert_eq!(pieces("<!foo"), [(Comment, "<!foo")]);
assert_eq!(pieces("<!"), [(Comment, "<!")]);
}
}
pieces splits the input into labelled pieces. On the left of each line is the input; on the right, the pieces it should become. An XML declaration, <?xml ...?>, becomes a comment. So do <!foo> and </ x>. A bogus comment with no > at all takes everything to the end.
The rule explains something that looks like a bug. CDATA sections, <![CDATA[ ... ]]>, are an XML feature. In ordinary HTML, outside svg and math, a CDATA section starts with <!, so it is a bogus comment, and it ends at the first >, even when that > is inside the data. Run jemage on <p><![CDATA[ a > b ]]></p> and it reports:
Comment "<![CDATA[ a >"
Text " b ]]>"
The comment stops in the middle of the data, and the rest shows up as text. The test never mentions CDATA, but it is the rule that explains what happens to it. There is no CDATA test in the suite yet.
Summary
The three tests do three different jobs. The first teaches a rule of the program: keys keep the author’s order. The second records what a library actually does, which is not always what you’d assume. The third states a rule from a long public standard in five lines, and that rule explains a behaviour that otherwise looks like a bug. None of them needs the program’s source code to read.
Building one piece at a time, inside a test
Most of jemage was built this way: one small piece of behaviour, written as a test first, then the code to pass it. My opinion is that it’s the right way to work with a model, with some limits worth knowing.
The advantages:
- One rule at a time. A test is small enough for a person to check by eye and for a model to get right. When it fails, it names the rule that broke.
- The test is the spec. Its name says what should happen and its body says exactly what goes in and comes out. A year later, it still says so.
- Cheap to change your mind. A test that pins the wrong behaviour can be rewritten in minutes, and the code follows.
- It survives a rewrite. The code can be thrown away and regenerated; the tests decide whether the new version is right.
- It checks other people’s code too. The serde_json test will fail the day the library changes, and that failure is a finding, not a bug.
- Small context. A model working on one test and one function reads a few hundred lines, not the whole project.
The disadvantages:
- Every piece can pass while the whole fails. Tests of single rules don’t show what happens when rules meet. jemage answers this with tests that run whole inputs: a full sample checked against a saved copy of the right output, and a test that glues random fragments of HTML together and checks that nothing is lost.
- A test can be wrong. A model writes tests confidently, including wrong ones. Check them against something else: a second library, a real file, the standard itself.
- It pins mistakes as firmly as rules. A test records current behaviour. If the behaviour was a mistake, the test now defends it. jemage marks these on purpose: one test is named
known_gap_a_dotted_key_reads_like_a_path, so nobody mistakes it for a rule. - It only covers what someone thought of. The bogus-comment test explains CDATA, but there is still no CDATA test.
- Helpers hide things.
piecesmakes the HTML tests short, and it also means the reader is trustingpieces.
On balance, I’d still build this way. The disadvantages are reasons to add a few whole-input tests and to check the tests themselves, not reasons to stop.
Don’t Hoard Code
In the beginning I saved code. A function that parsed something, a clever loop, a module from a project that ended. I’ll use that some day. I didn’t.
With Rust especially, the code is a way of doing things. The way is what’s worth keeping, and the way lives in the spec and the tests, not in the lines.
The next model reads only the page
Here is the reason this matters now. The code for your project will be written, and rewritten, by a model. Not the session you planned it with, but another one: a fresh session, maybe a different model, maybe next year. It wasn’t in the meeting. It didn’t hear you explain what you meant. It has the spec, the tests and whatever else you put in front of it, and nothing more.
Whatever the page doesn’t say, that model will decide for itself. It may not tell you it’s guessing. It will write code that runs, reads well and does something you never agreed to.
So the spec has one job above the others: a model that has never seen this project should be able to produce correct code from the spec and the tests alone. If it can’t, the spec isn’t finished.
What handwaving looks like
Handwaving is a line in the spec that sounds like a requirement and decides nothing:
- “Handle errors appropriately.” Which errors? What happens to the input? What does the user see?
- “Fast enough.” What number, measured how?
- “Works like the old system.” Which behaviours, written out one by one?
- “The usual validation.” Which rules?
- A list that ends in “etc.”
- “TBD” still in the spec when it reaches the gate.
Each one is a place where the next model will make a choice on your behalf.
What specific looks like
jemage’s project file has lines like these:
- “Duplicate keys and byte offsets are first-class.”
- “Tolerate any madness in input except circular references.”
- “Loss of data is tragic.”
- “Never give two things the same name.”
Each is one sentence, and each settles questions in code that nobody wrote a separate rule for. Should a duplicate key be dropped, merged or kept? Kept. Should a strange input be rejected? Not unless it’s circular. Should a long value be cut short to fit the display? Not if anything is lost.
A spec that can regenerate code needs:
- The purpose and the reader. Who is this for?
- Inputs and outputs, with examples. Real ones, including the ugly ones.
- Each rule stated, with a test. The test is the rule in a form a model can’t misread.
- What’s out of scope. Otherwise the next model may helpfully build it.
- The decisions and their reasons. A deliberate choice with no reason written next to it looks like a mistake, and the next model may fix it.
Check it by regenerating
You can test a spec the same way you test code. Take one piece of the project, give a fresh session only the spec and the tests, and ask it to write that piece. Then compare.
If the new code passes the tests and does what you meant, the spec is good. If it differs, the difference shows you where the spec is thin. Fix the spec, not the code. This costs one session, and it’s much cheaper than finding the same gap after the old code is gone.
What to keep
Keep the spec, the tests, the decisions and their reasons, and commit messages that say why.
Let go of the snippets you’re saving for some day, and of generated code you’re afraid to touch. If the spec and the tests are good, the code can be written again. If they aren’t, keeping the old code won’t supply them: it records what the code does, not what it was supposed to do.
In short
Write the spec for a model that wasn’t there. If it can rebuild the code from the page, you can let the code go.
The Spec Nobody Wrote Down
Every system has two specs. One is written down. The other is carried by the people who run the system, and it is often a large part of the whole.
Don’t expect the LLM to understand unwritten business requirements; it has no way to know them. It has read the public standards, the textbooks and a great deal of other people’s code. It has not read your business.
Where it lives
In people. People often manage the exceptions. The clerk who knows which orders to hold. The analyst who knows that one customer’s invoices go out a day late on purpose. None of it is in the system; all of it is in the job.
In the old system. Behaviour nobody documented, recorded only in the code that does it. A branch that skips an approval, a field nobody can explain. The code shows what happens and never why (see “The Shadow on the Wall”).
Beside the system. The spreadsheet someone keeps next to it. The report run by hand at the end of every month. The email that goes out when a number looks wrong. If people do it every month, it is probably a requirement, whether or not anyone wrote it down.
In other organizations. Trading partners publish their own versions of a standard, each with its own exceptions. A rule that holds for one partner breaks for the next, and the difference is in their guide, not yours.
In contracts and law. Obligations someone signed or a regulator set, which often nobody on the project has read.
Why it stays unwritten
Mostly because it’s obvious to the person who knows it. They don’t think of it as a rule; it’s just how the work is done. Ask them for the requirements and they’ll describe the normal case, because to them the exceptions are ordinary work, not requirements.
Sometimes people are reluctant to write it down. Expect some reluctance, and expect the manager to have to ask for it directly.
And sometimes nobody asked.
Why the model can’t fill it in
Ask the model about an unwritten rule and it will still answer. The answer will be plausible, well written and consistent with everything else it was given. It may also be wrong, and nothing in the answer will tell you which.
What the model can do is find where the gaps are. Give it the request and ask what it would have to assume (see “The machine asks; people answer” in the five considerations). Each assumption it lists is a place where the unwritten spec probably sits. Then a person has to go and get the answer.
How to get it out
- Ask about the exceptions, not the process. “When does this not work? What do you do by hand? What do you check before you send it?”
- Watch the work. What people do and what they say they do are often different.
- Collect what’s beside the system. The spreadsheets, the checklists, the emails. Each one is a rule someone needed.
- Ask about every odd branch in the old code. Who depends on this? Can it go?
- Write each answer as a rule, with an example and a test. Note who said it and when, so it can be checked later.
Why the first project runs long
People are often surprised that their first LLM project takes longer than they expected. The code arrived in an afternoon. The project took months.
The estimate was built on an old assumption: that writing the code is the long part. On a traditional project, the unwritten spec came out slowly during coding. Finding out was spread across the schedule and hidden inside it.
With a model, the code comes first and fast, and the questions don’t get asked. So the unwritten spec shows up later, as defects: in testing, in review, or after the system is live, when the first exception arrives. Each one means going back to people, writing the rule down, and changing code that already looked finished.
The time didn’t go away. It moved. The work of finding out what the business actually does has not shrunk much. A project that plans for it, by asking first and writing the answers down, spends that time at the start, when it costs least. A project that doesn’t spends it at the end, along with the time to undo code built on guesses.
Two things make the first estimate more honest:
- Estimate the finding out, not the code. Count the people who need to be asked and the exceptions each of them handles.
- Count the learning. The first project is also where the team learns to write a spec a model can build from. The second project pays less of it.
If it isn’t written down, the next model won’t know it
For the next model, an unwritten rule doesn’t exist. It will build the system without it, and the system may pass every test you have, until the first exception arrives and someone has to handle it by hand again.
In short
If it’s not on the page, the model will decide it for you. Only people can put it on the page.
Let the Machine Ask
If you are lazy, and most of us are by the end of the day, have the LLM start with the basics of your request and make the humans get the answers. The first human is you, the person who asked. The rest are the people who know.
This chapter shows what that looks like on one real kind of request.
A thin request
Here is a request of the kind that arrives every week in an EDI shop:
Set up a new trading partner for invoices.
Give this to a model as a build request and it will build something: a mapping, a connection, a schedule. Every gap in those eight words will be filled with a default, and you may not be told which ones.
Give it to the model as a question request instead:
Before anything is built, list what you would need to know. For each question, say what you’d assume if nobody answered, and who would know.
What comes back
This is the list a model produced for that request, lightly trimmed:
- Are we sending invoices to them, or receiving invoices from them? Assumed: sending. Who knows: the account manager.
- Which version of the X12 standard do they use? Assumed: 004010. Who knows: the partner’s EDI contact.
- Do they publish their own implementation guide? Assumed: yes, and it differs from ours in places. Who knows: the partner.
- How do we connect: AS2, SFTP, or a value-added network? Assumed: AS2. Who knows: the partner’s EDI contact and our network administrator.
- Must each invoice match a purchase order we’ve received? Assumed: yes. Who knows: accounts receivable.
- What happens to an invoice with no matching purchase order? Assumed: hold it and alert someone. Who knows: the accounts receivable supervisor.
- Do they expect a functional acknowledgment, and what if it doesn’t arrive? Assumed: yes, within 24 hours, with an alert if it’s late. Who knows: EDI operations.
- Are there allowances or charges on the invoice, such as freight or discounts? Assumed: none. Who knows: the account manager.
- How many test invoices before going live? Assumed: as many as the partner needs to certify us. Who knows: the partner.
- Who gets called when one fails? Assumed: EDI operations, during business hours. Who knows: the operations manager.
Eight words held ten decisions. The request wasn’t careless; it was normal. The gap between what was typed and what was meant is there in nearly every request, and the list is that gap written out.
What happens to the list
Sort it by who answers. The partner gets one email with questions 2, 3, 4 and 9. Accounts receivable gets 5 and 6. The account manager gets 1 and 8. Operations gets 7 and 10. That’s one email and three short conversations, instead of a meeting with everyone. And “who knows” isn’t always the job title: if someone on the team has set up twenty partner connections, question 4 goes to them.
In a list like this, most answers are a yes. The defaults are usually right, and confirming a default takes seconds. That’s the point of including them: people answer by exception.
The no’s are the spec. Suppose accounts receivable answers question 6 this way: “No. For this partner, drop-ship orders never have a purchase order. Match those on the order number instead.” That rule wasn’t in the request, and no model could have known it. It goes into the spec, with an example and a test, and with a note of who said it.
Run it again. Give the model the request plus the answers, and ask for the questions that remain. The second list is shorter. When the new questions are about details nobody would argue over, stop.
Why this works
The model is good at one half of this and has no way to do the other. It has read a great deal about EDI, so it knows what a trading partner setup involves and where setups usually go wrong. It does not know your partner, your accounts receivable rules or your on-call list. A question list uses the half it’s good at and sends the other half to people.
The questions are the output. Not the code, not yet. Code built from the eight-word request would have been built on ten guesses. Code built after the list is built on ten answers.
In short
Hand the model your thin request and ask for questions, defaults and who knows. Then take the list to the people.
Blessed by Everyone
A standard Gantt chart fits a project that involves an LLM poorly. The chart assumes the work is a list of tasks with known durations, done in order, and that building is the longest bar on it. With a model, building is the short part. The long parts are finding out what the business actually does, getting the people who know to confirm it, and reviewing the result, and none of those has a duration you can know in advance. They also repeat: questions lead to answers, answers lead to new questions, and a review can send part of the spec back. A plan that fits this kind of project is built around gates with conditions, not bars with dates. The gate described here is the most important one. It marks where coding starts, and the point where everyone involved has a stake in what gets built.
Nobody should generate anything but setup code and tests (throwaway prototypes excepted, and marked as such) until the spec has been blessed by everyone. At that point, submit the entire spec and everything else about the project to the best model available, for a project review.
A project manager reads “blessed by everyone” and hears a problem. The project is managed by one person, and that person is accountable for the date. If everyone has to agree, nobody can decide.
Both are true, because they are about different things. Everyone blesses facts. The project manager makes decisions.
What a blessing is
A blessing is one person confirming that the spec says what they told it. The rule they gave is written down correctly. The exceptions they handle are all there. Nothing they depend on is missing.
A blessing covers that person’s part, not the whole spec. It isn’t a vote, and it isn’t a veto. Accounts receivable blesses the invoice-matching rules. They don’t get a say in which network protocol the partner uses.
The word comes from testing, where blessing a result means accepting the program’s own output as the new expected answer. That check is only as good as the person who looked at the diff. Here the spec is what’s being checked, and the person who confirms it is the oracle. That is why a recorded blessing is worth more than a green checkmark.
Who “everyone” is
- Each person who answered a question while the spec was written.
- The people who will run the system and support it.
- The people at the other end: the trading partner, the other department, the outside system’s owners.
- Whoever pays for it. They bless that the spec matches what they agreed to buy. That is a fact about the agreement; changing the agreement is a decision, and it goes to you.
Not everyone in the building. If a person didn’t contribute a fact and won’t live with the result, they don’t need to bless anything.
What stays managed by you
- The gate date. Blessings are collected by a deadline you set.
- Conflicts. When two people’s answers disagree, someone with authority decides which one governs, and where the boundary between them sits. That’s you, or someone you name.
- Scope. What’s in, what’s out, and what waits for the next release.
- The review. What the reviewing model says is advice. You decide each point.
- When it’s good enough. No spec is complete. You decide when it’s complete enough to build from.
What I have, what I need
Before the gate, get the people together and have each one say two things: what they have, and what they need from the others.
- What I have: the answers I’ve confirmed, the parts I’ve blessed, what’s ready on my side.
- What I need: the answer I’m waiting on, the decision that’s blocking me, the file I haven’t seen.
This shows the gaps between people, which a review of the spec can’t. If accounts receivable needs the partner’s guide and nobody has asked the partner, it tends to come out early. The “what I need” items become your list to chase before the gate opens.
How to run the gate
- Send each person their part. Not the whole spec. You may want to assign roles and responsibilities here: who owns each part, and who blesses it. Mark their answers, ask “Is this what you told us? Is anything missing?”, and give a date.
- Silence means unblessed. A rule that nobody confirmed is still a guess, so follow up until there’s an answer. If the gate date arrives and a part is still unblessed, you may choose to build on it anyway. Record that as an accepted risk, with your name and the reason.
- Record each blessing. Who, which part, when, and the commit of the spec they blessed, kept in the repository next to the spec. A blessing of text that has since changed is a blessing of something else.
- Hold the have-and-need meeting. Chase every “what I need” until it’s answered or deliberately put off.
- Package the whole thing. The spec, the questions and answers, the tests, the decisions and their reasons. Send the distillate, not the churn: the finished spec, not every chat that produced it. Before it goes, check that the package may leave the building; the first item in the security risks of Whoever is Good at It applies to this step more than to any other.
- Send it to the best model available, in a fresh session. Not the session that helped write the spec. It shares the spec’s blind spots. Ask what’s missing, what contradicts, and what will cause trouble.
- Decide every point. Accept it, reject it, or send it back to the person who owns that part. Write down the decision and the reason. When an owner revises their part, they bless the new version. Revising your own part is no failure; it’s how a spec gets finished properly.
- Open the gate. Building starts.
Setup code can come before the gate: the project skeleton, the build, the test harness. None of it makes a decision about the business, so none of it needs a blessing.
The tests come before the gate too. Let the model set up the tests for the spec’s rules, then read them all. Each test is a rule from the spec in a form that runs, so it is blessed with the part it belongs to and goes in the package.
After the gate
The spec will change. The builder will find things while writing tests, and some of them will mean the spec was wrong or incomplete.
A change doesn’t send the whole spec back through the gate. It goes to the people who own the part that changed, for a small blessing of their own, and the decision is recorded like the others. Everyone else carries on.
Finding those people is mechanical, since each blessing carries the commit it was given against. The parts that need a new blessing are the ones whose blessed version no longer matches the current text.
In short
Everyone blesses the part they own. You, the project manager, decide everything else, including when the gate opens.
Whoever is Good at It
You already take each problem to the person who is good at it. Do the same with the LLM.
A plan assigns work by role. Problems don’t arrive sorted by role. The question about partner connections should go to whoever on the team has set up twenty of them, whatever their title says. Knowing who is good at what is part of managing the project, and no planning tool records it. Use it.
What to take to the LLM
- Long reading. A standard, an implementation guide, a contract, a regulation. It can summarize it, find the section that matters, or turn it into test cases.
- Unfamiliar code. What does this program do? Where is this field set, and where is it read? Which parts does nothing call anymore?
- History. When did this change, and in which commit? Did this function ever exist?
- Questions. Given a thin request, what’s missing and what would it have to assume?
- First drafts. Specs, test cases, documentation, status notes, the email to a trading partner.
- Unit tests. Small, single-purpose and readable, from a rule stated in plain words.
- Small tools. A one-off script to convert a file, a database query, a pattern to match a field.
- Translation. One data format into another, or an old language into a plain description of what it does.
- Review. A spec or a change, read by a fresh session, looking for what’s missing or contradicts.
- Explanation. An error message, a log, a concept explained in terms you already know.
What not to take to it
Anything that depends on knowing your business, your people or your history, unless that knowledge is written down and given to it. Decisions. Anything where a confident wrong answer would go unchecked.
The security risks
Taking a problem to the LLM means giving it the material the problem is made of. That has costs a project manager has to plan for.
- Data leaves your hands. Whatever is pasted in or read by an agent goes to the model’s provider. Before any real data goes in, find out what your organization’s policy allows and what the provider’s terms say about retention and training. Some data, such as health records or payment card numbers, may not be allowed to go at all. Code and schemas are usually the safe place to start; real records usually aren’t.
- Secrets travel with files. An agent that reads a repository will also read configuration files, keys and passwords left in it, and may copy them into its output, a log or a commit. Keep secrets out of what it can read.
- Agents can act. An agent that can run commands can also delete files, push code, send messages or change a live system. Start it read-only. Give it no production credentials. Review anything it proposes to run before it runs.
- What it reads can instruct it. A web page, an email, a partner’s document or a comment in someone else’s code can contain text written as instructions to the model, and the model may follow them. Treat everything it reads from outside as data, and keep agents that read untrusted material away from tools that can do damage.
- Generated code can be unsafe. It may use insecure patterns, out-of-date libraries, or a package name that doesn’t exist, which someone can then publish with harmful contents. Review it, test it, and check that every dependency is the real one.
- Security answers can be confidently wrong. Have a person who knows the subject check anything the model says about security, permissions or compliance.
- Shared output stays shared. A chat link, a published page or a pasted transcript can carry everything that was in the conversation. Check before sharing.
Browser Claude and Claude Code
I work with two sessions of the same model, and they have different jobs.
Browser Claude is the conversation in a web browser. It has no access to my files and can’t run anything. That’s where I think a problem through, argue about it, and write the spec.
Claude Code runs in my development environment. It can read and change the files, run the build and the tests, and keep the project’s history. It writes the code and manages the project, from the spec that Browser Claude and I have written and approved.
But Claude Code doesn’t have to follow that spec when it finds things in test.
Roles, not models
Both are the same model. What makes them different is what each one has in front of it and what it’s allowed to do.
The browser session can’t see the code, so it thinks about the problem instead of the code. It’s the right place for the interrogator, asking what’s missing, and for the spec partner, helping write it down.
The development session can see the code and run it, so it finds out what’s actually true. It’s the right place for the builder. A fresh session on either side can be the reviewer, as long as it wasn’t the one that wrote what it’s reviewing.
The roles are the point. Any model you trust can fill them. Keep the roles separate and give each one only what it needs.
The spec is blessed, not sacred
The spec is written before anything runs. Tests are checked against what actually happens. When the two disagree, what actually happened is evidence, and the builder is allowed to follow it, visibly.
jemage has a file of tests that shows the split. Its header says the tests were written without a toolchain to hand, so nobody could run them, and that the first run should be treated as a check on the predictions. Any test that failed on the first run meant the prediction was wrong, and the actual behaviour was the thing to record. One session predicted; the other found out.
A deviation is only safe if it’s visible. When the builder departs from the spec, it says so in plain words, in the commit message and to me. If the deviation stands, it goes back into the spec, so the next session builds from the corrected page and not from a spec that the code no longer matches.
The handoff
What passes between the two sessions should be files, not chat. The spec lives as markdown in the repository, and the builder reads it from there.
Pasting a chat reply across brings the conversation with it. A reply once pasted whole into a chapter of this book arrived complete with “Want me to fold this in?” at the bottom. In a spec, the leftover conversation is harder to spot, and the builder may treat it as a requirement.
What each one needs
The browser session needs the purpose, the people’s answers, and room to argue. It doesn’t need the code.
The development session needs the blessed spec, the tests, clear limits on what it may do without asking, and a place to record what it changed and why. Commit messages are that place.
In short
One session thinks, one session builds. The spec passes between them as a file, and when the build proves the spec wrong, the spec gets fixed.
The Shadow on the Wall
When you hand the Claude model a legacy system, you hand it text.
Source files. Copybooks. Stored procedures. A schema dump, if someone found one. Job control that runs at two in the morning. Maybe a design document from 2004 describing a system that was never quite built.
The model reads that text quickly, and usually accurately. It can tell you what a COBOL paragraph does, trace a field from the screen that captures it to the table that stores it, and find the procedure nobody calls anymore. It has read more of this kind of code than a person could in a career.
But what it is reading is the shadow, not the thing that casts it.
What casts the shadow
A legacy system is the shadow of an organization’s operations, cast onto code over decades. The operations are people: clerks, inspectors, supervisors, the resident at the counter, the auditor who asked for a report once in 1997. Most branches in that code are there because something happened in the room.
The model sees the branch. It does not see the room.
Take a field called FLAG_7. The model can usually tell you where it is set and where it is read. It can tell you that when it is Y, the record skips the second approval. What it cannot tell you is why. Maybe it marks a category of applicant the law exempted. Maybe it’s how one supervisor, long retired, got urgent cases through faster, and everyone has relied on it since. Maybe it’s a bug that three departments now depend on.
All three cast the same shadow.
The danger is its fluency
Here is what you should worry about. Ask the model what FLAG_7 is for and it will give you an answer. The answer will be plausible. It will be well written. It will fit the code. And it may be wrong.
This isn’t deception. Explaining is what the model is built to do, and a gap in the evidence doesn’t stop it. The gap gets filled with the most likely story. A person who doesn’t know usually hesitates. The model usually doesn’t, unless you’ve told it to.
So tell it to. “Don’t explain this yet. List what you’d need to know to explain it, and who would know.” That turns its fluency into questions, and questions are what a project like this is short of. The author calls this letting the machine ask. It is the most valuable instruction you can give.
Translation preserves the shadow
An expensive mistake the model can help you make is a faithful translation.
It can turn COBOL into Java or C# line by line. The result will compile. It may pass every test you have. And you will have paid a great deal to move the shadow from one wall to another: the workarounds, the dead branches, the rule that stopped mattering when the regulation changed, all carried forward in a modern language, where they are harder to recognize as old.
A replacement worth paying for asks a different question. Not “what does the old system do?” but “what does the organization need to do now, and which of the old behaviors does that still require?” The model can answer the first question fairly well. On the second it can raise questions, but it can’t settle it. That one belongs to the people in the room.
Where the model is useful
Spend tokens on the model here:
- Inventory. What’s in there: tables, jobs, screens, programs, interfaces, who calls what. Tedious for people, fast for the model.
- Characterization tests. Pin down what the old system actually does, input by input, before anyone changes it. The tests become the shared record of the shadow. When the new system disagrees with them, someone has to decide whether the old behavior was a requirement or an accident. That decision is the project.
- Questions. For every rule the model finds, a question for a person: why does this exist, who depends on it, can it go?
- Compression. The regulation, the vendor manual, the interface spec for the outside system nobody wants to read. The model can turn it into cases you can check.
- Review at the gate. A model that didn’t help write the spec, given the whole thing, looking for what’s missing.
Don’t spend tokens on the model here:
- Generating the new system before the spec is blessed.
- Explaining the business purpose of legacy behavior without someone who knows checking it.
- Deciding what the organization needs.
The model won’t remember this project
A project like this runs for years. The model runs for a session. When the conversation ends it will not remember FLAG_7, or what the retired supervisor told you about it, or which department said it can’t lose it.
That isn’t a flaw to work around later. It’s the design constraint. Everything the project learns has to be written down where the next session, the next model and the next person can find it: the decision log, the characterization tests, the answered questions. If it lives only in a chat history, it’s lost the same way the original reasons for FLAG_7 were lost.
There’s an irony here. The legacy system is hard to replace because its reasons were never written down. A project run with the model can repeat that mistake quickly. Or it can record every reason, because the model needs the reasons recorded to be useful at all.
The scarce resource
On a project like this, the model is the most abundant thing you have. It is available at any hour, it will read a great deal, and it costs little per page.
The scarcest thing you have is the people who remember: the clerk with twenty years at the counter, the programmer who wrote the two a.m. job and retires next spring. Their time runs out on a calendar.
So spend the abundant resource to protect the scarce one. Let the model do the reading, the inventory and the drafting, so that when you sit down with the people who remember, you arrive with the right questions, and they spend their hour answering instead of explaining from scratch.
The model can show you every shadow on the wall. Only they can tell you what’s casting it.
What the Model Needs From You
“The Shadow on the Wall” is about reading an old system. This chapter is about the everyday: what a project manager can do to get good work from the model.
Most advice about using an LLM is about prompts. Prompts matter, but the project around the Claude model matters more: what’s written down, who decides, and how its work gets checked. That’s management, and it’s your job, not the model’s.
Tell it who the work is for
Give the model a task and it will do it. Tell it who the work is for and it will do it differently.
jemage, the project most of this book’s examples come from, renders messy data for blind readers. The first rule in its project file is one line: “We are always guided by the blind user.” That sentence settles questions nobody thought to write a rule for. Should this output be shorter? Should that symbol be spelled out? Ask what the blind user needs, and the answer is usually plain.
One sentence of purpose beats a page of instructions. Write it first.
Its memory is your files
The model starts every session knowing nothing about your project. What it knows a few minutes in is what it has read: the project file, the specs, the commit history, any notes left for it.
So the state of those files is the state of its memory. A stale spec gives it stale beliefs. A commit message that says “fix stuff” gives it nothing. A decision made in a meeting and never written down never happened, as far as the model can tell.
That turns a project manager’s oldest chore, keeping the documents current, into something more direct. You aren’t only keeping records for people. You’re managing what your LLM knows.
Make it show its work
The model can be wrong fluently. “The Shadow on the Wall” covers why. The everyday defense is simple: don’t accept a claim without evidence, and ask for the evidence up front.
Evidence means something you can check. The test that passes. The command and its output. The file and line number.
One afternoon a library the author maintains stopped compiling. The code called a method that didn’t exist. The model could have said “it looks like that method was never written.” Instead it searched the whole history for the name and found it had never appeared in any commit. That’s a fact, and the next step followed from it.
When the model gives a conclusion without the evidence, ask for it. When it can’t produce it, treat the conclusion as a guess.
Point it at the reading
The model’s best use is the reading nobody wants to do. A three-hundred-page spec. A year of logs. A repository someone else wrote. A workspace of forty crates nobody has looked at as a whole.
That same afternoon, the author asked the model to find a project from months earlier, and then its “single source of truth.” Following the files and imports turned up three sources of truth, two programs loading them, and two different traits with the same name. A person could have found all of it. Few people would have spent the afternoon.
Reading is cheap for the model and expensive for you. Spend accordingly.
Keep the decisions
The model will lay out the options and recommend one. But the decision belongs to the person who will live with it and answer for it when it goes wrong.
Watch for the model deciding things nobody asked about. It looks like helpfulness: a refactor slipped into a bug fix, a renamed function, an extra feature. It’s scope creep. Stop it the way you’d stop it from anyone on the team.
Small steps, each checked
A large change made in one go is where the model goes wrong. Each small assumption builds on the last, and by the end the work is wrong in ways the model reports with confidence.
Break the work into steps small enough to check: a change, its test, a look. It feels slower. It’s faster than undoing a day of work built on a wrong assumption.
One error at a time
When forty compiler errors arrive together, the model reads them as forty tasks. Everything in front of it looks like something you want done, so it tries to do all of it at once. But the list doesn’t say which errors are real. One wrong type early in a file can cause thirty-nine complaints further down, and they look as urgent as the cause. After the first mistake, the compiler is guessing at what you meant so it can keep reporting. Many of the later errors come from those guesses, not from your code.
So the model patches every line. In Rust, the language most of the author’s code is in, that means adding a copy of a value to quiet one complaint (.clone()), telling the program to crash rather than handle a missing value (unwrap()), or switching a warning off (#[allow]). It writes a small adapter to make two mismatched pieces fit, when the real fix was to change one of them. Some of these fixes undo others. At the end the errors may be gone, but the code carries a dozen guesses. None was checked on its own, and nobody can tell which guess did what.
Give the model only the first error and that changes. It has one question, and the compiler answers it in seconds. It makes the smallest change that could fix it and builds again. If a new error appears, it’s real, because the follow-on errors went away with their cause. The model doesn’t write code for a problem it wasn’t shown.
The codebase gets small changes, each readable at a glance, and a history in which every step compiled. It doesn’t get the defensive copies and the glue code. The compiler does the triage, and it knows the order of things better than the model does.
The cost is more round trips, each a build and a short turn. That is usually cheaper than one large turn that tries everything and then has to be undone.
Three more points:
The error count is not progress. Forty errors down to three sounds like a good afternoon. But the model can make the count fall without fixing anything, by switching checks off and crashing instead of handling. If someone reports a falling count, ask what was added to make it fall. Those suppressions can be searched for, and each one is a decision somebody should have seen.
Some lists really are many tasks. If a function was renamed and twenty places still use the old name, those twenty errors share one cause and one obvious fix. Doing them together is fine. The question is whether the errors share a cause that is already understood. If they do, fix them as a batch. If nobody knows yet, fix the first and build again.
Tests work the same way. When a dozen tests fail after one change, one cause usually explains most of them. Fix the failure with the plainest reason, and run them all again.
This is the habit of “Stop when it goes in circles”, below, at a smaller scale. When the model’s work isn’t converging, narrow what it is looking at.
Correct it once, in writing
When the model gets something wrong, say so. Then make sure the correction is written down, or the next session will make the same mistake.
The author does this with short notes the model reads at the start of each session. One says never to give two things the same name. One says to define each Rust term in Java terms the first time it comes up. One records the One Hz Rule: design for one message a second, then handle every message as it arrives. Each started as a correction in chat. Written down, each one is still in force next session.
A correction made only in conversation lasts until the conversation ends.
Stop when it goes in circles
If the third patch doesn’t fix it, the problem isn’t the patch. The fifth consideration says go back to the spec. Add this: start a fresh session with the better spec, rather than asking the model to keep patching. In a long session full of failed attempts, the model tends to repeat them.
What it adds up to
None of this is new. Know the purpose. Keep the records. Check the work. Keep the decisions where they belong. Take small steps. Write down what you learned. That’s project management.
What’s new is how fast the model shows the cost of skipping it. A team can get by for months on what people remember. The model can’t get through a single session that way.
The next model reads only the page. Write it for the one who wasn’t there.