Skip to content

ADR: The host root holds one file

ADR: The host root holds one file

Status: accepted, 2026-10-23, at 1.0.4.38. The root of api/TheYard.Api holds Program.cs and nothing else. Every other file is one slice's code under Features/<Slice>/ or one concern's code under Shared/<Concern>/, and neither Features/ nor Shared/ holds a loose file. HostLayoutTests fails the build when a file sits where this record says none may.

Reading list

  1. ADR: The onion cut into vertical slices: the slices this record finishes. Its 1.0.4.24 addendum is where the root stopped shrinking.
  2. ADR: The rules a change has to pass: the table this record adds one row to.
  3. Jimmy Bogard, Vertical Slice Architecture: organise by feature, not by the kind of file, which is the line a root of seventy-eight files broke.

In plain words

Domain-driven design and vertical slices answer two different questions, and this codebase uses both. Domain-driven design decides where the lines go: accounts, bids, vehicles and the Admin tab are different parts of the business, so they are different folders, and the rings keep business rules away from the database and the network. Vertical slices decide what goes inside each line: everything one use case needs, side by side, so a change to bidding opens one folder.

What the slices missed was the root. ADR-107 moved a root file into a slice only when one slice alone used it, and a file two slices share had nowhere to go, so seventy-eight files stayed at the root in alphabetical order, with nothing between Activity.cs and AzureMetrics.cs but the alphabet. Shared/ had the same problem one level down: twenty-seven registration and settings files loose beside two folders.

From this record every file has one home. If one slice uses it, it lives in that slice. If more than one place uses it, it lives under Shared/, in the folder named for the concern it serves. A newcomer opening the project sees two folders and one file, and the folder names under Shared/ are the list of things every slice may lean on.

Context

Measured at 4b460b48 (1.0.4.36): 78 .cs files at the root of api/TheYard.Api (Program.cs and 77 others), 27 loose under Shared/ beside Shared/Hosted and Shared/Sites, and a 23-file Cloud/ folder beside Features/. SliceTests rule 1 held the root to "no type with one user", a floor the root reached on 10/21 and could not go below, and SliceTests.StaysShared named eleven cloud card readers that stayed in Cloud/ by decision.

The measurement that placed every file reads who uses each file's types: a slice's files count as that slice, and shared code (a registration, the request pipeline, another shared type) counts as shared. A file only one slice uses and no shared code touches moves into that slice. A file used by more than one slice, or by one slice and the shared code that builds the host, is shared. The cloud card readers and the card frame were used by Features/Admin/Cloud alone once the folder moved together, so they went into that slice, NetlifyEdge and AzureMetrics with them. EdgeKeeps stayed shared because the request pipeline reads what the edge may keep and writes the header the edge card reads back. The first placement left NetlifyEdge shared on the strength of that header, and AzureMetrics because NetlifyEdge read it; the header's constant was compiled into the pipeline, so the measurement saw one user, the header moved to EdgeKeeps, where both of its users read it, and the second check then found AzureMetrics with one user too.

Decision

  1. The root of api/TheYard.Api holds Program.cs alone.
  2. Features/ holds folders alone. Each is one slice named for its domain, and a slice may hold sub-slices (Admin/Cloud, Admin/Plan, Admin/Operations).
  3. Shared/ holds folders alone. Each is one concern, named in the table below, and a concern exists because more than one place uses what it holds.
  4. A file's home is decided by measured use, read from the compiled host the way rule 1 reads it: one using slice and no shared user, that slice; anything more, the concern it serves. Name and alphabet decide nothing.
  5. The root Cloud/ folder moves whole into Features/Admin/Cloud, with the card frame (CloudCards, CloudThresholds, ResourceView), the recorder and NightlyResources.
  6. Namespaces follow folders. Shared/<Concern>/ declares TheYard.Api.Shared.<Concern>, subfolders included, and the host project imports every concern once in TheYard.Api.csproj, so a slice names a shared type the way it did before the move. No slice is imported there.
  7. A concern's name is never the name of a type or of a namespace the code already uses. Host, Azure and Plan would have hidden Microsoft.Extensions.Hosting.Host, the Azure SDK's root namespace and a nested Plan record, so those concerns are Instance, Resources and PlanReadings. Composition is the name of a folder an earlier record retired, so the registrations are Wiring.

The concerns under Shared/:

Concern What it holds Who uses it
Shared/Activity/ Activity, ActivityCollector, ActivityReportCache, ActivityWindows, Arrival, Hits, RequestRecorder, RequestTimings, TrafficMinutes written by the pipeline, read by Admin and the blog
Shared/Auth/ AdminKey, IdentityTokens, Tokens Accounts issue, Admin, Blog and Docs check
Shared/CostReadings/ CostReader, CostRecorder, CostReport, CostWire, Costs, PlanCost the cost cards and the first screen's pulse
Shared/Documentation/ DocumentationCatalog the docs routes and the Admin page sweep
Shared/Edge/ EdgeKeeps: what the edge may keep and the header each web app names itself in the request pipeline writes it, the edge card reads it
Shared/Grades/ CloudTones the cloud, plan and operations cards
Shared/Hosted/ the hosted services that span slices the host's start and stop
Shared/Instance/ CanonicalSite, Clocks, HostIdentity, HostStart, HttpCurrentRequest, KeepWarm, KeepWarmState, PageStatus, Peer, Pulse, ResumeDoor, SelfAddress, SelfTestCooldown, ServedAddresses, SiteHosts the running process, every slice
Shared/MachineReadings/ HourlyReadings, MachineRecorder, MachineSize, Machines the machines card and the plan card
Shared/Observability/ AdminObservability, CollectorLoggerProvider, ErrorRings, KeptRingWriterReader, LogRingBuffer, Logs, Observability, ProblemHandler, RingSizes, StoreLoggers, Telemetry and its two parts every request and every error
Shared/PlanReadings/ PlanDeploys, PlanHistoryReader, PlanReader, PlanRecorder, PlanRows, PlanShapes, PlanView the plan card and the cloud cards
Shared/Proof/ Proof, ProofClients, ProofResult, ProofRunner and its two parts the proof routes and the Cosmos DB card
Shared/Resources/ AzureIds, AzureResources the resource names every Azure card and the plan read
Shared/Sites/ IHostedSite, HostedSiteMount, The Shed The Shed mounts through it
Shared/Stores/ Backend, CatalogueReads, Catalogues, DesignTime, PreparedStores, RelationalContexts, StorePrepare, StoreSecondChance, Stores both stores, every slice reads one
Shared/Usage/ AnthropicClaudeClient the one client that asks Claude, registered by the usage wiring
Shared/Wire/ ApiDocument, Replies (kept whole by ADR-076), VehicleWire the public document names every slice's replies
Shared/Wiring/ IModule, Modules, every *Registration, RequestPipeline, HostPaths, AdminSettings, SiteSettings, StoreChoice builds the host every slice runs in

What holds it

HostLayoutTests, new:

  • the root of api/TheYard.Api holds exactly one .cs file and it is Program.cs;
  • Features/ and Shared/ hold no .cs file directly;
  • no folder of code sits at the root beside Features/ and Shared/;
  • every folder under Shared/ is a row in this record's table and every row is a folder (the test reads the table, so a new concern is a record change first);
  • a file under Shared/<Concern>/ declares TheYard.Api.Shared.<Concern>;
  • nothing sits in the host's root namespace;
  • a shared type that exactly one slice uses fails with the slice named, read from the compiled host by SliceTests.LonelySharedTypes, which rule 1 reads too.

SliceTests.StaysShared shrinks from seventeen names to seven: the five replies ADR-076 keeps in Replies.cs, and StoreMetrics and Routes, which share a documented region with what the shared registration builds. The eleven cloud readers and the recorder left the list because they left the root. CompositionRootTests holds every file under Shared/Wiring/ to static classes and records, and every other shared file that registers or maps to the same, which is the rule it held over the loose Shared/ files before.

What was considered

Leave the root as it is and call it the shared part. Rejected: seventy-eight files in alphabetical order is the layout ADR-107 was written to end, moved up one level.

One Shared/ folder with no concern folders inside it. Rejected: it moves the same files one folder down and tells a newcomer nothing.

A using line in every file that names a moved type, where the compiler asks for one. Rejected for this move: it touches about two hundred files for no change in meaning and hides the renames in the diff. One import per concern in the project file says the same thing once, and a slice is still never imported.

Cutting the proof and the cost cards out of Admin as their own slices in this version. Moved to the version that makes the Admin reads queries (ADR-115's ladder): the measurement put both in two slices' use (the Cosmos DB card reads the proof, the first screen's pulse reads the costs), so their code is shared and only their routes would move, and those routes get their handlers then.

Consequences

Every file moved once, so the commit is large and the diff is renames: the moves and the namespace lines are one commit, and the imports, the paths and the tests are the next. Live fences and records that named a moved file by path were repointed; prose was left as written. A type's full name changed for every moved type, so a test that names one by string reads the new name.

Where it sits

Only the host. The rings below it keep their folders as ADR-107 cut them until the version that slices them (the inner rings' addendum to ADR-107). Single responsibility: ADR-107 says what a slice is, this record says where everything that is not a slice lives. What would change it: a third hosted site with its own slices, which would ask whether Features/ gets a folder per site.

Files

Enforced by

One rule in the rulebook cites this record, each held by a test on every release.

The rule What holds it In the last gate
The host root holds Program.cs alone; Features/ and Shared/ hold folders alone; every Shared concern is a row in the record's table and declares its own namespace; a shared type one slice alone uses is red with the slice named HostLayoutTests, SliceTests, CompositionRootTests 50 of 50 passed
Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn