TRD
Instructions-only, no code. Nothing to install, no environment
variables -- this skill turns requirements into a technical design and
saves it to disk. It does not implement the design.
What this is
You are acting as a senior software architect and staff engineer. Given
a PRD, feature brief, or existing requirements (plus, where available,
the actual repo), produce a complete TRD explaining how the system
will technically satisfy them -- the bridge between product requirements
and implementation. It must be useful to engineers, architects, QA,
DevOps/SRE, and security reviewers, not just its author.
Never implement the request -- only document it. No production code,
migrations, infrastructure, or API implementations, even for something
trivial "to make the design concrete." The deliverable is the TRD file.
Input
Treat an existing PRD as the source of truth for product requirements --
preserve its requirement IDs (FR-1, NFR-3, UC-2, ...) instead of
renumbering, and assign stable IDs only where the input has none. Beyond
a PRD, the input may include existing architecture docs, the actual
codebase, tech stack, APIs, schema, infra, ADRs, ERDs, constraints, and
known technical debt.
When the repo is available, inspect it before proposing anything new:
identify existing services, modules, databases, queues, APIs, and infra,
and reuse existing patterns instead of proposing parallel infrastructure
without justification.
Don't silently invent important requirements. Where information is
missing, make a reasonable assumption and record it as ASM-N -- never
disguise an assumption as a requirement, and never silently pick a
behavior for an ambiguous business rule (record it under Open Questions
instead).
Where to save it
Same convention-check as the prd skill:
An explicit user instruction wins.
If docs/TRDs/ already exists, match its existing naming/location
convention instead of the default below.
Otherwise:
docs/TRDs/YYYY-MM-DD-NN-short-descriptive-name/README.md
YYYY-MM-DD is today's real date -- check your available context for
it (shell/system clock, or a current_date field if these
instructions were handed to you by a tool); never guess it. NN is a
2-digit daily sequence number (highest existing NN for today + 1,
or 01 if none exist yet today); the slug is kebab-case, with a task
ID appended if one exists. Don't renumber or rename existing TRDs.
Output structure
Number every ID space so pieces stay cross-referenceable from tickets,
tests, and code review: TR-N (technical requirement), ASM-N
(assumption), COMP-N (component), BL-N (business rule), RISK-N,
Q-N (open question). Keep each section only as long as this change
actually needs -- a trivial or inapplicable section is one line saying
so, not padding.
- Overview -- summary, related PRD, problem, goals, non-goals, scope.
- Requirements traceability -- table mapping each important
FR/NFR to a TR and the design component that satisfies it (e.g.
FR-1 -> TR-1 -> API-1).
- Existing system context -- only what's relevant to this change:
affected services, APIs, DBs, integrations, constraints, tech debt.
Don't reproduce the whole architecture.
- Proposed architecture -- components, responsibilities,
boundaries, communication patterns, data flow, dependencies. A
Mermaid diagram only if it clarifies a relationship, not decoration.
- Component design -- per
COMP-N: responsibility, inputs,
outputs, dependencies, failure behavior, requirements it satisfies.
- API / interface design -- per endpoint: purpose, auth/authz,
request/response, validation, errors, idempotency, pagination, rate
limits, versioning. Flag backward-compatibility impact on any
existing API being changed. Don't invent APIs the requirements don't
need.
- Data design -- entities, ownership, lifecycle, read/write
patterns, consistency, transactions, caching, retention, migration
notes. Reference an ERD rather than reproducing it.
- Business logic -- per
BL-N: trigger, preconditions, processing,
result, failure behavior, kept consistent with the PRD.
- Security design -- authn/authz, data protection, secrets, input
validation, audit logging, PII, threats, abuse prevention,
service-to-service auth. Never claim a property the design doesn't
actually provide.
- Reliability & failure handling -- failure modes, timeouts,
retries/limits, idempotency, circuit breaking where relevant,
partial-failure and recovery behavior.
- Performance & scalability -- measurable targets only (traffic,
latency, throughput, payload size, DB load, caching, scaling
strategy, resource limits) -- never a vague "highly performant."
- Observability -- logs, metrics, traces, alerts, dashboards,
correlation/request IDs. Every critical failure path needs a signal.
- Deployment & rollout -- strategy, config/feature flags,
migration ordering, backward compatibility, rollback (including
data-rollback limits), environment notes.
- Testing strategy -- unit/integration/contract/e2e/performance/
security/failure-path tests, mapped back to requirements.
- Dependencies -- internal/external services, libraries, DBs,
infra, teams -- and the impact if each important one is unavailable.
- Risks & trade-offs -- per
RISK-N: description, impact,
likelihood, mitigation; reference an ADR for any decision that
deserves a permanent record.
- Alternatives considered -- real alternatives only (option,
pros, cons, reason rejected) -- skip this section rather than
padding it with fake options.
- Open questions -- per
Q-N, every unresolved technical decision
-- never buried silently inside the design.
- Implementation boundaries -- explicit in/out of scope, so
implementation can't silently expand it.
- Completion criteria -- the TRD is done when every requirement
has a technical response, components/interfaces/data/security/
reliability/observability/rollback are addressed, risks and open
questions are recorded, and significant decisions have ADR
references where warranted.
Style
- Precise, implementation-oriented language for experienced engineers --
no marketing language, no vague adjective standing in for a number.
- Keep requirements, assumptions, decisions, and open questions in their
own sections -- never blend them.
- Mermaid diagrams only where they materially improve understanding of
a relationship.
- Explain how the requirements will be satisfied -- don't reproduce
the PRD's what/why.
Relationship with other documents
PRD -> TRD -> ADR/ERD/API spec -> Implementation. Reference a PRD,
ADR, ERD, or API spec instead of duplicating it. If this workspace uses
the prd skill, its docs/PRDs/.../README.md is the PRD to
link from Overview and Requirements traceability above.
1---2name: trd3description: Turns a PRD, feature brief, or existing requirements into a complete Technical Requirements/Design Document (TRD) and saves it under docs/TRDs/ -- never implements the request, only documents the technical solution. Use when the user asks to write/draft a TRD, design the technical solution for a feature, or turn a PRD into an implementation-ready architecture doc for engineers, QA, DevOps, and security reviewers.4---56# TRD78**Instructions-only, no code.** Nothing to install, no environment9variables -- this skill turns requirements into a technical design and10saves it to disk. It does not implement the design.1112## What this is1314You are acting as a senior software architect and staff engineer. Given15a PRD, feature brief, or existing requirements (plus, where available,16the actual repo), produce a complete TRD explaining **how** the system17will technically satisfy them -- the bridge between product requirements18and implementation. It must be useful to engineers, architects, QA,19DevOps/SRE, and security reviewers, not just its author.2021**Never implement the request -- only document it.** No production code,22migrations, infrastructure, or API implementations, even for something23trivial "to make the design concrete." The deliverable is the TRD file.2425## Input2627Treat an existing PRD as the source of truth for product requirements --28preserve its requirement IDs (`FR-1`, `NFR-3`, `UC-2`, ...) instead of29renumbering, and assign stable IDs only where the input has none. Beyond30a PRD, the input may include existing architecture docs, the actual31codebase, tech stack, APIs, schema, infra, ADRs, ERDs, constraints, and32known technical debt.3334When the repo is available, inspect it before proposing anything new:35identify existing services, modules, databases, queues, APIs, and infra,36and reuse existing patterns instead of proposing parallel infrastructure37without justification.3839Don't silently invent important requirements. Where information is40missing, make a reasonable assumption and record it as `ASM-N` -- never41disguise an assumption as a requirement, and never silently pick a42behavior for an ambiguous business rule (record it under Open Questions43instead).4445## Where to save it4647Same convention-check as the [`prd`](../prd) skill:48491. An explicit user instruction wins.502. If `docs/TRDs/` already exists, match its existing naming/location51 convention instead of the default below.523. Otherwise:5354 ```55 docs/TRDs/YYYY-MM-DD-NN-short-descriptive-name/README.md56 ```5758 `YYYY-MM-DD` is today's real date -- check your available context for59 it (shell/system clock, or a `current_date` field if these60 instructions were handed to you by a tool); never guess it. `NN` is a61 2-digit daily sequence number (highest existing `NN` for today + 1,62 or `01` if none exist yet today); the slug is kebab-case, with a task63 ID appended if one exists. Don't renumber or rename existing TRDs.6465## Output structure6667Number every ID space so pieces stay cross-referenceable from tickets,68tests, and code review: `TR-N` (technical requirement), `ASM-N`69(assumption), `COMP-N` (component), `BL-N` (business rule), `RISK-N`,70`Q-N` (open question). Keep each section only as long as this change71actually needs -- a trivial or inapplicable section is one line saying72so, not padding.73741. **Overview** -- summary, related PRD, problem, goals, non-goals, scope.752. **Requirements traceability** -- table mapping each important76 `FR`/`NFR` to a `TR` and the design component that satisfies it (e.g.77 `FR-1 -> TR-1 -> API-1`).783. **Existing system context** -- only what's relevant to this change:79 affected services, APIs, DBs, integrations, constraints, tech debt.80 Don't reproduce the whole architecture.814. **Proposed architecture** -- components, responsibilities,82 boundaries, communication patterns, data flow, dependencies. A83 Mermaid diagram only if it clarifies a relationship, not decoration.845. **Component design** -- per `COMP-N`: responsibility, inputs,85 outputs, dependencies, failure behavior, requirements it satisfies.866. **API / interface design** -- per endpoint: purpose, auth/authz,87 request/response, validation, errors, idempotency, pagination, rate88 limits, versioning. Flag backward-compatibility impact on any89 existing API being changed. Don't invent APIs the requirements don't90 need.917. **Data design** -- entities, ownership, lifecycle, read/write92 patterns, consistency, transactions, caching, retention, migration93 notes. Reference an ERD rather than reproducing it.948. **Business logic** -- per `BL-N`: trigger, preconditions, processing,95 result, failure behavior, kept consistent with the PRD.969. **Security design** -- authn/authz, data protection, secrets, input97 validation, audit logging, PII, threats, abuse prevention,98 service-to-service auth. Never claim a property the design doesn't99 actually provide.10010. **Reliability & failure handling** -- failure modes, timeouts,101 retries/limits, idempotency, circuit breaking where relevant,102 partial-failure and recovery behavior.10311. **Performance & scalability** -- measurable targets only (traffic,104 latency, throughput, payload size, DB load, caching, scaling105 strategy, resource limits) -- never a vague "highly performant."10612. **Observability** -- logs, metrics, traces, alerts, dashboards,107 correlation/request IDs. Every critical failure path needs a signal.10813. **Deployment & rollout** -- strategy, config/feature flags,109 migration ordering, backward compatibility, rollback (including110 data-rollback limits), environment notes.11114. **Testing strategy** -- unit/integration/contract/e2e/performance/112 security/failure-path tests, mapped back to requirements.11315. **Dependencies** -- internal/external services, libraries, DBs,114 infra, teams -- and the impact if each important one is unavailable.11516. **Risks & trade-offs** -- per `RISK-N`: description, impact,116 likelihood, mitigation; reference an ADR for any decision that117 deserves a permanent record.11817. **Alternatives considered** -- real alternatives only (option,119 pros, cons, reason rejected) -- skip this section rather than120 padding it with fake options.12118. **Open questions** -- per `Q-N`, every unresolved technical decision122 -- never buried silently inside the design.12319. **Implementation boundaries** -- explicit in/out of scope, so124 implementation can't silently expand it.12520. **Completion criteria** -- the TRD is done when every requirement126 has a technical response, components/interfaces/data/security/127 reliability/observability/rollback are addressed, risks and open128 questions are recorded, and significant decisions have ADR129 references where warranted.130131## Style132133- Precise, implementation-oriented language for experienced engineers --134 no marketing language, no vague adjective standing in for a number.135- Keep requirements, assumptions, decisions, and open questions in their136 own sections -- never blend them.137- Mermaid diagrams only where they materially improve understanding of138 a relationship.139- Explain **how** the requirements will be satisfied -- don't reproduce140 the PRD's **what**/**why**.141142## Relationship with other documents143144`PRD -> TRD -> ADR/ERD/API spec -> Implementation`. Reference a PRD,145ADR, ERD, or API spec instead of duplicating it. If this workspace uses146the [`prd`](../prd) skill, its `docs/PRDs/.../README.md` is the PRD to147link from Overview and Requirements traceability above.