@brainfish-ai/devdoc 0.1.33 → 0.1.35

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.
Files changed (33) hide show
  1. package/ai-agents/.claude/skills/blame-doc/SKILL.md +171 -0
  2. package/ai-agents/.claude/skills/bootstrap-docs/SKILL.md +332 -34
  3. package/ai-agents/.claude/skills/check-docs/SKILL.md +89 -13
  4. package/ai-agents/.claude/skills/commit-doc/SKILL.md +214 -0
  5. package/ai-agents/.claude/skills/create-doc/SKILL.md +198 -0
  6. package/ai-agents/.claude/skills/delete-doc/SKILL.md +164 -0
  7. package/ai-agents/.claude/skills/update-doc/SKILL.md +219 -0
  8. package/ai-agents/.cursor/rules/devdoc-blame.mdc +114 -0
  9. package/ai-agents/.cursor/rules/devdoc-bootstrap.mdc +174 -62
  10. package/ai-agents/.cursor/rules/devdoc-commit.mdc +103 -0
  11. package/ai-agents/.cursor/rules/devdoc-create.mdc +89 -0
  12. package/ai-agents/.cursor/rules/devdoc-delete.mdc +101 -0
  13. package/ai-agents/.cursor/rules/devdoc-update.mdc +95 -0
  14. package/ai-agents/.devdoc/context.json +66 -0
  15. package/ai-agents/.devdoc/templates/api-reference.md +211 -0
  16. package/ai-agents/.devdoc/templates/guide.md +133 -0
  17. package/ai-agents/.devdoc/templates/quickstart.md +179 -0
  18. package/ai-agents/.devdoc/templates/troubleshooting.md +215 -0
  19. package/ai-agents/.devdoc/templates/tutorial.md +212 -0
  20. package/ai-agents/CLAUDE.md +6 -3
  21. package/ai-agents/schemas/context.schema.json +259 -0
  22. package/dist/cli/commands/ai.js +16 -12
  23. package/dist/cli/commands/create.d.ts +12 -1
  24. package/dist/cli/commands/create.js +135 -94
  25. package/dist/cli/commands/init.js +11 -7
  26. package/dist/cli/index.js +2 -2
  27. package/package.json +1 -1
  28. package/ai-agents/.claude/skills/create-doc-page/SKILL.md +0 -274
  29. package/ai-agents/.claude/skills/docs-from-code/SKILL.md +0 -81
  30. package/ai-agents/.claude/skills/generate-api-docs/SKILL.md +0 -94
  31. package/ai-agents/.claude/skills/sync-docs/SKILL.md +0 -146
  32. package/ai-agents/.claude/skills/update-docs-json/SKILL.md +0 -60
  33. package/ai-agents/.cursor/rules/devdoc-sync.mdc +0 -105
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: blame-doc
3
+ description: Analyze documentation for duplicates, outdated content, and discrepancies with codebase
4
+ ---
5
+
6
+ ## Instructions
7
+
8
+ Perform a deep analysis of documentation quality, finding issues that need attention.
9
+
10
+ ### Step 0: Read Context
11
+
12
+ **Read `.devdoc/context.json` if it exists** for product info and terminology.
13
+
14
+ **Read `docs.json`** to understand documentation structure.
15
+
16
+ ### Step 1: Scan Codebase
17
+
18
+ Analyze the source code to understand:
19
+ - Exported functions, classes, types
20
+ - API endpoints and routes
21
+ - Configuration options
22
+ - Feature flags and capabilities
23
+
24
+ ### Step 2: Analyze Documentation
25
+
26
+ Scan all MDX files for:
27
+ - Topics covered
28
+ - Code examples used
29
+ - Features documented
30
+ - API references
31
+
32
+ ### Step 3: Generate Blame Report
33
+
34
+ ```
35
+ Documentation Blame Report
36
+ ==========================
37
+
38
+ Generated: [date]
39
+ Files analyzed: X docs, Y source files
40
+
41
+ ## 🔴 Critical Issues
42
+
43
+ ### Duplicate Content (count)
44
+
45
+ Content that appears in multiple places, causing maintenance burden:
46
+
47
+ | Topic | Files | Recommendation |
48
+ |-------|-------|----------------|
49
+ | Authentication setup | auth.mdx, quickstart.mdx, api/overview.mdx | Consolidate to auth.mdx, link from others |
50
+ | Error handling | errors.mdx, troubleshooting.mdx | Merge into single page |
51
+
52
+ **Details:**
53
+ - `auth.mdx:15-45` and `quickstart.mdx:80-110` contain nearly identical OAuth setup instructions
54
+ - `errors.mdx` and `troubleshooting.mdx` both list the same error codes
55
+
56
+ ### Outdated Documentation (count)
57
+
58
+ Docs that don't match current codebase:
59
+
60
+ | File | Issue | Current State |
61
+ |------|-------|---------------|
62
+ | api/users.mdx | Wrong signature | `getUser(id)` is now `getUser(id, options)` |
63
+ | config.mdx | Missing options | `timeout` and `retries` not documented |
64
+ | quickstart.mdx | Old version | References v1.x, current is v2.x |
65
+
66
+ **Details:**
67
+ - `api/users.mdx:23` shows `getUser(id: string)` but code has `getUser(id: string, options?: UserOptions)`
68
+ - `config.mdx` missing 3 new configuration options added in v2.0
69
+
70
+ ### Code-Doc Discrepancies (count)
71
+
72
+ Mismatches between documented and actual behavior:
73
+
74
+ | File | Documented | Actual |
75
+ |------|------------|--------|
76
+ | api/auth.mdx | Returns `{ token }` | Returns `{ token, expiresAt }` |
77
+ | guides/setup.mdx | Requires Node 14+ | package.json requires Node 18+ |
78
+ | api/errors.mdx | Error code 401 | Code throws 403 for this case |
79
+
80
+ ## 🟡 Warnings
81
+
82
+ ### Undocumented Features (count)
83
+
84
+ Code exists but no documentation:
85
+
86
+ - `src/utils/retry.ts` - Retry utility with backoff (exported, no docs)
87
+ - `src/api/webhooks.ts` - Webhook handlers (3 endpoints, no docs)
88
+ - `src/config/advanced.ts` - Advanced options (12 options, not in config.mdx)
89
+
90
+ ### Stale Examples (count)
91
+
92
+ Code examples that may not work:
93
+
94
+ | File | Line | Issue |
95
+ |------|------|-------|
96
+ | quickstart.mdx | 45 | Uses deprecated `init()`, should be `initialize()` |
97
+ | api/fetch.mdx | 23 | Import path changed from `pkg` to `pkg/client` |
98
+
99
+ ### Inconsistent Terminology
100
+
101
+ Terms used differently across docs:
102
+
103
+ | Term | Variations Found | Recommended |
104
+ |------|------------------|-------------|
105
+ | API key | "api key", "API Key", "apiKey", "api-key" | "API key" |
106
+ | endpoint | "endpoint", "route", "URL", "path" | "endpoint" |
107
+
108
+ ## 🟢 Good Practices Found
109
+
110
+ ✓ All public exports have corresponding docs
111
+ ✓ Code examples have language tags
112
+ ✓ Consistent use of components (Note, Warning, etc.)
113
+
114
+ ## Recommendations
115
+
116
+ ### High Priority
117
+ 1. **Consolidate auth docs** - Merge duplicate OAuth content into single source
118
+ 2. **Update API signatures** - 5 files have outdated function signatures
119
+ 3. **Document webhooks** - Major feature with zero documentation
120
+
121
+ ### Medium Priority
122
+ 4. **Version bump** - Update all version references to v2.x
123
+ 5. **Standardize terminology** - Create glossary in context.json
124
+
125
+ ### Low Priority
126
+ 6. **Add missing options** - Document 12 config options
127
+ 7. **Fix stale examples** - Update deprecated imports
128
+ ```
129
+
130
+ ## Analysis Techniques
131
+
132
+ ### Finding Duplicates
133
+
134
+ Look for:
135
+ 1. **Exact matches** - Same paragraphs in multiple files
136
+ 2. **Similar code blocks** - Nearly identical examples
137
+ 3. **Repeated explanations** - Same concept explained multiple times
138
+ 4. **Copy-paste patterns** - Setup instructions repeated
139
+
140
+ ### Finding Outdated Content
141
+
142
+ Compare:
143
+ 1. **Function signatures** - Params, return types
144
+ 2. **Import paths** - Package structure changes
145
+ 3. **Version numbers** - In code vs docs
146
+ 4. **Default values** - Changed defaults
147
+ 5. **Error messages** - Updated error text
148
+
149
+ ### Finding Discrepancies
150
+
151
+ Check:
152
+ 1. **Return types** - What docs say vs code returns
153
+ 2. **Required fields** - Optional vs required mismatches
154
+ 3. **Behavior descriptions** - Edge cases documented incorrectly
155
+ 4. **Prerequisites** - Wrong versions, missing dependencies
156
+
157
+ ## Output Actions
158
+
159
+ After generating report, suggest:
160
+
161
+ "Found X issues. Would you like me to:
162
+ 1. **Fix outdated docs** - Update signatures and versions
163
+ 2. **Consolidate duplicates** - Merge redundant content
164
+ 3. **Create missing docs** - Stub pages for undocumented features
165
+ 4. **Update terminology** - Standardize across all files"
166
+
167
+ ## Integration with Other Skills
168
+
169
+ - After blame analysis → `/update-doc` to fix issues
170
+ - For new undocumented features → `/create-doc`
171
+ - When ready to save → `/commit-doc`
@@ -1,15 +1,27 @@
1
1
  ---
2
2
  name: bootstrap-docs
3
- description: Analyze repository and generate documentation. Reads docType from docs.json config, or asks if not set.
3
+ description: Analyze repository and generate documentation. Creates context memory for consistent AI assistance.
4
4
  ---
5
5
 
6
6
  ## Instructions
7
7
 
8
8
  When bootstrapping documentation from a repository:
9
9
 
10
- ### Step 1: Detect Project Structure
10
+ ### Step 1: Check Context Memory
11
11
 
12
- Determine where you are:
12
+ **First, check if `.devdoc/context.json` exists:**
13
+
14
+ **If context.json exists and is populated:**
15
+ - Read the context file
16
+ - Tell user: "Found existing product context. Using saved configuration."
17
+ - Skip to Step 5 (Generate Documentation)
18
+
19
+ **If context.json is empty or doesn't exist:**
20
+ - Proceed to Step 2 (Discovery Flow)
21
+
22
+ ### Step 2: Discovery Flow (Context Creation)
23
+
24
+ #### 2a. Detect Project Structure
13
25
 
14
26
  **If `docs.json` exists in current directory:**
15
27
  - You're in a DevDoc docs folder
@@ -22,55 +34,296 @@ Determine where you are:
22
34
  **If neither matches:**
23
35
  - Ask user for the source code path
24
36
 
25
- ### Step 2: Check for docType Configuration
37
+ #### 2b. Scan for Existing API Specs
38
+
39
+ **Search for OpenAPI specs:**
40
+ ```
41
+ openapi.json, openapi.yaml, openapi.yml
42
+ swagger.json, swagger.yaml, swagger.yml
43
+ api-spec.json, api-spec.yaml
44
+ **/openapi.*, **/swagger.*
45
+ ```
46
+
47
+ **Search for GraphQL schemas:**
48
+ ```
49
+ schema.graphql, schema.gql
50
+ *.graphql, *.gql
51
+ **/schema.graphql
52
+ ```
53
+
54
+ **If found, store the paths for later use.**
55
+
56
+ #### 2c. Auto-Discover Information
57
+
58
+ Scan the repository and extract:
59
+
60
+ ```
61
+ From README.md:
62
+ - Product name
63
+ - Description
64
+ - Key features
65
+
66
+ From package.json / pyproject.toml / Cargo.toml:
67
+ - Primary language
68
+ - Framework (from dependencies)
69
+ - Project type (library, cli, api, etc.)
70
+
71
+ From OpenAPI spec (if exists):
72
+ - API style: REST
73
+ - Base URL
74
+ - Authentication type
75
+ - Endpoints count
76
+ - Common patterns
77
+
78
+ From GraphQL schema (if exists):
79
+ - API style: GraphQL
80
+ - Types count
81
+ - Queries/Mutations
82
+
83
+ From source code structure:
84
+ - Key directories
85
+ - Naming conventions
86
+ ```
87
+
88
+ #### 2d. Ask Key Questions
89
+
90
+ After auto-discovery, ask the user to confirm/provide:
91
+
92
+ **Question 1: Documentation Type**
93
+ "What type of documentation are you creating?
94
+ 1. **internal** - For your team: setup guides, architecture, contribution guidelines
95
+ 2. **api** - For developers using your product: API reference, SDKs, integration guides
96
+ 3. **product** - For end users: feature guides, tutorials, FAQs"
97
+
98
+ ---
99
+
100
+ **Question 2: Import Existing API Spec (if detected)**
101
+
102
+ **If OpenAPI spec found:**
103
+ "I found an OpenAPI specification at `{path}`:
104
+ - {endpoint_count} endpoints
105
+ - Base URL: {base_url}
106
+ - Auth: {auth_type}
107
+
108
+ Would you like me to:
109
+ 1. **Import it** - Copy to `api-reference/openapi.json` and generate API Reference tab
110
+ 2. **Reference it** - Point docs.json to existing location: `{path}`
111
+ 3. **Skip** - Don't include API reference (I'll create manual docs instead)"
112
+
113
+ **If GraphQL schema found:**
114
+ "I found a GraphQL schema at `{path}`:
115
+ - {types_count} types
116
+ - {queries_count} queries
117
+ - {mutations_count} mutations
118
+
119
+ Would you like me to:
120
+ 1. **Import it** - Copy to `api-reference/schema.graphql` and generate GraphQL tab
121
+ 2. **Reference it** - Point docs.json to existing location: `{path}`
122
+ 3. **Skip** - Don't include GraphQL playground"
123
+
124
+ **If multiple specs found:**
125
+ "I found multiple API specifications:
126
+ - OpenAPI: `{openapi_path}`
127
+ - GraphQL: `{graphql_path}`
128
+
129
+ Which would you like to use for the API Reference?
130
+ 1. **OpenAPI (REST)** - Interactive REST API playground
131
+ 2. **GraphQL** - GraphQL playground with schema explorer
132
+ 3. **Both** - Create separate tabs for each
133
+ 4. **Skip** - Manual documentation only"
134
+
135
+ ---
136
+
137
+ **Question 3: Target Audience**
138
+ "Who is your primary audience?
139
+ (e.g., 'Backend developers integrating our payment API', 'Internal engineering team', 'Non-technical business users')"
140
+
141
+ **Question 4: Terminology (optional)**
142
+ "Any specific terminology I should know? For example:
143
+ - Brand names with specific capitalization
144
+ - Terms to avoid or prefer
145
+ - Domain-specific vocabulary
146
+
147
+ (Press Enter to skip)"
26
148
 
27
- **Read `docs.json` and check for `docType` field:**
149
+ **Question 5: Code Examples**
150
+ "What language should I use for code examples?
151
+ (e.g., TypeScript, Python, curl)"
152
+
153
+ #### 2e. Create Context Memory
154
+
155
+ Create `.devdoc/` folder and `context.json` with discovered + user info:
28
156
 
29
157
  ```json
30
158
  {
31
- "name": "Project Name",
32
- "docType": "api", // "internal" | "api" | "product"
33
- ...
159
+ "$schema": "https://devdoc.sh/schemas/context.json",
160
+ "version": "1.0",
161
+ "lastUpdated": "2026-01-24T10:30:00Z",
162
+ "product": {
163
+ "name": "[from README/package.json]",
164
+ "description": "[from README]",
165
+ "type": "[api/sdk/platform/cli/library]",
166
+ "domain": "[inferred or asked]",
167
+ "targetAudience": "[from Question 3]",
168
+ "keyFeatures": ["[from README]"]
169
+ },
170
+ "terminology": {
171
+ "glossary": {},
172
+ "avoidTerms": [],
173
+ "brandNames": {}
174
+ },
175
+ "api": {
176
+ "style": "[REST/GraphQL/etc if detected]",
177
+ "specPath": "[path to imported/referenced spec]",
178
+ "baseUrl": "[from OpenAPI if found]",
179
+ "authentication": {
180
+ "type": "[from OpenAPI if found]",
181
+ "headerName": "",
182
+ "description": ""
183
+ },
184
+ "conventions": {},
185
+ "commonPatterns": []
186
+ },
187
+ "codebase": {
188
+ "language": "[from package.json]",
189
+ "framework": "[from dependencies]",
190
+ "sourceLocation": "../"
191
+ },
192
+ "documentation": {
193
+ "voice": "[based on docType]",
194
+ "perspective": "second_person",
195
+ "codeExamples": {
196
+ "primaryLanguage": "[from Question 5]",
197
+ "additionalLanguages": []
198
+ },
199
+ "templates": {
200
+ "guide": ".devdoc/templates/guide.md",
201
+ "apiReference": ".devdoc/templates/api-reference.md",
202
+ "tutorial": ".devdoc/templates/tutorial.md",
203
+ "quickstart": ".devdoc/templates/quickstart.md",
204
+ "troubleshooting": ".devdoc/templates/troubleshooting.md"
205
+ }
206
+ },
207
+ "learned": {
208
+ "insights": [],
209
+ "corrections": []
210
+ }
34
211
  }
35
212
  ```
36
213
 
37
- **If `docType` is set:**
38
- - Use that value automatically
39
- - Tell user: "Using docType: {type} from docs.json"
214
+ Also copy template files to `.devdoc/templates/` if they don't exist.
40
215
 
41
- **If `docType` is NOT set, ask the user:**
216
+ Tell user:
217
+ "Created product context in `.devdoc/context.json`
218
+ - Product: {name}
219
+ - Type: {docType}
220
+ - API: {REST/GraphQL} (imported from {spec_path})
221
+ - Audience: {targetAudience}
222
+ - Code examples: {primaryLanguage}
42
223
 
43
- "What type of documentation are you creating?
224
+ This context will be used for consistent documentation generation."
44
225
 
45
- 1. **internal** - For your team: setup guides, architecture, contribution guidelines
46
- 2. **api** - For developers using your product: API reference, SDKs, integration guides
47
- 3. **product** - For end users: feature guides, tutorials, FAQs"
226
+ ### Step 3: Import API Spec (if selected)
227
+
228
+ **For OpenAPI (Import option):**
229
+ 1. Copy spec to `api-reference/openapi.json` (or `.yaml`)
230
+ 2. Validate the spec is valid OpenAPI 3.x
231
+ 3. Extract key info for context.json
232
+
233
+ **For OpenAPI (Reference option):**
234
+ 1. Note the relative path for docs.json
235
+ 2. Extract key info for context.json
48
236
 
49
- **IMPORTANT: After user answers, immediately update docs.json:**
237
+ **For GraphQL (Import option):**
238
+ 1. Copy schema to `api-reference/schema.graphql`
239
+ 2. Validate the schema
240
+ 3. Extract types/queries/mutations for context
50
241
 
51
- Add the `docType` field to docs.json so it's saved for future use:
242
+ **For GraphQL (Reference option):**
243
+ 1. Note the relative path for docs.json
244
+ 2. Extract schema info for context
245
+
246
+ ### Step 4: Update docs.json with API Reference
247
+
248
+ **Read existing `docs.json` or create new one.**
249
+
250
+ Add the `docType` field and API reference tab:
251
+
252
+ **For OpenAPI:**
253
+ ```json
254
+ {
255
+ "name": "Project Name",
256
+ "docType": "api",
257
+ "navigation": {
258
+ "tabs": [
259
+ {
260
+ "tab": "Guides",
261
+ "groups": [...]
262
+ },
263
+ {
264
+ "tab": "API Reference",
265
+ "type": "openapi",
266
+ "spec": "api-reference/openapi.json"
267
+ }
268
+ ]
269
+ }
270
+ }
271
+ ```
52
272
 
273
+ **For GraphQL:**
53
274
  ```json
54
275
  {
55
276
  "name": "Project Name",
56
- "docType": "api", // Save their choice here
57
- "navigation": { ... }
277
+ "docType": "api",
278
+ "navigation": {
279
+ "tabs": [
280
+ {
281
+ "tab": "Guides",
282
+ "groups": [...]
283
+ },
284
+ {
285
+ "tab": "GraphQL API",
286
+ "type": "graphql",
287
+ "schema": "api-reference/schema.graphql",
288
+ "endpoint": "https://api.example.com/graphql"
289
+ }
290
+ ]
291
+ }
292
+ }
293
+ ```
294
+
295
+ **For Both:**
296
+ ```json
297
+ {
298
+ "navigation": {
299
+ "tabs": [
300
+ { "tab": "Guides", "groups": [...] },
301
+ { "tab": "REST API", "type": "openapi", "spec": "api-reference/openapi.json" },
302
+ { "tab": "GraphQL API", "type": "graphql", "schema": "api-reference/schema.graphql" }
303
+ ]
304
+ }
58
305
  }
59
306
  ```
60
307
 
61
- Tell user: "Saved docType: {type} to docs.json - you won't be asked again."
308
+ Tell user: "Configured API Reference with {spec_type} from {path}"
62
309
 
63
- ### Step 3: Analyze Repository
310
+ ### Step 5: Generate Documentation
64
311
 
65
- Scan the source code for:
66
- - `README.md` - Project overview
67
- - `package.json` / `Cargo.toml` / `pyproject.toml` - Dependencies, metadata
68
- - `src/` or `lib/` - Source code structure
69
- - `api/` or `routes/` - API endpoints
70
- - `openapi.json` / `swagger.yaml` - API specs
71
- - `schema.graphql` - GraphQL schemas
312
+ **Read context from `.devdoc/context.json` before generating.**
72
313
 
73
- ### Step 4: Generate Based on docType
314
+ **Read the appropriate template** from `.devdoc/templates/` for each page type:
315
+ - For guides: read `.devdoc/templates/guide.md`
316
+ - For API reference: read `.devdoc/templates/api-reference.md`
317
+ - For quickstart: read `.devdoc/templates/quickstart.md`
318
+ - For tutorials: read `.devdoc/templates/tutorial.md`
319
+
320
+ **Apply context throughout:**
321
+ - Use correct product name from `product.name`
322
+ - Use terminology from `terminology.glossary`
323
+ - Avoid terms from `terminology.avoidTerms`
324
+ - Use code language from `documentation.codeExamples.primaryLanguage`
325
+ - Match voice from `documentation.voice`
326
+ - Reference API spec path from `api.specPath`
74
327
 
75
328
  ---
76
329
 
@@ -80,6 +333,9 @@ For internal team documentation, create:
80
333
 
81
334
  ```
82
335
  docs/
336
+ ├── .devdoc/
337
+ │ ├── context.json
338
+ │ └── templates/
83
339
  ├── docs.json
84
340
  ├── index.mdx # Project overview
85
341
  ├── getting-started/
@@ -107,6 +363,8 @@ docs/
107
363
  - Debugging and troubleshooting
108
364
  - Team conventions and standards
109
365
 
366
+ **Voice:** Technical, direct, assumes familiarity with codebase
367
+
110
368
  ---
111
369
 
112
370
  ## docType: "api"
@@ -115,6 +373,9 @@ For external developers using your API/SDK, create:
115
373
 
116
374
  ```
117
375
  docs/
376
+ ├── .devdoc/
377
+ │ ├── context.json
378
+ │ └── templates/
118
379
  ├── docs.json
119
380
  ├── index.mdx # Product intro, value prop
120
381
  ├── quickstart.mdx # 5-minute getting started
@@ -126,7 +387,8 @@ docs/
126
387
  │ ├── introduction.mdx # API overview, base URL, versioning
127
388
  │ ├── authentication.mdx # Auth details
128
389
  │ ├── errors.mdx # Error codes and handling
129
- └── openapi.json # Full API spec
390
+ ├── openapi.json # Full API spec (if imported)
391
+ │ └── schema.graphql # GraphQL schema (if imported)
130
392
  ├── sdks/ # If SDKs exist
131
393
  │ ├── javascript.mdx
132
394
  │ ├── python.mdx
@@ -143,6 +405,8 @@ docs/
143
405
  - Error handling and troubleshooting
144
406
  - Rate limits and best practices
145
407
 
408
+ **Voice:** Professional, helpful, code-focused
409
+
146
410
  ---
147
411
 
148
412
  ## docType: "product"
@@ -151,6 +415,9 @@ For end users of your product, create:
151
415
 
152
416
  ```
153
417
  docs/
418
+ ├── .devdoc/
419
+ │ ├── context.json
420
+ │ └── templates/
154
421
  ├── docs.json
155
422
  ├── index.mdx # Product overview
156
423
  ├── getting-started/
@@ -180,6 +447,8 @@ docs/
180
447
  - FAQs and troubleshooting
181
448
  - Feature explanations
182
449
 
450
+ **Voice:** Friendly, supportive, non-technical
451
+
183
452
  ---
184
453
 
185
454
  ## docs.json Templates (with docType)
@@ -205,7 +474,7 @@ docs/
205
474
  }
206
475
  ```
207
476
 
208
- ### Customer API Docs
477
+ ### Customer API Docs (with OpenAPI)
209
478
  ```json
210
479
  {
211
480
  "name": "{Product Name}",
@@ -229,6 +498,31 @@ docs/
229
498
  }
230
499
  ```
231
500
 
501
+ ### Customer API Docs (with GraphQL)
502
+ ```json
503
+ {
504
+ "name": "{Product Name}",
505
+ "docType": "api",
506
+ "navigation": {
507
+ "tabs": [
508
+ {
509
+ "tab": "Guides",
510
+ "groups": [
511
+ { "group": "Getting Started", "pages": ["index", "quickstart", "authentication"] },
512
+ { "group": "Guides", "pages": ["guides/overview"] }
513
+ ]
514
+ },
515
+ {
516
+ "tab": "GraphQL API",
517
+ "type": "graphql",
518
+ "schema": "api-reference/schema.graphql",
519
+ "endpoint": "https://api.example.com/graphql"
520
+ }
521
+ ]
522
+ }
523
+ }
524
+ ```
525
+
232
526
  ### Product Docs
233
527
  ```json
234
528
  {
@@ -252,8 +546,12 @@ docs/
252
546
 
253
547
  ## Quality Guidelines
254
548
 
255
- - Extract real code examples, don't fabricate
256
- - Match tone to audience (technical vs non-technical)
549
+ - Extract real code examples from source, don't fabricate
550
+ - Match tone to audience based on docType
257
551
  - Add TODO markers for sections needing human review
258
552
  - Include relevant screenshots for product docs
259
553
  - Test all code examples work
554
+ - Always use terminology from context.json
555
+ - Update context.json if you learn new information
556
+ - **Import existing API specs** rather than creating manual docs
557
+ - **Validate specs** before importing