prd-to-spec
Use when given a rough PRD, feature request, or raw requirement. Turns it into a spec update, an RFC when the change is significant or contested, and an ADR for hard-to-reverse decisions.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- prd-to-spec
- description
- Use when given a rough PRD, feature request, or raw requirement. Turns it into a spec update, an RFC when the change is significant or contested, and an ADR for hard-to-reverse decisions.
03 SKILL.md 正文
prd-to-spec
The agent-executable form of CONTRIBUTING.md#development-flow.
Prerequisites
- The PRD (external; never commit it wholesale, and never copy private material into this public repository).
- Existing contracts in
specs/and decisions indecisions/.
Workflow
- Frame: problem, users, scope, non-goals, acceptance criteria, security
and privacy impact (does it touch a key, a token, or personal data?), and
what, if anything, it emits. List open questions, then ask the human with
ask-the-human rather than invent. What the
human defers and does not block the spec becomes a
<!-- TODO -->; a blocking gap keeps the spec from being handed off as ready. - Locate: which specs, packages, and contracts are affected? Which ADRs constrain the solution? Which of them are backend-owned contracts (name them, do not copy private text)?
- Route:
- small, well-understood → update the spec(s) directly;
- significant, cross-cutting, or contested → write
rfcs/active/RFC-NNN-<slug>.mdfrom the RFC template (statusdraft); - hard-to-reverse choice (dependency, protocol, package structure, supply
chain) →
decisions/ADR-NNN-<slug>.mdfrom the ADR template.
- Write the spec (template: spec.md): contract, invariants, errors, security, and what it emits.
- Check readiness (definition of ready): spec agreed or RFC accepted; acceptance criteria written.
- Hand off to the implementer with the list of spec sections and tests expected.
- When an RFC is accepted: fold it into specs (+ ADR), set status
archived, move it torfcs/archived/.
Constraints
- Specs describe current/accepted behavior, not wishes; proposals stay in RFCs.
- Mark unknowns with
<!-- TODO -->; never fabricate versions, scopes, hostnames, or contract details. - Never overwrite an ADR; supersede it with a new one.
- Public repository: no secrets, internal hostnames, dashboard links, personal data, or unpublished backend internals.
Expected output
Spec diff (and RFC/ADR when routed there) plus a short hand-off note.
References
04 同仓库更多 Skills
<skill-name>
Use when <situation>. One or two sentences.
write-tests
Use when adding or changing behavior, signing code, contracts, or the UI. Chooses the right test level and applies the repository's test rules.
spec-drift-sync
Use before merging any non-trivial change. Reconciles code with specs, and code/specs with memories, runbooks, and telemetry docs (Spec Drift Synchronization).
shepherd-a-pull-request
Use when reviewing a pull request on GitHub, following up on a review after new pushes, or answering review comments on your own pull request. The `gh` procedure behind the pr-shepherd agent, with draft-then-confirm posting.
ask-the-human
Use when you hit an open question, a decision that is not yours to make, a gap or ambiguity in a spec, or a draft that needs a human's confirmation. Asks through the host's structured-question tool with concrete options and a recommendation, instead of guessing or burying the question in prose.
add-a-package
Use when adding a new package under packages/ (or an app under apps/). Covers the placement check, the dependency direction, public API, wiring, tests, and docs.