Dry Run
local graph
Chapter 13 — Dry Run
Section titled “Chapter 13 — Dry Run”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.
Total Recall
Section titled “Total Recall”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.
Recall in Action
Section titled “Recall in Action”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 ishosted and deployed, working from the specification in the project files. Createfiles as needed in the .tmp/dry-run/ subfolder of the scratch directory.Build only from what the specification states. The moment the task needs adecision 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 logthe 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 S3bucket agentic-spec.com, CloudFront use, AWS SSO authentication, client-side cleanURLs. 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 hostedand 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; therecorded assumption is what the architect adopted in order to keep the designmoving. Records are separated by a line containing `=====`.
**ID:** `[GAP:0001]`
**QUESTION:** How is the S3 origin exposed to CloudFront - as a public S3static-website endpoint, or as a private bucket reached through CloudFront OriginAccess Control (OAC) - and in which AWS region does the bucket live?
**BUSINESS IMPACT:** The access model sets the site's baseline security exposureand the AWS bill.
**TECHNICAL IMPACT:** The two models are not interchangeable downstream. A publicS3 *website* endpoint provides index-document and basic redirect behavior but onlyspeaks HTTP to the origin and cannot use OAC; a private *REST* endpoint supportsOAC and HTTPS-to-origin but performs no index-document or URL rewriting - whichdirectly determines how clean URLs must be resolved (see `[GAP:0002]`). Region alsoconstrains nothing for the cert (CloudFront certs are always us-east-1) but doesfix where `aws s3 sync` writes.
**USER IMPACT:** Largely invisible to readers when done correctly; a misconfiguredpublic bucket could surface duplicate, un-CDN'd origin URLs in search results orexpose 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 policythat grants `s3:GetObject` exclusively to CloudFront distribution.
**GROUNDING:** Model training - AWS Well-Architected guidance and the currentAWS-recommended CloudFront+S3 pattern (OAC superseding the legacy Origin AccessIdentity). 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 acrawler fetches the sitemap entries (which are listed without `.html`), and for theapex `/` 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 errorsand inbound/shared clean links break - directly undercutting the site's statedpurpose of promoting the book and serving readers.**TECHNICAL IMPACT:** Under the private-OAC origin assumed in `[GAP:0001]`, S3serves object keys literally and does no index-document or path rewriting, so thekey is `about.html` while the requested path is `/about` - a guaranteed misswithout an edge rewrite. The client-side strip cannot help on the first hit (thedocument 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 forhumans and bots alike.
**ASSUMPTION:** Attach a CloudFront Function (viewer-request) that normalizes thepath to an S3 key: `/` and any path ending in `/` map to `_/index.html`; a pathwith no file extension gets `.html` appended (`/about` → `/about.html`); paths thatalready carry an extension pass through unchanged. Set the distribution's DefaultRoot Object to `index.html`, and configure a CloudFront custom error response thatserves a generated `404.html` with HTTP 404.
**GROUNDING:** The registered specification itself (sitemap lists extensionlessURLs; 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 FunctionsURL-rewrite pattern) is from model training. Builds directly on the private-OACorigin assumed in `[GAP:0001]`.
=====
**ID:** `[GAP:0003]`
**QUESTION:** How is the custom domain served over HTTPS - what provisions the TLScertificate, what DNS authority and records point `agentic-spec.com` (and `www`) atCloudFront distribution, which hostname is canonical, and what are theviewer-protocol and minimum-TLS policies? The spec implies HTTPS (clean-URL handlerkeys 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 securelyand not resolving at all. Missing/mismatched certificate or DNS means downtime,browser security warnings, or an unreachable site - a direct hit to the book'sprimary 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; thedistribution's CNAMEs, the cert SANs, and the DNS records must agree exactly. Apexdomains generally cannot use a plain CNAME, so an alias/ALIAS-type record (orprovider equivalent) is required. The viewer-protocol policy and minimum-TLSsecurity 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 singlecanonical host with the other 301-redirecting keeps shared links and bookmarksstable.**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 AmazonRoute 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 thedistribution Viewer Protocol Policy to redirect-HTTP-to-HTTPS and the securitypolicy to `TLSv1.2_2021`.
**GROUNDING:** Model training - the CloudFront/ACM custom-domain requirement thatcerts live in `us-east-1`, the apex-alias DNS pattern, and standardHTTPS-redirect/TLS-floor hardening. The domain name and distribution ID come fromthe 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.
Challenge
Section titled “Challenge”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.