Docs
Sign in
Browse the docs

The SDLC pipeline

TAD: architecture

The technology stack, data storage, service boundaries and decisions the design builds on.

8 min read7 sections

The TAD step writes the Technical Architecture Document: how the system will be built, argued from the approved requirements. The agent, working as a solutions architect, decides the technology stack, where data lives, how the system splits into deployable units, which third-party services and libraries it uses, and which screens the product needs. It records every decision with the alternative it was weighed against. Beside the document it returns the same decisions, the architecture elements and the trust boundaries as data, so that the SDS, the Prototype and the Threat Model can build on them.

What you get

A Markdown document titled Technical Architecture Document, written to the ISO/IEC/IEEE 42010 architecture-description standard. The bridge adds the title block on top, and after the agent's text it adds a Decision Register built from the typed data, then the version history. The agent writes ten sections in this order:

SectionContents
1. ContextWhat is being built, for whom, the constraints it lives with, and a table of stakeholders, their concerns and the section that answers each
2. Architecture DriversThe requirements and constraints that shape the architecture, with the NFR figures turned into sizing (concurrent users, data volume, RPO and RTO)
3. Technology StackA table per layer with the choice, major version, licence type, build or buy, the reason and the alternatives, then environments, high availability and disaster recovery, observability and security architecture
4. Data StorageEvery data store, what it holds, its kind, why, its size and its backup approach
5. Service BoundariesMonolith, modular monolith or services, one row per deployable unit, and the integration patterns between units
6. Third-Party ServicesEvery external service a requirement implies, how it integrates and what happens when it is down
7. LibrariesThe significant libraries with major versions and licence types
8. Architecture DecisionsOne sub-section per decision, TAD-001 upward, plus Migration and Rollback and Risks and Technical Debt where they apply
9. System ArchitectureA diagram of the deployable units, data stores and external services, with the protocol on each edge
10. UI SurfacesA table of every screen the product needs and what a person can do there, or "None" when it has no user interface

The bridge requires these ten headings (Context, Architecture Drivers, Technology Stack, Data Storage, Service Boundaries, Third-Party Services, Libraries, Architecture Decisions, System Architecture and UI Surfaces) and at least one Mermaid diagram.

Before you run it

  • The SRS must be approved. Until it is, /tad is locked with "Approve Requirements Spec to unlock this". The run also needs the scope and SRS documents in the project state; if one is missing it stops with a message such as "Cannot write the Technical Architecture Document: srs artifact is missing from state.json. Run /srs first."
  • The agent receives the validated requirements, the compliance flags, the list of ids it may cite, and your notes on a Request changes run. It also gets the approved Scope and SRS documents exactly as people reviewed and edited them, and treats them as authoritative where they differ from the data.
  • A project whose SDS was produced before the TAD step existed counts its TAD as approved and keeps its SDS. See How the pipeline works.

How it works

TAD makes one skill call, sdlc-technical-architect. The reply is one JSON object with five keys: markdown, and the typed parts decisions, elements, trustBoundaries and uiSurfaces. The bridge checks the reply and keeps every problem, hard or not, on the draft for the reviewer.

Flow
  • Approved scope, requirements and compliance flags to sdlc-technical-architect
  • sdlc-technical-architect to Hard problem found?
  • Hard problem found? to Keep the draft, list the open checks, Yes
  • Keep the draft, list the open checks to Attach remaining notes for the reviewer
  • Hard problem found? to Attach remaining notes for the reviewer, No
  • Attach remaining notes for the reviewer to Bridge adds the Decision Register
  • Bridge adds the Decision Register to Write tad-vN.md and save tadModel
  • Write tad-vN.md and save tadModel to Threat Model reads trust boundaries
  • Write tad-vN.md and save tadModel to Prototype reads UI surfaces
  • Write tad-vN.md and save tadModel to SDS designs on the stack

Only some problems send the draft back. A hard problem is a required section that is missing, a requirement id that does not exist in the SRS (in the text or in the typed parts), or an empty document. The attempt is spent again only when a reply cannot be read or the document is empty; the first draft with any text is kept with its hard problems listed, and Fix failed checks then asks the agent to rewrite just the sections they sit in. The bridge makes no repair call by itself unless an operator allows more attempts. Everything else is a note: the draft is accepted and the note is shown above Approve.

NoteRaised when
Too few diagrams, or a diagram that does not start with a diagram typeThe document has no Mermaid block, or the block's first word is not a known type
Decision with no requirementA decision in decisions cites no REQ id. It is a preference, not a decision
Decision with no alternativeA decision has an empty alternativeRejected
Untraced elementAn element is not named in the System Architecture diagram, or cites no requirement
Typed part missing or malformeddecisions, elements or trustBoundaries is absent or empty, or rows were dropped for a bad id format. uiSurfaces may be empty
Local sign-in or mail design, or Poly-X not namedThe document designs password hashing, a login endpoint or an SMTP sender, or discusses sign-in or notifications without naming Poly-X

The skill is told to use Poly-X for identity and notifications when the requirements need them, to record that as a TAD-NNN decision with at least one alternative, and to draw Poly-X in the diagram. The platform note is how the bridge checks it.

The run panel shows: Checking project state, Deciding the technical architecture, Writing the Markdown document.

Ids this step owns

IdMeaning
TAD-NNNAn architecture decision, with its requirement ids, the alternative rejected and the reason
TB-NNA trust boundary: where trust changes, such as internet to edge or services to a third party, and the elements it lies between
UI-NNA screen the product needs, with its users, what a person can do there and its requirement ids

The TAD cites requirement ids but does not create them; those belong to the SRS. Every REQ id it cites must exist.

Reviewing it

The TAD is a chain step: it finishes as Awaiting your review, and /sds stays locked until you approve it. Check that:

  • every stack, data and third-party choice cites real requirements and names the alternative that lost;
  • nothing the client has ruled out (a cloud, a licence, a language) appears;
  • every unit, store and external service in the diagram also appears in sections 4 to 6 under the same name;
  • the trust boundaries cover the places data crosses between trust levels, because the threat model checks itself against them;
  • the UI Surfaces list covers every user-facing requirement, since the prototype plans its screens from it;
  • the figures (versions, sizing) come from the requirements, not from the agent's imagination.

You can edit the draft while it is under review. The Decision Register and the version history stay as the bridge wrote them.

Request changes sends the agent the draft and your change list and asks for only what changes: the sections it rewrites and the decisions or elements it adds or removes. The bridge lays those on the previous draft, so everything you did not mention stays exactly as it was. The new draft keeps the same version number.

When it fails

What you seeWhyWhat to do
/tad locked: "Approve Requirements Spec to unlock this"The SRS is not approved yet.Approve the SRS.
"Cannot write the Technical Architecture Document: scope (or srs) artifact is missing from state.json."An upstream document is missing from the project state.Run the step it names.
"The agent did not return a usable reply."Every attempt returned something that could not be read, or an empty document.Run it again.
A draft with a "problems to fix" panelNotes from the table above were left on the draft.Read them, then Approve or Request changes.
Missing section or invented requirement id in the panelThe draft was kept as the agent wrote it.Press Fix failed checks, or request changes naming the section or the id.

Under the hood

  • The driver is bridge/src/services/tadPipeline.service.ts; the headings and diagram minimum are in bridge/src/lib/documentSpecs.ts and the typed-part rules in bridge/src/lib/documentQuality.ts.
  • The document is .sdlc/artifacts/tad-vN.md, registered as artifacts.tad. The draft and its reply are kept in .sdlc/tmp/tad-data.json while under review.
  • The decisions, elements, trust boundaries and UI surfaces are saved as tadModel in the project state, except from a draft that failed a contract check. /threat reads the trust boundaries from it and /proto reads the UI surfaces.
  • The SDS, the Prototype, the Threat Model, the API Contract, the Delivery Plan and the Proposal all receive the approved TAD as a source document. The compliance check reads it as evidence.