@brainfish-ai/devdoc 0.1.37 → 0.1.39
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.
- package/ai-agents/.claude/skills/bootstrap-docs/SKILL.md +382 -434
- package/ai-agents/.claude/skills/create-doc/SKILL.md +47 -10
- package/ai-agents/.claude/skills/update-doc/SKILL.md +40 -15
- package/ai-agents/.cursor/rules/devdoc-bootstrap.mdc +211 -153
- package/ai-agents/.cursor/rules/devdoc-create.mdc +17 -5
- package/ai-agents/.cursor/rules/devdoc-update.mdc +29 -12
- package/ai-agents/schemas/code-graph.schema.json +413 -0
- package/ai-agents/schemas/context.schema.json +20 -0
- package/dist/cli/commands/deploy.js +40 -15
- package/dist/cli/commands/upload.js +37 -2
- package/package.json +1 -1
|
@@ -7,10 +7,16 @@ globs: ["**/*.mdx", "**/docs.json"]
|
|
|
7
7
|
|
|
8
8
|
When asked to update documentation:
|
|
9
9
|
|
|
10
|
-
## Step 0: Read Context
|
|
10
|
+
## Step 0: Read Context & Code Graph
|
|
11
11
|
|
|
12
12
|
Read `.devdoc/context.json` for terminology and conventions.
|
|
13
13
|
|
|
14
|
+
Read `.devdoc/code-graph.json` to compare:
|
|
15
|
+
- Current exports vs documented functions
|
|
16
|
+
- Current types vs documented types
|
|
17
|
+
- New endpoints not in docs
|
|
18
|
+
- Removed features still documented
|
|
19
|
+
|
|
14
20
|
## Step 1: Understand What to Update
|
|
15
21
|
|
|
16
22
|
Ask: "What would you like to update?
|
|
@@ -27,22 +33,33 @@ Ask: "What would you like to update?
|
|
|
27
33
|
- Ask what changes needed
|
|
28
34
|
|
|
29
35
|
**For Codebase Sync:**
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
36
|
+
|
|
37
|
+
1. Re-scan codebase to update code-graph.json
|
|
38
|
+
2. Compare docs vs code-graph.json:
|
|
39
|
+
- Signatures changed? (exports array)
|
|
40
|
+
- New exports undocumented?
|
|
41
|
+
- Removed exports still documented?
|
|
42
|
+
- Types changed?
|
|
43
|
+
- New endpoints? (api.endpoints)
|
|
35
44
|
|
|
36
45
|
Generate sync report:
|
|
37
46
|
```
|
|
38
|
-
## Sync Report
|
|
47
|
+
## Sync Report (from code-graph.json)
|
|
48
|
+
|
|
49
|
+
### Signatures Changed
|
|
50
|
+
- `api/users.mdx`: createUser signature changed
|
|
51
|
+
- Documented: createUser(name, email)
|
|
52
|
+
- Code-graph: createUser(options: CreateUserInput)
|
|
53
|
+
|
|
54
|
+
### New Exports (not documented)
|
|
55
|
+
- auth.refreshToken()
|
|
56
|
+
- users.deleteUser()
|
|
39
57
|
|
|
40
|
-
###
|
|
41
|
-
-
|
|
42
|
-
- `quickstart.mdx`: version outdated
|
|
58
|
+
### Removed (documented but not in code-graph)
|
|
59
|
+
- legacyAuth() - removed
|
|
43
60
|
|
|
44
|
-
###
|
|
45
|
-
-
|
|
61
|
+
### Types Changed
|
|
62
|
+
- User interface: added `role` property
|
|
46
63
|
|
|
47
64
|
### Up to Date ✓
|
|
48
65
|
- `guides/auth.mdx`
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://devdoc.sh/schemas/code-graph.json",
|
|
4
|
+
"title": "DevDoc Code Graph",
|
|
5
|
+
"description": "Complete analysis of a codebase for accurate documentation generation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "generatedAt", "git", "project"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Schema URL for validation"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Schema version",
|
|
16
|
+
"enum": ["1.0"]
|
|
17
|
+
},
|
|
18
|
+
"generatedAt": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "date-time",
|
|
21
|
+
"description": "When the code graph was generated"
|
|
22
|
+
},
|
|
23
|
+
"git": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Git state when code graph was generated",
|
|
26
|
+
"required": ["commitHash"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"commitHash": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Full commit SHA when graph was generated",
|
|
31
|
+
"pattern": "^[a-f0-9]{40}$"
|
|
32
|
+
},
|
|
33
|
+
"commitShort": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Short commit hash (7 chars)",
|
|
36
|
+
"pattern": "^[a-f0-9]{7}$"
|
|
37
|
+
},
|
|
38
|
+
"branch": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Branch name when generated"
|
|
41
|
+
},
|
|
42
|
+
"commitMessage": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Commit message"
|
|
45
|
+
},
|
|
46
|
+
"commitDate": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": "date-time",
|
|
49
|
+
"description": "Date of the commit"
|
|
50
|
+
},
|
|
51
|
+
"isDirty": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Whether there were uncommitted changes",
|
|
54
|
+
"default": false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"project": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "Project metadata",
|
|
61
|
+
"required": ["name", "language"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"name": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Project name from package.json or README"
|
|
66
|
+
},
|
|
67
|
+
"description": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "Project description"
|
|
70
|
+
},
|
|
71
|
+
"language": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Primary programming language",
|
|
74
|
+
"examples": ["TypeScript", "Python", "Go", "Rust", "Java"]
|
|
75
|
+
},
|
|
76
|
+
"framework": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Main framework used",
|
|
79
|
+
"examples": ["Express", "Next.js", "FastAPI", "Django", "Spring"]
|
|
80
|
+
},
|
|
81
|
+
"rootDir": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Source code root directory",
|
|
84
|
+
"default": "src/"
|
|
85
|
+
},
|
|
86
|
+
"packageManager": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": ["npm", "yarn", "pnpm", "pip", "cargo", "go"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"structure": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"description": "Directory structure overview",
|
|
95
|
+
"properties": {
|
|
96
|
+
"sourceDir": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "Main source directory"
|
|
99
|
+
},
|
|
100
|
+
"testsDir": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Tests directory"
|
|
103
|
+
},
|
|
104
|
+
"examplesDir": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "Examples directory"
|
|
107
|
+
},
|
|
108
|
+
"docsDir": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Documentation directory"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"files": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"description": "List of important files",
|
|
117
|
+
"items": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": ["path", "type"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"path": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "File path relative to project root"
|
|
124
|
+
},
|
|
125
|
+
"type": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"enum": ["entrypoint", "router", "controller", "model", "service", "util", "type", "config", "test", "example"],
|
|
128
|
+
"description": "File type/purpose"
|
|
129
|
+
},
|
|
130
|
+
"exports": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": { "type": "string" },
|
|
133
|
+
"description": "Named exports from this file"
|
|
134
|
+
},
|
|
135
|
+
"description": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "Brief description of the file's purpose"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"modules": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"description": "Logical modules/packages in the codebase",
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"required": ["name", "path"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"name": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Module name"
|
|
152
|
+
},
|
|
153
|
+
"path": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Module directory path"
|
|
156
|
+
},
|
|
157
|
+
"description": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "What this module does"
|
|
160
|
+
},
|
|
161
|
+
"files": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"items": { "type": "string" },
|
|
164
|
+
"description": "Files in this module"
|
|
165
|
+
},
|
|
166
|
+
"exports": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"description": "Public exports from this module",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"required": ["name", "type"],
|
|
172
|
+
"properties": {
|
|
173
|
+
"name": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"description": "Export name"
|
|
176
|
+
},
|
|
177
|
+
"type": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": ["function", "class", "interface", "type", "constant", "enum"],
|
|
180
|
+
"description": "Type of export"
|
|
181
|
+
},
|
|
182
|
+
"signature": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Function/method signature or type definition"
|
|
185
|
+
},
|
|
186
|
+
"description": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "What this export does"
|
|
189
|
+
},
|
|
190
|
+
"params": {
|
|
191
|
+
"type": "array",
|
|
192
|
+
"description": "Function parameters",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"name": { "type": "string" },
|
|
197
|
+
"type": { "type": "string" },
|
|
198
|
+
"description": { "type": "string" },
|
|
199
|
+
"optional": { "type": "boolean" }
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"returns": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"description": "Return type",
|
|
206
|
+
"properties": {
|
|
207
|
+
"type": { "type": "string" },
|
|
208
|
+
"description": { "type": "string" }
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"async": {
|
|
212
|
+
"type": "boolean",
|
|
213
|
+
"description": "Whether the function is async"
|
|
214
|
+
},
|
|
215
|
+
"deprecated": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"description": "Whether this export is deprecated"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"dependencies": {
|
|
223
|
+
"type": "array",
|
|
224
|
+
"items": { "type": "string" },
|
|
225
|
+
"description": "Other modules this depends on"
|
|
226
|
+
},
|
|
227
|
+
"docPriority": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"enum": ["high", "medium", "low"],
|
|
230
|
+
"description": "Priority for documentation"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"types": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"description": "Type definitions, interfaces, schemas",
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"required": ["name", "path"],
|
|
241
|
+
"properties": {
|
|
242
|
+
"name": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"description": "Type name"
|
|
245
|
+
},
|
|
246
|
+
"path": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"description": "File where type is defined"
|
|
249
|
+
},
|
|
250
|
+
"kind": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"enum": ["interface", "type", "class", "enum", "schema"],
|
|
253
|
+
"description": "Kind of type definition"
|
|
254
|
+
},
|
|
255
|
+
"definition": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Full type definition code"
|
|
258
|
+
},
|
|
259
|
+
"properties": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"description": "Properties of the type",
|
|
262
|
+
"items": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"name": { "type": "string" },
|
|
266
|
+
"type": { "type": "string" },
|
|
267
|
+
"description": { "type": "string" },
|
|
268
|
+
"optional": { "type": "boolean" }
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"description": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "What this type represents"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"api": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"description": "API information (REST/GraphQL)",
|
|
282
|
+
"properties": {
|
|
283
|
+
"type": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"enum": ["REST", "GraphQL", "gRPC", "WebSocket"],
|
|
286
|
+
"description": "API type"
|
|
287
|
+
},
|
|
288
|
+
"baseUrl": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"description": "Base URL or path prefix"
|
|
291
|
+
},
|
|
292
|
+
"specPath": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"description": "Path to OpenAPI/GraphQL spec file"
|
|
295
|
+
},
|
|
296
|
+
"authentication": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"type": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"enum": ["bearer", "apiKey", "basic", "oauth2", "none"]
|
|
302
|
+
},
|
|
303
|
+
"headerName": { "type": "string" },
|
|
304
|
+
"description": { "type": "string" }
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"endpoints": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"description": "API endpoints (if no spec file)",
|
|
310
|
+
"items": {
|
|
311
|
+
"type": "object",
|
|
312
|
+
"properties": {
|
|
313
|
+
"method": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"enum": ["GET", "POST", "PUT", "PATCH", "DELETE"]
|
|
316
|
+
},
|
|
317
|
+
"path": { "type": "string" },
|
|
318
|
+
"handler": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"description": "File:function handling this endpoint"
|
|
321
|
+
},
|
|
322
|
+
"description": { "type": "string" },
|
|
323
|
+
"auth": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"enum": ["required", "optional", "none"]
|
|
326
|
+
},
|
|
327
|
+
"requestBody": { "type": "string" },
|
|
328
|
+
"responseType": { "type": "string" }
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"examples": {
|
|
335
|
+
"type": "array",
|
|
336
|
+
"description": "Code example files",
|
|
337
|
+
"items": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"required": ["path"],
|
|
340
|
+
"properties": {
|
|
341
|
+
"path": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"description": "Path to example file"
|
|
344
|
+
},
|
|
345
|
+
"description": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "What this example demonstrates"
|
|
348
|
+
},
|
|
349
|
+
"tags": {
|
|
350
|
+
"type": "array",
|
|
351
|
+
"items": { "type": "string" },
|
|
352
|
+
"description": "Tags for categorizing examples"
|
|
353
|
+
},
|
|
354
|
+
"runnable": {
|
|
355
|
+
"type": "boolean",
|
|
356
|
+
"description": "Whether this example can be run directly"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"dependencies": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"description": "Project dependencies",
|
|
364
|
+
"additionalProperties": {
|
|
365
|
+
"type": "string"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"config": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"description": "Configuration options the project supports",
|
|
371
|
+
"properties": {
|
|
372
|
+
"envVars": {
|
|
373
|
+
"type": "array",
|
|
374
|
+
"description": "Environment variables",
|
|
375
|
+
"items": {
|
|
376
|
+
"type": "object",
|
|
377
|
+
"properties": {
|
|
378
|
+
"name": { "type": "string" },
|
|
379
|
+
"description": { "type": "string" },
|
|
380
|
+
"required": { "type": "boolean" },
|
|
381
|
+
"default": { "type": "string" }
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"configFiles": {
|
|
386
|
+
"type": "array",
|
|
387
|
+
"description": "Configuration files",
|
|
388
|
+
"items": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"path": { "type": "string" },
|
|
392
|
+
"format": { "type": "string" },
|
|
393
|
+
"description": { "type": "string" }
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"errors": {
|
|
400
|
+
"type": "array",
|
|
401
|
+
"description": "Error types/codes defined in the codebase",
|
|
402
|
+
"items": {
|
|
403
|
+
"type": "object",
|
|
404
|
+
"properties": {
|
|
405
|
+
"name": { "type": "string" },
|
|
406
|
+
"code": { "type": "string" },
|
|
407
|
+
"message": { "type": "string" },
|
|
408
|
+
"description": { "type": "string" }
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
@@ -19,6 +19,26 @@
|
|
|
19
19
|
"format": "date-time",
|
|
20
20
|
"description": "ISO 8601 timestamp of last update"
|
|
21
21
|
},
|
|
22
|
+
"git": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"description": "Git state when context was created/updated",
|
|
25
|
+
"properties": {
|
|
26
|
+
"commitHash": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Full commit SHA when context was generated",
|
|
29
|
+
"pattern": "^[a-f0-9]{40}$"
|
|
30
|
+
},
|
|
31
|
+
"commitShort": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Short commit hash (7 chars)",
|
|
34
|
+
"pattern": "^[a-f0-9]{7}$"
|
|
35
|
+
},
|
|
36
|
+
"branch": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Branch name when generated"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
22
42
|
"product": {
|
|
23
43
|
"type": "object",
|
|
24
44
|
"description": "Core product information",
|