@damenor/agent-docs 0.1.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -29
- package/dist/index.js +3834 -217
- package/package.json +14 -11
- package/templates/modules/agents/.agents/agents/doc-designer.md +39 -37
- package/templates/modules/agents/.agents/agents/doc-maintainer.md +35 -35
- package/templates/modules/agents/.agents/agents/doc-reviewer.md +55 -46
- package/templates/modules/agents/.agents/agents/doc-writer.md +34 -33
- package/templates/modules/agents/.agents/agents/reviewer.md +114 -100
- package/templates/modules/agents/.agents/skills/doc-design/SKILL.md +176 -174
- package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md +241 -247
- package/templates/modules/agents/.agents/skills/doc-maintain/SKILL.md +205 -195
- package/templates/modules/agents/.agents/skills/doc-maintain/references/triggers.md +171 -165
- package/templates/modules/agents/.agents/skills/doc-review/SKILL.md +245 -240
- package/templates/modules/agents/.agents/skills/doc-review/references/health-checklist.md +115 -112
- package/templates/modules/agents/.agents/skills/doc-scaffold/SKILL.md +164 -157
- package/templates/modules/agents/.agents/skills/doc-scaffold/references/diataxis-quick-ref.md +110 -110
- package/templates/modules/agents/.agents/skills/doc-write/SKILL.md +240 -212
- package/templates/modules/agents/.agents/skills/doc-write/references/adr-format.md +99 -93
- package/templates/modules/agents/.agents/skills/doc-write/references/diataxis-patterns.md +221 -200
- package/templates/base/AGENTS.md +0 -177
- package/templates/base/CHANGELOG.md +0 -86
- package/templates/base/README.md +0 -110
- package/templates/base/docs/CONTEXT.md +0 -111
- package/templates/base/docs/README.md +0 -131
- package/templates/base/docs/adr/TEMPLATE.md +0 -83
- package/templates/modules/design/docs/DESIGN.md +0 -253
- package/templates/modules/explanation/docs/explanation/agent-flow.md +0 -15
- package/templates/modules/explanation/docs/explanation/architecture.md +0 -138
- package/templates/modules/guides/docs/guides/deployment.md +0 -189
- package/templates/modules/guides/docs/guides/runbooks/TEMPLATE.md +0 -86
- package/templates/modules/guides/docs/guides/troubleshooting.md +0 -65
- package/templates/modules/operations/docs/operations/README.md +0 -115
- package/templates/modules/product/docs/product/overview.md +0 -90
- package/templates/modules/product/docs/roadmap.md +0 -80
- package/templates/modules/reference/docs/reference/api.md +0 -131
- package/templates/modules/reference/docs/reference/code-style.md +0 -275
- package/templates/modules/reference/docs/reference/configuration.md +0 -117
- package/templates/modules/reference/docs/reference/infrastructure.md +0 -191
- package/templates/modules/tutorials/docs/tutorials/environment-setup.md +0 -212
- package/templates/modules/tutorials/docs/tutorials/first-task.md +0 -246
- package/templates/modules/tutorials/docs/tutorials/quick-start.md +0 -146
|
@@ -1,351 +1,372 @@
|
|
|
1
1
|
---
|
|
2
|
-
created:
|
|
2
|
+
created: '2024-01-15'
|
|
3
3
|
status: active
|
|
4
4
|
type: reference
|
|
5
|
-
tags: [diataxis,
|
|
5
|
+
tags: [diataxis, patterns, documentation, writing]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Diátaxis —
|
|
8
|
+
# Diátaxis — Detailed Patterns by Type
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Tutorial Patterns
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Canonical structure
|
|
13
13
|
|
|
14
14
|
```markdown
|
|
15
|
-
# [
|
|
15
|
+
# [Verb + learning object]
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
[Resultado tangible que el lector obtendrá]
|
|
17
|
+
## What you'll build
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
[Lista exacta: software, conocimientos, acceso]
|
|
19
|
+
[Tangible result the reader will obtain]
|
|
22
20
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
[
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
[Exact list: software, knowledge, access]
|
|
24
|
+
|
|
25
|
+
## Step 1: [Concrete action in infinitive]
|
|
26
|
+
|
|
27
|
+
[Step by step instructions]
|
|
28
|
+
[Complete and executable code]
|
|
26
29
|
|
|
27
30
|
### ✅ Verificación
|
|
31
|
+
|
|
28
32
|
[Comando o acción para confirmar que funciona]
|
|
29
33
|
|
|
30
34
|
## Paso N: ...
|
|
31
35
|
|
|
32
36
|
## Resumen
|
|
37
|
+
|
|
33
38
|
[Qué se aprendió]
|
|
34
39
|
[Próximos pasos sugeridos]
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
###
|
|
42
|
+
### Tone
|
|
38
43
|
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
44
|
+
- **Didactic and patient**: Don't assume prior knowledge of the topic
|
|
45
|
+
- **One concept at a time**: Each step introduces ONE new thing
|
|
46
|
+
- **Encouraging**: Show visible progress frequently
|
|
47
|
+
- **Concrete**: Use specific examples, not abstract ones
|
|
43
48
|
|
|
44
|
-
###
|
|
49
|
+
### Length
|
|
45
50
|
|
|
46
|
-
- **Ideal**: 500-1500
|
|
47
|
-
- **
|
|
48
|
-
- **
|
|
51
|
+
- **Ideal**: 500-1500 words
|
|
52
|
+
- **Maximum**: 2000 words — if longer, split into sequential tutorials
|
|
53
|
+
- **Minimum**: 300 words — if shorter, it's probably a how-to
|
|
49
54
|
|
|
50
|
-
###
|
|
55
|
+
### When to write a tutorial
|
|
51
56
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
57
|
+
- A new user needs to learn a fundamental skill
|
|
58
|
+
- There's an onboarding flow no one has documented
|
|
59
|
+
- A key concept is taught repeatedly to new people
|
|
55
60
|
|
|
56
|
-
###
|
|
61
|
+
### Concrete example
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
````markdown
|
|
59
64
|
---
|
|
60
|
-
created:
|
|
65
|
+
created: '2024-03-10'
|
|
61
66
|
status: active
|
|
62
67
|
type: tutorial
|
|
63
68
|
tags: [onboarding, api, express]
|
|
64
69
|
---
|
|
65
70
|
|
|
66
|
-
#
|
|
71
|
+
# Create your first endpoint with Express
|
|
72
|
+
|
|
73
|
+
## What you'll build
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
Un endpoint GET /api/health que responda con el estado del servidor.
|
|
75
|
+
A GET /api/health endpoint that responds with the server status.
|
|
70
76
|
|
|
71
|
-
##
|
|
72
|
-
|
|
73
|
-
-
|
|
77
|
+
## Prerequisites
|
|
78
|
+
|
|
79
|
+
- Node.js 18+ installed
|
|
80
|
+
- Code editor
|
|
74
81
|
- Terminal
|
|
75
82
|
|
|
76
|
-
##
|
|
83
|
+
## Step 1: Initialize the project
|
|
77
84
|
|
|
78
|
-
|
|
85
|
+
Create a new folder and initialize the project:
|
|
79
86
|
|
|
80
|
-
|
|
81
|
-
mkdir
|
|
87
|
+
```bash
|
|
88
|
+
mkdir my-api && cd my-api
|
|
82
89
|
npm init -y
|
|
83
90
|
npm install express
|
|
84
|
-
|
|
91
|
+
```
|
|
92
|
+
````
|
|
85
93
|
|
|
86
|
-
### ✅
|
|
87
|
-
|
|
94
|
+
### ✅ Verification
|
|
95
|
+
|
|
96
|
+
You should see `node_modules/` and `package.json` in the folder.
|
|
88
97
|
|
|
89
|
-
##
|
|
98
|
+
## Step 2: Create the server
|
|
90
99
|
|
|
91
|
-
|
|
100
|
+
Create `index.js`:
|
|
92
101
|
|
|
93
|
-
|
|
94
|
-
const express = require('express')
|
|
95
|
-
const app = express()
|
|
102
|
+
```javascript
|
|
103
|
+
const express = require('express')
|
|
104
|
+
const app = express()
|
|
96
105
|
|
|
97
106
|
app.get('/api/health', (req, res) => {
|
|
98
|
-
res.json({ status: 'ok', timestamp: new Date().toISOString() })
|
|
99
|
-
})
|
|
107
|
+
res.json({ status: 'ok', timestamp: new Date().toISOString() })
|
|
108
|
+
})
|
|
100
109
|
|
|
101
110
|
app.listen(3000, () => {
|
|
102
|
-
console.log('
|
|
103
|
-
})
|
|
104
|
-
|
|
111
|
+
console.log('Server running at http://localhost:3000')
|
|
112
|
+
})
|
|
113
|
+
```
|
|
105
114
|
|
|
106
|
-
### ✅
|
|
107
|
-
Ejecuta `node index.js` y abre `http://localhost:3000/api/health` en el navegador.
|
|
108
|
-
Deberías ver `{"status":"ok","timestamp":"..."}`.
|
|
115
|
+
### ✅ Verification
|
|
109
116
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
Run `node index.js` and open `http://localhost:3000/api/health` in your browser.
|
|
118
|
+
You should see `{"status":"ok","timestamp":"..."}`.
|
|
119
|
+
|
|
120
|
+
## Summary
|
|
121
|
+
|
|
122
|
+
You learned to create an Express server with a GET endpoint.
|
|
123
|
+
Next step: [[tutorials/add-database]] to connect a database.
|
|
124
|
+
|
|
125
|
+
````
|
|
114
126
|
|
|
115
|
-
###
|
|
127
|
+
### Tutorial anti-patterns
|
|
116
128
|
|
|
117
|
-
| Anti-
|
|
129
|
+
| Anti-pattern | Why it's bad | What to do instead |
|
|
118
130
|
|-------------|----------------|----------------------|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
131
|
+
| Explaining theory before practice | Bores the beginner | Explain WHILE doing |
|
|
132
|
+
| Skipping verification steps | The reader gets lost without knowing | Verify after EACH step |
|
|
133
|
+
| Assuming prior knowledge | Frustrates the beginner | List prerequisites explicitly |
|
|
134
|
+
| Incomplete or pseudo-code | Cannot be executed | Code ALWAYS complete and executable |
|
|
135
|
+
| Covering multiple topics | Saturates the reader | One tutorial = one topic |
|
|
136
|
+
| External docs links for basics | Interrupts flow | Include everything inline |
|
|
125
137
|
|
|
126
138
|
---
|
|
127
139
|
|
|
128
|
-
##
|
|
140
|
+
## How-to Patterns
|
|
129
141
|
|
|
130
|
-
###
|
|
142
|
+
### Canonical structure
|
|
131
143
|
|
|
132
144
|
```markdown
|
|
133
|
-
#
|
|
145
|
+
# How to [solve specific problem]
|
|
134
146
|
|
|
135
|
-
##
|
|
136
|
-
[1-3
|
|
147
|
+
## When to use this
|
|
148
|
+
[1-3 lines: scenario where this guide applies]
|
|
137
149
|
|
|
138
|
-
##
|
|
139
|
-
1. [
|
|
140
|
-
2. [
|
|
150
|
+
## Steps
|
|
151
|
+
1. [Direct action]
|
|
152
|
+
2. [Direct action]
|
|
141
153
|
...
|
|
142
154
|
|
|
143
|
-
##
|
|
144
|
-
[
|
|
145
|
-
|
|
155
|
+
## Expected result
|
|
156
|
+
[What you get at the end]
|
|
157
|
+
````
|
|
146
158
|
|
|
147
|
-
###
|
|
159
|
+
### Tone
|
|
148
160
|
|
|
149
|
-
- **
|
|
150
|
-
- **
|
|
151
|
-
- **
|
|
152
|
-
- **
|
|
161
|
+
- **Direct**: Straight to the point, no preamble
|
|
162
|
+
- **Assumes knowledge**: The reader already knows the system
|
|
163
|
+
- **Practical**: Concrete steps, not theoretical explanations
|
|
164
|
+
- **No justification**: Don't explain why — if the reader asks why, they need an explanation, not a how-to
|
|
153
165
|
|
|
154
|
-
###
|
|
166
|
+
### When to split a how-to
|
|
155
167
|
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
168
|
+
- More than 10 steps → split into more specific how-tos
|
|
169
|
+
- Covers more than one problem → one how-to per problem
|
|
170
|
+
- Has explanation sections → extract explanation to explanation/
|
|
159
171
|
|
|
160
|
-
###
|
|
172
|
+
### Concrete example
|
|
161
173
|
|
|
162
|
-
|
|
174
|
+
````markdown
|
|
163
175
|
---
|
|
164
|
-
created:
|
|
176
|
+
created: '2024-03-10'
|
|
165
177
|
status: active
|
|
166
178
|
type: how-to
|
|
167
179
|
tags: [auth, jwt, middleware]
|
|
168
180
|
---
|
|
169
181
|
|
|
170
|
-
#
|
|
182
|
+
# How to add JWT authentication to an existing API
|
|
183
|
+
|
|
184
|
+
## When to use this
|
|
171
185
|
|
|
172
|
-
|
|
173
|
-
Cuando tienes una API Express funcionando y necesitas proteger endpoints con JWT.
|
|
186
|
+
When you have a working Express API and need to protect endpoints with JWT.
|
|
174
187
|
|
|
175
|
-
##
|
|
188
|
+
## Steps
|
|
176
189
|
|
|
177
|
-
1.
|
|
190
|
+
1. Install dependencies:
|
|
178
191
|
|
|
179
|
-
|
|
192
|
+
```bash
|
|
180
193
|
npm install jsonwebtoken bcryptjs
|
|
181
|
-
|
|
194
|
+
```
|
|
195
|
+
````
|
|
182
196
|
|
|
183
|
-
2.
|
|
197
|
+
2. Create auth middleware at `src/middleware/auth.js`:
|
|
184
198
|
|
|
185
|
-
|
|
186
|
-
const jwt = require('jsonwebtoken')
|
|
199
|
+
```javascript
|
|
200
|
+
const jwt = require('jsonwebtoken')
|
|
187
201
|
|
|
188
202
|
function authMiddleware(req, res, next) {
|
|
189
|
-
const token = req.headers.authorization?.split(' ')[1]
|
|
190
|
-
if (!token) return res.status(401).json({ error: 'Token
|
|
203
|
+
const token = req.headers.authorization?.split(' ')[1]
|
|
204
|
+
if (!token) return res.status(401).json({ error: 'Token required' })
|
|
191
205
|
|
|
192
206
|
try {
|
|
193
|
-
req.user = jwt.verify(token, process.env.JWT_SECRET)
|
|
194
|
-
next()
|
|
207
|
+
req.user = jwt.verify(token, process.env.JWT_SECRET)
|
|
208
|
+
next()
|
|
195
209
|
} catch {
|
|
196
|
-
res.status(401).json({ error: '
|
|
210
|
+
res.status(401).json({ error: 'Invalid token' })
|
|
197
211
|
}
|
|
198
212
|
}
|
|
199
213
|
|
|
200
|
-
module.exports = authMiddleware
|
|
201
|
-
|
|
214
|
+
module.exports = authMiddleware
|
|
215
|
+
```
|
|
202
216
|
|
|
203
|
-
3.
|
|
217
|
+
3. Protect endpoints:
|
|
204
218
|
|
|
205
|
-
|
|
219
|
+
```javascript
|
|
206
220
|
const auth = require('./middleware/auth');
|
|
207
221
|
app.get('/api/profile', auth, (req, res) => { ... });
|
|
208
|
-
\`\`\`
|
|
209
|
-
|
|
210
|
-
## Resultado esperado
|
|
211
|
-
Los endpoints protegidos requieren un JWT válido en el header `Authorization: Bearer <token>`.
|
|
212
222
|
```
|
|
213
223
|
|
|
214
|
-
|
|
224
|
+
## Expected result
|
|
225
|
+
|
|
226
|
+
Protected endpoints require a valid JWT in the `Authorization: Bearer <token>` header.
|
|
227
|
+
|
|
228
|
+
````
|
|
229
|
+
|
|
230
|
+
### How-to anti-patterns
|
|
215
231
|
|
|
216
|
-
| Anti-
|
|
232
|
+
| Anti-pattern | Why it's bad | What to do instead |
|
|
217
233
|
|-------------|----------------|----------------------|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
|
|
|
222
|
-
| "
|
|
234
|
+
| Explaining basic concepts | The reader should already know | Link to tutorial if needed |
|
|
235
|
+
| Narrative or storytelling | Not what the reader is looking for | Direct, numbered steps |
|
|
236
|
+
| Multiple alternative solutions | Confuses the reader | One solution, best practice |
|
|
237
|
+
| Extensive prerequisites | If it needs lots of setup, it's a tutorial | Simplify or link to tutorial |
|
|
238
|
+
| "Optionally you can..." | Creates uncertainty | One clear path |
|
|
223
239
|
|
|
224
240
|
---
|
|
225
241
|
|
|
226
|
-
##
|
|
242
|
+
## Reference Patterns
|
|
227
243
|
|
|
228
|
-
###
|
|
244
|
+
### Canonical structure
|
|
229
245
|
|
|
230
246
|
```markdown
|
|
231
|
-
# [
|
|
247
|
+
# [System/API/interface name]
|
|
232
248
|
|
|
233
|
-
## [
|
|
249
|
+
## [Main section]
|
|
234
250
|
|
|
235
|
-
|
|
|
251
|
+
| Parameter | Type | Required | Description | Default |
|
|
236
252
|
|-----------|------|-----------|-------------|---------|
|
|
237
253
|
| ... | ... | ... | ... | ... |
|
|
238
254
|
|
|
239
|
-
##
|
|
255
|
+
## Response codes
|
|
240
256
|
|
|
241
|
-
|
|
|
257
|
+
| Code | Meaning | When returned |
|
|
242
258
|
|--------|------------|-------------------|
|
|
243
259
|
| ... | ... | ... |
|
|
244
260
|
|
|
245
|
-
##
|
|
246
|
-
[
|
|
247
|
-
|
|
261
|
+
## Examples
|
|
262
|
+
[One minimal example per main use case]
|
|
263
|
+
````
|
|
248
264
|
|
|
249
|
-
###
|
|
265
|
+
### Tone
|
|
250
266
|
|
|
251
|
-
- **Neutral
|
|
252
|
-
- **
|
|
253
|
-
- **
|
|
254
|
-
- **
|
|
267
|
+
- **Neutral and factual**: No opinions, no narrative
|
|
268
|
+
- **Structured**: Tables > lists > prose
|
|
269
|
+
- **Complete**: Include ALL parameters, ALL cases
|
|
270
|
+
- **No explanations**: If it needs explaining, link to explanation/
|
|
255
271
|
|
|
256
|
-
###
|
|
272
|
+
### Auto-generation tips
|
|
257
273
|
|
|
258
|
-
|
|
259
|
-
- **OpenAPI/Swagger**: Generar referencia desde el spec
|
|
260
|
-
- **TypeScript interfaces**: Extraer tipos y comentarios JSDoc
|
|
261
|
-
- **JSON Schema**: Usar el schema como base
|
|
262
|
-
- **CLI con `--help`**: Capturar la salida completa
|
|
274
|
+
If the code has:
|
|
263
275
|
|
|
264
|
-
|
|
276
|
+
- **OpenAPI/Swagger**: Generate reference from the spec
|
|
277
|
+
- **TypeScript interfaces**: Extract types and JSDoc comments
|
|
278
|
+
- **JSON Schema**: Use the schema as base
|
|
279
|
+
- **CLI with `--help`**: Capture the complete output
|
|
265
280
|
|
|
266
|
-
|
|
267
|
-
- Valores por defecto
|
|
268
|
-
- Valores permitidos (enums)
|
|
269
|
-
- Restricciones (min, max, formato)
|
|
270
|
-
- Códigos de error
|
|
271
|
-
- Ejemplos mínimos por cada caso principal
|
|
281
|
+
### What to always include
|
|
272
282
|
|
|
273
|
-
|
|
283
|
+
- All parameters/props/fields with type and description
|
|
284
|
+
- Default values
|
|
285
|
+
- Allowed values (enums)
|
|
286
|
+
- Constraints (min, max, format)
|
|
287
|
+
- Error codes
|
|
288
|
+
- Minimal examples per main case
|
|
274
289
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
280
|
-
|
|
|
281
|
-
|
|
|
290
|
+
### Reference anti-patterns
|
|
291
|
+
|
|
292
|
+
| Anti-pattern | Why it's bad | What to do instead |
|
|
293
|
+
| ------------------------ | ----------------------------- | --------------------------------------- |
|
|
294
|
+
| Narrative prose | Reference should be scannable | Tables and lists |
|
|
295
|
+
| Examples without context | Don't know when to use each | One example per use case |
|
|
296
|
+
| Partial parameters | Reader can't trust the doc | Document ALL or indicate what's missing |
|
|
297
|
+
| Explaining why | Not the place | Link to explanation/ |
|
|
298
|
+
| Ignoring edge cases | Surprises the reader | Document all cases |
|
|
282
299
|
|
|
283
300
|
---
|
|
284
301
|
|
|
285
|
-
##
|
|
302
|
+
## Explanation Patterns
|
|
286
303
|
|
|
287
|
-
###
|
|
304
|
+
### Canonical structure
|
|
288
305
|
|
|
289
306
|
```markdown
|
|
290
|
-
# [
|
|
307
|
+
# [Topic or question being answered]
|
|
308
|
+
|
|
309
|
+
## Context
|
|
291
310
|
|
|
292
|
-
|
|
293
|
-
[Por qué existe, qué problema aborda]
|
|
311
|
+
[Why it exists, what problem it addresses]
|
|
294
312
|
|
|
295
|
-
##
|
|
296
|
-
[Vista general conceptual — sin código]
|
|
313
|
+
## How it works
|
|
297
314
|
|
|
298
|
-
|
|
299
|
-
[Qué otras opciones existían]
|
|
315
|
+
[Conceptual overview — without code]
|
|
300
316
|
|
|
301
|
-
##
|
|
302
|
-
|
|
317
|
+
## Alternatives considered
|
|
318
|
+
|
|
319
|
+
[What other options existed]
|
|
320
|
+
|
|
321
|
+
## Implications
|
|
322
|
+
|
|
323
|
+
[What it means for the present and future]
|
|
303
324
|
```
|
|
304
325
|
|
|
305
|
-
###
|
|
326
|
+
### Tone
|
|
306
327
|
|
|
307
|
-
- **
|
|
308
|
-
- **
|
|
309
|
-
- **
|
|
310
|
-
- **
|
|
328
|
+
- **Discursive and analytical**: Like a conversation with an expert colleague
|
|
329
|
+
- **Connective**: Relate to other concepts, ADRs, decisions
|
|
330
|
+
- **Historical**: Tell the story of how we got here
|
|
331
|
+
- **No code** (or minimal): Focus is understanding, not implementation
|
|
311
332
|
|
|
312
|
-
###
|
|
333
|
+
### When an explanation is needed
|
|
313
334
|
|
|
314
|
-
-
|
|
315
|
-
-
|
|
316
|
-
-
|
|
317
|
-
-
|
|
335
|
+
- An ADR needs more context than 1-3 sentences can provide
|
|
336
|
+
- A concept is referenced across multiple how-tos/tutorials and deserves its own space
|
|
337
|
+
- Someone asked "why did we do it this way?" more than once
|
|
338
|
+
- There's recurring confusion about a topic
|
|
318
339
|
|
|
319
|
-
###
|
|
340
|
+
### Linking with ADRs
|
|
320
341
|
|
|
321
342
|
```markdown
|
|
322
|
-
|
|
323
|
-
|
|
343
|
+
For the formal decision, see [[ADR-003-event-sourcing]].
|
|
344
|
+
This document explains the context and implications in greater detail.
|
|
324
345
|
```
|
|
325
346
|
|
|
326
|
-
###
|
|
347
|
+
### Explanation anti-patterns
|
|
327
348
|
|
|
328
|
-
| Anti-
|
|
329
|
-
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
|
334
|
-
|
|
|
349
|
+
| Anti-pattern | Why it's bad | What to do instead |
|
|
350
|
+
| -------------------------- | ------------------------------ | ------------------------------- |
|
|
351
|
+
| Step-by-step instructions | That's a tutorial or how-to | Focus on why |
|
|
352
|
+
| Listing all config options | That's reference | Explain the logic behind |
|
|
353
|
+
| No historical context | Loses the value of explanation | Include how we got here |
|
|
354
|
+
| Too abstract | Doesn't help understanding | Use concrete analogies |
|
|
355
|
+
| Repeating the ADR verbatim | Adds no value | Expand with context and nuances |
|
|
335
356
|
|
|
336
357
|
---
|
|
337
358
|
|
|
338
|
-
## Anti-
|
|
359
|
+
## Cross-cutting Anti-patterns
|
|
339
360
|
|
|
340
|
-
### Anti-
|
|
361
|
+
### Anti-patterns that apply to ALL types
|
|
341
362
|
|
|
342
|
-
| Anti-
|
|
343
|
-
|
|
344
|
-
| **
|
|
345
|
-
| **
|
|
346
|
-
| **
|
|
347
|
-
| **
|
|
348
|
-
| **
|
|
349
|
-
| **
|
|
350
|
-
| **
|
|
351
|
-
| **
|
|
363
|
+
| Anti-pattern | Description | Solution |
|
|
364
|
+
| ----------------------- | -------------------------------------- | -------------------------------------- |
|
|
365
|
+
| **Chameleon document** | Tries to be two types at once | One doc = one type. Separate. |
|
|
366
|
+
| **Placeholder content** | "TODO: add content" | Write real content or don't create |
|
|
367
|
+
| **No frontmatter** | File without YAML metadata | Always include frontmatter |
|
|
368
|
+
| **No date** | Don't know when it was created | Always include `created` |
|
|
369
|
+
| **Undefined terms** | Jargon without reference to CONTEXT.md | Define or link |
|
|
370
|
+
| **Broken links** | References to non-existent files | Verify before publishing |
|
|
371
|
+
| **Duplicate content** | Same info in multiple files | Reference, don't duplicate |
|
|
372
|
+
| **No verification** | No way to know if it's updated | Include `last-reviewed` in frontmatter |
|