Doc Co-Authoring¶
Purpose: Guide users through a structured workflow for co-authoring documentation. Helps efficiently transfer context, refine content through iteration, and verify the document works for readers.
When to Use¶
| Trigger | Description |
|---|---|
| Writing Documentation | Drafting proposals, technical specs, or decision docs |
| Structured Content | Creating PRDs, design docs, RFCs, or similar structured documents |
| Collaborative Drafting | Co-authoring content with AI through iterative refinement |
| Document Quality | Ensuring docs work for readers through structured testing |
Process¶
Stage 1: Context Gathering¶
Close the gap between what the user knows and what the AI knows:
- Initial questions — document type, audience, desired impact, template, constraints
- Info dumping — encourage the user to dump all context (background, discussions, architecture, constraints)
- Clarifying questions — generate 5-10 targeted questions based on gaps
- Exit condition — sufficient context gathered when edge cases and trade-offs can be discussed
Stage 2: Refinement & Structure¶
Build the document section by section:
- Section ordering — start with whichever section has the most unknowns
- For each section:
- Ask 5-10 clarifying questions
- Brainstorm 5-20 options for content
- User curates (keep/remove/combine)
- Gap check for missing items
- Draft the section
- Iterative refinement through surgical edits
- Near completion — re-read entire document checking for flow, redundancy, and filler
- Quality checking — after 3 iterations with no changes, ask if anything can be removed
Stage 3: Reader Testing¶
Test the document with a fresh perspective:
- Predict reader questions — generate 5-10 realistic questions readers would ask
- Test with sub-agent — use a fresh AI instance (no context) to answer the questions
- Run additional checks — check for ambiguity, false assumptions, contradictions
- Report and fix — loop back to refinement for any problematic sections
- Exit condition — reader consistently answers correctly with no new gaps
Key Principles¶
- Quality over speed — each iteration should make meaningful improvements
- User agency — always give the user control to adjust the process
- Context management — don't let gaps accumulate, address them as they come up
- Direct and procedural — explain rationale briefly, don't oversell the approach
See Also¶
- CLI Reference: skill - Full command reference
- The .claude Directory - Where skills live
- Document Work - Capture patterns and decisions after work