|
| 1 | +--- |
| 2 | +name: documentation |
| 3 | +description: Documentation Brief description for SEO and navigation |
| 4 | +--- |
| 5 | + |
| 6 | +### Documentation |
| 7 | + |
| 8 | +The documentation for this project is available in the `docs/` directory. It uses GitHub-flavored markdown with Astro Starlight for rendering and follows the Diátaxis framework for systematic documentation. |
| 9 | + |
| 10 | +## Diátaxis Framework |
| 11 | + |
| 12 | +Documentation must be organized into four distinct types, each serving a specific purpose: |
| 13 | + |
| 14 | +### 1. Tutorials (Learning-Oriented) |
| 15 | +**Purpose**: Guide beginners through achieving a specific outcome to build confidence. |
| 16 | + |
| 17 | +- Start with what the user will build or achieve |
| 18 | +- Provide a clear, step-by-step path from start to finish |
| 19 | +- Include concrete examples and working code |
| 20 | +- Assume minimal prior knowledge |
| 21 | +- Focus on the happy path (avoid edge cases and alternatives) |
| 22 | +- End with a working result the user can see and use |
| 23 | +- Use imperative mood: "Create a file", "Run the command" |
| 24 | + |
| 25 | +**Avoid**: Explaining concepts in depth, multiple options, troubleshooting |
| 26 | + |
| 27 | +### 2. How-to Guides (Goal-Oriented) |
| 28 | +**Purpose**: Show how to solve a specific real-world problem or accomplish a particular task. |
| 29 | + |
| 30 | +- Title format: "How to [accomplish specific goal]" |
| 31 | +- Assume the user knows the basics |
| 32 | +- Focus on practical steps to solve one problem |
| 33 | +- Include necessary context but stay focused |
| 34 | +- Show multiple approaches only when genuinely useful |
| 35 | +- End when the goal is achieved |
| 36 | +- Use imperative mood: "Configure the setting", "Add the following" |
| 37 | + |
| 38 | +**Avoid**: Teaching fundamentals, explaining every detail, being exhaustive |
| 39 | + |
| 40 | +### 3. Reference (Information-Oriented) |
| 41 | +**Purpose**: Provide accurate, complete technical descriptions of the system. |
| 42 | + |
| 43 | +- Organized by structure (CLI commands, configuration options, API endpoints) |
| 44 | +- Comprehensive and authoritative |
| 45 | +- Consistent format across all entries |
| 46 | +- Technical accuracy is paramount |
| 47 | +- Include all parameters, options, and return values |
| 48 | +- Use descriptive mood: "The command accepts", "Returns a string" |
| 49 | +- Minimal narrative or explanation |
| 50 | + |
| 51 | +**Avoid**: Instructions, tutorials, opinions on usage |
| 52 | + |
| 53 | +### 4. Explanation (Understanding-Oriented) |
| 54 | +**Purpose**: Clarify and illuminate topics to deepen understanding. |
| 55 | + |
| 56 | +- Discuss why things are the way they are |
| 57 | +- Explain design decisions and tradeoffs |
| 58 | +- Provide context and background |
| 59 | +- Connect concepts to help form mental models |
| 60 | +- Discuss alternatives and their implications |
| 61 | +- Use indicative mood: "This approach provides", "The engine uses" |
| 62 | + |
| 63 | +**Avoid**: Step-by-step instructions, exhaustive reference material |
| 64 | + |
| 65 | +## General Style Guidelines |
| 66 | + |
| 67 | +- **Tone**: Neutral, technical, not promotional |
| 68 | +- **Voice**: Avoid "we", "our", "us" (use "the tool", "this command") |
| 69 | +- **Headings**: Use markdown heading syntax, not bold text as headings |
| 70 | +- **Lists**: Avoid long bullet point lists; prefer prose with structure |
| 71 | +- **Code samples**: Minimal and focused; exclude optional fields unless relevant |
| 72 | +- **Language tag**: Use `aw` for agentic workflow snippets with YAML frontmatter |
| 73 | + |
| 74 | +**Example workflow code block**: |
| 75 | +```aw wrap |
| 76 | +on: push |
| 77 | +# Your workflow steps here |
| 78 | +``` |
| 79 | + |
| 80 | +## GitHub-Flavored Markdown Syntax |
| 81 | + |
| 82 | +Documentation files use GitHub-flavored markdown with Astro Starlight for rendering. Key syntax elements: |
| 83 | + |
| 84 | +### Frontmatter |
| 85 | +Every documentation page must have frontmatter: |
| 86 | +```markdown |
| 87 | +title: Page Title |
| 88 | +description: Brief description for SEO and navigation |
| 89 | +``` |
| 90 | + |
| 91 | +### GitHub Alerts |
| 92 | +Use GitHub's alert syntax for notes, tips, warnings, and cautions: |
| 93 | +```markdown |
| 94 | +> [!NOTE] |
| 95 | +> Important information the reader should notice. |
| 96 | +
|
| 97 | +> [!TIP] |
| 98 | +> Helpful advice for the reader. |
| 99 | +
|
| 100 | +> [!WARNING] |
| 101 | +> Warning about potential issues or pitfalls. |
| 102 | +
|
| 103 | +> [!CAUTION] |
| 104 | +> Critical warning about dangerous operations. |
| 105 | +
|
| 106 | +> [!IMPORTANT] |
| 107 | +> Key information users need to know. |
| 108 | +``` |
| 109 | + |
| 110 | +### Code Blocks |
| 111 | +- Use syntax highlighting with language tags |
| 112 | +- Add `title` attribute for file names: ` ```yaml title=".github/workflows/example.yml" ` |
| 113 | +- Use `aw` language for agentic workflow files with YAML frontmatter |
| 114 | +- Add `wrap` for line wrapping: ` ```aw wrap ` |
| 115 | + |
| 116 | +### Links |
| 117 | +- Internal links: Use relative paths between documentation pages |
| 118 | +- External links: Open in new tab automatically |
| 119 | +- Link text: Use descriptive text, avoid "click here" |
| 120 | + |
| 121 | +### Tabs |
| 122 | +Use tabs for showing alternatives (e.g., different languages, platforms): |
| 123 | +```markdown |
| 124 | +import { Tabs, TabItem } from '@astrojs/starlight/components'; |
| 125 | + |
| 126 | +<Tabs> |
| 127 | + <TabItem label="npm"> |
| 128 | + ```bash |
| 129 | + npm install package |
| 130 | + ``` |
| 131 | + </TabItem> |
| 132 | + <TabItem label="yarn"> |
| 133 | + ```bash |
| 134 | + yarn add package |
| 135 | + ``` |
| 136 | + </TabItem> |
| 137 | +</Tabs> |
| 138 | +``` |
| 139 | + |
| 140 | +### Cards |
| 141 | +Use cards for navigation or highlighting multiple options: |
| 142 | +```markdown |
| 143 | +import { Card, CardGrid } from '@astrojs/starlight/components'; |
| 144 | + |
| 145 | +<CardGrid> |
| 146 | + <Card title="Getting Started" icon="rocket"> |
| 147 | + Quick introduction to the basics. |
| 148 | + </Card> |
| 149 | + <Card title="Advanced Usage" icon="setting"> |
| 150 | + Deep dive into advanced features. |
| 151 | + </Card> |
| 152 | +</CardGrid> |
| 153 | +``` |
| 154 | + |
| 155 | +**Remember**: Keep components minimal. Prefer standard markdown when possible. |
| 156 | + |
| 157 | +## Content to Avoid |
| 158 | + |
| 159 | +- "Key Features" sections |
| 160 | +- Marketing language or selling points |
| 161 | +- Excessive bullet points (prefer structured prose) |
| 162 | +- Overly verbose examples with all optional parameters |
| 163 | +- Mixing documentation types (e.g., tutorials that become reference) |
| 164 | + |
| 165 | +## Avoiding Documentation Bloat |
| 166 | + |
| 167 | +Documentation bloat reduces clarity and makes content harder to navigate. Common types of bloat include: |
| 168 | + |
| 169 | +### Types of Documentation Bloat |
| 170 | + |
| 171 | +1. **Duplicate content**: Same information repeated in different sections |
| 172 | +2. **Excessive bullet points**: Long lists that could be condensed into prose or tables |
| 173 | +3. **Redundant examples**: Multiple examples showing the same concept |
| 174 | +4. **Verbose descriptions**: Overly wordy explanations that could be more concise |
| 175 | +5. **Repetitive structure**: The same "What it does" / "Why it's valuable" pattern overused |
| 176 | + |
| 177 | +### Writing Concise Documentation |
| 178 | + |
| 179 | +When editing documentation, focus on: |
| 180 | + |
| 181 | +**Consolidate bullet points**: |
| 182 | +- Convert long bullet lists into concise prose or tables |
| 183 | +- Remove redundant points that say the same thing differently |
| 184 | + |
| 185 | +**Eliminate duplicates**: |
| 186 | +- Remove repeated information |
| 187 | +- Consolidate similar sections |
| 188 | + |
| 189 | +**Condense verbose text**: |
| 190 | +- Make descriptions more direct and concise |
| 191 | +- Remove filler words and phrases |
| 192 | +- Keep technical accuracy while reducing word count |
| 193 | + |
| 194 | +**Standardize structure**: |
| 195 | +- Reduce repetitive "What it does" / "Why it's valuable" patterns |
| 196 | +- Use varied, natural language |
| 197 | + |
| 198 | +**Simplify code samples**: |
| 199 | +- Remove unnecessary complexity from code examples |
| 200 | +- Focus on demonstrating the core concept clearly |
| 201 | +- Eliminate boilerplate or setup code unless essential for understanding |
| 202 | +- Keep examples minimal yet complete |
| 203 | +- Use realistic but simple scenarios |
| 204 | + |
| 205 | +### Example: Before and After |
| 206 | + |
| 207 | +**Before (Bloated)**: |
| 208 | +```markdown |
| 209 | +### Tool Name |
| 210 | +Description of the tool. |
| 211 | + |
| 212 | +- **What it does**: This tool does X, Y, and Z |
| 213 | +- **Why it's valuable**: It's valuable because A, B, and C |
| 214 | +- **How to use**: You use it by doing steps 1, 2, 3, 4, 5 |
| 215 | +- **When to use**: Use it when you need X |
| 216 | +- **Benefits**: Gets you benefit A, benefit B, benefit C |
| 217 | +- **Learn more**: [Link](url) |
| 218 | +``` |
| 219 | + |
| 220 | +**After (Concise)**: |
| 221 | +```markdown |
| 222 | +### Tool Name |
| 223 | +Description of the tool that does X, Y, and Z to achieve A, B, and C. |
| 224 | + |
| 225 | +Use it when you need X by following steps 1-5. [Learn more](url) |
| 226 | +``` |
| 227 | + |
| 228 | +### Documentation Quality Guidelines |
| 229 | + |
| 230 | +1. **Preserve meaning**: Never lose important information |
| 231 | +2. **Be surgical**: Make precise edits, don't rewrite everything |
| 232 | +3. **Maintain tone**: Keep the neutral, technical tone |
| 233 | +4. **Test locally**: Verify links and formatting are still correct |
| 234 | + |
| 235 | +## Structure by File Type |
| 236 | + |
| 237 | +- **Getting Started**: Tutorial format |
| 238 | +- **How-to Guides**: Goal-oriented, one task per guide |
| 239 | +- **CLI Reference**: Reference format, complete command documentation |
| 240 | +- **Concepts**: Explanation format, building understanding |
| 241 | +- **API Reference**: Reference format, complete API documentation |
0 commit comments