You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/810-documentation.mdc
+97Lines changed: 97 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,93 @@ files:
18
18
19
19
## Documentation Strategy
20
20
21
+
### Diataxis Framework (Recommended)
22
+
23
+
Use Diataxis to keep documentation purpose-specific. Each document should have one primary mode.
24
+
25
+
| Mode | Primary user need | Typical question it answers |
26
+
|---|---|---|
27
+
| Tutorial | Learn by doing | "How do I get started?" |
28
+
| How-to guide | Complete a specific task | "How do I configure X in Y?" |
29
+
| Reference | Look up facts quickly | "What are all flags/options?" |
30
+
| Explanation | Understand concepts and tradeoffs | "Why is this designed this way?" |
31
+
32
+
> [!IMPORTANT]
33
+
> Do not mix documentation modes in one page unless there is a strong reason. If a page starts combining step-by-step onboarding with API option listings and architectural rationale, split it into separate pages and cross-link them.
34
+
35
+
### Diataxis Decision Guide
36
+
37
+
Before writing or editing docs, choose one mode first:
38
+
39
+
- If the reader is learning from scratch, write a **Tutorial**
40
+
- If the reader is trying to finish a concrete task, write a **How-to guide**
41
+
- If the reader needs authoritative details, write a **Reference**
42
+
- If the reader needs understanding and rationale, write an **Explanation**
43
+
44
+
### Diataxis Templates (Lightweight)
45
+
46
+
#### Tutorial template
47
+
48
+
```markdown
49
+
# <Goal-oriented tutorial title>
50
+
51
+
## What you will build
52
+
53
+
## Prerequisites
54
+
55
+
## Step-by-step walkthrough
56
+
1. ...
57
+
2. ...
58
+
59
+
## Verify success
60
+
61
+
## Next steps
62
+
```
63
+
64
+
#### How-to guide template
65
+
66
+
```markdown
67
+
# How to <specific task>
68
+
69
+
## Prerequisites
70
+
71
+
## Steps
72
+
1. ...
73
+
2. ...
74
+
75
+
## Validation
76
+
77
+
## Troubleshooting
78
+
```
79
+
80
+
#### Reference template
81
+
82
+
```markdown
83
+
# <Feature/API> reference
84
+
85
+
## Syntax / schema
86
+
87
+
## Parameters / fields
88
+
89
+
## Defaults and limits
90
+
91
+
## Examples
92
+
```
93
+
94
+
#### Explanation template
95
+
96
+
```markdown
97
+
# <Concept> explained
98
+
99
+
## Context
100
+
101
+
## Mental model
102
+
103
+
## Tradeoffs
104
+
105
+
## Related decisions and alternatives
106
+
```
107
+
21
108
### When to Use Documentation Websites
22
109
23
110
**Use documentation websites** when:
@@ -147,6 +234,16 @@ docs/
147
234
- Define technical terms
148
235
- Use examples liberally
149
236
237
+
### Voice (Avoid "you/your")
238
+
239
+
Prefer **neutral** or **imperative** phrasing over second-person voice.
240
+
241
+
- **Preferred**: "Run `make test`", "Set `ENV=prod`", "The operator should rotate keys weekly"
242
+
- **Avoid**: "You should run `make test`", "Make sure your environment is set to prod"
243
+
244
+
> [!NOTE]
245
+
> This improves consistency across audiences (end-users, operators, reviewers) and makes docs read less like a conversation.
246
+
150
247
### Punctuation
151
248
152
249
**Never use em dashes (—) or en dashes (–). Use hyphens (-) instead.**
Canonical Diataxis guidance lives in `rules/810-documentation.mdc`. Keep this skill concise and link back to the rule instead of duplicating detailed standards.
0 commit comments