docs-writer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocs Writer
文档撰写工具
Generate structured documents through guided discovery. 8 document types, each with its own workflow depth.
通过引导式探索生成结构化文档。支持8种文档类型,每种类型都有对应的工作流深度。
Workflow
工作流
trigger --> detect type --> load reference --> discovery --> draftingDetect document type from the trigger. If ambiguous, ask the user which type they want.
trigger --> detect type --> load reference --> discovery --> drafting从触发词中识别文档类型。如果类型不明确,则询问用户所需的文档类型。
Document Types
文档类型
| Type | Workflow | Reference | Template |
|---|---|---|---|
| PRD | discovery -> validation -> synthesis -> drafting | prd.md | prd.md |
| Brief | generated with PRD (no separate trigger) | brief.md | brief.md |
| Issue | classification -> drafting | issue.md | issue.md |
| Task | direct drafting | task.md | task.md |
| User Story | discovery -> drafting | user-story.md | user-story.md |
| RFC | discovery -> analysis -> drafting | rfc.md | rfc.md |
| ADR | discovery -> drafting | adr.md | adr.md |
| TDD | discovery -> analysis -> drafting | tdd.md | tdd.md |
| 类型 | 工作流 | 参考文档 | 模板 |
|---|---|---|---|
| PRD | 探索 -> 验证 -> 综合 -> 撰写 | prd.md | prd.md |
| Brief | 随PRD生成(无独立触发词) | brief.md | brief.md |
| Issue | 分类 -> 撰写 | issue.md | issue.md |
| Task | 直接撰写 | task.md | task.md |
| User Story | 探索 -> 撰写 | user-story.md | user-story.md |
| RFC | 探索 -> 分析 -> 撰写 | rfc.md | rfc.md |
| ADR | 探索 -> 撰写 | adr.md | adr.md |
| TDD | 探索 -> 分析 -> 撰写 | tdd.md | tdd.md |
Triggers
触发词
| Trigger Pattern | Type | Reference |
|---|---|---|
| Create PRD, define product, product requirements, write PRD | PRD | prd.md |
| Create issue, report bug, feature request, create discussion | Issue | issue.md |
| Create task, sprint task, new task | Task | task.md |
| Create user story, write story, new story | User Story | user-story.md |
| Create RFC, propose change, request for comments | RFC | rfc.md |
| Create ADR, record decision, architecture decision | ADR | adr.md |
| Create TDD, technical design, design document | TDD | tdd.md |
| Create document, write doc | Ask user | -- |
| 触发词模式 | 类型 | 参考文档 |
|---|---|---|
| Create PRD, define product, product requirements, write PRD | PRD | prd.md |
| Create issue, report bug, feature request, create discussion | Issue | issue.md |
| Create task, sprint task, new task | Task | task.md |
| Create user story, write story, new story | User Story | user-story.md |
| Create RFC, propose change, request for comments | RFC | rfc.md |
| Create ADR, record decision, architecture decision | ADR | adr.md |
| Create TDD, technical design, design document | TDD | tdd.md |
| Create document, write doc | 询问用户 | -- |
Shared Discovery Patterns
通用探索模式
LOAD: discovery.md before starting any type that requires discovery.
Discovery applies to: PRD, Issue (feature/discussion subtypes), User Story, RFC, ADR, TDD.
Discovery does NOT apply to: Task, Issue (bug subtype -- uses structured reproduction instead), Brief (generated as part of PRD workflow).
加载: 在开始任何需要探索的文档类型之前,先加载discovery.md。
探索适用于:PRD、Issue(功能/讨论子类型)、User Story、RFC、ADR、TDD。
探索不适用于:Task、Issue(Bug子类型——使用结构化复现流程)、Brief(作为PRD工作流的一部分生成)。
Output
输出
All documents save to . Create the directory if it doesn't exist.
.specs/docs/| Type | Filename |
|---|---|
| PRD | |
| Brief | |
| Issue | |
| Task | |
| User Story | |
| RFC | |
| ADR | |
| TDD | |
For ADR, use kebab-case for and auto-detect the next sequential number from existing files in .
{name}.specs/docs/所有文档均保存至目录。如果目录不存在则自动创建。
.specs/docs/| 类型 | 文件名 |
|---|---|
| PRD | |
| Brief | |
| Issue | |
| Task | |
| User Story | |
| RFC | |
| ADR | |
| TDD | |
对于ADR,需使用短横线分隔的小写格式(kebab-case),并从目录中的现有文件自动检测下一个连续编号。
{name}.specs/docs/Quality Standards
质量标准
Requirements must be concrete and measurable across all document types.
| Bad | Good |
|---|---|
| "Search should be fast" | "Search returns results within 200ms" |
| "Easy to use" | "New users complete onboarding in under 2 minutes" |
| "Intuitive interface" | "Task completion rate above 90% without help text" |
所有文档类型的需求都必须具体且可衡量。
| 反面示例 | 正面示例 |
|---|---|
| "搜索速度要快" | "搜索结果返回时间不超过200ms" |
| "易于使用" | "新用户无需帮助即可在2分钟内完成入门流程" |
| "界面直观" | "无需帮助文本的情况下,任务完成率超过90%" |
Guidelines
指南
DO:
- Always complete discovery before drafting (for types that require it)
- Present draft for user feedback before saving
- Mark unknowns as TBD rather than inventing constraints
- Use concrete, measurable requirements
- Use fixed filenames per type (ADR keeps suffix in kebab-case)
{name}
DON'T:
- Skip discovery for types that require it
- Assume document type -- detect from trigger or ask
- Include visual/design direction (that belongs in design-builder)
- Use vague adjectives as requirements ("fast", "easy", "intuitive")
- Mix document types in a single file
需要做:
- 对于需要探索的文档类型,务必在撰写前完成探索流程
- 在保存前将草稿提交给用户获取反馈
- 将未知内容标记为TBD(待确定),而非自行设定约束
- 使用具体、可衡量的需求
- 每种类型使用固定的文件名(ADR保留后缀,采用kebab-case格式)
{name}
不要做:
- 跳过需要探索的文档类型的探索流程
- 假设文档类型——从触发词识别或询问用户
- 包含视觉/设计方向(属于design-builder的范畴)
- 使用模糊的形容词作为需求(如“快”、“容易”、“直观”)
- 在单个文件中混合多种文档类型
Cross-References
交叉引用
docs-writer -----> spec-driven (any doc can feed into a spec)
docs-writer -----> design-builder (PRD informs copy and design extraction)
RFC -------------> ADR (accepted RFC generates ADR)
TDD -------------> ADR (references relevant decisions)docs-writer -----> spec-driven (任何文档都可作为规格输入)
docs-writer -----> design-builder (PRD为文案和设计提取提供信息)
RFC -------------> ADR (已通过的RFC生成ADR)
TDD -------------> ADR (参考相关决策)Integration with Other Skills
与其他功能的集成
- design-builder: PRD sections 1-5 (problem, goals, value prop, competitive landscape, personas) inform copy extraction and design extraction
- spec-driven: Any document can be input for feature initialization when implementation is complex
- design-builder:PRD的第1-5部分(问题、目标、价值主张、竞争格局、用户画像)为文案提取和设计提取提供依据
- spec-driven:当实现复杂时,任何文档都可作为功能初始化的输入
Error Handling
错误处理
- No : Create the directory
.specs/docs/ - Ambiguous trigger: Ask user which document type
- Missing context for discovery: Ask questions, never assume
- ADR numbering conflict: Scan existing files and use next available number
- 无目录:自动创建该目录
.specs/docs/ - 触发词不明确:询问用户所需的文档类型
- 探索所需上下文缺失:询问问题,绝不假设
- ADR编号冲突:扫描现有文件并使用下一个可用编号