Skip to content
ImagineWorld

Dry Run

node_idnode-book_agentic-spec-driven-development_chapter-13-dry-run
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num13
chapter_titleDry Run
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Up to now, you have been the one taking the initiative. AI has done plenty — researching, drafting, recording your decisions, flagging its own contradictions when you check its work — but the moves have started with you. Above all, the method has asked one thing of you: to decide what goes into the specification.

That expectation carries a hidden assumption: that you know, ahead of time, what the specification will need. You should — you are the domain expert, and that judgment stays with you. But knowing your domain is not the same as recalling, in one sitting, every decision your project requires. You will forget things. And you forget them for a specific reason — the same reason the technique in this chapter works.

Why do you forget? Because checking a spec and building from it are different acts. Run down a mental list of what the spec needs, and only the obvious items come to mind; the rest stay hidden. Start building — lay out the first table, draft the first clause, sketch the first screen — and they surface on their own, pulled into the open by the work. The first hour of real building catches what many hours of review would miss.

So you do not ask AI what is missing from the spec — that is the Omission Trap from Chapter 11, and the answer is generic boilerplate. You ask AI to build from the spec instead. That is a dry run.

You give AI a real task — a concrete deliverable some specialist would produce from the spec: design the database tables, lay out the screens, draft the deployment process. It has to be a recognized kind of work, the sort AI has “seen” done many times in its training. Do not tell AI to “build the entire system.” That task is too broad. Almost no one tackles the whole system as a single job, so it rarely shows up that way in training — and that breadth drops AI right back into the Omission Trap. Keep each task small and specific, run a separate dry run for each — the tables, the screens, the deployment — and cast AI as the specialist who owns that craft. Take the shallow, design-level tasks first; the deeper ones that build on them come later.

Have AI do the task for real, writing whatever working files the job produces into the scratch directory. At first, those files are not the point — they exist only to make the work concrete. What you are after is what the work exposes: the decisions the spec never made. The output itself comes later — you turn to it once the gaps are addressed.

One rule makes it work: AI may not settle anything in silence. It builds only from what the spec records. The moment the task needs a decision the spec has not made, it records that missing decision — a gap — along with the answer it would have assumed and where that answer came from: its training, a quick web search, or nothing at all. Then it keeps going, leaning on the assumption to push deeper into the same task, and logs the next gap the same way. You saw a similar move in Chapter 11.

A single pass ends in one of two ways. Either the task is finished — AI reaches the natural end of the job, every gap along the way logged — or the run hits a cap you set on the number of reported gaps. The cap keeps the list short enough to review in one sitting: 10 is a sensible starting point, and about 50 is the ceiling.

What comes back is a file of gaps. You do not work through them one at a time. You read the whole list and record decisions into your ground-truth and memory files, the way you record anything else, with the reasoning behind each. Gaps and decisions are not one to one: a single decision can close several gaps, and some gaps disappear once an earlier decision makes them irrelevant. Then you start over. The file is disposable — you never edit it; you regenerate it with another dry run. Each fresh pass reaches deeper into the task before it has to assume anything, surfacing the next layer of gaps.

Eventually a pass comes back clean — no new gaps. That is not the finish line. Now the output itself becomes the point. Inspect what AI has built — the design, the draft, the layout, the code — as a deliverable, and judge it against what you actually expected. The output shows you what the spec, as written, produces. Any deviation points at what the spec defines incorrectly, or misses entirely despite the earlier search for gaps. Anything you would change becomes a new decision to record, and the next dry run builds against it — sometimes surfacing fresh gaps.

The entire dry run is done when a pass leaves no gaps behind and the output holds nothing you would change.

Notice what a dry run does and does not do. It flags the gaps and points you at what to settle next. It does not make the calls for you. It lightens the load — it helps you remember every decision the job demands — but each decision is still yours to make, because you are the domain expert and AI is not. That is the method’s core principle, holding here as everywhere else: your judgment is what matters, and the method only helps you apply it.

Here is a dry run session for agentic-spec.com. The site’s business and product layers are recorded. How it actually functions is barely covered — that part of the spec holds only the technical requirements logged at the start. You need to fill in the rest — an architect’s work.

A couple of notes first. The example that follows borrows some words from web infrastructure, but you do not need to be an engineer to follow the shape of the move. It also caps the run at 3 gaps for brevity; on a real project you would set the cap higher, so each pass does more work before it stops.

You:

Act as a senior software architect (SA). Your task: design how agentic-spec.com is
hosted and deployed, working from the specification in the project files. Create
files as needed in the .tmp/dry-run/ subfolder of the scratch directory.
Build only from what the specification states. The moment the task needs a
decision the specification has not made, do not settle it silently. Log it to
.tmp/dry-run/gaps.md with the following fields, each starts on a new line:
- ID: [GAP:nnnn], where nnnn is a unique sequential number in gaps.md (for
instance, [GAP:0001], [GAP:0002], etc.)
- QUESTION: the decision the spec has not made, in one or two sentences
- BUSINESS IMPACT: explains the business impact from the decision, if any.
Leave blank if there's no significant business impact.
- TECHNICAL IMPACT: explains the technical impact from the decision, if any.
Leave blank if there's no significant business impact.
- USER IMPACT: explains how the decision affects user experience, if any. Leave
blank if there's no significant business impact.
- ASSUMPTION: the decision you (SA's) assumed for the lack of a clear
specification record, to keep going.
- GROUNDING: where your (SA's) assumption comes from - model's training, online
research, none, or gaps recorded earlier (with their specific IDs).
Then keep working, using your assumption to go further into the same task, and log
the next gap the same way. Stop when you have logged 3 gaps.
Separate gap records in gaps.md with a dedicated line containing =====.

AI:

Done. Files hosting-deployment-design.md and gaps.md are in .tmp/dry-run/.
The registered specs/0200-technology.md fixes: static site, private build in S3
bucket agentic-spec.com, CloudFront use, AWS SSO authentication, client-side clean
URLs. I built the design from those.
The three gaps I hit and carried forward are recorded in gaps.md.
I stopped logging at three, as instructed.

Here is what gaps.md contains after this run:

# Hosting & Deployment Design - Gap Log (Dry Run)
Senior-architect gap log produced while designing how `agentic-spec.com` is hosted
and deployed, built strictly from the registered specification
(`specs/0200-technology.md`) and the readable generation procedure
(`gen-site.md`). Each record is a decision the specification has not made; the
recorded assumption is what the architect adopted in order to keep the design
moving. Records are separated by a line containing `=====`.
**ID:** `[GAP:0001]`
**QUESTION:** How is the S3 origin exposed to CloudFront - as a public S3
static-website endpoint, or as a private bucket reached through CloudFront Origin
Access Control (OAC) - and in which AWS region does the bucket live?
**BUSINESS IMPACT:** The access model sets the site's baseline security exposure
and the AWS bill.
**TECHNICAL IMPACT:** The two models are not interchangeable downstream. A public
S3 *website* endpoint provides index-document and basic redirect behavior but only
speaks HTTP to the origin and cannot use OAC; a private *REST* endpoint supports
OAC and HTTPS-to-origin but performs no index-document or URL rewriting - which
directly determines how clean URLs must be resolved (see `[GAP:0002]`). Region also
constrains nothing for the cert (CloudFront certs are always us-east-1) but does
fix where `aws s3 sync` writes.
**USER IMPACT:** Largely invisible to readers when done correctly; a misconfigured
public bucket could surface duplicate, un-CDN'd origin URLs in search results or
expose the site to defacement, both of which degrade trust.
**ASSUMPTION:** Private S3 bucket (no static-website hosting, no public access)
reached only through CloudFront via Origin Access Control, with a bucket policy
that grants `s3:GetObject` exclusively to CloudFront distribution.
**GROUNDING:** Model training - AWS Well-Architected guidance and the current
AWS-recommended CloudFront+S3 pattern (OAC superseding the legacy Origin Access
Identity). No region or access-model statement exists in the registered spec.
=====
**ID:** `[GAP:0002]`
**QUESTION:** How are the site's extensionless "clean" URLs resolved *server-side*
- i.e., when a reader navigates directly to `https://agentic-spec.com/about` or a
crawler fetches the sitemap entries (which are listed without `.html`), and for the
apex `/` and any unknown path?
**BUSINESS IMPACT:** SEO and shareability depend on this. The generated
`sitemap.xml` advertises `/about`, `/author`, `/downloads`, `/errata` (no
`.html`); if the edge returns 403/404 for those exact URLs, crawlers index errors
and inbound/shared clean links break - directly undercutting the site's stated
purpose of promoting the book and serving readers.
**TECHNICAL IMPACT:** Under the private-OAC origin assumed in `[GAP:0001]`, S3
serves object keys literally and does no index-document or path rewriting, so the
key is `about.html` while the requested path is `/about` - a guaranteed miss
without an edge rewrite. The client-side strip cannot help on the first hit (the
document must already be loaded for its script to run) or for non-JS crawlers.
Something at the CDN layer must map paths to keys.
**USER IMPACT:** Without server-side resolution, a reader pasting
`agentic-spec.com/errata` into the address bar, or following a shared clean link,
lands on an error instead of content; with it, clean URLs work on first load for
humans and bots alike.
**ASSUMPTION:** Attach a CloudFront Function (viewer-request) that normalizes the
path to an S3 key: `/` and any path ending in `/` map to `_/index.html`; a path
with no file extension gets `.html` appended (`/about` → `/about.html`); paths that
already carry an extension pass through unchanged. Set the distribution's Default
Root Object to `index.html`, and configure a CloudFront custom error response that
serves a generated `404.html` with HTTP 404.
**GROUNDING:** The registered specification itself (sitemap lists extensionless
URLs; Req 13 scopes the strip to the client and to `http(s)`; Req 5 forces `.html`
on disk) establishes the unmet need; the resolution mechanism (CloudFront Functions
URL-rewrite pattern) is from model training. Builds directly on the private-OAC
origin assumed in `[GAP:0001]`.
=====
**ID:** `[GAP:0003]`
**QUESTION:** How is the custom domain served over HTTPS - what provisions the TLS
certificate, what DNS authority and records point `agentic-spec.com` (and `www`) at
CloudFront distribution, which hostname is canonical, and what are the
viewer-protocol and minimum-TLS policies? The spec implies HTTPS (clean-URL handler
keys on `http(s)`) and names the domain, but says nothing about ACM, DNS,
apex-vs-`www`, HTTP→HTTPS redirect, or TLS version.
**BUSINESS IMPACT:** This is the difference between the domain resolving securely
and not resolving at all. Missing/mismatched certificate or DNS means downtime,
browser security warnings, or an unreachable site - a direct hit to the book's
primary off-Amazon promotional channel.
**TECHNICAL IMPACT:** CloudFront custom-domain TLS requires an ACM certificate in
`us-east-1` whose SANs cover every alternate domain name on the distribution; the
distribution's CNAMEs, the cert SANs, and the DNS records must agree exactly. Apex
domains generally cannot use a plain CNAME, so an alias/ALIAS-type record (or
provider equivalent) is required. The viewer-protocol policy and minimum-TLS
security policy must be set explicitly or they default.
**USER IMPACT:** Readers expect `https://agentic-spec.com` and
`https://www.agentic-spec.com` to both work and to show a valid padlock; a single
canonical host with the other 301-redirecting keeps shared links and bookmarks
stable.
**ASSUMPTION:** Provision an ACM public certificate in `us-east-1` with SANs
`agentic-spec.com` and `www.agentic-spec.com` (DNS-validated); host DNS in Amazon
Route 53 with alias A/AAAA records for the apex pointing at the distribution and a
`www` record that 301-redirects to the apex (apex chosen as canonical); set the
distribution Viewer Protocol Policy to redirect-HTTP-to-HTTPS and the security
policy to `TLSv1.2_2021`.
**GROUNDING:** Model training - the CloudFront/ACM custom-domain requirement that
certs live in `us-east-1`, the apex-alias DNS pattern, and standard
HTTPS-redirect/TLS-floor hardening. The domain name and distribution ID come from
the registered spec / `gen-site.md`; everything about certificate, DNS,
canonicalization, and TLS policy is unstated. Region alignment builds on the
`us-east-1` choice assumed in `[GAP:0001]`.

Read what came back. Every gap is a genuine decision the architect had to settle to keep going — not a generic checklist item — and most would never have occurred to you on your own. Look at the grounding on [GAP:0002]: resolving the site’s clean URLs only becomes a question once you assume the private-bucket origin in [GAP:0001]. So the second gap names the first as its footing. The chain is visible, not hidden — and that will matter when you make your decisions.

Now you do exactly that: read the gap log and record the decisions you are ready to make, with your reasoning — not one answer per gap, only those you can commit to now.

You:

Record the following ground truths to 0200-technology.md:
- The website shall be deployed to a private S3 bucket reachable via http(s)
only through CloudFront with Origin Access Control.
- Resolve clean URLs at the edge with a CloudFront viewer-request function that
assumes .html file name extensions every time an extension isn't specified in
the URL.

The next time you run the same dry run, AI finds those decisions already in the spec. It no longer has to assume them, so new gaps surface in their place — if there are any.

Once you resolve the hosting questions, you move on. In more complex sites and apps, the next dry runs might target the database schema and the screen layouts — one with a data architect, the other with an interface designer. Same move, different specialist, different task.

The same shape works well outside software. Cast AI as the lawyer drafting the full agreement from a signed term sheet, and the gaps surface as the points the term sheet left open — the governing law, the liability cap, what happens if one side walks away early. Cast it as a statistician asked to write the analysis plan for a research protocol, and the same thing happens: a specific professional doing a concrete job runs into the decisions the document has not made.

A dry run is not a rule you install; it is a prompt — you run it when you need it. Once the move earns its place in your work, save your dry-run prompts as files and reuse them.

Every gap detected in a dry run already carries its impact — business, technical, user — in separate fields. On a large project, those impacts are handled by different people: a product manager answers the business questions, an architect the technical ones, a designer the user-facing ones. Yet the dry run drops every gap into one file, so each reviewer has to read past everything that is not theirs.

Your challenge is to route the gaps. Extend the prompt to write not a single gaps.md but several — one file per audience. A gap with weight in more than one area goes to more than one reviewer.