For AI agents: the complete documentation index is available at https://docs.flezise.com/llms.txt, the full documentation bundle is available at https://docs.flezise.com/llms-full.txt, and this page is available as Markdown at https://docs.flezise.com/artifacts/specs/technical-design-specs.md.

Technical design specs

A technical design spec defines how to build what the requirements ask for, in a form an agent implements against. This page covers the three forms it takes and where each one fits in the artifact chain.

High-level design

The high-level design (HLD) translates the approved PRD into an architectural blueprint. It answers structural questions before any API or implementation detail is specified.

C4 levels

The design documents the system at four levels:

LevelWhat it shows
System contextThe system, its users, and the external systems it depends on
ContainersThe deployable units: services, databases, queues, and frontends
ComponentsThe major building blocks within each container and their interactions
DeploymentWhere containers run: hosts, regions, networking, and infrastructure

Technology stack

Each technology choice in the stack carries a version pin and a trade-off note: why this option, and what the alternatives gave up. The version pin makes the implementation reproducible across agent runs.

Architecture decision records

An architecture decision record (ADR) captures a key choice: the context that drove it, the options considered, the decision, and its consequences. ADRs are written at decision time and stay in the design permanently.

Non-functional requirement mapping

Each NFR from the PRD maps to the architectural decisions that satisfy it. This tracing lets a reviewer verify that every non-functional requirement has a design answer.

Contract index

The Contract Index names every operation in the system and which component owns it. Full request and response bodies are deferred to the owning feature spec; the index records the operation name and the owning component.

Interface and detailed design

The interface spec (ICD) and the detailed design expand the HLD into complete, implementable contracts.

OpenAPI 3.1 document

Each REST boundary gets one complete OpenAPI 3.1 document. The document covers:

SectionWhat it specifies
serversBase URL for each environment
Security schemesAuthentication methods and required scopes
Operation IDsA stable, unique identifier for each endpoint
ParametersPath, query, header, and cookie parameters with types and constraints
Request bodiesSchema, content type, and which fields are required
Reusable schemasShared types referenced across multiple operations
ExamplesAt least one request example and one response example per operation
ResponsesEvery success status and every error status, each with its schema

Error contract

All error responses share a single RFC 9457 ProblemDetails shape:

FieldPurpose
codeA stable, machine-readable error identifier
detailA human-readable explanation of what went wrong
traceIdThe trace identifier for correlating across logs and spans
errorsField-level errors for validation failures

A shared shape means clients parse errors the same way across every endpoint.

What detailed design adds

Beyond the API contract, a detailed design includes a C4 component diagram for each service, a sequence diagram for each significant flow, and the database schema with an entity-relationship diagram.

Coding standards

A coding standards spec (CS) sets the conventions the implementation run follows across the whole project:

  • Naming conventions for files, types, variables, and exported symbols
  • File and directory organization within each service or package
  • Error-handling patterns: how errors are wrapped, propagated, and logged
  • Testing expectations: coverage targets, required test kinds, and test organization
  • Linting and formatting rules and the exact tool configuration
  • Commit message conventions
  • Pull request review standards: what a reviewer checks and what a PR requires before merge

The coding standards spec drafts when the PRD is approved, alongside the high-level design, and applies to every coding run in the project.

Where technical design sits

The high-level design and coding standards draft as soon as the PRD is approved. The detailed design follows once the epic and the high-level design are both approved.

  1. PRD
  2. HLD + CS
  3. Detailed design
  4. Coding

Once approved, the technical design specs feed the coding run. The agent reads the interface spec, the approved coding standards, and the story to write code that matches the agreed contracts and conventions.

See requirements specs for the upstream spec the technical design depends on, and work items for how the coding run is dispatched.

Next steps