Skip to content

Commit b4696ee

Browse files
authored
Added Contributing Userguide for Documentation (#286)
- closes #279
1 parent 583e31c commit b4696ee

2 files changed

Lines changed: 234 additions & 1 deletion

File tree

docs/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@
261261
"reference/eval/fix-code-testbench"
262262
]
263263
},
264-
"reference/dependency-management"
264+
"reference/dependency-management",
265+
"reference/contributing-docs"
265266
]
266267
},
267268
{
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
---
2+
title: "Documentation Contribution Guide"
3+
description: "How to contribute to GAIA documentation - types, structure, and when to use each"
4+
icon: "pen-to-square"
5+
---
6+
7+
This guide clarifies what goes where in GAIA documentation and how to contribute.
8+
9+
---
10+
11+
## The Problem
12+
13+
Section names can be confusing:
14+
- "SDK Reference" in Documentation tab vs "SDKs" in Specifications tab - what's the difference?
15+
- "User Guides" vs "Playbooks" - when to use which?
16+
- "Reference" vs "Specifications" - aren't they the same?
17+
18+
This guide provides clear definitions and decision criteria.
19+
20+
---
21+
22+
## Documentation Tab
23+
24+
### User Guides (`docs/guides/`)
25+
26+
**Definition:** Task-oriented tutorials teaching users how to accomplish goals with GAIA features.
27+
28+
**Contains:**
29+
- Step-by-step instructions
30+
- CLI commands users can run
31+
- Working Python code examples
32+
- Troubleshooting sections
33+
34+
**When to use:** User asks "How do I chat with PDF documents?"
35+
36+
**When NOT to use:** User asks "What parameters does ChatConfig accept?" → That's a Specification
37+
38+
**Example:** [docs/guides/chat.mdx](https://github.com/amd/gaia/blob/main/docs/guides/chat.mdx)
39+
40+
---
41+
42+
### Playbooks (`docs/playbooks/`)
43+
44+
**Definition:** Multi-part tutorials for building agents from scratch, with deep explanations of why things work.
45+
46+
**Contains:**
47+
- 3+ part series
48+
- Architecture diagrams (Mermaid)
49+
- "Under the Hood" explanations
50+
- Complete working code at the end
51+
52+
**When to use:** Teaching someone to BUILD a new agent type from scratch
53+
54+
**When NOT to use:** Explaining how to USE an existing agent → That's a Guide
55+
56+
**Example:** [docs/playbooks/chat-agent/](https://github.com/amd/gaia/tree/main/docs/playbooks/chat-agent)
57+
58+
---
59+
60+
### SDK Reference (`docs/sdk/sdks/`)
61+
62+
**Definition:** Quick code snippets for rapid development - "cheat sheets" developers copy-paste.
63+
64+
**Contains:**
65+
- Import statements
66+
- Common usage patterns (5-10 lines each)
67+
- No step-by-step tutorials
68+
- Links to full specifications
69+
70+
**When to use:** Developer asks "What's the quick way to do streaming chat?"
71+
72+
**When NOT to use:** Developer asks "What are ALL the methods on ChatSDK?" → That's a Specification
73+
74+
**Example:** [docs/sdk/sdks/chat.mdx](https://github.com/amd/gaia/blob/main/docs/sdk/sdks/chat.mdx)
75+
76+
---
77+
78+
## Specifications Tab
79+
80+
### SDK Specifications (`docs/spec/*-sdk.mdx`, `docs/spec/*-client.mdx`)
81+
82+
**Definition:** Complete technical contracts for SDK modules - ALL methods, parameters, types, and internals.
83+
84+
**Contains:**
85+
- Full API with every method signature
86+
- All parameters with types, defaults, descriptions
87+
- Implementation details and testing requirements
88+
- Extension points for contributors
89+
90+
**When to use:** Developer needs to know ALL methods on a class, or wants to extend the SDK
91+
92+
**When NOT to use:** Developer just wants to quickly use the SDK → That's SDK Reference or a Guide
93+
94+
**Example:** [docs/spec/llm-client.mdx](https://github.com/amd/gaia/blob/main/docs/spec/llm-client.mdx)
95+
96+
---
97+
98+
### Infrastructure Specifications (`docs/spec/api-server.mdx`, `docs/spec/mcp-*.mdx`)
99+
100+
**Definition:** Technical architecture of GAIA's backend systems - servers, bridges, registries.
101+
102+
**Contains:**
103+
- Functional/Non-Functional Requirements
104+
- Complete Pydantic schemas
105+
- Request/response formats
106+
- Internal implementation logic
107+
108+
**When to use:** Developer needs to understand or extend backend infrastructure
109+
110+
**When NOT to use:** User just wants to start the API server → That's Reference
111+
112+
---
113+
114+
## Reference Tab
115+
116+
### CLI Reference (`docs/reference/cli.mdx`)
117+
118+
**Definition:** Complete documentation of all CLI commands, flags, and options.
119+
120+
**When to use:** User asks "What flags does `gaia chat` accept?"
121+
122+
### API Reference (`docs/reference/api.mdx`)
123+
124+
**Definition:** User-facing guide for using the REST API server.
125+
126+
**When to use:** User asks "How do I use the API server?" (not "How is it built?" - that's a Specification)
127+
128+
---
129+
130+
## Comparison Tables
131+
132+
### SDK Reference vs SDK Specification
133+
134+
| Aspect | SDK Reference (`docs/sdk/sdks/`) | SDK Specification (`docs/spec/`) |
135+
|--------|----------------------------------|----------------------------------|
136+
| **Purpose** | Quick usage examples | Complete technical contract |
137+
| **Length** | ~100-200 lines | ~800-1400 lines |
138+
| **Content** | Copy-paste snippets | Full API signatures, internals |
139+
| **Audience** | Developers USING the SDK | Developers EXTENDING the SDK |
140+
141+
### Guides vs Playbooks
142+
143+
| Aspect | User Guides (`docs/guides/`) | Playbooks (`docs/playbooks/`) |
144+
|--------|------------------------------|-------------------------------|
145+
| **Purpose** | USE pre-built features | BUILD agents from scratch |
146+
| **Format** | Single page tutorial | Multi-part series (3+ parts) |
147+
| **Output** | User accomplishes a task | User builds a complete agent |
148+
149+
### Reference vs Specifications
150+
151+
| Aspect | Reference (`docs/reference/`) | Specifications (`docs/spec/`) |
152+
|--------|-------------------------------|-------------------------------|
153+
| **Focus** | User-facing tools | Internal architecture |
154+
| **Audience** | Users and operators | SDK developers and contributors |
155+
156+
---
157+
158+
## Decision Tree
159+
160+
**"I want to document..."**
161+
162+
1. **How to USE a feature** → User Guide (`docs/guides/`)
163+
2. **How to BUILD an agent from scratch** → Playbook (`docs/playbooks/`)
164+
3. **Quick code snippets for developers** → SDK Reference (`docs/sdk/sdks/`)
165+
4. **Complete API contract (all methods)** → Specification (`docs/spec/`)
166+
5. **CLI commands and flags** → CLI Reference (`docs/reference/cli.mdx`)
167+
6. **Backend architecture** → Infrastructure Spec (`docs/spec/`)
168+
169+
---
170+
171+
## Contributing Process
172+
173+
### Step 1: Identify the Right Location
174+
175+
Use the decision tree above to determine where your content belongs.
176+
177+
### Step 2: Create Your File
178+
179+
Create a `.mdx` file in the appropriate directory with frontmatter:
180+
181+
```yaml
182+
---
183+
title: "Your Page Title"
184+
description: "One-line description"
185+
icon: "icon-name"
186+
---
187+
```
188+
189+
### Step 3: Update Navigation
190+
191+
Add your page to `docs/docs.json` in the appropriate tab and group.
192+
193+
### Step 4: Submit a Pull Request
194+
195+
```bash
196+
git checkout -b docs/your-feature
197+
git add docs/
198+
git commit -m "docs: add [description]"
199+
git push origin docs/your-feature
200+
```
201+
202+
---
203+
204+
## Style Guidelines
205+
206+
- Use active voice and second person ("you")
207+
- Include working code examples
208+
- Add source code links at the top
209+
- Include license footer at the bottom
210+
- Cross-link to related documentation
211+
212+
---
213+
214+
## Review Checklist
215+
216+
- [ ] Content is in the correct section (use decision tree)
217+
- [ ] Frontmatter has `title` and `description`
218+
- [ ] Added to `docs/docs.json`
219+
- [ ] Code examples are complete and working
220+
- [ ] License footer included
221+
222+
---
223+
224+
<small style="color: #666;">
225+
226+
**License**
227+
228+
Copyright(C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
229+
230+
SPDX-License-Identifier: MIT
231+
232+
</small>

0 commit comments

Comments
 (0)