write-requirements-prd
Skill1 starsChanged 3 months agoMITView on GitHub
Draft, improve, review, or convert notes, business rules, permission matrices, state machines, design docs, prototypes, UI automation requirements, development plans, and test plans into structured, testable PRD-style requirements documents with DoR/DoD, RTM, acceptance criteria, evidence, and change governance. Use when the user asks to 编写需求文档, 生成PRD, 评审需求文档, 补强需求规范, 转换权限矩阵/状态机, 生成开发测试计划, or create Agent-ready traceable requirements.
In this repository22 other files it gives its agents.
- analysis-skillSkill
- auto-testcase-generatorSkill
- create-agent-skillSkill
- create-skillSkill
- development-systemSkill
- domain-modelingSkill
- figma-rest-syncSkill
- grill-systemSkill
- grill-with-docsSkill
- rag-change-impactSkill
- rag-downstream-handoffSkill
- rag-governanceSkill
- rag-intakeSkill
- rag-querySkill
- rag-schemaSkill
- rag-structure-fidelitySkill
- rag-systemSkill
- researchSkill
- session-handoffSkill
- skill-packagerSkill
- task-understanding-routerSkill
- ui-testSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 14 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 12
Default to HTML output when creating artifacts, unless the user explicitly requests Markdown, Word, JSON, or another format.
- Distinctive: line 14
Do not invent business facts.
- Distinctive: line 20
Do not include secrets, passwords, tokens, cookies, private keys, real credentials, or production-only account data in generated PRDs, …
- Distinctive: line 25
Treat business documents as the source of truth.
- Distinctive: line 27
When the input mixes requirement, development, and testing content, first classify the artifact type.
- Very specific: line 44
use references/document-type-routing.md when the user asks for a development plan, test plan, combined plan, or document review.
- Very specific: line 45
use references/dev-test-plan-contract.md when the output must include development tasks, test strategy, quality gates, execution evidence, …
- Very specific: line 55
If the artifact depends on external references, reference skills, products, standards, or literature, inspect the latest …
- Distinctive: line 58
document metadata and revision record.
- Distinctive: line 78
Add Agent-ready fields when the PRD will feed Codex, Midscene, Playwright, Solution D, or a testing Agent:
- Distinctive: line 79
test entry path and URL/route.
- Distinctive: line 88
test data and cleanup strategy.
- Distinctive: line 95
document type boundaries are respected.
- Distinctive: line 96
no sensitive information included.
- Very specific: line 136
Read the latest research report, its research-decision-gate JSON, and high-impact strict closure blocks when:
- Distinctive: line 148
If the user gives a company document, preserve its terminology and business rules.
- Distinctive: line 152
When reviewing a PRD or plan, lead with findings ordered by severity:
- Distinctive: line 170
Do not overwrite existing artifacts unless the user explicitly requests it.
- Distinctive: line 174
When this skill is changed, run:
- Very specific: line 184
every referenced file in references/ exists.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Write Requirements PRD
Operating Rules
Produce requirements that are understandable, developable, testable, traceable, and maintainable.
Default to HTML output when creating artifacts, unless the user explicitly requests Markdown, Word, JSON, or another format. For this workspace, write HTML deliverables to C:\Users\lenovo\Desktop\UI自动化 when no other path is specified.
Do not invent business facts. Mark unknowns, assumptions, and required confirmations explicitly.
When producing or reviewing a high-impact PRD, development plan, test plan, Agent-ready requirement, or skill-change plan, consume available research-decision-gate evidence before finalizing deterministic recommendations. If the research report is high-impact, also verify critique-loop-log, source-review-findings, followup-query-matrix, and p0p1-closure-matrix. If P0/P1 coverage is insufficient, blocked, or strict closure evidence is missing, route back to research, mark the artifact partial/blocked, or ask for explicit risk acceptance.
Default repair policy: prefer complete root-cause repair over minimal patching when the user asks to fix, adjust, review, or harden requirements, plans, Skills, or automation workflows. A task is not complete until direct fixes, related references, validation, reports, and known downstream impacts are handled or explicitly documented as out of scope. If the user explicitly asks for a minimal change, follow that constraint.
Do not include secrets, passwords, tokens, cookies, private keys, real credentials, or production-only account data in generated PRDs, reports, examples, Memory, or test data sections. For account-related content, do not include real credentials; use role/account type, placeholder names, or redacted examples instead.
If the user only asks for a brief explanation, comparison, or definition, answer directly and do not generate a full PRD/plan artifact. Enter the full artifact workflow only when the user asks to draft, generate, review, convert, harden, or update a document, plan, or traceable requirement package.
Treat business documents as the source of truth. If a generated framework conflicts with company rules, preserve the company rule and add the missing governance or Agent-ready fields around it.
When the input mixes requirement, development, and testing content, first classify the artifact type. Do not merge all details into one undifferentiated document.
Workflow
- Identify the document type:
- business PRD or feature requirement;
- permission matrix or data access rule;
- state machine or workflow rule;
- UI automation / Agent-ready testing requirement;
- development plan;
- test plan;
- development and test plan PRD;
- review or gap analysis.
- Route the document:
- declare
documentType, target reader, applicable sections, intentionally excluded sections, and referenced standards; - apply reference priority in this order:
document-type-routing.mddecides artifact type and scope,capability-boundary-map.mddecides skill ownership and handoff,agent-ready-output-schema.mddefines downstream contract when needed,dev-test-plan-contract.mdadds development/test gates when applicable,prd-framework.mdfills general PRD/RTM/DoR/DoD fields,governance-diagnostics.mdadds version/change/diagnostic rules, andreview-checklist.mdchecks severity and readiness; - use
references/document-type-routing.mdwhen the user asks for a development plan, test plan, combined plan, or document review; - use
references/dev-test-plan-contract.mdwhen the output must include development tasks, test strategy, quality gates, execution evidence, or release/change governance.
- declare
Extract source facts:
- goals, users, roles, permissions, scope, non-goals;
- pages, menus, buttons, forms, states, business objects;
- business rules, data filters, state transitions, exceptions;
- APIs, downstream systems, business IDs, test data, evidence needs;
- baselines, source versions, deadlines, owners, and change impact;
- open questions and assumptions.
If the artifact depends on external references, reference skills, products, standards, or literature, inspect the latest
research-decision-gateand strict closure blocks first. If they are missing for a high-impact decision, call or requestresearchbefore converting the decision into a requirement, plan, or acceptance criterion.- Structure the artifact:
- document metadata and revision record;
- background and problem definition;
- goals and success metrics;
- scope, boundaries, non-goals;
- users, roles, permissions;
- glossary and business objects;
- pages, flows, state machines, and interactions;
- functional requirements with IDs;
- non-functional requirements;
- acceptance criteria;
- RTM traceability matrix;
- risks, dependencies, fallback, launch/rollback if relevant;
- change management.
- Add testability:
- number requirements as
FR-*,BR-*,NFR-*,TR-*,AC-*; - include normal, abnormal, permission, boundary, idempotency, async, and rollback criteria for P0/P1 requirements;
- map each requirement to tests and evidence;
- specify UI/API/task/downstream/log evidence where needed.
- number requirements as
- Add Agent-ready fields when the PRD will feed Codex, Midscene, Playwright, Solution D, or a testing Agent:
- test entry path and URL/route;
- role/account type, not actual credentials;
- allowed read-only actions and forbidden high-risk actions;
- key observable UI states;
- key APIs and JSONPath/business ID extraction;
- downstream verification entry;
- expected evidence type;
- failure attribution priority;
- fallback and deterministic verification strategy;
- test data and cleanup strategy;
- execution quality review and memory promotion criteria when relevant.
- Validate before finalizing:
- DoR satisfied for requirements entering development/testing;
- DoD clear for delivery completion;
- RTM links goals, requirements, development tasks, tests, automation assets, evidence, defects, and changes;
- document type boundaries are respected;
- no sensitive information included;
- assumptions and open questions are visible.
- P0/P1 evidence gaps from
research-decision-gateand strict closure blocks are closed, routed toresearch, or explicitly marked as accepted risk.
Reference Loading
Read references/prd-framework.md when:
- creating a new PRD from sparse notes;
- reviewing whether a PRD is complete;
- converting permission matrices, state machines, or business rules into testable requirements;
- adding DoR/DoD, RTM, Agent-ready testing fields, or scoring.
Read references/document-type-routing.md when:
- the user asks for a development plan, test plan, combined development and test plan, document review, or gap analysis;
- the input contains mixed requirement, implementation, and testing content;
- you need to decide which sections belong in the current artifact and which should remain out of scope.
Read references/dev-test-plan-contract.md when:
- producing or reviewing a development plan, test plan, or combined development/test plan;
- adding phases, WBS, dependencies, quality gates, test strategy, evidence requirements, pause/resume criteria, defect handling, release/rollback, or change governance.
Read references/agent-ready-output-schema.md when:
- the output will feed another Agent or Skill;
- the artifact needs module boundary, business objects, upstream/downstream, evidence contract, safety, handoff targets, or grill questions;
- checking whether an output is machine-consumable by downstream skills.
Read references/capability-boundary-map.md when:
- deciding whether a capability belongs in this skill or should be handed off to
development-plan,test-plan,testcase-generator, orui-test; - reviewing whether this skill is expanding beyond upstream requirement truth and handoff contracts.
Read references/governance-diagnostics.md when:
- handling version baselines, change impact, output scoring, failure diagnosis, grill escalation, or Memory governance;
- deciding whether an artifact can be promoted to downstream use or must be re-reviewed.
Read the latest research report, its research-decision-gate JSON, and high-impact strict closure blocks when:
- writing requirements, development plans, test plans, or skill-change plans from researched references;
- grill-system identified P0/P1 findings that affect the recommendation;
- the artifact would otherwise depend on assumptions about external products, reference skills, standards, or literature.
Read references/review-checklist.md when:
- reviewing requirements, plans, UI automation inputs, or Agent-ready outputs;
- deciding P0/P1/P2 severity;
- checking complete repair, source baseline, traceability, evidence quality, or readiness gates.
If the user gives a company document, preserve its terminology and business rules. Use references only to add missing structure, not to overwrite domain language.
Review Output Rules
When reviewing a PRD or plan, lead with findings ordered by severity:
- P0: blocks development/testing, creates safety/compliance risk, or prevents traceability;
- P1: likely causes ambiguity, missing tests, implementation mismatch, or unreviewed change impact;
- P2: improves maintainability, readability, automation readiness, or evidence quality.
For each finding, include the affected section, why it matters, and the concrete fix.
Artifact Naming
For generated HTML artifacts, use concise Chinese or task-specific names such as:
需求文档-v1.html权限规则-agent-ready-prd.html状态机需求评审.htmlUI自动化开发测试计划PRD.html开发测试计划评审报告.html
Do not overwrite existing artifacts unless the user explicitly requests it.
Validation
When this skill is changed, run:
python scripts/forward_test_write_prd_skill.py
python scripts/validate_agent_ready_schema.pyAlso validate:
- frontmatter has only
nameanddescription; - every referenced file in
references/exists; agents/openai.yamlreflects PRD, development plan, test plan, RTM, evidence, and change governance capabilities;- outputs contain no secrets, tokens, cookies, private keys, real credentials, or production-only account details;
- high-impact artifacts do not ignore
research-decision-gateP0/P1 gaps or missing strict closure blocks; - forward-test cases cover sparse PRD, permission matrix, state machine, combined development/test plan, lightweight explanation, and sensitive input.
- Agent-ready schema validation covers module understanding, business objects, upstream/downstream, evidence, safety, handoff targets, and governance references.
Escalation
Ask before:
- writing outside the requested output directory;
- changing global skill directories;
- using private repositories, private URLs, or internal systems;
- sending documents, screenshots, credentials, or business content to external LLMs;
- including production actions, destructive operations, real credentials, tokens, cookies, or private identifiers in any artifact.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

