Skip to content

Commit 77fef11

Browse files
committed
feat(instructions): add documentation style and shell script guidelines
- establish voice and tone standards for markdown documents - outline structure conventions and formatting rules for shell scripts - include examples for clarity and consistency 📚 - Generated by Copilot
1 parent 4ded515 commit 77fef11

File tree

2 files changed

+503
-0
lines changed

2 files changed

+503
-0
lines changed
Lines changed: 352 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,352 @@
1+
---
2+
description: Required instructions for all markdown (*.md) documents in azure-nvidia-robotics-reference-architecture
3+
applyTo: "**/*.md"
4+
---
5+
6+
# Documentation Style and Conventions
7+
8+
Standards for creating and maintaining documentation in this repository.
9+
10+
## Voice and Tone
11+
12+
Documentation uses a direct, technical voice. State facts without hedging. Avoid conversational filler.
13+
14+
### Voice Example
15+
16+
**Correct voice:**
17+
18+
> Scripts auto-detect Azure context from Terraform outputs. Override any value using CLI arguments or environment variables.
19+
20+
**Incorrect voice (avoid):**
21+
22+
> These scripts are designed to automatically detect your Azure context by reading from Terraform outputs. If you need to, you can override any of these values by using CLI arguments or environment variables, which gives you flexibility in how you configure things.
23+
24+
The correct voice is imperative, specific, and trusts the reader's technical competence.
25+
26+
## Structure Conventions
27+
28+
### Document Hierarchy
29+
30+
Documents follow this section order when applicable:
31+
32+
1. Title (H1) - single sentence or phrase
33+
2. Opening paragraph - one to three sentences, no heading
34+
3. Prerequisites (if needed)
35+
4. Quick Start or Usage
36+
5. Configuration or Parameters
37+
6. Feature sections
38+
7. Related Documentation or Next Steps
39+
40+
### Heading Levels
41+
42+
| Level | Usage |
43+
|-------|-------|
44+
| H1 (`#`) | Document title only, one per file |
45+
| H2 (`##`) | Major sections |
46+
| H3 (`###`) | Subsections within H2 |
47+
| H4+ | Avoid; restructure content instead |
48+
49+
### README Section Emojis
50+
51+
In user-facing `README.md` files, prefix each H2 heading with an emoji representing the section content:
52+
53+
```markdown
54+
## 📋 Prerequisites
55+
## 🚀 Quick Start
56+
## ⚙️ Configuration
57+
## 🏗️ Architecture
58+
## 📦 Modules
59+
## 📤 Outputs
60+
## 🔧 Optional Components
61+
## 🗑️ Destroy Infrastructure
62+
## 🔍 Troubleshooting
63+
```
64+
65+
### Opening Paragraphs
66+
67+
Every document starts with one to three sentences immediately after the H1 title. No heading precedes this opening. The opening states what the document covers and why it matters.
68+
69+
```markdown
70+
# Setup
71+
72+
AKS cluster configuration for robotics workloads with AzureML and NVIDIA OSMO.
73+
74+
## Prerequisites
75+
```
76+
77+
Not:
78+
79+
```markdown
80+
# Setup
81+
82+
## Overview
83+
84+
This document describes AKS cluster configuration...
85+
```
86+
87+
## Formatting Rules
88+
89+
### Tables Over Lists
90+
91+
Use tables for structured information. Tables are scannable and align related data.
92+
93+
**Use tables for:**
94+
95+
- Feature comparisons
96+
- Parameter definitions
97+
- Script/file inventories
98+
- Prerequisites with versions
99+
100+
```markdown
101+
| Script | Purpose |
102+
|--------|---------|
103+
| `01-deploy-robotics-charts.sh` | GPU Operator, KAI Scheduler |
104+
| `02-deploy-azureml-extension.sh` | AzureML K8s extension, compute attach |
105+
```
106+
107+
### Lists Without Bold Prefixes
108+
109+
Lists contain plain items or single inline code spans. Never bold the first word as a pseudo-heading.
110+
111+
**Correct:**
112+
113+
```markdown
114+
Before deployment:
115+
116+
- Azure CLI authenticated (`az login`)
117+
- Terraform 1.5+ installed
118+
- GPU VM quota in target region
119+
```
120+
121+
**Incorrect (Claude-style, avoid):**
122+
123+
```markdown
124+
Before deployment:
125+
126+
- **Azure CLI**: Must be authenticated using `az login`
127+
- **Terraform**: Version 1.5 or higher is required
128+
- **GPU Quota**: Ensure you have quota in your target region
129+
```
130+
131+
The bold-prefix pattern creates visual noise and delays comprehension. If items need structure, use a table or subheadings instead.
132+
133+
### Code Blocks
134+
135+
Specify language for syntax highlighting:
136+
137+
````markdown
138+
```bash
139+
terraform init && terraform apply
140+
```
141+
````
142+
143+
For multi-step commands, show the complete sequence:
144+
145+
```bash
146+
# Connect to cluster
147+
az aks get-credentials --resource-group <rg> --name <aks>
148+
149+
# Deploy infrastructure
150+
./01-deploy-robotics-charts.sh
151+
```
152+
153+
Comments in code blocks should be terse. One comment per logical group maximum.
154+
155+
### Inline Code
156+
157+
Use backticks for:
158+
159+
- Commands: `terraform output`
160+
- File names: `terraform.tfvars`
161+
- Environment variables: `ARM_SUBSCRIPTION_ID`
162+
- Parameter names: `--use-acr`
163+
164+
Do not use backticks for product names (Azure ML, OSMO, Kubernetes).
165+
166+
### Directory Trees
167+
168+
Use code blocks with `text` language for directory structures:
169+
170+
````markdown
171+
```text
172+
002-setup/
173+
├── 01-deploy-robotics-charts.sh
174+
├── cleanup/
175+
└── values/
176+
```
177+
````
178+
179+
### Directory Trees with Comments
180+
181+
When directory trees include inline comments, align all comments to the same column for readability:
182+
183+
**Correct (aligned comments):**
184+
185+
```text
186+
001-iac/
187+
├── main.tf # Module composition
188+
├── variables.tf # Input variables
189+
├── outputs.tf # Output values
190+
├── modules/
191+
│ ├── platform/ # Shared Azure services
192+
│ │ ├── networking.tf # VNet, subnets, NAT Gateway
193+
│ │ └── security.tf # Key Vault, managed identities
194+
│ └── sil/ # AKS + ML extension
195+
└── vpn/ # Standalone VPN deployment
196+
```
197+
198+
Pick a column position (typically 40-45 characters) and align all comments consistently.
199+
200+
## Patterns to Avoid
201+
202+
### Verbose Explanations
203+
204+
**Avoid:**
205+
206+
> The following table provides a comprehensive overview of the various scripts that are available in this directory, along with their purposes and what they accomplish when executed.
207+
208+
**Use:**
209+
210+
> Scripts in this directory:
211+
212+
### Hedging Language
213+
214+
**Avoid:**
215+
216+
- "You might want to consider..."
217+
- "It's generally recommended that..."
218+
- "In most cases, you would typically..."
219+
220+
**Use:**
221+
222+
- "Configure..." / "Set..."
223+
- "Use..." / "Run..."
224+
- Direct imperatives
225+
226+
### Redundant Transitions
227+
228+
**Avoid:**
229+
230+
- "Now that we've covered X, let's move on to Y"
231+
- "In this section, we will discuss..."
232+
- "As mentioned above..."
233+
234+
**Use:**
235+
236+
Start sections directly with content.
237+
238+
### GitHub Alerts (Callouts)
239+
240+
Use GitHub-flavored markdown alerts for important callouts. Each alert type on its own line within the blockquote:
241+
242+
```markdown
243+
> [!NOTE]
244+
> Useful information that users should know, even when skimming content.
245+
246+
> [!TIP]
247+
> Helpful advice for doing things better or more easily.
248+
249+
> [!IMPORTANT]
250+
> Key information users need to know to achieve their goal.
251+
252+
> [!WARNING]
253+
> Urgent info that needs immediate user attention to avoid problems.
254+
255+
> [!CAUTION]
256+
> Advises about risks or negative outcomes of certain actions.
257+
```
258+
259+
**Avoid legacy formats:**
260+
261+
```markdown
262+
> **Note**: This is the old format - do not use
263+
> **Warning**: This format does not render as an alert
264+
```
265+
266+
Limit alerts to genuinely important information. One or two per document maximum. If everything is a note, nothing is.
267+
268+
### Bold-First List Items
269+
270+
This pattern appears frequently in AI-generated content:
271+
272+
**Avoid:**
273+
274+
```markdown
275+
- **Storage**: Configure blob containers for checkpoints
276+
- **Compute**: GPU nodes must have sufficient memory
277+
- **Networking**: Private endpoints require DNS resolution
278+
```
279+
280+
**Use tables when structure matters:**
281+
282+
```markdown
283+
| Component | Requirement |
284+
|-----------|-------------|
285+
| Storage | Blob containers for checkpoints |
286+
| Compute | GPU nodes with sufficient memory |
287+
| Networking | Private endpoints with DNS resolution |
288+
```
289+
290+
**Or plain lists when it doesn't:**
291+
292+
```markdown
293+
- Configure blob containers for checkpoints
294+
- GPU nodes require sufficient memory
295+
- Private endpoints need DNS resolution
296+
```
297+
298+
### Numbered Steps for Non-Sequential Content
299+
300+
Reserve numbered lists for actual sequences where order matters. Use bullets or tables for unordered information.
301+
302+
## DOs
303+
304+
- Start with what the reader needs to do, not background
305+
- Use tables for anything with two or more columns of related data
306+
- Show complete, runnable commands
307+
- Link to related documentation with relative paths
308+
- Include file paths from repository root in examples
309+
- State prerequisites as a table with tool, version, and installation command
310+
- End sections on action items or next steps, not summaries
311+
- Use emoji sparingly and consistently (features: 🚀, architecture: 🏗️, prerequisites: 📋)
312+
- Keep README files under 300 lines; split into linked documents if longer
313+
314+
## YAML Front Matter
315+
316+
Use front matter for documents that may be processed by documentation systems:
317+
318+
```yaml
319+
---
320+
title: AzureML Workflows
321+
description: Azure Machine Learning job templates for robotics training
322+
author: Edge AI Team
323+
ms.date: 2025-12-04
324+
ms.topic: reference
325+
---
326+
```
327+
328+
Required fields: `title`, `description`. Add `ms.date` for versioned content.
329+
330+
## File Naming
331+
332+
| Type | Convention | Example |
333+
|------|------------|---------|
334+
| README | `README.md` (uppercase) | `deploy/README.md` |
335+
| Guides | kebab-case | `mlflow-integration.md` |
336+
| References | kebab-case with type suffix | `azureml-validation-job-debugging.md` |
337+
338+
## Checklist
339+
340+
Before committing documentation:
341+
342+
- [ ] H1 matches file purpose
343+
- [ ] Opening paragraph present (no heading)
344+
- [ ] H2 headings have emojis (README.md only)
345+
- [ ] Tables used for structured data
346+
- [ ] No bold-prefix list items
347+
- [ ] Code blocks have language specified
348+
- [ ] Directory trees use aligned comments (if comments present)
349+
- [ ] Links use relative paths
350+
- [ ] No hedging or filler language
351+
- [ ] GitHub alerts use `> [!NOTE]` format (not `> **Note**:`)
352+
- [ ] Under 300 lines or split appropriately

0 commit comments

Comments
 (0)