SDD for QA and Product (ft-sdd)

ft-sdd writes one Software Design Description (SDD) as a Word document in the approved Friendly template. It publishes an artifact, a page that Claude publishes, with the document as text you can select and copy, and the .docx and PDF as downloads. Each fact is checked in the code. An overview document does not write a fact that the agent cannot confirm: the report lists it under Unverified:. Every line and rule is on the reference page.

  1. YouSend the brief

    The worktree, the commit and the scope

  2. ft-sddCheck the facts

    Each fact, in the code at Tip:

  3. ft-sddWrite the source

    doc.md, the six chapters of the shape

  4. GatesPass the gates

    Shape check, reader test, pre-show check, Word render, grep

  5. ArtifactPublish the page

    Real text, with .docx and PDF downloads

    PUBLISHED

Is ft-sdd the agent you need?

Find what you need. Open a row to see what comes out.

A design document for QA and product ("What changed") → ft-sdd

A Word document in the Friendly template, shown page by page in an artifact. Audience: overview is the default. It has six chapters: Change list, Requirements coverage, New and changed API, How to configure, Flows and Limits. The rules for each chapter are in overview.md.

A design document for developers and architects → ft-sdd

The same Word document and artifact, with Audience: technical.

Product documentation in the Antora portal → ft-doc-writer-agent

AsciiDoc pages in the docs root of the product.

The design of a feature before it is coded → ft-sdd

A human SDD with State: design, written before the code and approved by you. The design brief of ft-developer is internal.

A letter, a deck or another Word document → friendly-branded-docs

This skill builds a .docx or .pptx file in the company template. ft-sdd uses the same skill to build its document.

SDD names one thing on this page

SDD means the finished document that ft-sdd writes. The one-page design that ft-developer drafts before code is the design brief. The design brief is internal: nobody offers it as the SDD. Its template file is named SDD.md.

The full table is on the reference page.

How you ask for a document

In the main loop, type Use ft-sdd. and paste a brief. The main loop is the Claude Code session in which you talk to the agents.

A new document

Claude Code
Use ft-sdd. Repo: /path/to/worktree Tip: feature/profiles@a1b2c3d Scope: DEV-1234 device profiles, phases P0-P8 Audience: overview — QA testers write test cases from it Baseline: release/6.4@9f8e7d6 API docs: https://<test host>/swagger/openapi.json Test env: https://<test host>/rest, users qa_admin, qa_user Sources: src/main/java/..., run journals, vault hub Exclude: MQTT, HTTP data receiver

Replace each value with your own. The lines answer the ten intake questions (I1-I10). The main loop can answer them itself. To rewrite a published document at the same URL, add an Artifact: line to this brief.

A fix to a published document

Claude Code
Use ft-sdd. Repo: /path/to/worktree Tip: feature/profiles@a1b2c3d Scope: device profiles, phases P0-P8 Mode: repair Artifact: https://claude.ai/artifact/<id> Feedback: 1. Section 3 names the wrong default for the profile timeout. 2. The glossary lacks the term "profile group".

Launch a fresh ft-sdd with the same Repo: and Scope:, and Tip: when the state is delivered. State:, Tip: and the other intake answers come from the ledger file intake.md. A document from an older version of the agent still has them in its Intake table. The agent checks each correction in the code before it applies it.

Send one ft-sdd, and nothing else

Do not write the document with a fork or a general-purpose agent. A fork carries the whole conversation and costs more. Do not set a model: the agent definition runs it on Opus.

Which line each job needs

solid dot Solid: write this linehollow dot Hollow or dashed: optionalEmpty: leave it out. Open a line to read what it does.

LineNew documentRewrite at the same URLRepair
Repo:

The worktree that the agent reads. It never writes there. Required in both states: without it the agent returns NEEDS_INPUT — I3.

New document: write itRewrite: write itRepair: write it
State:

design when the feature is not coded yet: the agent checks the Today facts at Baseline:. delivered when the code is at Tip:. Without State:, a Tip: means delivered. A repair takes it from the ledger.

New document: write itRewrite: write itRepair: optional
Tip:

The branch and commit where the agent checks the facts. Write it as branch@commit. Required for State: delivered, and it must resolve in Repo:. With State: design, leave it out.

New document: optionalRewrite: optionalRepair: optional
Scope:

I4. The tickets, SOW items or phases. The scope always also covers every behaviour change in the diff from Baseline: to Tip:.

New document: write itRewrite: write itRepair: write it
Mode:

write is the default. repair verifies and fixes an existing artifact.

New document: optionalRewrite: optionalRepair: write it
Artifact:

The URL to update in place. A write run with this line rewrites that document at the same URL.

Rewrite: write itRepair: write it
Feedback:

The corrections, as a numbered list.

Repair: write it
Audience:

I1. The variant, then a dash, the reader and their task. overview is the default variant, for QA and product. technical is for developers and architects. A repair takes it from the ledger.

New document: write itRewrite: write itRepair: optional
Baseline:

I2. The ref that holds the last release. "Before" means this release. It has no default. A repair takes it from the ledger.

New document: write itRewrite: write itRepair: optional
API docs:

I7. The Swagger or OpenAPI URL, or none. With none, the document says that no description is published. A repair takes it from the ledger.

New document: write itRewrite: write itRepair: optional
Test env:

I6. The base URL and the test user names where readers test. Never a password or token.

New document: optionalRewrite: optionalRepair: optional
Config:

I8. The config surfaces that change. By default the agent derives them from the diff.

New document: optionalRewrite: optionalRepair: optional
Known issues:

I9. list (default) lists known issues in the document. omit keeps them in the report.

New document: optionalRewrite: optionalRepair: optional
Pages:

I10. The main-body page cap. The default is 15 pages. Appendices do not count.

New document: optionalRewrite: optionalRepair: optional
Sources:

Code paths, run journals, vault notes and real UI captures.

New document: optionalRewrite: optionalRepair: optional
Exclude:

I5. Features that the document never names, not even as removed.

New document: optionalRewrite: optionalRepair: optional
Golden:

Artifact URLs whose structure and depth the document matches.

New document: optionalRewrite: optionalRepair: optional
Pre-show:

skip — checkpoint D SOUND <journal path>. The agent reads the journal and honours the line only after verifying the last matching journal block. Any other Pre-show: line is not honoured and the check runs.

New document: optionalRewrite: optionalRepair: optional

What you get back

The document is Word. The artifact shows the same source as text you can select and copy, and the Word file and the PDF are downloads.

Artifact › Example SDD

Example SDD

SDD 1.0

Word (.docx)PDF
Part of the pageWhat it holds
Contents railEvery section, beside the text
OpeningTitle, kicker, subtitle, the Draft note if any, Contents
Numbered sectionsThe story, for your audience
ChaptersThe six chapters of an overview
IllustrationThe artifact shows the document as text under two download buttons.
  • One URL

    The agent updates a document in place, so the link stays the same.
  • Links that work

    Each Contents entry links to its heading in the .docx, in the PDF and on the page.
  • The source stays with it

    The artifact keeps source/doc.md and its figures. The next update rebuilds from them.

How the Word file is built

One command, word-pages.py, runs these four steps on doc.md. The page images of step 3 are for the agent to look at, and they are not published.

  1. 1

    Build

    It builds the .docx in the approved template. The template supplies the look.

    Automatic
  2. 2

    Check

    It runs the structure check of the skill. The check must pass.

    Automatic
  3. 3

    Render

    It renders every page in real Word, on macOS or Windows. Without Word, the document is a draft.

    Automatic
  4. 4

    Stage

    It stages the text page, both downloads and the source, and checks that every link resolves.

    Automatic

What is inside the document

The Audience: line picks one of two section lists. These are the Contents, in order.

Contents › Audience: overview

For QA and product

The default.

1Change list: C-01 to C-NN, from the code diff
2Requirements coverage
3New and changed API
4How to configure
5Flows
6Limits
IllustrationThe six chapters of an overview document. The rules for each chapter are in overview.md.
Contents › Audience: technical

For developers and architects

Only when you ask for it.

1Purpose and scope
2Change list
3Context and constraints
4Architecture, with one diagram
5The worked example end to end
6Components as reference
7Decisions: options, choice, why
8Data and contracts, with the new and changed API
9Failure modes and limits
10Testing and verification
11Open items and unverified facts
12Glossary
IllustrationThe Contents of a technical document.
  • A change list first

    Every behaviour change in the diff, as C-01 to C-NN. Each entry says where QA sees it and how to trigger it.
  • A source on every rule

    Each rule carries OWNER, SPEC, SPEC-INFERRED, DESIGN or LEGACY. A technical document shows the tag. An overview keeps the tag in the fact ledger, and the text shows none.
  • One worked example

    A technical document runs it through the whole text. It uses real shipped files and synthetic device data.
  • Linear reading

    Each section answers one question and leads into the next.
  • Short tables

    A table has at most four columns. Each row has an example from a real file.
  • No status labels

    The document has no "Merged", "Ready" or "In progress" tags. The only status text is the Draft note of a draft overview.

The rest is on the reference page: writing rules and layout rules.

How it keeps the facts right

Each fact has one path: the code proves it, or the document says that nothing proves it.

  1. 1. A fact enters the text

    Any rule, value, default, label or URL that the document states.
  2. 2. Does the code at Tip: confirm it?

    A journal or a vault note is only a lead.
    • YESIt stays as a fact.
    • NOIt is marked unverified and listed under "Open items and unverified facts".
  3. 3. The ledger records it

    Each line reads claim → file:line @ <tip>. The ledger lasts across runs, and the agent only adds to it.
  4. 4. On a later run, did its file change?

    The agent compares each fact's tip with the new tip by git diff.
    • YESIt checks again. A changed fact gets a new line that supersedes the old one.
    • NOThe fact stands with no new check.

What counts as proof

A "before" or "previously" claim → git show <baseline>:<path>

A state that existed only on a development branch never shipped. So it is not a "before".

A button label, route or URL → the UI source

The agent takes these from the UI templates, i18n files and route tables.

A made-up id in an example → a search that finds nothing

The agent searches the shipped resources and test fixtures for the id. The id must not be there. Example ids are marked as synthetic.

The branch moves during the run → the new head

The agent checks against the new head and says so.

Customer data stays out

The document has no serials, MACs, IP addresses, device values, customer names or credentials. The only addresses allowed are the Test env: and API docs: URLs. The agent never opens raw customer traces or customer spreadsheets.

Gates before publishing

They run in this order before every publish. The agent fixes a failed gate. It does not skip the gate.

  1. 1. Shape check

    For overview, the script shape-check.py checks doc.md against the rules H1 to H15 of overview.md.
    • PASSThe script exits 0.
    • BREAKThe agent fixes the break. If it needs the owner, the status is NEEDS_INPUT — shape H<n> and nothing is published.
  2. 2. Reader test

    A fresh general-purpose agent on Sonnet reads only doc.md and does the reader tasks.
    The tasks

    For overview, tasks 1 to 6: 5 test cases from the change list for the riskiest entry and one picked at random, with a list of what the tester could not determine; a made-up second group or object; the tables and row keys of each figure; behaviour the change does not touch and every library or version named; names it cannot find; 3-5 QA questions. For technical, a made-up device that the document does not use and a transfer task (a field and a link that change together). The tester writes nothing.

    • PASSNo guesses, no wrong answers, nothing left undetermined.
    • GAPEach guess, wrong answer or undetermined item that the document should answer is a gap, and the agent fixes it.
  3. 3. Source tags

    For technical, the agent checks that every normative rule carries a tag.
    • PASSEvery rule is tagged.
    • DEFECTAn untagged rule is a defect, and the agent fixes it.
  4. 4. Pre-show check

    Two verifier lenses, Security and Correctness, read doc.md against the code at Baseline:. The check reviews the design before you see the document.
    When it runs, and what it costs

    It runs on State: design in write mode. It also runs on a repair whose feedback changes a design statement, and when a Feedback: item says run the pre-show check. It does not run on a wording-only repair after a checked revision. No Pre-show: line turns the check off for a delivered document. There are at most 3 checks per ledger. run the pre-show check on a lost preshow.md starts a new ledger at check 1 of 3. The owner is asked only on cap 3 reached. A check is two Opus runs, so six at most per ledger. A Feedback: item extend the pre-show cap by 1 allows one more.

    • PASSThe report shows both verdicts.
    • OBJECTIONThe agent fixes what needs no owner decision. The rest comes back as Design questions:.
  5. 5. Word render

    word-pages.py builds, checks and renders the file and checks the links of the page. The agent looks at every Word page. LibreOffice still gives a published draft. With no PDF renderer at all (no Word, no LibreOffice), nothing is published.
    What it looks at

    The title page, numbering, tables, figures, code blocks and the page count.

    • PASSEvery page is right.
    • DEFECTThe agent fixes doc.md and runs the command again.
  6. 6. Draft decision, restage and second shape check

    The agent decides the status. A gate that did not run makes it DRAFT, and the note goes into doc.md. Then word-pages.py again stages the page, source/doc.md and the PDF from the decided doc.md.
    • PASSThe shape check runs a second time with the decided status and exits 0.
    • BREAKThe agent fixes the break. Nothing is published without exit 0.
  7. 7. Grep

    The agent searches doc.md for excluded features, status labels and secrets. It looks at every figure and screenshot for the same.
    • PASSNo hits.
    • HITA hit is a defect, and the agent fixes it.
  8. 8. Publish

    The agent publishes the page to the same URL.
    • PUBLISHEDAll gates ran.
    • DRAFTA gate could not run, and the page still goes out. The one exception is no PDF renderer at all: then nothing is published. An overview then shows > Draft: <gate> not run. after the subtitle.
A gate that cannot run gives a draft

This happens with no Word, no browser for a figure or no sub-agent. LibreOffice still gives a published draft. A pre-show check that did not run is a draft too. The document is still published and is marked Draft. The shape check is a script, so it always runs: if it does not exit 0, nothing is published. LibreOffice is only an approximation, so it does not count as a Word render. The one exception is no PDF renderer at all (no Word, no LibreOffice): then nothing is published.

What it reports, and what you do next

The report starts with one of four statuses. Every other field is on the reference page.

PUBLISHED
Open the URL in the report. Read the text, select and copy it, or download the .docx or the PDF. To correct a fact, send a repair brief.
DRAFT
The status is DRAFT — <gate> not run. The document is published, but a gate did not run. The report names the gate and the reason. With no PDF renderer at all, nothing is published. The agent does not offer the document for approval.
NEEDS_INPUT
A required intake answer is missing: Audience: with the reader, Baseline:, Repo: (in both states), State: or Tip:, Scope: or API docs:. Or repair has no Artifact:. The status names the missing ids. The agent did no work. Add the lines and send the brief again. NEEDS_INPUT — shape H<n> is different: the document breaks a shape rule that the agent cannot fix without you. Nothing is published, and each break comes back as a Design questions: line.
CONTEXT_RESET
The context passed about 200K tokens. The agent finished its section and wrote a handoff to state.md. The status line gives its path. Launch a fresh ft-sdd with the prompt on this page.
Claude Code, after CONTEXT_RESET
Resumed from a reset. State: <state.md path> <the original brief, unchanged>
Replace both placeholders. The agent that returned is retired: do not send it a message.
The main loop relays the questions

The report can carry Design questions: and Limit questions:. The main loop gives you each one as a yes or no line. Your answers go into Feedback: of the next repair. Only the Feedback: item extend the pre-show cap by 1 extends the cap. The main loop does not present a document with Pre-show: NOT RUN or a DRAFT status for approval.

Questions

Does the agent change my repository?

No. It only reads the worktree. Its files live in its ledger and run directories, and in the artifact.

Does it shorten the text?

In write mode the agent cuts 25 to 30 percent of the words of the first draft and keeps every fact. repair mode has no cut target.

Which skills does it need?

The skills are mandatory, and the agent never skips one to save context. The reference page lists them by mode.

What happens if my brief has no Audience: line?

The agent writes the overview document and says so in its report.

Does the document show source tags?

An overview does not. The tag of each claim is in the fact ledger, and the document shows no tag, no requirement id outside two tables and no code name. A technical document shows its tags.

What is the pre-show check?

It is a cheap design review by two verifier lenses, Security and Correctness, before you see the document. It runs inside ft-sdd, at most 3 times per ledger. Each check is two Opus runs. The reference page says when it runs.

Can I use it for portal pages?

No. Product documentation in the Antora portal goes to ft-doc-writer-agent.

Where to go next

This page shows how a document comes to exist. These pages hold the rest.

The internal design briefThe one-page design that ft-developer codes from, in Writing a Design Brief.
All agents and skillsWho does what in Claude Toolkit.
SDD for QA and Product Reference