@brainfish-ai/devdoc 0.1.28 → 0.1.30
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 +102 -0
- package/ai-agents/.claude/skills/check-docs/SKILL.md +72 -0
- package/ai-agents/.claude/skills/create-doc-page/SKILL.md +57 -0
- package/ai-agents/.claude/skills/docs-from-code/SKILL.md +73 -0
- package/ai-agents/.claude/skills/generate-api-docs/SKILL.md +94 -0
- package/ai-agents/.claude/skills/import-api-spec/SKILL.md +114 -0
- package/ai-agents/.claude/skills/migrate-docs/SKILL.md +116 -0
- package/ai-agents/.claude/skills/sync-docs/SKILL.md +112 -0
- package/ai-agents/.claude/skills/update-docs-json/SKILL.md +60 -0
- package/ai-agents/.cursor/rules/devdoc-bootstrap.mdc +66 -0
- package/ai-agents/.cursor/rules/devdoc-migrate.mdc +62 -0
- package/ai-agents/.cursor/rules/devdoc-sync.mdc +70 -0
- package/ai-agents/.cursor/rules/devdoc.mdc +94 -0
- package/ai-agents/CLAUDE.md +194 -0
- package/dist/cli/commands/ai.js +9 -9
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +140 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.js +188 -1
- package/dist/cli/index.js +3 -1
- package/package.json +3 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bootstrap-docs
|
|
3
|
+
description: Analyze repository and generate complete initial documentation structure
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
When bootstrapping documentation from a repository:
|
|
9
|
+
|
|
10
|
+
### Step 1: Analyze Repository Structure
|
|
11
|
+
|
|
12
|
+
Scan and identify:
|
|
13
|
+
- `README.md` - Project overview, installation, usage
|
|
14
|
+
- `package.json` / `Cargo.toml` / `pyproject.toml` - Dependencies, scripts, metadata
|
|
15
|
+
- `src/` or `lib/` - Main source code structure
|
|
16
|
+
- `api/` or `routes/` - API endpoints (REST, GraphQL)
|
|
17
|
+
- `components/` - UI components (React, Vue, etc.)
|
|
18
|
+
- `docs/` - Existing documentation
|
|
19
|
+
- `.env.example` - Environment variables
|
|
20
|
+
- `docker-compose.yml` / `Dockerfile` - Deployment info
|
|
21
|
+
- `openapi.json` / `swagger.yaml` - API specifications
|
|
22
|
+
- `schema.graphql` - GraphQL schemas
|
|
23
|
+
|
|
24
|
+
### Step 2: Generate Documentation Structure
|
|
25
|
+
|
|
26
|
+
Create the following based on what's found:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
docs/
|
|
30
|
+
├── docs.json # Navigation config
|
|
31
|
+
├── index.mdx # Homepage (from README)
|
|
32
|
+
├── quickstart.mdx # Getting started guide
|
|
33
|
+
├── installation.mdx # Installation instructions
|
|
34
|
+
├── configuration.mdx # Environment/config setup
|
|
35
|
+
├── guides/
|
|
36
|
+
│ ├── overview.mdx # Architecture overview
|
|
37
|
+
│ └── {feature}.mdx # Feature-specific guides
|
|
38
|
+
├── api-reference/
|
|
39
|
+
│ ├── introduction.mdx # API overview
|
|
40
|
+
│ ├── authentication.mdx # Auth guide
|
|
41
|
+
│ └── openapi.json # (if found/generated)
|
|
42
|
+
├── components/ # (if UI library)
|
|
43
|
+
│ └── {component}.mdx
|
|
44
|
+
└── deployment.mdx # Deployment guide
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Step 3: Content Generation
|
|
48
|
+
|
|
49
|
+
For each page, generate:
|
|
50
|
+
1. Frontmatter with title and description
|
|
51
|
+
2. Clear introduction explaining the topic
|
|
52
|
+
3. Code examples extracted from source
|
|
53
|
+
4. Links to related documentation
|
|
54
|
+
|
|
55
|
+
### Step 4: Generate docs.json
|
|
56
|
+
|
|
57
|
+
Create navigation structure:
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"name": "{Project Name from package.json}",
|
|
61
|
+
"navigation": {
|
|
62
|
+
"tabs": [
|
|
63
|
+
{
|
|
64
|
+
"tab": "Guides",
|
|
65
|
+
"type": "docs",
|
|
66
|
+
"groups": [
|
|
67
|
+
{
|
|
68
|
+
"group": "Getting Started",
|
|
69
|
+
"pages": ["index", "quickstart", "installation"]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"group": "Guides",
|
|
73
|
+
"pages": ["guides/overview"]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## What to Extract from Source Code
|
|
83
|
+
|
|
84
|
+
| Source | Documentation Generated |
|
|
85
|
+
|--------|------------------------|
|
|
86
|
+
| README.md | Homepage content, project overview |
|
|
87
|
+
| package.json scripts | CLI commands, development workflow |
|
|
88
|
+
| Exported functions | API reference pages |
|
|
89
|
+
| React components | Component documentation with props |
|
|
90
|
+
| API routes | Endpoint reference |
|
|
91
|
+
| OpenAPI spec | Full API documentation |
|
|
92
|
+
| GraphQL schema | GraphQL type documentation |
|
|
93
|
+
| Config files | Configuration reference |
|
|
94
|
+
| Tests | Usage examples |
|
|
95
|
+
|
|
96
|
+
## Output Quality Guidelines
|
|
97
|
+
|
|
98
|
+
- Extract real code examples, don't fabricate
|
|
99
|
+
- Preserve existing documentation where found
|
|
100
|
+
- Note areas that need human review with TODOs
|
|
101
|
+
- Generate SEO-friendly descriptions
|
|
102
|
+
- Include installation commands from package manager
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-docs
|
|
3
|
+
description: Quick check for documentation issues without making changes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
Run a quick audit of documentation health:
|
|
9
|
+
|
|
10
|
+
1. **Broken Links** - Check all internal href links resolve
|
|
11
|
+
2. **Missing Pages** - Pages in docs.json but file doesn't exist
|
|
12
|
+
3. **Orphan Pages** - MDX files not in docs.json navigation
|
|
13
|
+
4. **Code Validity** - Syntax check code blocks
|
|
14
|
+
5. **Outdated Examples** - Compare imports against package exports
|
|
15
|
+
6. **Stale Versions** - Check version numbers against package.json
|
|
16
|
+
|
|
17
|
+
## Output Format
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Documentation Health Check
|
|
21
|
+
==========================
|
|
22
|
+
|
|
23
|
+
Summary: X issues found
|
|
24
|
+
|
|
25
|
+
Broken Links (count)
|
|
26
|
+
file.mdx:line → /path (page not found)
|
|
27
|
+
|
|
28
|
+
Outdated Code (count)
|
|
29
|
+
file.mdx:line → import { oldFunc } from 'pkg'
|
|
30
|
+
'oldFunc' no longer exported, use 'newFunc'
|
|
31
|
+
|
|
32
|
+
Orphan Pages (count)
|
|
33
|
+
path/to/file.mdx (not in navigation)
|
|
34
|
+
|
|
35
|
+
Missing Pages (count)
|
|
36
|
+
docs.json references 'page' but file not found
|
|
37
|
+
|
|
38
|
+
All version numbers current
|
|
39
|
+
All pages in docs.json exist
|
|
40
|
+
No syntax errors in code blocks
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Checks Performed
|
|
44
|
+
|
|
45
|
+
### Link Validation
|
|
46
|
+
- Internal links (`href="/path"`)
|
|
47
|
+
- Anchor links (`href="#section"`)
|
|
48
|
+
- Cross-references between pages
|
|
49
|
+
|
|
50
|
+
### Code Block Validation
|
|
51
|
+
- Language tag present
|
|
52
|
+
- Valid syntax (basic check)
|
|
53
|
+
- Import statements resolve
|
|
54
|
+
|
|
55
|
+
### Navigation Validation
|
|
56
|
+
- All pages in docs.json exist
|
|
57
|
+
- No duplicate entries
|
|
58
|
+
- Valid group structure
|
|
59
|
+
|
|
60
|
+
### Content Validation
|
|
61
|
+
- Frontmatter present (title, description)
|
|
62
|
+
- No H1 headings (title from frontmatter)
|
|
63
|
+
- Images have alt text
|
|
64
|
+
|
|
65
|
+
## Quick Fixes
|
|
66
|
+
|
|
67
|
+
After running check, common fixes:
|
|
68
|
+
|
|
69
|
+
1. **Broken link** → Update href or create missing page
|
|
70
|
+
2. **Orphan page** → Add to docs.json or delete if unused
|
|
71
|
+
3. **Missing frontmatter** → Add title and description
|
|
72
|
+
4. **Outdated import** → Update to current export name
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-doc-page
|
|
3
|
+
description: Create a new DevDoc MDX documentation page with proper structure and components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
When creating a new documentation page:
|
|
9
|
+
|
|
10
|
+
1. Ask for the page topic and type (guide, reference, tutorial)
|
|
11
|
+
2. Generate MDX with:
|
|
12
|
+
- Proper frontmatter (title, description)
|
|
13
|
+
- Clear introduction paragraph
|
|
14
|
+
- Structured sections with H2/H3
|
|
15
|
+
- Appropriate components (Steps, Cards, Callouts)
|
|
16
|
+
- Navigation cards at the bottom
|
|
17
|
+
|
|
18
|
+
## Template Structure
|
|
19
|
+
|
|
20
|
+
```mdx
|
|
21
|
+
---
|
|
22
|
+
title: "{Title}"
|
|
23
|
+
description: "{Description}"
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
{Introduction paragraph explaining the topic}
|
|
27
|
+
|
|
28
|
+
## {Section 1}
|
|
29
|
+
|
|
30
|
+
{Content with appropriate components}
|
|
31
|
+
|
|
32
|
+
## {Section 2}
|
|
33
|
+
|
|
34
|
+
{More content}
|
|
35
|
+
|
|
36
|
+
## Next Steps
|
|
37
|
+
|
|
38
|
+
<CardGroup cols={2}>
|
|
39
|
+
<Card title="Related Topic" icon="icon-name" href="/path">
|
|
40
|
+
Brief description
|
|
41
|
+
</Card>
|
|
42
|
+
</CardGroup>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Component Usage Guidelines
|
|
46
|
+
|
|
47
|
+
- Use `<Steps>` for procedural content
|
|
48
|
+
- Use `<CardGroup>` for navigation/feature highlights
|
|
49
|
+
- Use `<Tip>` for helpful hints
|
|
50
|
+
- Use `<Warning>` for important cautions
|
|
51
|
+
- Use `<Note>` for additional context
|
|
52
|
+
- Use `<Accordion>` for optional/advanced details
|
|
53
|
+
|
|
54
|
+
## After Creating
|
|
55
|
+
|
|
56
|
+
1. Add the new page to `docs.json` navigation
|
|
57
|
+
2. Link to the page from related documentation
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-from-code
|
|
3
|
+
description: Generate documentation from specific code files, functions, or modules
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
When generating docs from specific code:
|
|
9
|
+
|
|
10
|
+
1. Analyze the code structure and purpose
|
|
11
|
+
2. Identify:
|
|
12
|
+
- Public API/exports
|
|
13
|
+
- Function signatures and parameters
|
|
14
|
+
- Return types and values
|
|
15
|
+
- Usage patterns from tests or examples
|
|
16
|
+
3. Generate documentation with:
|
|
17
|
+
- Overview of the module/function
|
|
18
|
+
- Parameter descriptions
|
|
19
|
+
- Code examples
|
|
20
|
+
- Common use cases
|
|
21
|
+
|
|
22
|
+
## Output Format
|
|
23
|
+
|
|
24
|
+
```mdx
|
|
25
|
+
---
|
|
26
|
+
title: "{Module/Function Name}"
|
|
27
|
+
description: "{Brief purpose}"
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
{Overview paragraph}
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
{If applicable}
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
<Steps>
|
|
39
|
+
<Step title="Import">
|
|
40
|
+
```typescript
|
|
41
|
+
import { function } from 'package';
|
|
42
|
+
```
|
|
43
|
+
</Step>
|
|
44
|
+
<Step title="Basic Usage">
|
|
45
|
+
{Example code}
|
|
46
|
+
</Step>
|
|
47
|
+
</Steps>
|
|
48
|
+
|
|
49
|
+
## API Reference
|
|
50
|
+
|
|
51
|
+
### `functionName(params)`
|
|
52
|
+
|
|
53
|
+
{Description}
|
|
54
|
+
|
|
55
|
+
**Parameters:**
|
|
56
|
+
| Name | Type | Description |
|
|
57
|
+
|------|------|-------------|
|
|
58
|
+
| param1 | `type` | Description |
|
|
59
|
+
|
|
60
|
+
**Returns:** `type` - Description
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
{Practical examples with code blocks}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Best Practices
|
|
68
|
+
|
|
69
|
+
1. Extract real code examples - don't fabricate
|
|
70
|
+
2. Include TypeScript types when available
|
|
71
|
+
3. Show common use cases
|
|
72
|
+
4. Document edge cases and error handling
|
|
73
|
+
5. Link to related functions/modules
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-api-docs
|
|
3
|
+
description: Generate API documentation pages from OpenAPI spec or code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
1. Analyze the OpenAPI spec or API code
|
|
9
|
+
2. Create documentation pages for:
|
|
10
|
+
- Introduction/Overview
|
|
11
|
+
- Authentication guide
|
|
12
|
+
- Error handling
|
|
13
|
+
- Rate limiting (if applicable)
|
|
14
|
+
3. Update docs.json to include API reference tab
|
|
15
|
+
|
|
16
|
+
## OpenAPI Tab Configuration
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"tab": "API Reference",
|
|
21
|
+
"type": "openapi",
|
|
22
|
+
"path": "/api-reference",
|
|
23
|
+
"spec": "api-reference/openapi.json",
|
|
24
|
+
"groups": [
|
|
25
|
+
{
|
|
26
|
+
"group": "Overview",
|
|
27
|
+
"pages": ["api-reference/introduction", "api-reference/authentication"]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## GraphQL Tab Configuration
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"tab": "GraphQL API",
|
|
38
|
+
"type": "graphql",
|
|
39
|
+
"path": "/graphql-api",
|
|
40
|
+
"schema": "api-reference/schema.graphql",
|
|
41
|
+
"endpoint": "https://api.example.com/graphql"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Generated Pages
|
|
46
|
+
|
|
47
|
+
### api-reference/introduction.mdx
|
|
48
|
+
```mdx
|
|
49
|
+
---
|
|
50
|
+
title: "API Introduction"
|
|
51
|
+
description: "Overview of the API"
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
Brief overview of the API capabilities.
|
|
55
|
+
|
|
56
|
+
## Base URL
|
|
57
|
+
|
|
58
|
+
\`\`\`
|
|
59
|
+
https://api.example.com/v1
|
|
60
|
+
\`\`\`
|
|
61
|
+
|
|
62
|
+
## Authentication
|
|
63
|
+
|
|
64
|
+
All requests require authentication. See [Authentication](/api-reference/authentication).
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### api-reference/authentication.mdx
|
|
68
|
+
```mdx
|
|
69
|
+
---
|
|
70
|
+
title: "Authentication"
|
|
71
|
+
description: "How to authenticate API requests"
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
<Tabs>
|
|
75
|
+
<Tab title="Bearer Token">
|
|
76
|
+
Include the token in the Authorization header:
|
|
77
|
+
\`\`\`bash
|
|
78
|
+
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.example.com/v1/users
|
|
79
|
+
\`\`\`
|
|
80
|
+
</Tab>
|
|
81
|
+
<Tab title="API Key">
|
|
82
|
+
Include the API key in the header:
|
|
83
|
+
\`\`\`bash
|
|
84
|
+
curl -H "X-API-Key: YOUR_KEY" https://api.example.com/v1/users
|
|
85
|
+
\`\`\`
|
|
86
|
+
</Tab>
|
|
87
|
+
</Tabs>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## After Generating
|
|
91
|
+
|
|
92
|
+
1. Review and customize the generated content
|
|
93
|
+
2. Add real examples from your API
|
|
94
|
+
3. Update authentication details
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: import-api-spec
|
|
3
|
+
description: Import and configure API specification (OpenAPI, GraphQL, AsyncAPI) for documentation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
When importing an API specification:
|
|
9
|
+
|
|
10
|
+
### Step 1: Detect Spec Type
|
|
11
|
+
|
|
12
|
+
| File Pattern | Type | Version |
|
|
13
|
+
|--------------|------|---------|
|
|
14
|
+
| `openapi.json/yaml` | OpenAPI | 3.x |
|
|
15
|
+
| `swagger.json/yaml` | Swagger | 2.0 |
|
|
16
|
+
| `schema.graphql` | GraphQL | - |
|
|
17
|
+
| `asyncapi.json/yaml` | AsyncAPI | 2.x/3.x |
|
|
18
|
+
| `*.proto` | Protobuf/gRPC | - |
|
|
19
|
+
|
|
20
|
+
### Step 2: Validate & Process
|
|
21
|
+
|
|
22
|
+
1. Validate spec syntax
|
|
23
|
+
2. Check for $ref resolution issues
|
|
24
|
+
3. Identify auth schemes
|
|
25
|
+
4. Extract server URLs
|
|
26
|
+
|
|
27
|
+
### Step 3: Generate Documentation
|
|
28
|
+
|
|
29
|
+
For OpenAPI/Swagger:
|
|
30
|
+
```
|
|
31
|
+
api-reference/
|
|
32
|
+
├── openapi.json # Cleaned/validated spec
|
|
33
|
+
├── introduction.mdx # API overview from info
|
|
34
|
+
├── authentication.mdx # From securitySchemes
|
|
35
|
+
├── errors.mdx # From error response schemas
|
|
36
|
+
└── rate-limiting.mdx # If x-rateLimit extension exists
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For GraphQL:
|
|
40
|
+
```
|
|
41
|
+
api-reference/
|
|
42
|
+
├── schema.graphql # Schema file
|
|
43
|
+
├── introduction.mdx # Overview
|
|
44
|
+
├── authentication.mdx # Auth guide
|
|
45
|
+
├── queries.mdx # Query documentation
|
|
46
|
+
├── mutations.mdx # Mutation documentation
|
|
47
|
+
└── subscriptions.mdx # If subscriptions exist
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 4: Update docs.json
|
|
51
|
+
|
|
52
|
+
Add appropriate tab configuration:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
// OpenAPI
|
|
56
|
+
{
|
|
57
|
+
"tab": "API Reference",
|
|
58
|
+
"type": "openapi",
|
|
59
|
+
"path": "/api-reference",
|
|
60
|
+
"spec": "api-reference/openapi.json",
|
|
61
|
+
"groups": [
|
|
62
|
+
{
|
|
63
|
+
"group": "Overview",
|
|
64
|
+
"pages": [
|
|
65
|
+
"api-reference/introduction",
|
|
66
|
+
"api-reference/authentication"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
// GraphQL
|
|
75
|
+
{
|
|
76
|
+
"tab": "GraphQL API",
|
|
77
|
+
"type": "graphql",
|
|
78
|
+
"path": "/graphql-api",
|
|
79
|
+
"schema": "api-reference/schema.graphql",
|
|
80
|
+
"endpoint": "https://api.example.com/graphql"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 5: Generate Supporting Pages
|
|
85
|
+
|
|
86
|
+
#### introduction.mdx
|
|
87
|
+
```mdx
|
|
88
|
+
---
|
|
89
|
+
title: "API Introduction"
|
|
90
|
+
description: "Overview of the {API Name}"
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
{Description from spec info}
|
|
94
|
+
|
|
95
|
+
## Base URL
|
|
96
|
+
|
|
97
|
+
Production: `{server URL}`
|
|
98
|
+
|
|
99
|
+
## Authentication
|
|
100
|
+
|
|
101
|
+
{Summary of auth methods}
|
|
102
|
+
|
|
103
|
+
See [Authentication](/api-reference/authentication) for details.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### authentication.mdx
|
|
107
|
+
```mdx
|
|
108
|
+
---
|
|
109
|
+
title: "Authentication"
|
|
110
|
+
description: "How to authenticate API requests"
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
{Content based on securitySchemes}
|
|
114
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-docs
|
|
3
|
+
description: Migrate documentation from other platforms (Mintlify, Docusaurus, GitBook, README) to DevDoc format
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
When migrating documentation from another platform:
|
|
9
|
+
|
|
10
|
+
### Step 1: Detect Source Format
|
|
11
|
+
|
|
12
|
+
Identify the documentation source by looking for:
|
|
13
|
+
|
|
14
|
+
| Platform | Detection Files |
|
|
15
|
+
|----------|-----------------|
|
|
16
|
+
| Mintlify | `mint.json`, `.mintlify/` |
|
|
17
|
+
| Docusaurus | `docusaurus.config.js`, `sidebars.js` |
|
|
18
|
+
| GitBook | `SUMMARY.md`, `.gitbook.yaml` |
|
|
19
|
+
| ReadMe | `readme-oas.json`, `.readme/` |
|
|
20
|
+
| VuePress | `.vuepress/config.js` |
|
|
21
|
+
| MkDocs | `mkdocs.yml` |
|
|
22
|
+
| Sphinx | `conf.py`, `index.rst` |
|
|
23
|
+
| README only | `README.md` (no other docs) |
|
|
24
|
+
|
|
25
|
+
### Step 2: Migration Mappings
|
|
26
|
+
|
|
27
|
+
#### Mintlify → DevDoc
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
mint.json → docs.json
|
|
31
|
+
├── name → name
|
|
32
|
+
├── logo → (extract to assets/logo/)
|
|
33
|
+
├── favicon → favicon
|
|
34
|
+
├── colors → theme.json
|
|
35
|
+
├── navigation → navigation.tabs + groups
|
|
36
|
+
├── topbarLinks → navbar
|
|
37
|
+
├── anchors → navigation.global.anchors
|
|
38
|
+
└── api → api
|
|
39
|
+
|
|
40
|
+
Component Mappings:
|
|
41
|
+
├── <Accordion> → <Accordion>
|
|
42
|
+
├── <AccordionGroup> → <AccordionGroup>
|
|
43
|
+
├── <Card> → <Card>
|
|
44
|
+
├── <CardGroup> → <CardGroup>
|
|
45
|
+
├── <CodeGroup> → <Tabs> with code
|
|
46
|
+
├── <Tabs> → <Tabs>
|
|
47
|
+
├── <Tab> → <Tab>
|
|
48
|
+
├── <Info> → <Info>
|
|
49
|
+
├── <Note> → <Note>
|
|
50
|
+
├── <Tip> → <Tip>
|
|
51
|
+
├── <Warning> → <Warning>
|
|
52
|
+
├── <Check> → <Tip> (with check icon)
|
|
53
|
+
├── <Steps> → <Steps>
|
|
54
|
+
├── <Step> → <Step>
|
|
55
|
+
├── <Frame> → (image wrapper, convert to <img>)
|
|
56
|
+
├── <ResponseField> → (convert to table)
|
|
57
|
+
└── <ParamField> → (convert to table)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Docusaurus → DevDoc
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
docusaurus.config.js → docs.json
|
|
64
|
+
├── title → name
|
|
65
|
+
├── favicon → favicon
|
|
66
|
+
├── themeConfig.navbar → navbar
|
|
67
|
+
├── themeConfig.footer → (extract links to anchors)
|
|
68
|
+
└── docs.sidebarPath → navigation
|
|
69
|
+
|
|
70
|
+
sidebars.js → navigation.tabs[].groups
|
|
71
|
+
|
|
72
|
+
Component Mappings:
|
|
73
|
+
├── :::note → <Note>
|
|
74
|
+
├── :::tip → <Tip>
|
|
75
|
+
├── :::info → <Info>
|
|
76
|
+
├── :::caution → <Warning>
|
|
77
|
+
├── :::danger → <Warning>
|
|
78
|
+
├── <Tabs> → <Tabs>
|
|
79
|
+
├── <TabItem> → <Tab>
|
|
80
|
+
└── import/export → (inline or convert to snippets)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### GitBook → DevDoc
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
SUMMARY.md → docs.json navigation
|
|
87
|
+
├── # Group → groups[].group
|
|
88
|
+
├── * [Page](path.md) → groups[].pages[]
|
|
89
|
+
└── Nested items → nested groups
|
|
90
|
+
|
|
91
|
+
Component Mappings:
|
|
92
|
+
├── {% hint style="info" %} → <Info>
|
|
93
|
+
├── {% hint style="warning" %} → <Warning>
|
|
94
|
+
├── {% hint style="danger" %} → <Warning>
|
|
95
|
+
├── {% hint style="success" %} → <Tip>
|
|
96
|
+
├── {% tabs %} → <Tabs>
|
|
97
|
+
├── {% tab title="X" %} → <Tab title="X">
|
|
98
|
+
├── {% code title="X" %} → ```language title="X"
|
|
99
|
+
└── {% embed url="X" %} → <iframe> or link
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 3: Execute Migration
|
|
103
|
+
|
|
104
|
+
1. Convert configuration files
|
|
105
|
+
2. Transform MDX/MD content with component mappings
|
|
106
|
+
3. Copy and organize assets
|
|
107
|
+
4. Generate docs.json navigation
|
|
108
|
+
5. Create theme.json from color settings
|
|
109
|
+
|
|
110
|
+
### Step 4: Post-Migration Validation
|
|
111
|
+
|
|
112
|
+
After migration:
|
|
113
|
+
1. Run `/check-docs` to verify all links work
|
|
114
|
+
2. Preview with `devdoc dev`
|
|
115
|
+
3. Check component rendering
|
|
116
|
+
4. Verify navigation structure
|