|
| 1 | +--- |
| 2 | +applyTo: "docs/**" |
| 3 | +--- |
| 4 | + |
| 5 | +# Copilot SDK docs style guide |
| 6 | + |
| 7 | +This style guide applies to all documentation in the `docs/` directory. These docs are synced to `github/docs-internal` via a normalization pipeline, so they must follow the conventions below to be compatible with docs.github.com. |
| 8 | + |
| 9 | +## Headings |
| 10 | + |
| 11 | +Use **sentence case** for all headings. Capitalize only the first word and proper nouns. |
| 12 | + |
| 13 | +* `## Quick start: Azure AI Foundry` — not `## Quick Start: Azure AI Foundry` |
| 14 | +* `# Custom agents and sub-agent orchestration` — not `# Custom Agents & Sub-Agent Orchestration` |
| 15 | + |
| 16 | +Use `and` instead of `&` in headings. |
| 17 | + |
| 18 | +Do not use `**bold**` or `*italic*` markers inside headings. The heading level provides emphasis. |
| 19 | + |
| 20 | +### Proper nouns to always capitalize |
| 21 | + |
| 22 | +* Products/companies: GitHub, Copilot, Azure, OpenAI, Anthropic, Microsoft, Ollama, Slack, Foundry, Kubernetes, Docker |
| 23 | +* Languages/frameworks: TypeScript, JavaScript, Python, Java, Node.js, OpenTelemetry, Express |
| 24 | +* Platforms: macOS, Linux, Windows |
| 25 | +* Protocols/formats: OAuth, JSON-RPC, JSON, YAML, HTTP, TCP, SSE, REST |
| 26 | +* Acronyms: MCP, BYOK, MAF, SDK, CLI, API, HMAC, CI/CD, SaaS, ISV, FAQ, LLM, AI, EMU, ID, UI, PNG |
| 27 | +* Tools (keep canonical casing): npm, npx, stdio |
| 28 | +* Code identifiers in headings: SessionConfig, MessageOptions, TelemetryConfig, ProviderConfig, CopilotClient |
| 29 | +* Multi-word proper names: GitHub App, GitHub Actions, GitHub OAuth, Foundry Local, Azure AD, Container Instances |
| 30 | + |
| 31 | +## Callouts |
| 32 | + |
| 33 | +Use GitHub-flavored alert syntax: |
| 34 | + |
| 35 | +```markdown |
| 36 | +> [!NOTE] |
| 37 | +> This is a note. |
| 38 | +
|
| 39 | +> [!TIP] |
| 40 | +> This is a tip. |
| 41 | +
|
| 42 | +> [!WARNING] |
| 43 | +> This is a warning. |
| 44 | +``` |
| 45 | + |
| 46 | +Never use `> **Note:**` or `> **Tip:**` style callouts. |
| 47 | + |
| 48 | +When a callout applies to a specific language, put the qualifier as bold text in the body: |
| 49 | + |
| 50 | +```markdown |
| 51 | +> [!TIP] |
| 52 | +> **(Python / Go)** These SDKs use a single `Data` class/struct with all fields optional. |
| 53 | +``` |
| 54 | + |
| 55 | +## Lists |
| 56 | + |
| 57 | +### Unordered lists |
| 58 | + |
| 59 | +Use `*` (asterisks) for unordered list markers, not `-` (hyphens). |
| 60 | + |
| 61 | +### Ordered lists |
| 62 | + |
| 63 | +Use `1.` for every item in ordered lists, not sequential numbering. This makes reordering easier. |
| 64 | + |
| 65 | +```markdown |
| 66 | +1. First step |
| 67 | +1. Second step |
| 68 | +1. Third step |
| 69 | +``` |
| 70 | + |
| 71 | +### List item formatting |
| 72 | + |
| 73 | +* Capitalize the first letter of each list item. |
| 74 | +* Use periods only if the item is a complete sentence. |
| 75 | +* Introduce lists with a descriptive sentence, not vague phrases like "the following" in isolation. |
| 76 | + |
| 77 | +## Em dashes |
| 78 | + |
| 79 | +For list items with a **label and description**, use a colon: |
| 80 | + |
| 81 | +```markdown |
| 82 | +* **Ephemeral**: not persisted to disk, not replayed on session resume |
| 83 | +``` |
| 84 | + |
| 85 | +For em dashes used mid-sentence, use no spaces: |
| 86 | + |
| 87 | +```markdown |
| 88 | +The SDK is a transport layer—it sends your prompt to the CLI over JSON-RPC. |
| 89 | +``` |
| 90 | + |
| 91 | +## Horizontal rules |
| 92 | + |
| 93 | +Do not use `---` as a horizontal rule to visually separate sections in the body of an article. Use headings to separate sections instead. This does not apply to YAML frontmatter delimiters. |
| 94 | + |
| 95 | +## Index.md files |
| 96 | + |
| 97 | +In the docs pipeline, `index.md` files become YAML-only category pages. Rich content (prose, code samples, diagrams) must live in standalone files. |
| 98 | + |
| 99 | +If you are writing a new section with substantive content, create a named file (for example, `choosing-a-setup-path.md`) rather than putting the content in `index.md`. |
| 100 | + |
| 101 | +## Code snippets |
| 102 | + |
| 103 | +* Only modify code block contents when necessary. Keep all examples passing the SDK team's `docs-validate` workflow, rerun validation after changes, and use `docs-validate: skip` or `docs-validate: hidden` markers when appropriate. |
| 104 | + |
| 105 | +## Voice and tone |
| 106 | + |
| 107 | +* Use clear, simple language approachable for a wide range of readers. |
| 108 | +* Use active voice whenever possible. |
| 109 | +* Avoid idioms, slang, and region-specific phrases. |
| 110 | +* Avoid ambiguous modal verbs ("may", "might", "should", "could") when an action is required. Use definitive verbs instead. |
| 111 | +* Refer to people as "people" or "users", not "customers." |
| 112 | + |
| 113 | +## Emphasis |
| 114 | + |
| 115 | +* Use **bold** for UI elements and for emphasis, sparingly (no more than five contiguous words). |
| 116 | +* Do not bold text that already has other formatting (for example, all-caps placeholders). |
| 117 | + |
| 118 | +## Word choice |
| 119 | + |
| 120 | +| Use | Avoid | |
| 121 | +|---|---| |
| 122 | +| terminal | shell | |
| 123 | +| sign in | log in, login | |
| 124 | +| sign up | signup | |
| 125 | +| email | e-mail | |
| 126 | +| press (a key) | hit, tap | |
| 127 | +| repository | repo | |
| 128 | +| administrator | admin | |
| 129 | +| for example | e.g. | |
| 130 | +| and similar | etc. | |
| 131 | + |
| 132 | +## What the pipeline handles |
| 133 | + |
| 134 | +Authors do not need to worry about these — the normalization pipeline handles them automatically: |
| 135 | + |
| 136 | +* YAML frontmatter (added to files for docs.github.com) |
| 137 | +* Mermaid diagram → PNG conversion |
| 138 | +* Link rewriting for docs.github.com cross-references |
| 139 | +* Liquid variable substitution (product names) |
| 140 | +* `[AUTOTITLE]` link conversion |
| 141 | + |
| 142 | +## New article template |
| 143 | + |
| 144 | +When creating a new docs article, use this structure: |
| 145 | + |
| 146 | +```markdown |
| 147 | +# Article title in sentence case |
| 148 | + |
| 149 | +A one- or two-sentence intro explaining what the reader will learn or accomplish. |
| 150 | + |
| 151 | +## First section |
| 152 | + |
| 153 | +Body text here. |
| 154 | + |
| 155 | +## Second section |
| 156 | + |
| 157 | +Body text here. |
| 158 | + |
| 159 | +## Further reading |
| 160 | + |
| 161 | +* [Link text](./relative-path.md): short description |
| 162 | +``` |
0 commit comments