opensearch-sugar 1.0.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.
- checksums.yaml +7 -0
- data/.agents/skills/diataxis/SKILL.md +142 -0
- data/.agents/skills/diataxis/references/examples.md +420 -0
- data/.agents/skills/diataxis/references/explanation-template.md +96 -0
- data/.agents/skills/diataxis/references/framework.md +400 -0
- data/.agents/skills/diataxis/references/how-to-guide-template.md +105 -0
- data/.agents/skills/diataxis/references/reference-template.md +110 -0
- data/.agents/skills/diataxis/references/tutorial-template.md +101 -0
- data/.agents/skills/diataxis/scripts/generate_index.py +139 -0
- data/.rspec +3 -0
- data/.standard.yml +3 -0
- data/AGENTS.md +120 -0
- data/CHANGELOG.md +5 -0
- data/Dockerfile.opensearch +4 -0
- data/Increase_Coverage.md +311 -0
- data/README.md +143 -0
- data/Rakefile +27 -0
- data/Steepfile +23 -0
- data/adrs/ADR-000-template.md +87 -0
- data/adrs/ADR-001-simpledelegator-for-client.md +138 -0
- data/adrs/ADR-002-facade-pattern-for-index.md +126 -0
- data/adrs/ADR-003-repository-pattern-for-models.md +148 -0
- data/adrs/ADR-004-integration-tests-no-mocking.md +91 -0
- data/adrs/ADR-005-exceptions-over-result-objects.md +107 -0
- data/adrs/ADR-006-ssl-on-by-default.md +95 -0
- data/adrs/ADR-007-selective-sugar-surface.md +118 -0
- data/adrs/ADR-008-integration-test-design.md +178 -0
- data/compose.yml +2 -0
- data/compose_opensearch.yml +31 -0
- data/docs/HOWTO.md +844 -0
- data/docs/REFERENCE.md +725 -0
- data/docs/TUTORIAL.md +327 -0
- data/docs/alias-api-design-notes.md +119 -0
- data/lib/opensearch/sugar/client.rb +300 -0
- data/lib/opensearch/sugar/index/include/utilities.rb +6 -0
- data/lib/opensearch/sugar/index.rb +339 -0
- data/lib/opensearch/sugar/models.rb +209 -0
- data/lib/opensearch/sugar/version.rb +8 -0
- data/lib/opensearch/sugar.rb +61 -0
- data/old_docs/DELEGATED_METHODS_ANALYSIS.md +361 -0
- data/old_docs/EXPLANATION.md +685 -0
- data/old_docs/README.md +155 -0
- data/old_docs/docs/CLI-PROPOSAL.md +257 -0
- data/old_docs/docs/HOWTO.md +798 -0
- data/old_docs/docs/REFERENCE.md +901 -0
- data/old_docs/docs/TUTORIAL.md +493 -0
- data/sig/opensearch/sugar.rbs +162 -0
- metadata +240 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# Diátaxis Framework - Complete Guide
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
1. [Tutorials (Learning-Oriented)](#tutorials)
|
|
6
|
+
2. [How-to Guides (Task-Oriented)](#how-to-guides)
|
|
7
|
+
3. [Reference (Information-Oriented)](#reference)
|
|
8
|
+
4. [Explanation (Understanding-Oriented)](#explanation)
|
|
9
|
+
5. [Anti-Patterns to Avoid](#anti-patterns)
|
|
10
|
+
6. [Quality Checklist](#quality-checklist)
|
|
11
|
+
|
|
12
|
+
## Tutorials
|
|
13
|
+
|
|
14
|
+
Tutorials are **lessons** that guide learners through practical activities under your guidance. Think of a cookbook recipe that a cooking student would follow while learning.
|
|
15
|
+
|
|
16
|
+
### Purpose
|
|
17
|
+
|
|
18
|
+
- Teach skills through guided practice
|
|
19
|
+
- Build confidence and competence
|
|
20
|
+
- Create the "feeling of doing" — joined-up purpose, action, and result
|
|
21
|
+
- Minimize cognitive load while maximizing practical progress
|
|
22
|
+
|
|
23
|
+
### Key Principles
|
|
24
|
+
|
|
25
|
+
✓ **Show the destination upfront** — "By the end, you'll have X"
|
|
26
|
+
|
|
27
|
+
✓ **Deliver visible results early and often** — Users see progress quickly
|
|
28
|
+
|
|
29
|
+
✓ **Maintain narrative of expectations** — "You will notice that…", "You should see…"
|
|
30
|
+
|
|
31
|
+
✓ **Point out what learners should observe** — Guide attention to important details
|
|
32
|
+
|
|
33
|
+
✓ **Focus on the concrete, not abstract** — Use specific, tangible examples
|
|
34
|
+
|
|
35
|
+
✓ **Ruthlessly minimize explanation** — Link to it, don't embed it
|
|
36
|
+
|
|
37
|
+
✓ **Encourage and permit repetition** — Let users practice multiple times
|
|
38
|
+
|
|
39
|
+
✓ **Ignore options and alternatives** — Teach one way; link to alternatives elsewhere
|
|
40
|
+
|
|
41
|
+
✓ **Aspire to perfect reliability** — Every step must work as described
|
|
42
|
+
|
|
43
|
+
### Language Patterns
|
|
44
|
+
|
|
45
|
+
- "We will…" (first-person plural, tutor-learner relationship)
|
|
46
|
+
- "In this tutorial, we will create…"
|
|
47
|
+
- "First, do X. Now, do Y."
|
|
48
|
+
- "The output should look something like…"
|
|
49
|
+
- "Notice that… Remember that… Let's check…"
|
|
50
|
+
- Imperative: "Click", "Type", "Choose"
|
|
51
|
+
- Use numbered steps: 1, 2, 3
|
|
52
|
+
|
|
53
|
+
### Structure Template
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
# Getting Started with [Topic]
|
|
57
|
+
|
|
58
|
+
Learn how to [specific skill] in [timeframe].
|
|
59
|
+
|
|
60
|
+
## What you'll build
|
|
61
|
+
[Clear description of the end result]
|
|
62
|
+
|
|
63
|
+
## Before you start
|
|
64
|
+
[Prerequisites, no more than 3-4 items]
|
|
65
|
+
|
|
66
|
+
## Step 1: [Concrete task]
|
|
67
|
+
[Instructions with expected output]
|
|
68
|
+
|
|
69
|
+
## Step 2: [Concrete task]
|
|
70
|
+
[Instructions with expected output]
|
|
71
|
+
|
|
72
|
+
## What you've learned
|
|
73
|
+
[Summary of skills acquired]
|
|
74
|
+
|
|
75
|
+
## Next steps
|
|
76
|
+
- [Link to how-to guide for next goal]
|
|
77
|
+
- [Link to explanation for deeper understanding]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### What to Avoid
|
|
81
|
+
|
|
82
|
+
- Don't explain why things work — link to Explanation instead
|
|
83
|
+
- Don't offer choices or alternatives — teach one way
|
|
84
|
+
- Don't assume prior knowledge — link to Tutorials for prerequisites
|
|
85
|
+
- Don't jump to advanced topics
|
|
86
|
+
- Don't say "you might want to" — be directive
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## How-to Guides
|
|
91
|
+
|
|
92
|
+
How-to guides are **directions** that solve real-world problems. They assume competence and focus on accomplishing a specific task. Think of a recipe a chef uses to make a dish they already know how to make.
|
|
93
|
+
|
|
94
|
+
### Purpose
|
|
95
|
+
|
|
96
|
+
- Solve specific, practical problems
|
|
97
|
+
- Address real-world complexity and edge cases
|
|
98
|
+
- Serve as a reference while doing work
|
|
99
|
+
- Provide executable instructions as a contract
|
|
100
|
+
|
|
101
|
+
### Key Principles
|
|
102
|
+
|
|
103
|
+
✓ **Goal-oriented** — Solve a clear, concrete problem
|
|
104
|
+
|
|
105
|
+
✓ **Assume competence** — User knows the basics; don't teach foundational skills
|
|
106
|
+
|
|
107
|
+
✓ **Omit the unnecessary** — Practical usability over completeness
|
|
108
|
+
|
|
109
|
+
✓ **Logical sequence** — Steps flow in a natural, thinking-driven order
|
|
110
|
+
|
|
111
|
+
✓ **Seek flow** — Smooth progress grounded in how users actually think
|
|
112
|
+
|
|
113
|
+
✓ **Executable instructions** — Every step works; it's a contract
|
|
114
|
+
|
|
115
|
+
✓ **Real-world complexity** — Address common variations and edge cases
|
|
116
|
+
|
|
117
|
+
✓ **Clear naming** — "How to [achieve specific outcome]"
|
|
118
|
+
|
|
119
|
+
### Language Patterns
|
|
120
|
+
|
|
121
|
+
- "This guide shows you how to…"
|
|
122
|
+
- "If you want X, do Y. To achieve W, do Z."
|
|
123
|
+
- "Refer to the X reference guide for full options."
|
|
124
|
+
- "When you encounter [situation], [action]"
|
|
125
|
+
- "To accomplish X, follow these steps:"
|
|
126
|
+
- Conditional: "If X, then do Y"
|
|
127
|
+
|
|
128
|
+
### Structure Template
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
# How to [Achieve Specific Outcome]
|
|
132
|
+
|
|
133
|
+
This guide shows you how to [outcome] without [common pitfall].
|
|
134
|
+
|
|
135
|
+
## When to use this guide
|
|
136
|
+
[Who this is for, what problem it solves]
|
|
137
|
+
|
|
138
|
+
## Before you start
|
|
139
|
+
[Minimal prerequisites]
|
|
140
|
+
|
|
141
|
+
## Steps
|
|
142
|
+
|
|
143
|
+
### [Subtask 1]
|
|
144
|
+
[Instructions]
|
|
145
|
+
|
|
146
|
+
### [Subtask 2]
|
|
147
|
+
[Instructions]
|
|
148
|
+
|
|
149
|
+
## Troubleshooting
|
|
150
|
+
|
|
151
|
+
**Problem: X**
|
|
152
|
+
Solution: Y
|
|
153
|
+
|
|
154
|
+
## Next steps
|
|
155
|
+
- [Link to related how-to guides]
|
|
156
|
+
- [Link to reference for advanced options]
|
|
157
|
+
- [Link to explanation for conceptual background]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### What to Avoid
|
|
161
|
+
|
|
162
|
+
- Don't teach basic skills — link to Tutorials
|
|
163
|
+
- Don't explain why things work — link to Explanation
|
|
164
|
+
- Don't offer unnecessary alternatives — focus on the most direct path
|
|
165
|
+
- Don't assume prior knowledge — link to Tutorial prerequisites
|
|
166
|
+
- Don't be overly comprehensive — link to Reference for full options
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Reference
|
|
171
|
+
|
|
172
|
+
Reference guides are **technical descriptions** of machinery. They are austere, accurate, and consulted rather than read. Think of a dictionary or API documentation.
|
|
173
|
+
|
|
174
|
+
### Purpose
|
|
175
|
+
|
|
176
|
+
- Provide complete, accurate information
|
|
177
|
+
- Describe how things work, not how to use them
|
|
178
|
+
- Support lookups and exploration
|
|
179
|
+
- Be authoritative and unambiguous
|
|
180
|
+
|
|
181
|
+
### Key Principles
|
|
182
|
+
|
|
183
|
+
✓ **Describe and only describe** — No instructions, only facts
|
|
184
|
+
|
|
185
|
+
✓ **Neutral and objective** — No opinions, preferences, or guidance
|
|
186
|
+
|
|
187
|
+
✓ **Precise and accurate** — No approximations or "mostly correct"
|
|
188
|
+
|
|
189
|
+
✓ **Structured by machinery** — Mirror how the system is actually built
|
|
190
|
+
|
|
191
|
+
✓ **Adopt standard patterns** — Use consistent structure throughout
|
|
192
|
+
|
|
193
|
+
✓ **Comprehensive** — Include all significant options and parameters
|
|
194
|
+
|
|
195
|
+
✓ **Wholly authoritative** — No doubt or ambiguity
|
|
196
|
+
|
|
197
|
+
✓ **Examples for illustration** — Show without instructing
|
|
198
|
+
|
|
199
|
+
### Language Patterns
|
|
200
|
+
|
|
201
|
+
- "X is a [noun] that [describes function]"
|
|
202
|
+
- "X inherits from Y and is defined in Z"
|
|
203
|
+
- "Sub-commands are: a, b, c, d, e, f"
|
|
204
|
+
- "Must use A. Must not apply B unless C."
|
|
205
|
+
- "Optional. Default: X"
|
|
206
|
+
- Lists and tables for comparison
|
|
207
|
+
- Definitions that stand alone
|
|
208
|
+
|
|
209
|
+
### Structure Template
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
# [Component] Reference
|
|
213
|
+
|
|
214
|
+
[One-sentence description of what this is]
|
|
215
|
+
|
|
216
|
+
## Overview
|
|
217
|
+
[Concise technical description]
|
|
218
|
+
|
|
219
|
+
## [Category 1]
|
|
220
|
+
|
|
221
|
+
### [Item 1]
|
|
222
|
+
- Description
|
|
223
|
+
- Parameters/options
|
|
224
|
+
- Examples (illustrative, not instructional)
|
|
225
|
+
|
|
226
|
+
### [Item 2]
|
|
227
|
+
[Same structure]
|
|
228
|
+
|
|
229
|
+
## [Category 2]
|
|
230
|
+
|
|
231
|
+
[Same structure]
|
|
232
|
+
|
|
233
|
+
## Related references
|
|
234
|
+
- [Other reference pages]
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### What to Avoid
|
|
238
|
+
|
|
239
|
+
- Don't include how-to instructions — link to How-to Guides
|
|
240
|
+
- Don't explain philosophy or design decisions — link to Explanation
|
|
241
|
+
- Don't organize by use case — organize by structure
|
|
242
|
+
- Don't simplify for beginners — be complete and precise
|
|
243
|
+
- Don't offer opinions or recommendations
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Explanation
|
|
248
|
+
|
|
249
|
+
Explanation is **discursive discussion** that deepens understanding. It answers "Why?" and "Can you tell me about…?" Think of an essay or research paper.
|
|
250
|
+
|
|
251
|
+
### Purpose
|
|
252
|
+
|
|
253
|
+
- Provide conceptual clarity
|
|
254
|
+
- Explain design decisions and tradeoffs
|
|
255
|
+
- Connect to broader context
|
|
256
|
+
- Acknowledge complexity and alternatives
|
|
257
|
+
|
|
258
|
+
### Key Principles
|
|
259
|
+
|
|
260
|
+
✓ **Make connections** — Relate to other concepts and contexts
|
|
261
|
+
|
|
262
|
+
✓ **Provide background** — Design decisions, history, constraints, tradeoffs
|
|
263
|
+
|
|
264
|
+
✓ **Talk about the subject** — Titles should work with "About…" prefix
|
|
265
|
+
|
|
266
|
+
✓ **Admit perspective** — Acknowledge limitations and alternatives
|
|
267
|
+
|
|
268
|
+
✓ **Weigh alternatives** — Show why one approach is chosen over others
|
|
269
|
+
|
|
270
|
+
✓ **Bound the discussion** — Don't absorb instructions or reference
|
|
271
|
+
|
|
272
|
+
✓ **Answer "why" questions** — Not "how" or "what"
|
|
273
|
+
|
|
274
|
+
### Language Patterns
|
|
275
|
+
|
|
276
|
+
- "The reason for X is because historically, Y…"
|
|
277
|
+
- "W is better than Z, because…"
|
|
278
|
+
- "X in system Y is analogous to W in system Z. However…"
|
|
279
|
+
- "Some users prefer W (because Z). This can work well, but…"
|
|
280
|
+
- "The tradeoff is…"
|
|
281
|
+
- "An important design decision was…"
|
|
282
|
+
- "Historically, X…"
|
|
283
|
+
|
|
284
|
+
### Structure Template
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
# About [Subject]
|
|
288
|
+
|
|
289
|
+
[One sentence explaining what this is about]
|
|
290
|
+
|
|
291
|
+
## Background
|
|
292
|
+
[Historical context or why this matters]
|
|
293
|
+
|
|
294
|
+
## The core concept
|
|
295
|
+
[What is this, fundamentally]
|
|
296
|
+
|
|
297
|
+
## [Design aspect 1]
|
|
298
|
+
|
|
299
|
+
[Discussion of why this was chosen, tradeoffs, alternatives]
|
|
300
|
+
|
|
301
|
+
## [Design aspect 2]
|
|
302
|
+
|
|
303
|
+
[Discussion of why this was chosen, tradeoffs, alternatives]
|
|
304
|
+
|
|
305
|
+
## Comparison to [similar concept]
|
|
306
|
+
[How this relates to similar ideas]
|
|
307
|
+
|
|
308
|
+
## Further reading
|
|
309
|
+
- [Tutorial for learning]
|
|
310
|
+
- [How-to guide for using]
|
|
311
|
+
- [Reference for details]
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### What to Avoid
|
|
315
|
+
|
|
316
|
+
- Don't write instructions — link to How-to Guides
|
|
317
|
+
- Don't describe machinery — link to Reference
|
|
318
|
+
- Don't teach from scratch — link to Tutorials
|
|
319
|
+
- Don't be neutral/objective — acknowledge perspective
|
|
320
|
+
- Don't try to be complete — bound the discussion
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Anti-Patterns to Avoid
|
|
325
|
+
|
|
326
|
+
### Problem: Mixed Categories
|
|
327
|
+
|
|
328
|
+
Content that tries to serve multiple user needs at once confuses readers.
|
|
329
|
+
|
|
330
|
+
**Example:** A tutorial that explains why each step works (mixing Tutorial + Explanation)
|
|
331
|
+
|
|
332
|
+
**Solution:** Keep tutorial concrete and focused. Link to Explanation for deeper understanding.
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### Problem: Tutorials That Teach Too Little
|
|
337
|
+
|
|
338
|
+
Tutorials that treat readers as complete beginners and provide extensive explanation.
|
|
339
|
+
|
|
340
|
+
**Example:** "In step 1, we will click the button. The button is a UI element that when clicked performs an action. Buttons are important in software…"
|
|
341
|
+
|
|
342
|
+
**Solution:** Focus on action. Link to Explanation for background.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
### Problem: How-to Guides That Teach
|
|
347
|
+
|
|
348
|
+
How-to guides that assume no prior knowledge and over-explain basics.
|
|
349
|
+
|
|
350
|
+
**Example:** "To configure X, you need to understand Y first. Y is a fundamental concept in…"
|
|
351
|
+
|
|
352
|
+
**Solution:** Link to Tutorial for fundamentals. Assume reader knows basics.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
### Problem: Reference That Instructs
|
|
357
|
+
|
|
358
|
+
Reference that includes steps and guidance instead of just describing machinery.
|
|
359
|
+
|
|
360
|
+
**Example:** "To use the API endpoint X, first set up authentication. Here's how…"
|
|
361
|
+
|
|
362
|
+
**Solution:** Keep Reference purely descriptive. Link to How-to Guide for instructions.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
### Problem: Explanation That Instructs
|
|
367
|
+
|
|
368
|
+
Explanation that embeds how-to steps instead of linking to them.
|
|
369
|
+
|
|
370
|
+
**Example:** "The reason we use caching is to improve performance. To implement caching, follow these steps…"
|
|
371
|
+
|
|
372
|
+
**Solution:** Explain the "why". Link to How-to Guide for implementation.
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Quality Checklist
|
|
377
|
+
|
|
378
|
+
For each documentation piece, verify:
|
|
379
|
+
|
|
380
|
+
- [ ] **Single category** — Serves exactly one user need
|
|
381
|
+
- [ ] **No category pollution** — Other categories are linked, not embedded
|
|
382
|
+
- [ ] **Correct orientation** — Matches the right cell in the matrix
|
|
383
|
+
- [ ] **Appropriate language** — Uses category-specific patterns and tone
|
|
384
|
+
- [ ] **Proper structure** — Follows category conventions
|
|
385
|
+
- [ ] **Complete within scope** — Serves its purpose fully
|
|
386
|
+
- [ ] **Clear naming** — Title reflects content and category
|
|
387
|
+
- [ ] **Minimal links** — Relates to all four categories without being cluttered
|
|
388
|
+
- [ ] **Tested execution** — For tutorials/how-to guides, steps actually work
|
|
389
|
+
- [ ] **Accuracy verified** — For reference/explanation, facts are correct
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## Matrix Quick Reference
|
|
394
|
+
|
|
395
|
+
| | Practical | Theoretical |
|
|
396
|
+
| ------------ | ----------------------------------- | ---------------------------------- |
|
|
397
|
+
| **Learning** | **Tutorials** — "We will…" | **Explanation** — "Why is…" |
|
|
398
|
+
| **Working** | **How-to Guides** — "To achieve X…" | **Reference** — "X is defined as…" |
|
|
399
|
+
|
|
400
|
+
Choose the right quadrant, follow its principles, and everything else falls into place.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# How-to Guide Template
|
|
2
|
+
|
|
3
|
+
**Purpose**: Solve a specific, real-world problem. User is competent and wants to get work done.
|
|
4
|
+
|
|
5
|
+
**Key Characteristics**:
|
|
6
|
+
- Addresses a specific goal or problem
|
|
7
|
+
- Assumes competence (links to Tutorials if needed)
|
|
8
|
+
- Action-focused, no digression
|
|
9
|
+
- Practical and adaptable to variations
|
|
10
|
+
- Omits unnecessary details
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# How to [Achieve specific outcome]
|
|
16
|
+
|
|
17
|
+
This guide shows you how to [outcome] when [situation/context].
|
|
18
|
+
|
|
19
|
+
## When to use this guide
|
|
20
|
+
|
|
21
|
+
[Who should use this and what problem it solves]
|
|
22
|
+
|
|
23
|
+
Example: "Use this if you need to migrate your database to a new server
|
|
24
|
+
while minimizing downtime."
|
|
25
|
+
|
|
26
|
+
## Before you start
|
|
27
|
+
|
|
28
|
+
[Minimal prerequisites]
|
|
29
|
+
- [Access or permission]
|
|
30
|
+
- [Tool or service]
|
|
31
|
+
- [Basic knowledge]
|
|
32
|
+
|
|
33
|
+
## Context
|
|
34
|
+
|
|
35
|
+
[Brief explanation of why this matters, if helpful. Keep it short.]
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
### [Subtask 1: Clear verb]
|
|
40
|
+
|
|
41
|
+
[Practical directions addressing the user's goal]
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[Command or action]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### [Subtask 2: Clear verb]
|
|
48
|
+
|
|
49
|
+
[Continue with next subtask]
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
|
|
53
|
+
**Problem: [Common issue]**
|
|
54
|
+
Solution: [How to fix it]
|
|
55
|
+
|
|
56
|
+
**Problem: [Another issue]**
|
|
57
|
+
Solution: [How to fix it]
|
|
58
|
+
|
|
59
|
+
## Variations
|
|
60
|
+
|
|
61
|
+
If you need to [alternative goal], instead do X instead of Y at step 2.
|
|
62
|
+
|
|
63
|
+
## Related guides
|
|
64
|
+
|
|
65
|
+
- [How-to Guide] for similar task
|
|
66
|
+
- [How-to Guide] for related task
|
|
67
|
+
- [Reference] for complete options
|
|
68
|
+
|
|
69
|
+
## See also
|
|
70
|
+
|
|
71
|
+
- [Explanation] for "why this approach"
|
|
72
|
+
- [Tutorial] for learning this skill from scratch
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Language Patterns
|
|
76
|
+
|
|
77
|
+
Use these patterns consistently throughout your how-to guide:
|
|
78
|
+
|
|
79
|
+
| Pattern | Example |
|
|
80
|
+
|---------|---------|
|
|
81
|
+
| **This guide shows you how to…** | "This guide shows you how to configure single sign-on with OAuth2." |
|
|
82
|
+
| **If you want X, do Y** | "If you want to run tests in parallel, add the `--workers=4` flag." |
|
|
83
|
+
| **To achieve W, follow these steps** | "To minimize downtime, follow these steps:" |
|
|
84
|
+
| **When you encounter [situation]** | "When you encounter a timeout, increase the connection timeout to 30s." |
|
|
85
|
+
| **Refer to the X reference for full options** | "Refer to the configuration reference for all available settings." |
|
|
86
|
+
|
|
87
|
+
## Key Principles to Remember
|
|
88
|
+
|
|
89
|
+
✓ **Address real-world complexity** — Handle common variations and edge cases
|
|
90
|
+
|
|
91
|
+
✓ **Omit the unnecessary** — Practical usability over completeness
|
|
92
|
+
|
|
93
|
+
✓ **Assume competence** — Link to tutorials for foundational skills
|
|
94
|
+
|
|
95
|
+
✓ **Provide executable instructions** — Every step works; it's a contract
|
|
96
|
+
|
|
97
|
+
✓ **Describe a logical sequence** — Steps flow in a natural, thinking-driven order
|
|
98
|
+
|
|
99
|
+
✓ **Seek flow** — Minimize context switching; guide user thinking
|
|
100
|
+
|
|
101
|
+
✓ **Pay attention to naming** — Title must say exactly what the guide shows
|
|
102
|
+
|
|
103
|
+
## Example
|
|
104
|
+
|
|
105
|
+
See [examples.md](examples.md#example-2-how-to-guide) for a complete working example: "How to migrate a PostgreSQL database with zero downtime"
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Reference Template
|
|
2
|
+
|
|
3
|
+
**Purpose**: Describe the machinery accurately and completely. User consults it, doesn't read it.
|
|
4
|
+
|
|
5
|
+
**Key Characteristics**:
|
|
6
|
+
- Neutral, objective, factual
|
|
7
|
+
- Structured by the system, not by use case
|
|
8
|
+
- Standard patterns and format
|
|
9
|
+
- Comprehensive but concise
|
|
10
|
+
- Examples for illustration, not instruction
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# [Component/API/Feature] Reference
|
|
16
|
+
|
|
17
|
+
[One sentence: what this thing is]
|
|
18
|
+
|
|
19
|
+
Example: "The Configuration API provides programmatic access to all
|
|
20
|
+
settings for the MyApp service."
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
[Technical description of what this does, how it fits into the system]
|
|
25
|
+
|
|
26
|
+
Example: "Authentication in MyApp uses JWT tokens issued by the
|
|
27
|
+
Identity Service and validated by all API endpoints."
|
|
28
|
+
|
|
29
|
+
## [Category 1: Organized by system structure]
|
|
30
|
+
|
|
31
|
+
### [Item]
|
|
32
|
+
|
|
33
|
+
[Description]
|
|
34
|
+
|
|
35
|
+
**Parameters** (if applicable)
|
|
36
|
+
| Name | Type | Required | Description |
|
|
37
|
+
|------|------|----------|-------------|
|
|
38
|
+
| param1 | string | Yes | [Description] |
|
|
39
|
+
| param2 | boolean | No | [Description] |
|
|
40
|
+
|
|
41
|
+
**Returns** (if applicable)
|
|
42
|
+
[Description of what is returned]
|
|
43
|
+
|
|
44
|
+
**Example**
|
|
45
|
+
```
|
|
46
|
+
[Concrete example showing usage]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Notes**
|
|
50
|
+
- [Important limitation or constraint]
|
|
51
|
+
- [When to use vs. alternative]
|
|
52
|
+
|
|
53
|
+
### [Next item]
|
|
54
|
+
|
|
55
|
+
[Same structure]
|
|
56
|
+
|
|
57
|
+
## [Category 2: Another section]
|
|
58
|
+
|
|
59
|
+
[Repeat structure]
|
|
60
|
+
|
|
61
|
+
## Error messages
|
|
62
|
+
|
|
63
|
+
| Error | Meaning | Solution |
|
|
64
|
+
|-------|---------|----------|
|
|
65
|
+
| 401 Unauthorized | [What this means] | [How to fix] |
|
|
66
|
+
| 404 Not Found | [What this means] | [How to fix] |
|
|
67
|
+
|
|
68
|
+
## Constraints
|
|
69
|
+
|
|
70
|
+
- [Limitation or boundary]
|
|
71
|
+
- [Edge case to be aware of]
|
|
72
|
+
|
|
73
|
+
## Related references
|
|
74
|
+
|
|
75
|
+
- [Other reference pages]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Language Patterns
|
|
79
|
+
|
|
80
|
+
Use these patterns consistently throughout your reference:
|
|
81
|
+
|
|
82
|
+
| Pattern | Example |
|
|
83
|
+
|---------|---------|
|
|
84
|
+
| **X is a [type] that [describes function]** | "The logger is a singleton object that handles all event logging." |
|
|
85
|
+
| **X inherits from Y, defined in Z** | "RequestHandler inherits from BaseHandler, defined in core/handlers.py." |
|
|
86
|
+
| **Sub-commands are: a, b, c** | "Commands are: list, create, delete, update." |
|
|
87
|
+
| **You must X. You must not Y unless Z** | "You must authenticate with OAuth2. You must not use API keys on public networks." |
|
|
88
|
+
| **May contain. Default: X** | "May contain traces of X. Default value: 1000ms" |
|
|
89
|
+
|
|
90
|
+
## Key Principles to Remember
|
|
91
|
+
|
|
92
|
+
✓ **Describe and only describe** — No instructions or explanations
|
|
93
|
+
|
|
94
|
+
✓ **Neutral and objective** — No opinions, preferences, or guidance
|
|
95
|
+
|
|
96
|
+
✓ **Precise and accurate** — No approximations or "mostly correct"
|
|
97
|
+
|
|
98
|
+
✓ **Structured by machinery** — Mirror how the system is actually built
|
|
99
|
+
|
|
100
|
+
✓ **Adopt standard patterns** — Use consistent structure throughout
|
|
101
|
+
|
|
102
|
+
✓ **Comprehensive** — Include all significant options and parameters
|
|
103
|
+
|
|
104
|
+
✓ **Wholly authoritative** — No doubt or ambiguity
|
|
105
|
+
|
|
106
|
+
✓ **Examples for illustration** — Show without instructing
|
|
107
|
+
|
|
108
|
+
## Example
|
|
109
|
+
|
|
110
|
+
See [examples.md](examples.md#example-3-reference) for a complete working example: "POST /api/articles Reference"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Tutorial Template
|
|
2
|
+
|
|
3
|
+
**Purpose**: Teach a skill through guided, hands-on practice. User learns by doing, building confidence and familiarity.
|
|
4
|
+
|
|
5
|
+
**Key Characteristics**:
|
|
6
|
+
- Concrete, step-by-step activities
|
|
7
|
+
- Visible results at every step
|
|
8
|
+
- Meaningful, achievable goal
|
|
9
|
+
- Minimal explanation (link instead)
|
|
10
|
+
- Perfect reliability (every step works)
|
|
11
|
+
|
|
12
|
+
## Structure
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# [Getting Started | Your First] [Topic]
|
|
16
|
+
|
|
17
|
+
[One sentence: what you'll accomplish]
|
|
18
|
+
|
|
19
|
+
## What you'll build
|
|
20
|
+
|
|
21
|
+
[Clear description of end result, with context if helpful]
|
|
22
|
+
|
|
23
|
+
Example: "You'll create and deploy a containerized web application
|
|
24
|
+
that responds to HTTP requests in under 5 minutes."
|
|
25
|
+
|
|
26
|
+
## Before you start
|
|
27
|
+
|
|
28
|
+
[Minimal prerequisites, 2-4 items]
|
|
29
|
+
- [Prerequisite 1] installed
|
|
30
|
+
- [Prerequisite 2] configured
|
|
31
|
+
- Basic familiarity with [Prerequisite 3]
|
|
32
|
+
|
|
33
|
+
## Step 1: [Concrete action]
|
|
34
|
+
|
|
35
|
+
[Detailed instructions. Be directive: "do X", not "you might want to".]
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
[Exact command or action]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The output should look something like:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
[Show expected output]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Notice that [something important to observe].
|
|
48
|
+
|
|
49
|
+
## Step 2: [Next concrete action]
|
|
50
|
+
|
|
51
|
+
[Follow same structure]
|
|
52
|
+
|
|
53
|
+
## What you've built
|
|
54
|
+
|
|
55
|
+
[Acknowledge what they've accomplished]
|
|
56
|
+
|
|
57
|
+
Example: "You've created a [thing], configured [thing], and deployed it
|
|
58
|
+
successfully. You now understand [skill]."
|
|
59
|
+
|
|
60
|
+
## Next steps
|
|
61
|
+
|
|
62
|
+
- Learn more: [Link to Explanation for "why"]
|
|
63
|
+
- Customize it: [Link to How-to Guide for the next real problem]
|
|
64
|
+
- Explore options: [Link to Reference]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Language Patterns
|
|
68
|
+
|
|
69
|
+
Use these patterns consistently throughout your tutorial:
|
|
70
|
+
|
|
71
|
+
| Pattern | Example |
|
|
72
|
+
|---------|---------|
|
|
73
|
+
| **We will…** | "In this tutorial, we will create a secure login form." |
|
|
74
|
+
| **First… Now… After…** | "First, open the terminal. Now, type the command. After it finishes, you should see…" |
|
|
75
|
+
| **Notice that…** | "Notice that the prompt changed from $ to #. This means you're in the right mode." |
|
|
76
|
+
| **The output should look like…** | "The server should respond with a 200 status code, like this: `HTTP/1.1 200 OK`" |
|
|
77
|
+
| **You have now…** | "You have now created a database, connected to it, and inserted your first record." |
|
|
78
|
+
|
|
79
|
+
## Key Principles to Remember
|
|
80
|
+
|
|
81
|
+
✓ **Show the destination upfront** — "By the end, you'll have X"
|
|
82
|
+
|
|
83
|
+
✓ **Deliver visible results early and often** — Users see progress quickly
|
|
84
|
+
|
|
85
|
+
✓ **Maintain narrative of expectations** — "You will notice that…", "You should see…"
|
|
86
|
+
|
|
87
|
+
✓ **Point out what learners should observe** — Guide attention to important details
|
|
88
|
+
|
|
89
|
+
✓ **Focus on the concrete, not abstract** — Use specific, tangible examples
|
|
90
|
+
|
|
91
|
+
✓ **Ruthlessly minimize explanation** — Link to it, don't embed it
|
|
92
|
+
|
|
93
|
+
✓ **Encourage and permit repetition** — Let users practice multiple times
|
|
94
|
+
|
|
95
|
+
✓ **Ignore options and alternatives** — Teach one way; link to alternatives elsewhere
|
|
96
|
+
|
|
97
|
+
✓ **Aspire to perfect reliability** — Every step must work as described
|
|
98
|
+
|
|
99
|
+
## Example
|
|
100
|
+
|
|
101
|
+
See [examples.md](examples.md#example-1-tutorial) for a complete working example: "Your First Django App"
|