@northbridge-security/secureai 0.1.13
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/.claude/README.md +122 -0
- package/.claude/commands/architect/clean.md +978 -0
- package/.claude/commands/architect/kiss.md +762 -0
- package/.claude/commands/architect/review.md +704 -0
- package/.claude/commands/catchup.md +90 -0
- package/.claude/commands/code.md +115 -0
- package/.claude/commands/commit.md +1218 -0
- package/.claude/commands/cover.md +1298 -0
- package/.claude/commands/fmea.md +275 -0
- package/.claude/commands/kaizen.md +312 -0
- package/.claude/commands/pr.md +503 -0
- package/.claude/commands/todo.md +99 -0
- package/.claude/commands/worktree.md +738 -0
- package/.claude/commands/wrapup.md +103 -0
- package/LICENSE +183 -0
- package/README.md +108 -0
- package/dist/cli.js +75634 -0
- package/docs/agents/devops-reviewer.md +889 -0
- package/docs/agents/kiss-simplifier.md +1088 -0
- package/docs/agents/typescript.md +8 -0
- package/docs/guides/README.md +109 -0
- package/docs/guides/agents.clean.arch.md +244 -0
- package/docs/guides/agents.clean.arch.ts.md +1314 -0
- package/docs/guides/agents.gotask.md +1037 -0
- package/docs/guides/agents.markdown.md +1209 -0
- package/docs/guides/agents.onepassword.md +285 -0
- package/docs/guides/agents.sonar.md +857 -0
- package/docs/guides/agents.tdd.md +838 -0
- package/docs/guides/agents.tdd.ts.md +1062 -0
- package/docs/guides/agents.typesript.md +1389 -0
- package/docs/guides/github-mcp.md +1075 -0
- package/package.json +130 -0
- package/packages/secureai-cli/src/cli.ts +21 -0
- package/tasks/README.md +880 -0
- package/tasks/aws.yml +64 -0
- package/tasks/bash.yml +118 -0
- package/tasks/bun.yml +738 -0
- package/tasks/claude.yml +183 -0
- package/tasks/docker.yml +420 -0
- package/tasks/docs.yml +127 -0
- package/tasks/git.yml +1336 -0
- package/tasks/gotask.yml +132 -0
- package/tasks/json.yml +77 -0
- package/tasks/markdown.yml +95 -0
- package/tasks/onepassword.yml +350 -0
- package/tasks/security.yml +102 -0
- package/tasks/sonar.yml +437 -0
- package/tasks/template.yml +74 -0
- package/tasks/vscode.yml +103 -0
- package/tasks/yaml.yml +121 -0
|
@@ -0,0 +1,1209 @@
|
|
|
1
|
+
# Markdown Formatting Guide for Code Agents
|
|
2
|
+
|
|
3
|
+
This guide establishes formatting standards for documentation created by AI code agents. The goal is to balance scannability with detail, allowing readers to quickly understand structure while accessing implementation details when needed.
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
**Readers want to see structure and concepts, not implementation details on first scan.**
|
|
8
|
+
|
|
9
|
+
- Show: Headers, diagrams, short explanations, decision points
|
|
10
|
+
- Hide: Code blocks, step-by-step procedures, detailed examples, lengthy lists
|
|
11
|
+
|
|
12
|
+
## Technical Writing Guidelines
|
|
13
|
+
|
|
14
|
+
### Emoji Usage
|
|
15
|
+
|
|
16
|
+
**Problem**: AI-generated documentation often overuses emojis, creating a telltale sign of auto-generated content that undermines professionalism.
|
|
17
|
+
|
|
18
|
+
**Common problematic emojis:**
|
|
19
|
+
|
|
20
|
+
- ✅ Checkmark (overused for every positive statement)
|
|
21
|
+
- 🔍 Magnifying glass (overused for "search" or "discover")
|
|
22
|
+
- ❌ Cross mark (overused for every negative point)
|
|
23
|
+
- 📊 Chart (overused for metrics or data)
|
|
24
|
+
|
|
25
|
+
**Rules:**
|
|
26
|
+
|
|
27
|
+
**NEVER use emojis in headers:**
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
<!-- ❌ WRONG -->
|
|
31
|
+
|
|
32
|
+
## ✅ Installation Guide
|
|
33
|
+
|
|
34
|
+
## 🔍 Debugging
|
|
35
|
+
|
|
36
|
+
## 📊 Metrics Dashboard
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Avoid emojis for:**
|
|
40
|
+
|
|
41
|
+
- Decoration in regular text
|
|
42
|
+
- Bullet point markers
|
|
43
|
+
- Status indicators in lists
|
|
44
|
+
- Section dividers
|
|
45
|
+
- "Visual interest"
|
|
46
|
+
|
|
47
|
+
**Example of excessive emoji usage (AVOID):**
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
## 🎯 Getting Started
|
|
51
|
+
|
|
52
|
+
✅ Install dependencies
|
|
53
|
+
✅ Configure environment
|
|
54
|
+
✅ Run tests
|
|
55
|
+
🔍 Check the logs
|
|
56
|
+
📊 View metrics
|
|
57
|
+
❌ Don't forget to commit
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Better approach:**
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## Getting Started
|
|
64
|
+
|
|
65
|
+
Prerequisites:
|
|
66
|
+
|
|
67
|
+
- Install dependencies
|
|
68
|
+
- Configure environment
|
|
69
|
+
- Run tests
|
|
70
|
+
|
|
71
|
+
Next steps:
|
|
72
|
+
|
|
73
|
+
- Check logs for errors
|
|
74
|
+
- Monitor metrics
|
|
75
|
+
- Commit your changes
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Checkbox Lists
|
|
79
|
+
|
|
80
|
+
**Problem**: Markdown checkbox syntax (`- [x]`, `- [ ]`) is commonly generated by AI agents and creates ambiguity about document state.
|
|
81
|
+
|
|
82
|
+
**NEVER use checkbox syntax:**
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
<!-- ❌ WRONG -->
|
|
86
|
+
|
|
87
|
+
## Implementation Status
|
|
88
|
+
|
|
89
|
+
- [x] Database schema created
|
|
90
|
+
- [x] API endpoints implemented
|
|
91
|
+
- [ ] Frontend components
|
|
92
|
+
- [ ] Integration tests
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Instead, use grouped sections:**
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
<!-- ✓ CORRECT - Option 1: Separate sections -->
|
|
99
|
+
|
|
100
|
+
## Implementation Status
|
|
101
|
+
|
|
102
|
+
### Completed
|
|
103
|
+
|
|
104
|
+
- Database schema created
|
|
105
|
+
- API endpoints implemented
|
|
106
|
+
|
|
107
|
+
### In Progress
|
|
108
|
+
|
|
109
|
+
- Frontend components
|
|
110
|
+
- Integration tests
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Or use nested lists:**
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
<!-- ✓ CORRECT - Option 2: Nested structure -->
|
|
117
|
+
|
|
118
|
+
## Implementation Status
|
|
119
|
+
|
|
120
|
+
**Backend (Complete)**
|
|
121
|
+
|
|
122
|
+
- Database schema created
|
|
123
|
+
- API endpoints implemented
|
|
124
|
+
|
|
125
|
+
**Frontend (In Progress)**
|
|
126
|
+
|
|
127
|
+
- Component development
|
|
128
|
+
- Integration testing
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Or use descriptive status:**
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
<!-- ✓ CORRECT - Option 3: Explicit status -->
|
|
135
|
+
|
|
136
|
+
## Implementation Status
|
|
137
|
+
|
|
138
|
+
- Database schema: Complete
|
|
139
|
+
- API endpoints: Complete
|
|
140
|
+
- Frontend components: In progress
|
|
141
|
+
- Integration tests: Not started
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### AI Adjectives and Filler Words
|
|
145
|
+
|
|
146
|
+
**Problem**: AI-generated text frequently uses vague, boastful adjectives that add no meaningful information. These words are emotional rather than factual and create noise in technical documentation.
|
|
147
|
+
|
|
148
|
+
**Common AI adjectives to avoid:**
|
|
149
|
+
|
|
150
|
+
| Avoid | Why | Use Instead |
|
|
151
|
+
| ---------------- | --------------------------- | --------------------------------- |
|
|
152
|
+
| Robust | Vague claim | "Handles 10,000 requests/second" |
|
|
153
|
+
| Comprehensive | Meaningless scope claim | List specific features |
|
|
154
|
+
| Seamless | Undefined integration claim | "Single-command deployment" |
|
|
155
|
+
| Cutting-edge | Marketing speak | Specify technology and version |
|
|
156
|
+
| Innovative | Subjective opinion | Describe what's different |
|
|
157
|
+
| Powerful | Vague capability claim | Quantify performance metrics |
|
|
158
|
+
| Advanced | Relative and unclear | Specify technical requirements |
|
|
159
|
+
| Efficient | Needs quantification | "Uses 50% less memory" |
|
|
160
|
+
| Flexible | Vague adaptability claim | List configuration options |
|
|
161
|
+
| Scalable | Undefined growth claim | "Scales to 1M users" |
|
|
162
|
+
| Revolutionary | Hyperbolic marketing | Describe actual improvement |
|
|
163
|
+
| State-of-the-art | Temporal and subjective | Cite specific technology |
|
|
164
|
+
| Enterprise-grade | Meaningless qualifier | List security/compliance features |
|
|
165
|
+
| World-class | Superlative without meaning | Use specific comparisons |
|
|
166
|
+
| Next-generation | Vague future claim | Specify new capabilities |
|
|
167
|
+
|
|
168
|
+
**Common AI filler phrases to avoid:**
|
|
169
|
+
|
|
170
|
+
| Avoid | Use Instead |
|
|
171
|
+
| ---------------------------- | ---------------------------------------- |
|
|
172
|
+
| "Helps you to..." | Direct action: "Reduces deployment time" |
|
|
173
|
+
| "Allows you to easily..." | "Deploy with one command" |
|
|
174
|
+
| "Provides the ability to..." | Direct verb: "Supports" or "Enables" |
|
|
175
|
+
| "It should be noted that..." | State directly |
|
|
176
|
+
| "In order to..." | "To" |
|
|
177
|
+
| "At this point in time" | "Now" or "Currently" |
|
|
178
|
+
| "Due to the fact that" | "Because" |
|
|
179
|
+
| "In the event that" | "If" |
|
|
180
|
+
| "With regard to" | "About" or "Regarding" |
|
|
181
|
+
| "It is important to note" | State directly without preamble |
|
|
182
|
+
|
|
183
|
+
**Examples of AI-typical writing:**
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
<!-- ❌ WRONG - AI adjectives and filler -->
|
|
187
|
+
|
|
188
|
+
Our robust and comprehensive solution provides a seamless, cutting-edge
|
|
189
|
+
platform that helps you to easily manage your infrastructure. This powerful
|
|
190
|
+
and innovative system allows you to efficiently deploy applications at scale.
|
|
191
|
+
|
|
192
|
+
<!-- ✓ CORRECT - Specific and factual -->
|
|
193
|
+
|
|
194
|
+
Deploy applications with a single command. Supports Docker and Kubernetes.
|
|
195
|
+
Handles up to 100,000 concurrent connections. Deployment completes in
|
|
196
|
+
under 2 minutes.
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
<!-- ❌ WRONG - Vague capabilities -->
|
|
201
|
+
|
|
202
|
+
This advanced feature provides robust error handling and comprehensive
|
|
203
|
+
logging capabilities.
|
|
204
|
+
|
|
205
|
+
<!-- ✓ CORRECT - Specific features -->
|
|
206
|
+
|
|
207
|
+
Retries failed requests up to 3 times with exponential backoff. Logs all
|
|
208
|
+
errors to CloudWatch with stack traces. Sends alerts for 5xx errors.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
<!-- ❌ WRONG - Marketing speak -->
|
|
213
|
+
|
|
214
|
+
Our enterprise-grade, world-class security solution offers cutting-edge
|
|
215
|
+
protection.
|
|
216
|
+
|
|
217
|
+
<!-- ✓ CORRECT - Specific security features -->
|
|
218
|
+
|
|
219
|
+
Security features:
|
|
220
|
+
|
|
221
|
+
- AES-256 encryption at rest
|
|
222
|
+
- TLS 1.3 for data in transit
|
|
223
|
+
- SOC 2 Type II compliant
|
|
224
|
+
- Automated vulnerability scanning
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Writing Style
|
|
228
|
+
|
|
229
|
+
**Be direct and specific:**
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
<!-- ❌ WRONG - Vague and decorated -->
|
|
233
|
+
|
|
234
|
+
🎉 We've successfully implemented an amazing new feature! ✨
|
|
235
|
+
|
|
236
|
+
<!-- ✓ CORRECT - Direct and specific -->
|
|
237
|
+
|
|
238
|
+
Implemented real-time WebSocket notifications for user events.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Replace adjectives with facts:**
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
<!-- ❌ WRONG - Vague adjectives -->
|
|
245
|
+
|
|
246
|
+
This comprehensive solution provides robust performance and seamless scaling.
|
|
247
|
+
|
|
248
|
+
<!-- ✓ CORRECT - Quantified facts -->
|
|
249
|
+
|
|
250
|
+
Processes 50,000 transactions per second. Auto-scales from 2 to 100 instances
|
|
251
|
+
based on CPU usage.
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Eliminate filler phrases:**
|
|
255
|
+
|
|
256
|
+
```markdown
|
|
257
|
+
<!-- ❌ WRONG - Excessive filler -->
|
|
258
|
+
|
|
259
|
+
In order to help you easily deploy your application, this tool provides the
|
|
260
|
+
ability to automatically configure resources.
|
|
261
|
+
|
|
262
|
+
<!-- ✓ CORRECT - Direct statement -->
|
|
263
|
+
|
|
264
|
+
Automatically configures deployment resources.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Use active voice:**
|
|
268
|
+
|
|
269
|
+
```markdown
|
|
270
|
+
<!-- ❌ WRONG - Passive voice -->
|
|
271
|
+
|
|
272
|
+
The configuration file was updated and the tests were run.
|
|
273
|
+
|
|
274
|
+
<!-- ✓ CORRECT - Active voice -->
|
|
275
|
+
|
|
276
|
+
Updated the configuration file and ran tests.
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Know Your Audience
|
|
280
|
+
|
|
281
|
+
**Problem**: Technical documentation often assumes all readers have the same background, native English proficiency, and technical level. This creates barriers for international teams and readers with different roles.
|
|
282
|
+
|
|
283
|
+
**Key principle**: Identify your target audience and tailor content to their needs, language proficiency, and technical expertise.
|
|
284
|
+
|
|
285
|
+
#### Audience Identification
|
|
286
|
+
|
|
287
|
+
**Define reader roles explicitly:**
|
|
288
|
+
|
|
289
|
+
```markdown
|
|
290
|
+
<!-- ✓ CORRECT - Clear audience -->
|
|
291
|
+
|
|
292
|
+
## Database Migration Guide
|
|
293
|
+
|
|
294
|
+
**Audience**: Backend developers and database administrators
|
|
295
|
+
|
|
296
|
+
**Prerequisites**:
|
|
297
|
+
|
|
298
|
+
- PostgreSQL 14+ installed
|
|
299
|
+
- Admin access to production database
|
|
300
|
+
- Familiarity with SQL migrations
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Common audience types:**
|
|
304
|
+
|
|
305
|
+
- **Integration engineers**: Need technical depth and step-by-step walkthroughs
|
|
306
|
+
- **Operations specialists**: Need troubleshooting guides and runbooks
|
|
307
|
+
- **Architects**: Need system overviews and design considerations
|
|
308
|
+
- **End users**: Need simplified explanations without technical jargon
|
|
309
|
+
|
|
310
|
+
#### Writing for Non-Native English Speakers
|
|
311
|
+
|
|
312
|
+
Many development teams include members who do not use English as their first language. Follow these guidelines to ensure documentation is accessible:
|
|
313
|
+
|
|
314
|
+
**Use simple, direct language:**
|
|
315
|
+
|
|
316
|
+
```markdown
|
|
317
|
+
<!-- ❌ WRONG - Complex language -->
|
|
318
|
+
|
|
319
|
+
Leverage the synergistic capabilities of the system to facilitate
|
|
320
|
+
seamless integration across disparate platforms.
|
|
321
|
+
|
|
322
|
+
<!-- ✓ CORRECT - Simple language -->
|
|
323
|
+
|
|
324
|
+
Use the API to connect different systems.
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Write short sentences:**
|
|
328
|
+
|
|
329
|
+
```markdown
|
|
330
|
+
<!-- ❌ WRONG - Long, complex sentence -->
|
|
331
|
+
|
|
332
|
+
When configuring the handler, which should be done after installing
|
|
333
|
+
dependencies but before running tests, ensure that the endpoint URL
|
|
334
|
+
is set correctly in the configuration file.
|
|
335
|
+
|
|
336
|
+
<!-- ✓ CORRECT - Short sentences -->
|
|
337
|
+
|
|
338
|
+
Configure the handler after installing dependencies. Set the endpoint
|
|
339
|
+
URL in the configuration file. Run tests to verify the setup.
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Avoid idioms and cultural references:**
|
|
343
|
+
|
|
344
|
+
```markdown
|
|
345
|
+
<!-- ❌ WRONG - Idioms and slang -->
|
|
346
|
+
|
|
347
|
+
- This feature is a game-changer
|
|
348
|
+
- Let's touch base on the deployment
|
|
349
|
+
- The system went belly-up
|
|
350
|
+
- We need to think outside the box
|
|
351
|
+
|
|
352
|
+
<!-- ✓ CORRECT - Direct language -->
|
|
353
|
+
|
|
354
|
+
- This feature improves performance by 50%
|
|
355
|
+
- Schedule a deployment review meeting
|
|
356
|
+
- The system crashed
|
|
357
|
+
- Consider alternative approaches
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Avoid business jargon:**
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
<!-- ❌ WRONG - Business jargon -->
|
|
364
|
+
|
|
365
|
+
- Circle back
|
|
366
|
+
- Low-hanging fruit
|
|
367
|
+
- Move the needle
|
|
368
|
+
- Synergy
|
|
369
|
+
- Paradigm shift
|
|
370
|
+
- Deep dive
|
|
371
|
+
- Take offline
|
|
372
|
+
|
|
373
|
+
<!-- ✓ CORRECT - Clear alternatives -->
|
|
374
|
+
|
|
375
|
+
- Follow up
|
|
376
|
+
- Quick wins
|
|
377
|
+
- Make progress
|
|
378
|
+
- Integration
|
|
379
|
+
- Major change
|
|
380
|
+
- Detailed analysis
|
|
381
|
+
- Discuss separately
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
**Define abbreviations on first use:**
|
|
385
|
+
|
|
386
|
+
```markdown
|
|
387
|
+
<!-- ❌ WRONG - Undefined acronyms -->
|
|
388
|
+
|
|
389
|
+
Configure the CDN, IAM, and VPC before deploying to ECS.
|
|
390
|
+
|
|
391
|
+
<!-- ✓ CORRECT - Defined acronyms -->
|
|
392
|
+
|
|
393
|
+
Configure the CDN (Content Delivery Network), IAM (Identity and Access
|
|
394
|
+
Management), and VPC (Virtual Private Cloud) before deploying to ECS
|
|
395
|
+
(Elastic Container Service).
|
|
396
|
+
|
|
397
|
+
Subsequent references can use the acronym: "Update the IAM policies..."
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**Use consistent terminology:**
|
|
401
|
+
|
|
402
|
+
```markdown
|
|
403
|
+
<!-- ❌ WRONG - Inconsistent terms -->
|
|
404
|
+
|
|
405
|
+
1. Open the configuration file
|
|
406
|
+
2. Edit the config
|
|
407
|
+
3. Save the settings file
|
|
408
|
+
4. Close the configuration
|
|
409
|
+
|
|
410
|
+
<!-- ✓ CORRECT - Consistent terms -->
|
|
411
|
+
|
|
412
|
+
1. Open the configuration file
|
|
413
|
+
2. Edit the configuration file
|
|
414
|
+
3. Save the configuration file
|
|
415
|
+
4. Close the configuration file
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
#### Use Examples to Clarify
|
|
419
|
+
|
|
420
|
+
**Provide concrete examples:**
|
|
421
|
+
|
|
422
|
+
````markdown
|
|
423
|
+
<!-- ❌ WRONG - Abstract instruction -->
|
|
424
|
+
|
|
425
|
+
Ensure handlers are compatible with organizational standards.
|
|
426
|
+
|
|
427
|
+
<!-- ✓ CORRECT - Concrete example -->
|
|
428
|
+
|
|
429
|
+
Use the AVRO schema format for all message handlers:
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"type": "record",
|
|
434
|
+
"name": "UserEvent",
|
|
435
|
+
"fields": [
|
|
436
|
+
{ "name": "userId", "type": "string" },
|
|
437
|
+
{ "name": "timestamp", "type": "long" }
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
````
|
|
442
|
+
|
|
443
|
+
**Show before and after:**
|
|
444
|
+
|
|
445
|
+
````markdown
|
|
446
|
+
<!-- ✓ CORRECT - Before/after example -->
|
|
447
|
+
|
|
448
|
+
## Migrating from REST to GraphQL
|
|
449
|
+
|
|
450
|
+
**Before (REST):**
|
|
451
|
+
|
|
452
|
+
```text
|
|
453
|
+
GET /api/users/123
|
|
454
|
+
GET /api/users/123/posts
|
|
455
|
+
GET /api/users/123/comments
|
|
456
|
+
```
|
|
457
|
+
````
|
|
458
|
+
|
|
459
|
+
**After (GraphQL):**
|
|
460
|
+
|
|
461
|
+
```graphql
|
|
462
|
+
query {
|
|
463
|
+
user(id: 123) {
|
|
464
|
+
name
|
|
465
|
+
posts {
|
|
466
|
+
title
|
|
467
|
+
}
|
|
468
|
+
comments {
|
|
469
|
+
text
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
#### Visual Aids
|
|
476
|
+
|
|
477
|
+
**Use diagrams for complex concepts:**
|
|
478
|
+
|
|
479
|
+
```markdown
|
|
480
|
+
## System Architecture
|
|
481
|
+
|
|
482
|
+
```mermaid
|
|
483
|
+
graph LR
|
|
484
|
+
A[Client] --> B[API Gateway]
|
|
485
|
+
B --> C[Lambda Function]
|
|
486
|
+
C --> D[Database]
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
The client sends requests to the API Gateway. The gateway routes requests
|
|
490
|
+
to Lambda functions. Lambda functions query the database.
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Use tables for comparisons:**
|
|
494
|
+
|
|
495
|
+
| Feature | Option A | Option B |
|
|
496
|
+
| ---------- | ----------------- | -------------------- |
|
|
497
|
+
| Speed | Fast (< 100ms) | Moderate (200-500ms) |
|
|
498
|
+
| Cost | High ($500/month) | Low ($50/month) |
|
|
499
|
+
| Complexity | Simple | Complex |
|
|
500
|
+
|
|
501
|
+
**Use numbered lists for sequences:**
|
|
502
|
+
|
|
503
|
+
```markdown
|
|
504
|
+
## Deployment Process
|
|
505
|
+
|
|
506
|
+
1. Run tests: `npm test`
|
|
507
|
+
2. Build application: `npm run build`
|
|
508
|
+
3. Deploy to staging: `npm run deploy:staging`
|
|
509
|
+
4. Verify deployment: Check staging URL
|
|
510
|
+
5. Deploy to production: `npm run deploy:prod`
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
#### Structure by Priority
|
|
514
|
+
|
|
515
|
+
**Start with context, then action:**
|
|
516
|
+
|
|
517
|
+
```markdown
|
|
518
|
+
<!-- ✓ CORRECT - Context then action -->
|
|
519
|
+
|
|
520
|
+
## Database Backup
|
|
521
|
+
|
|
522
|
+
**Context**: Daily backups protect against data loss. Backups are stored
|
|
523
|
+
for 30 days.
|
|
524
|
+
|
|
525
|
+
**Your responsibility**: Verify backups complete successfully each day.
|
|
526
|
+
|
|
527
|
+
**Steps**:
|
|
528
|
+
|
|
529
|
+
1. Open monitoring dashboard
|
|
530
|
+
2. Check backup status
|
|
531
|
+
3. Review error logs if backup failed
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
**Put critical information first:**
|
|
535
|
+
|
|
536
|
+
```markdown
|
|
537
|
+
<!-- ✓ CORRECT - Critical info first -->
|
|
538
|
+
|
|
539
|
+
## Security Alert
|
|
540
|
+
|
|
541
|
+
⚠️ **Critical**: This endpoint requires authentication. Requests without
|
|
542
|
+
valid tokens will be rejected.
|
|
543
|
+
|
|
544
|
+
**Setup**:
|
|
545
|
+
|
|
546
|
+
1. Generate API token in dashboard
|
|
547
|
+
2. Add token to request headers
|
|
548
|
+
3. Test with curl command
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
#### Action-Oriented Instructions
|
|
552
|
+
|
|
553
|
+
**Use imperative verbs:**
|
|
554
|
+
|
|
555
|
+
```markdown
|
|
556
|
+
<!-- ❌ WRONG - Passive and vague -->
|
|
557
|
+
|
|
558
|
+
The configuration file should be opened and the API endpoint field
|
|
559
|
+
needs to be set to the target URL.
|
|
560
|
+
|
|
561
|
+
<!-- ✓ CORRECT - Active and specific -->
|
|
562
|
+
|
|
563
|
+
1. Open `config.json`
|
|
564
|
+
2. Set `API_ENDPOINT` to your target URL
|
|
565
|
+
3. Save the file
|
|
566
|
+
4. Restart the service
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
**Break down complex tasks:**
|
|
570
|
+
|
|
571
|
+
```markdown
|
|
572
|
+
## Configure Database Connection
|
|
573
|
+
|
|
574
|
+
**Simple task (keep together):**
|
|
575
|
+
|
|
576
|
+
1. Open `.env` file
|
|
577
|
+
2. Add `DATABASE_URL=postgresql://localhost:5432/mydb`
|
|
578
|
+
3. Save file
|
|
579
|
+
|
|
580
|
+
**Complex task (break into subtasks):**
|
|
581
|
+
|
|
582
|
+
### Step 1: Generate SSL Certificates
|
|
583
|
+
|
|
584
|
+
<details>
|
|
585
|
+
<summary><strong>Certificate generation instructions</strong></summary>
|
|
586
|
+
|
|
587
|
+
1. Install OpenSSL
|
|
588
|
+
2. Generate private key: `openssl genrsa -out private.key 2048`
|
|
589
|
+
3. Create certificate request: `openssl req -new -key private.key -out cert.csr`
|
|
590
|
+
|
|
591
|
+
</details>
|
|
592
|
+
|
|
593
|
+
### Step 2: Configure SSL in Database
|
|
594
|
+
|
|
595
|
+
<details>
|
|
596
|
+
<summary><strong>Database SSL configuration</strong></summary>
|
|
597
|
+
|
|
598
|
+
1. Copy certificate to database server
|
|
599
|
+
2. Update postgresql.conf
|
|
600
|
+
3. Restart PostgreSQL
|
|
601
|
+
|
|
602
|
+
</details>
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
## When to Use Collapsible Sections
|
|
606
|
+
|
|
607
|
+
### DO Collapse (Use `<details>/<summary>`)
|
|
608
|
+
|
|
609
|
+
**Code blocks with 10+ lines:**
|
|
610
|
+
|
|
611
|
+
````markdown
|
|
612
|
+
<details>
|
|
613
|
+
<summary><strong>Example: Database Connection Setup</strong></summary>
|
|
614
|
+
|
|
615
|
+
```typescript
|
|
616
|
+
// 15+ lines of code
|
|
617
|
+
const connection = createConnection({
|
|
618
|
+
host: "localhost",
|
|
619
|
+
// ... many more lines
|
|
620
|
+
});
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
</details>
|
|
624
|
+
````
|
|
625
|
+
|
|
626
|
+
**Step-by-step procedures:**
|
|
627
|
+
|
|
628
|
+
```markdown
|
|
629
|
+
<details>
|
|
630
|
+
<summary><strong>Step 1: Deploy Infrastructure</strong></summary>
|
|
631
|
+
|
|
632
|
+
1. Configure AWS credentials
|
|
633
|
+
2. Run deployment command
|
|
634
|
+
3. Verify resources created
|
|
635
|
+
4. Check CloudWatch logs
|
|
636
|
+
|
|
637
|
+
</details>
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
**Operational runbooks:**
|
|
641
|
+
|
|
642
|
+
```markdown
|
|
643
|
+
<details>
|
|
644
|
+
<summary><strong>Troubleshooting: Connection Timeout</strong></summary>
|
|
645
|
+
|
|
646
|
+
**Problem**: Database connection times out
|
|
647
|
+
|
|
648
|
+
**Solution**:
|
|
649
|
+
|
|
650
|
+
1. Check security group rules
|
|
651
|
+
2. Verify bastion tunnel is running
|
|
652
|
+
3. Test network connectivity
|
|
653
|
+
4. Review CloudWatch logs
|
|
654
|
+
|
|
655
|
+
</details>
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
**Optional/reference material:**
|
|
659
|
+
|
|
660
|
+
```markdown
|
|
661
|
+
<details>
|
|
662
|
+
<summary><strong>Advanced Configuration Options</strong></summary>
|
|
663
|
+
|
|
664
|
+
For advanced users, additional configuration is available...
|
|
665
|
+
|
|
666
|
+
</details>
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
**Long lists (10+ items with descriptions):**
|
|
670
|
+
|
|
671
|
+
```markdown
|
|
672
|
+
<details>
|
|
673
|
+
<summary><strong>Available Environment Variables</strong></summary>
|
|
674
|
+
|
|
675
|
+
- `DATABASE_URL` - PostgreSQL connection string
|
|
676
|
+
- `REDIS_URL` - Redis connection string
|
|
677
|
+
- ... (8+ more items)
|
|
678
|
+
|
|
679
|
+
</details>
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
**Nested subsections with multiple code examples:**
|
|
683
|
+
|
|
684
|
+
```markdown
|
|
685
|
+
### Configuration Options
|
|
686
|
+
|
|
687
|
+
<details>
|
|
688
|
+
<summary><strong>Local Development</strong></summary>
|
|
689
|
+
|
|
690
|
+
Configuration for local development environment...
|
|
691
|
+
|
|
692
|
+
</details>
|
|
693
|
+
|
|
694
|
+
<details>
|
|
695
|
+
<summary><strong>Production Deployment</strong></summary>
|
|
696
|
+
|
|
697
|
+
Configuration for production environment...
|
|
698
|
+
|
|
699
|
+
</details>
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
### DO NOT Collapse (Keep Visible)
|
|
703
|
+
|
|
704
|
+
**Short lists (2-5 items):**
|
|
705
|
+
|
|
706
|
+
```markdown
|
|
707
|
+
**Prerequisites:**
|
|
708
|
+
|
|
709
|
+
- Valid AWS credentials
|
|
710
|
+
- Node.js 18+
|
|
711
|
+
- Bun installed
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
**Main narrative content:**
|
|
715
|
+
|
|
716
|
+
```markdown
|
|
717
|
+
## Overview
|
|
718
|
+
|
|
719
|
+
This system provides real-time data replication from PostgreSQL to Redshift
|
|
720
|
+
using AWS DMS. The architecture supports both full-load and CDC modes.
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
**Simple definitions:**
|
|
724
|
+
|
|
725
|
+
```markdown
|
|
726
|
+
**IQ Tests (Installation Qualification)**: Verify deployed resources match configuration
|
|
727
|
+
**OQ Tests (Operational Qualification)**: Verify resources operate correctly
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
**Headers with no content:**
|
|
731
|
+
|
|
732
|
+
```markdown
|
|
733
|
+
## Architecture
|
|
734
|
+
|
|
735
|
+
<!-- Don't wrap headers alone in details tags -->
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
**Tables:**
|
|
739
|
+
|
|
740
|
+
```markdown
|
|
741
|
+
| Metric | Target | Current |
|
|
742
|
+
| ------ | ------ | ------- |
|
|
743
|
+
| Uptime | 99.9% | 99.95% |
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
**Diagrams and images:**
|
|
747
|
+
|
|
748
|
+
```markdown
|
|
749
|
+
## System Architecture
|
|
750
|
+
|
|
751
|
+
```mermaid
|
|
752
|
+
graph TD
|
|
753
|
+
A[Source] --> B[DMS]
|
|
754
|
+
B --> C[Target]
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
<!-- Keep diagrams visible for quick reference -->
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
**Short code examples (< 10 lines):**
|
|
761
|
+
|
|
762
|
+
```markdown
|
|
763
|
+
**Quick start:**
|
|
764
|
+
|
|
765
|
+
```bash
|
|
766
|
+
bun install
|
|
767
|
+
bun test
|
|
768
|
+
```
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
## Formatting Patterns
|
|
772
|
+
|
|
773
|
+
### Test Documentation
|
|
774
|
+
|
|
775
|
+
```markdown
|
|
776
|
+
## Test Strategy
|
|
777
|
+
|
|
778
|
+
### When to Run Tests
|
|
779
|
+
|
|
780
|
+
<details>
|
|
781
|
+
<summary><strong>Unit Tests (<code>bun run test:unit</code>)</strong></summary>
|
|
782
|
+
|
|
783
|
+
- **Run:** Always
|
|
784
|
+
- **Prerequisites:** None
|
|
785
|
+
- **Duration:** < 5 seconds
|
|
786
|
+
|
|
787
|
+
</details>
|
|
788
|
+
|
|
789
|
+
<details>
|
|
790
|
+
<summary><strong>Integration Tests (<code>bun run test:integration</code>)</strong></summary>
|
|
791
|
+
|
|
792
|
+
- **Run:** After infrastructure changes
|
|
793
|
+
- **Prerequisites:**
|
|
794
|
+
1. Valid AWS credentials
|
|
795
|
+
2. Bastion tunnel running
|
|
796
|
+
3. Deployed infrastructure
|
|
797
|
+
|
|
798
|
+
</details>
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
### Step-by-Step Workflows
|
|
802
|
+
|
|
803
|
+
````markdown
|
|
804
|
+
## Deployment Workflow
|
|
805
|
+
|
|
806
|
+
<details>
|
|
807
|
+
<summary><strong>Step 1: Prepare Environment</strong></summary>
|
|
808
|
+
|
|
809
|
+
Configure your environment:
|
|
810
|
+
|
|
811
|
+
```bash
|
|
812
|
+
aws sso login --profile company-dev
|
|
813
|
+
export AWS_PROFILE=company-dev
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
Verify credentials:
|
|
817
|
+
|
|
818
|
+
```bash
|
|
819
|
+
aws sts get-caller-identity
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
</details>
|
|
823
|
+
|
|
824
|
+
<details>
|
|
825
|
+
<summary><strong>Step 2: Deploy Infrastructure</strong></summary>
|
|
826
|
+
|
|
827
|
+
Run deployment:
|
|
828
|
+
|
|
829
|
+
```bash
|
|
830
|
+
bun sst deploy
|
|
831
|
+
```
|
|
832
|
+
|
|
833
|
+
Expected output:
|
|
834
|
+
|
|
835
|
+
```text
|
|
836
|
+
✓ Resources created
|
|
837
|
+
✓ Stack deployed successfully
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
</details>
|
|
841
|
+
````
|
|
842
|
+
|
|
843
|
+
### Configuration Documentation
|
|
844
|
+
|
|
845
|
+
````markdown
|
|
846
|
+
## Configuration
|
|
847
|
+
|
|
848
|
+
### Environment Variables
|
|
849
|
+
|
|
850
|
+
<details>
|
|
851
|
+
<summary><strong>Required Variables</strong></summary>
|
|
852
|
+
|
|
853
|
+
```bash
|
|
854
|
+
DATABASE_URL=postgresql://...
|
|
855
|
+
REDIS_URL=redis://...
|
|
856
|
+
API_KEY=...
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
</details>
|
|
860
|
+
|
|
861
|
+
<details>
|
|
862
|
+
<summary><strong>Optional Variables</strong></summary>
|
|
863
|
+
|
|
864
|
+
```bash
|
|
865
|
+
LOG_LEVEL=debug
|
|
866
|
+
ENABLE_METRICS=true
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
</details>
|
|
870
|
+
````
|
|
871
|
+
|
|
872
|
+
### Troubleshooting Sections
|
|
873
|
+
|
|
874
|
+
```markdown
|
|
875
|
+
## Troubleshooting
|
|
876
|
+
|
|
877
|
+
<details>
|
|
878
|
+
<summary><strong>Connection Timeout</strong></summary>
|
|
879
|
+
|
|
880
|
+
**Problem**: Database connection times out after 30 seconds
|
|
881
|
+
|
|
882
|
+
**Cause**: Security group rules blocking traffic
|
|
883
|
+
|
|
884
|
+
**Solution**:
|
|
885
|
+
|
|
886
|
+
1. Check security group ingress rules
|
|
887
|
+
2. Verify bastion tunnel is running
|
|
888
|
+
3. Test connectivity with netcat
|
|
889
|
+
|
|
890
|
+
</details>
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
### API/Code Reference
|
|
894
|
+
|
|
895
|
+
````markdown
|
|
896
|
+
## API Reference
|
|
897
|
+
|
|
898
|
+
### Authentication
|
|
899
|
+
|
|
900
|
+
<details>
|
|
901
|
+
<summary><strong><code>POST /auth/login</code></strong></summary>
|
|
902
|
+
|
|
903
|
+
**Request:**
|
|
904
|
+
|
|
905
|
+
```json
|
|
906
|
+
{
|
|
907
|
+
"username": "user",
|
|
908
|
+
"password": "pass"
|
|
909
|
+
}
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
**Response:**
|
|
913
|
+
|
|
914
|
+
```json
|
|
915
|
+
{
|
|
916
|
+
"token": "jwt-token",
|
|
917
|
+
"expires": "2024-01-01T00:00:00Z"
|
|
918
|
+
}
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
</details>
|
|
922
|
+
````
|
|
923
|
+
|
|
924
|
+
## Best Practices
|
|
925
|
+
|
|
926
|
+
### Summary Text
|
|
927
|
+
|
|
928
|
+
**Good (active, descriptive):**
|
|
929
|
+
|
|
930
|
+
```markdown
|
|
931
|
+
<summary><strong>Step 3: Run Integration Tests</strong></summary>
|
|
932
|
+
<summary><strong>Example: Deploy to Production</strong></summary>
|
|
933
|
+
<summary><strong>Troubleshooting: Connection Refused</strong></summary>
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
**Bad (vague, generic):**
|
|
937
|
+
|
|
938
|
+
```markdown
|
|
939
|
+
<summary>More information</summary>
|
|
940
|
+
<summary>Click here</summary>
|
|
941
|
+
<summary>Details</summary>
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
### Nesting Details
|
|
945
|
+
|
|
946
|
+
**Acceptable nesting (2 levels):**
|
|
947
|
+
|
|
948
|
+
```markdown
|
|
949
|
+
<details>
|
|
950
|
+
<summary><strong>Step 1: Deploy Infrastructure</strong></summary>
|
|
951
|
+
|
|
952
|
+
Main step content...
|
|
953
|
+
|
|
954
|
+
<details>
|
|
955
|
+
<summary><strong>Example: AWS CLI Command</strong></summary>
|
|
956
|
+
|
|
957
|
+
Nested example...
|
|
958
|
+
|
|
959
|
+
</details>
|
|
960
|
+
|
|
961
|
+
</details>
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
**Avoid deep nesting (3+ levels)** - restructure instead.
|
|
965
|
+
|
|
966
|
+
### Code Highlighting
|
|
967
|
+
|
|
968
|
+
Use inline `code` for:
|
|
969
|
+
|
|
970
|
+
- Commands: `bun run test`
|
|
971
|
+
- File names: `config.ts`
|
|
972
|
+
- Environment variables: `DATABASE_URL`
|
|
973
|
+
- Function names: `connectToDatabase()`
|
|
974
|
+
|
|
975
|
+
Use code blocks for:
|
|
976
|
+
|
|
977
|
+
- Multi-line commands
|
|
978
|
+
- Configuration files
|
|
979
|
+
- Code examples
|
|
980
|
+
- Output/logs
|
|
981
|
+
|
|
982
|
+
### Semantic HTML
|
|
983
|
+
|
|
984
|
+
**Strong emphasis:**
|
|
985
|
+
|
|
986
|
+
```markdown
|
|
987
|
+
<summary><strong>Important Section</strong></summary>
|
|
988
|
+
```
|
|
989
|
+
|
|
990
|
+
**Code in headers:**
|
|
991
|
+
|
|
992
|
+
```markdown
|
|
993
|
+
<summary><strong>Unit Tests (<code>bun run test:unit</code>)</strong></summary>
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
## Common Mistakes
|
|
997
|
+
|
|
998
|
+
### ❌ Collapsing Everything
|
|
999
|
+
|
|
1000
|
+
```markdown
|
|
1001
|
+
<details>
|
|
1002
|
+
<summary>Overview</summary>
|
|
1003
|
+
This is a data pipeline.
|
|
1004
|
+
</details>
|
|
1005
|
+
|
|
1006
|
+
<details>
|
|
1007
|
+
<summary>Features</summary>
|
|
1008
|
+
- Real-time replication
|
|
1009
|
+
- Automatic failover
|
|
1010
|
+
</details>
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
**Why wrong**: Hides essential information that should be immediately visible.
|
|
1014
|
+
|
|
1015
|
+
### ❌ Not Collapsing Long Code
|
|
1016
|
+
|
|
1017
|
+
```markdown
|
|
1018
|
+
## Configuration
|
|
1019
|
+
|
|
1020
|
+
```json
|
|
1021
|
+
{
|
|
1022
|
+
"database": {
|
|
1023
|
+
"host": "localhost",
|
|
1024
|
+
"port": 5432,
|
|
1025
|
+
// ... 50+ more lines
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
```
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
**Why wrong**: Forces reader to scroll past implementation details.
|
|
1032
|
+
|
|
1033
|
+
### ❌ Vague Summary Text
|
|
1034
|
+
|
|
1035
|
+
```markdown
|
|
1036
|
+
<details>
|
|
1037
|
+
<summary>More info</summary>
|
|
1038
|
+
Details about the thing...
|
|
1039
|
+
</details>
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
**Why wrong**: Reader doesn't know what's inside without expanding.
|
|
1043
|
+
|
|
1044
|
+
### ❌ Collapsing Tables
|
|
1045
|
+
|
|
1046
|
+
```markdown
|
|
1047
|
+
<details>
|
|
1048
|
+
<summary>Metrics Table</summary>
|
|
1049
|
+
|
|
1050
|
+
| Metric | Value |
|
|
1051
|
+
| ------ | ----- |
|
|
1052
|
+
| Speed | Fast |
|
|
1053
|
+
|
|
1054
|
+
</details>
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
**Why wrong**: Tables are meant to be scanned quickly.
|
|
1058
|
+
|
|
1059
|
+
## Testing Your Documentation
|
|
1060
|
+
|
|
1061
|
+
Ask these questions:
|
|
1062
|
+
|
|
1063
|
+
1. **Can I understand the structure without expanding anything?**
|
|
1064
|
+
- If no: Collapse less, show more headers/summaries
|
|
1065
|
+
|
|
1066
|
+
2. **Do I have to scroll past 20+ lines of code to reach the next section?**
|
|
1067
|
+
- If yes: Collapse the code block
|
|
1068
|
+
|
|
1069
|
+
3. **Are there step-by-step procedures visible on first read?**
|
|
1070
|
+
- If yes: Collapse each step
|
|
1071
|
+
|
|
1072
|
+
4. **Can I see diagrams and images immediately?**
|
|
1073
|
+
- If no: Remove details tags around visuals
|
|
1074
|
+
|
|
1075
|
+
5. **Are there 10+ list items in a row?**
|
|
1076
|
+
- If yes: Consider collapsing with descriptive summary
|
|
1077
|
+
|
|
1078
|
+
## Template: QA Documentation
|
|
1079
|
+
|
|
1080
|
+
````markdown
|
|
1081
|
+
# Quality Assurance Process
|
|
1082
|
+
|
|
1083
|
+
## Overview
|
|
1084
|
+
|
|
1085
|
+
Brief description of QA process and philosophy. Keep visible.
|
|
1086
|
+
|
|
1087
|
+
## Test Strategy
|
|
1088
|
+
|
|
1089
|
+
### When to Run Tests
|
|
1090
|
+
|
|
1091
|
+
<details>
|
|
1092
|
+
<summary><strong>Unit Tests (<code>bun run test:unit</code>)</strong></summary>
|
|
1093
|
+
|
|
1094
|
+
- **Run:** Always
|
|
1095
|
+
- **Prerequisites:** None
|
|
1096
|
+
- **Duration:** < 5 seconds
|
|
1097
|
+
|
|
1098
|
+
</details>
|
|
1099
|
+
|
|
1100
|
+
<details>
|
|
1101
|
+
<summary><strong>Integration Tests (<code>bun run test:integration</code>)</strong></summary>
|
|
1102
|
+
|
|
1103
|
+
- **Run:** After infrastructure changes
|
|
1104
|
+
- **Prerequisites:**
|
|
1105
|
+
1. Valid credentials
|
|
1106
|
+
2. Deployed infrastructure
|
|
1107
|
+
|
|
1108
|
+
</details>
|
|
1109
|
+
|
|
1110
|
+
### Workflows
|
|
1111
|
+
|
|
1112
|
+
<details>
|
|
1113
|
+
<summary><strong>Daily Development</strong></summary>
|
|
1114
|
+
|
|
1115
|
+
```bash
|
|
1116
|
+
bun run test:unit
|
|
1117
|
+
bun run typecheck
|
|
1118
|
+
bun run check
|
|
1119
|
+
```
|
|
1120
|
+
````
|
|
1121
|
+
|
|
1122
|
+
</details>
|
|
1123
|
+
|
|
1124
|
+
<details>
|
|
1125
|
+
<summary><strong>Pre-PR Validation</strong></summary>
|
|
1126
|
+
|
|
1127
|
+
```bash
|
|
1128
|
+
bun run test:unit
|
|
1129
|
+
bun run test:integration
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
</details>
|
|
1133
|
+
|
|
1134
|
+
## Test Execution
|
|
1135
|
+
|
|
1136
|
+
<details>
|
|
1137
|
+
<summary><strong>Local Development</strong></summary>
|
|
1138
|
+
|
|
1139
|
+
### Prerequisites
|
|
1140
|
+
|
|
1141
|
+
```bash
|
|
1142
|
+
aws sso login
|
|
1143
|
+
export AWS_PROFILE=dev
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
### Commands
|
|
1147
|
+
|
|
1148
|
+
```bash
|
|
1149
|
+
bun test
|
|
1150
|
+
```
|
|
1151
|
+
|
|
1152
|
+
</details>
|
|
1153
|
+
|
|
1154
|
+
## Troubleshooting
|
|
1155
|
+
|
|
1156
|
+
<details>
|
|
1157
|
+
<summary><strong>Connection Timeout</strong></summary>
|
|
1158
|
+
|
|
1159
|
+
**Problem**: Tests time out
|
|
1160
|
+
|
|
1161
|
+
**Solution**:
|
|
1162
|
+
|
|
1163
|
+
1. Check credentials
|
|
1164
|
+
2. Verify network access
|
|
1165
|
+
|
|
1166
|
+
</details>
|
|
1167
|
+
|
|
1168
|
+
## Summary
|
|
1169
|
+
|
|
1170
|
+
**Golden rule**: Show structure and concepts, hide implementation and procedures.
|
|
1171
|
+
|
|
1172
|
+
**Formatting decisions:**
|
|
1173
|
+
|
|
1174
|
+
Always collapse:
|
|
1175
|
+
|
|
1176
|
+
- Code blocks (10+ lines)
|
|
1177
|
+
- Step-by-step procedures
|
|
1178
|
+
- Optional/advanced content
|
|
1179
|
+
|
|
1180
|
+
Always keep visible:
|
|
1181
|
+
|
|
1182
|
+
- Diagrams and images
|
|
1183
|
+
- Short lists (less than 10 items)
|
|
1184
|
+
- Main narrative content
|
|
1185
|
+
- Tables and metrics
|
|
1186
|
+
|
|
1187
|
+
Best practices:
|
|
1188
|
+
|
|
1189
|
+
- Use descriptive summary text
|
|
1190
|
+
- Avoid deep nesting (max 2 levels)
|
|
1191
|
+
- No emojis in headers or as decoration
|
|
1192
|
+
- No checkbox lists - use grouped sections instead
|
|
1193
|
+
- Write in active voice with specific details
|
|
1194
|
+
- Avoid AI adjectives (robust, comprehensive, seamless)
|
|
1195
|
+
- Replace vague claims with quantified facts
|
|
1196
|
+
- Eliminate filler phrases ("helps you to", "allows you to")
|
|
1197
|
+
|
|
1198
|
+
Audience awareness:
|
|
1199
|
+
|
|
1200
|
+
- Identify target reader roles explicitly
|
|
1201
|
+
- Use simple language for non-native English speakers
|
|
1202
|
+
- Write short, clear sentences
|
|
1203
|
+
- Avoid idioms, slang, and business jargon
|
|
1204
|
+
- Define abbreviations on first use
|
|
1205
|
+
- Maintain consistent terminology throughout
|
|
1206
|
+
- Provide concrete examples and visual aids
|
|
1207
|
+
- Structure content by priority (context before action)
|
|
1208
|
+
|
|
1209
|
+
**Result**: Documentation that's scannable on first read, with details available when needed.
|