A plan says what to build. It does not say when the work is complete. Without written
requirements, the agent decides the details while it writes code, and a reviewer cannot tell
a defect from a choice. This skill writes each requirement with an acceptance criterion that
a test can check. It cites the code of today as path:line, so a reader can see
what changes.
When to use it
Use it after the one-pager is approved, or when you ask for a product spec or a requirements
document. It has two variants: Standard, for a change to a thing that exists, and Greenfield,
for a new product with no code to describe.
Find the one-pager. An approved one-pager is the first source. If it is not approved, the agent tells you and recommends that you wait.
Read. The code that the feature touches, the config, and prior art from other products.
Interview. With an approved one-pager, few questions remain. With no one-pager, a PRD is a large task: 11 to 20 questions.
Make the page.prd new writes a small page and links it with the one-pager, in the two directions.
Write the page. The current state, the proposed state, FR and NFR requirements with Given / When / Then criteria, decisions, diagrams and work items.
Build and check.check finds a placeholder, a diagram element with no explanation, and a cited path that is not in the repo.
Offer a design review. When a decision card has two or more real options, the agent offers a design review. It starts one only with your yes. The card then shows "In review" and a link.
Wait for the review. The PRD stays a Draft while a linked review is not applied. prd check refuses the status In review or later until then. After the close, the agent moves the chosen option on each card, with your approval.
Work items. After approval, the agent can make the issues in your tracker. It asks first.
The interview from a real run
The one-pager answered most questions, so the agent found 16 answers and asked 2. The
one-pager was In review and not approved. The task told the agent to continue, so the PRD
stays a Draft.
The request
write the PRD
The agent found these answers in the repo. It did not ask these questions.
There is no approved one-pager for this feature. Do you want one first?
A one-pager for the feature exists, with the status In review. It is not approved.
Developers who test machines with @switchyard-ts/test.
Source earlier interview (one-pager section 1)
Which persons in the company must review this, or get a change from it?
None. The project has one maintainer and no company teams.
Source git log (one author), no CODEOWNERS file
What does a reader expect that this PRD does not do?
The 'Not in scope' answer of the one-pager.
Source earlier interview
Which scenario is most important, and which error case must work?
Main: run the tests, run switchyard coverage, read the transitions that no test took. Error cases from the code: no report file, and a report whose transitions do not agree with the class of today.
The writer goes in packages/test/src/index.ts next to coverage(); the command goes in packages/cli/src/index.ts with its logic in a new packages/cli/src/coverage/ folder, as design/ does. How the data goes from the test run to the CLI is an architecture decision: the adr skill records it.
Which data does the feature add or change, and does old data need a backfill?
One new JSON report file. No model, no table, no backfill.
Source earlier interview (one-pager section 6)
Which screens change, and what shows them in the PRD?
The three ui/ mock-ups of the one-pager.
Source earlier interview
Which product or UX standard is the best example for this job?
nyc (raw files, then a report command that merges), @xstate/test version 4 (testModel.testCoverage() in the test process) and WCAG 2.2 criterion 1.4.1.
What is not known and needs research, and what do we want but not commit to?
One spike: how a page gives data to testem in testem ci (FW-1). Two stretch goals: the --min gate (FW-2) and tracking with no call (FW-3). QUnit browser runs are in scope after the scope answer.
Source earlier interview
Which decisions in this plan had a second good answer?
DEC-1 surface, DEC-2 runners, DEC-3 transport (it gets the ADR), DEC-4 count of files, DEC-5 if the command loads the machine module.
A skip rule of the question bank removed these questions.
Which endpoints change, and who can call them?
Skip when the feature has no API: it is a CLI command and a library function.
Which teams do the work, and what is the unit of the estimates?
Skip when the repo has one team: one maintainer.
For each regime in the config: does it apply to this change?
Skip when the answer about sensitive data decides each regime: no sensitive data, and prd.regimes is empty, so the PRD has no compliance section.
The maintainer saw these questions. The first option is the recommended one.
MetricQuestion 1 of 2
Which result shows, with a number, that the switchyard coverage command of switchyard works?
Same countsRecommendedChosen
For each machine in the test suite of switchyard, the command prints the same state and transition counts as coverage().report() in the test process: 100% agreement, and a test can prove it.
Used in the gate
The gate of switchyard runs the command on its own packages and the guide machines, and the count of machines with a report is the number.
No number is known
The PRD records the metric as an open question and the goals stay in words.
LimitQuestion 2 of 2
Which limit must the switchyard coverage feature of switchyard keep?
Test timeRecommendedChosen
The writer adds 5% or less to the time of pnpm test, measured on the test suite of switchyard; a slow recorder makes people turn it off.
Command time
switchyard coverage finishes in 2 seconds or less for 50 machine classes, measured in a CLI test with fixtures.
No new dependency
@switchyard-ts/test and @switchyard-ts/core get no new runtime dependency; the limit is a count of 0 in each package.json.
No limit is known
The PRD has one NFR with an open question, and the limit is decided before approval.
The agent recorded these assumptions. Nobody answered them.
The one-pager has the status In review, not Approved. The skill says: tell the user, recommend approval, and the user can tell the agent to continue. The task of this run told the agent to continue. The PRD stays a Draft.
Which personal or sensitive data does the feature touch? None (the recommended option). prd.regimes is empty by default, so the PRD has no compliance section: its security section says that the feature touches no personal data. Nobody asked the maintainer.
Prior art: nyc, @xstate/test (version 4) and WCAG 2.2 criterion 1.4.1, from a web search by the agent on 2026-12-02.
The walkthrough link is empty: the feature is not built. This is permitted only while the status is Draft.
The names toJSON, writeCoverage, CoverageData, switchyardCoverage, SWITCHYARD_COVERAGE_DIR, the file name pattern, the 5 MB limit and the --clean option are proposals of the agent.
The error case "no report files" (FR-7) is a choice of the agent from the code.
DEC-4 (one file for each process) and DEC-5 (the command does not load the machine module) are choices of the agent from the code.
Estimates are points, and the team is "Maintainer".
The artifact from that run
The PRD has 6 diagrams with a Current / Proposed control, and it shows three mock-ups of the
one-pager in frames. It links the ADR of its decision DEC-3.
Its decision DEC-4 shows "In review": it links the open design review,
so the PRD stays a Draft.
The page is 159 kB. It loads the diagram library from one shared file,
_assets/mermaid.min.js. Each mock-up frame opens in the state that its title names.
The run took 13 minutes of agent time. check passed the first time. The run also found these problems:
Fixed: a built page was 3.7 MB, and the agent could not read it to edit it.prd new built the page at once, with the diagram library in it. Now
new writes a small page, build fills it, and the library is one
shared file in _assets/. The page above is the result: 159 kB.
Fixed: a PRD could not go to In review before the feature was built.check wanted a walkthrough link, and a walkthrough needs real screenshots of
the built feature. The link can now be empty in each status before Shipped.
Fixed: an open-source library got three compliance rows.
With no config, the PRD used HIPAA, CCPA and GDPR as defaults. Now a repo has no compliance
regime unless prd.regimes names it, and the page above has no compliance section.
Fixed: a mock-up in the PRD always opened in its start state.
One frame showed an empty terminal. A frame can now name its state in the URL, for example
ui/text-report.html#step=first. The API section also knew only HTTP endpoints:
a card can now be a library function or a CLI command.
Config keys
All keys are optional. The livery keys apply to each page.
Key
Default
Meaning
Who reads it
docs.prd
docs/prd
The folder of the PRD pages.
CLI
prd.audiences
[]
The customer groups. With a list, #customers needs data-customers.
CLI: src/prd/check-base.ts
prd.regimes
[]
The compliance regimes of the repo, for example ["HIPAA", "GDPR"]: one row each in #compliance. With no regime, a PRD has no compliance section.