@brainfish-ai/devdoc 0.1.32 → 0.1.34
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/blame-doc/SKILL.md +171 -0
- package/ai-agents/.claude/skills/bootstrap-docs/SKILL.md +519 -64
- package/ai-agents/.claude/skills/check-docs/SKILL.md +107 -12
- package/ai-agents/.claude/skills/commit-doc/SKILL.md +214 -0
- package/ai-agents/.claude/skills/create-doc/SKILL.md +198 -0
- package/ai-agents/.claude/skills/delete-doc/SKILL.md +164 -0
- package/ai-agents/.claude/skills/update-doc/SKILL.md +219 -0
- package/ai-agents/.cursor/rules/devdoc-blame.mdc +114 -0
- package/ai-agents/.cursor/rules/devdoc-bootstrap.mdc +207 -41
- package/ai-agents/.cursor/rules/devdoc-commit.mdc +103 -0
- package/ai-agents/.cursor/rules/devdoc-create.mdc +89 -0
- package/ai-agents/.cursor/rules/devdoc-delete.mdc +101 -0
- package/ai-agents/.cursor/rules/devdoc-update.mdc +95 -0
- package/ai-agents/.devdoc/context.json +66 -0
- package/ai-agents/.devdoc/templates/api-reference.md +211 -0
- package/ai-agents/.devdoc/templates/guide.md +133 -0
- package/ai-agents/.devdoc/templates/quickstart.md +179 -0
- package/ai-agents/.devdoc/templates/troubleshooting.md +215 -0
- package/ai-agents/.devdoc/templates/tutorial.md +212 -0
- package/ai-agents/CLAUDE.md +15 -3
- package/ai-agents/schemas/context.schema.json +259 -0
- package/dist/cli/commands/ai.d.ts +1 -0
- package/dist/cli/commands/ai.js +115 -46
- package/dist/cli/commands/create.d.ts +12 -0
- package/dist/cli/commands/create.js +110 -62
- package/dist/cli/commands/init.js +11 -7
- package/dist/cli/index.js +4 -2
- package/package.json +1 -1
- package/renderer/components/docs-viewer/sidebar/index.tsx +118 -87
- package/ai-agents/.claude/skills/create-doc-page/SKILL.md +0 -57
- package/ai-agents/.claude/skills/docs-from-code/SKILL.md +0 -73
- package/ai-agents/.claude/skills/generate-api-docs/SKILL.md +0 -94
- package/ai-agents/.claude/skills/sync-docs/SKILL.md +0 -112
- package/ai-agents/.claude/skills/update-docs-json/SKILL.md +0 -60
- package/ai-agents/.cursor/rules/devdoc-sync.mdc +0 -70
|
@@ -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`
|