specweave 0.23.12 → 0.23.16
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/CLAUDE.md +55 -0
- package/dist/src/core/progress/error-logger.d.ts +58 -0
- package/dist/src/core/progress/error-logger.d.ts.map +1 -0
- package/dist/src/core/progress/error-logger.js +99 -0
- package/dist/src/core/progress/error-logger.js.map +1 -0
- package/dist/src/core/spec-detector.d.ts +5 -0
- package/dist/src/core/spec-detector.d.ts.map +1 -1
- package/dist/src/core/spec-detector.js +91 -33
- package/dist/src/core/spec-detector.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/docs-changed.sh +9 -1
- package/plugins/specweave/hooks/docs-changed.sh.backup +79 -0
- package/plugins/specweave/hooks/human-input-required.sh +9 -1
- package/plugins/specweave/hooks/human-input-required.sh.backup +75 -0
- package/plugins/specweave/hooks/post-first-increment.sh.backup +61 -0
- package/plugins/specweave/hooks/post-increment-change.sh +6 -1
- package/plugins/specweave/hooks/post-increment-change.sh.backup +98 -0
- package/plugins/specweave/hooks/post-increment-completion.sh +6 -1
- package/plugins/specweave/hooks/post-increment-completion.sh.backup +231 -0
- package/plugins/specweave/hooks/post-increment-planning.sh +6 -1
- package/plugins/specweave/hooks/post-increment-planning.sh.backup +1048 -0
- package/plugins/specweave/hooks/post-increment-status-change.sh +6 -1
- package/plugins/specweave/hooks/post-increment-status-change.sh.backup +147 -0
- package/plugins/specweave/hooks/post-metadata-change.sh +7 -1
- package/plugins/specweave/hooks/post-spec-update.sh.backup +158 -0
- package/plugins/specweave/hooks/post-user-story-complete.sh.backup +179 -0
- package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +83 -0
- package/plugins/specweave/hooks/pre-implementation.sh +9 -1
- package/plugins/specweave/hooks/pre-implementation.sh.backup +67 -0
- package/plugins/specweave/hooks/pre-task-completion.sh +9 -1
- package/plugins/specweave/hooks/pre-task-completion.sh.backup +194 -0
- package/plugins/specweave/hooks/pre-tool-use.sh +9 -1
- package/plugins/specweave/hooks/pre-tool-use.sh.backup +133 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh.backup +386 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh +9 -2
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +353 -0
- package/plugins/specweave-ado/hooks/post-task-completion.sh +9 -1
- package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +15 -1
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +16 -0
- package/plugins/specweave-github/hooks/post-task-completion.sh +62 -1
- package/plugins/specweave-github/hooks/post-task-completion.sh.backup +258 -0
- package/plugins/specweave-jira/hooks/post-task-completion.sh +9 -1
- package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +48 -0
- package/plugins/specweave-release/hooks/post-task-completion.sh.backup +110 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +0 -21
- package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +0 -626
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +0 -318
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +0 -208
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +0 -1149
- package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +0 -340
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +0 -1010
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +0 -20
- package/plugins/specweave-cost-optimizer/skills/cost-optimizer/SKILL.md +0 -190
- package/plugins/specweave-docs/.claude-plugin/plugin.json +0 -19
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +0 -613
- package/plugins/specweave-docs/skills/spec-driven-brainstorming/README.md +0 -264
- package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +0 -439
- package/plugins/specweave-docs/skills/spec-driven-debugging/README.md +0 -479
- package/plugins/specweave-docs/skills/spec-driven-debugging/SKILL.md +0 -652
- package/plugins/specweave-figma/.claude-plugin/.mcp.json +0 -12
- package/plugins/specweave-figma/.claude-plugin/plugin.json +0 -20
- package/plugins/specweave-figma/ARCHITECTURE.md +0 -453
- package/plugins/specweave-figma/README.md +0 -728
- package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +0 -632
- package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +0 -29
- package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +0 -27
- package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +0 -28
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +0 -21
- package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +0 -107
- package/plugins/specweave-frontend/skills/frontend/SKILL.md +0 -177
- package/plugins/specweave-frontend/skills/nextjs/SKILL.md +0 -176
- package/plugins/specweave-testing/.claude-plugin/plugin.json +0 -20
- package/plugins/specweave-testing/skills/e2e-playwright/README.md +0 -506
- package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +0 -457
- package/plugins/specweave-testing/skills/e2e-playwright/execute.js +0 -373
- package/plugins/specweave-testing/skills/e2e-playwright/lib/utils.js +0 -514
- package/plugins/specweave-testing/skills/e2e-playwright/package.json +0 -33
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +0 -19
- package/plugins/specweave-tooling/skills/skill-creator/LICENSE.txt +0 -202
- package/plugins/specweave-tooling/skills/skill-creator/SKILL.md +0 -209
- package/plugins/specweave-tooling/skills/skill-creator/scripts/init_skill.py +0 -303
- package/plugins/specweave-tooling/skills/skill-creator/scripts/package_skill.py +0 -110
- package/plugins/specweave-tooling/skills/skill-creator/scripts/quick_validate.py +0 -65
- package/plugins/specweave-tooling/skills/skill-router/SKILL.md +0 -479
- package/plugins/specweave-ui/.claude-plugin/plugin.json +0 -26
- package/plugins/specweave-ui/.mcp.json +0 -10
- package/plugins/specweave-ui/README.md +0 -492
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +0 -676
|
@@ -1,613 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docusaurus
|
|
3
|
-
description: Expert in generating beautiful Docusaurus documentation sites from SpecWeave structure. ALWAYS use this for internal docs preview, browsing docs locally, viewing documentation in browser. Converts .specweave/docs/internal/ and .specweave/docs/public/ into beautiful, searchable sites with navigation, search, and Mermaid diagrams. Activates for preview internal docs, view docs locally, see docs in browser, browse documentation, internal docs preview, docusaurus, create docs site, generate documentation, public docs, documentation site, host docs, deploy documentation, static site generator, client documentation, engineering playbook, dual docs sites.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docusaurus Documentation Generator
|
|
7
|
-
|
|
8
|
-
Expert skill for creating production-ready Docusaurus documentation sites from SpecWeave documentation.
|
|
9
|
-
|
|
10
|
-
## 🚨 CRITICAL: Default Behavior for Internal Docs Preview
|
|
11
|
-
|
|
12
|
-
**When users ask to preview/view/browse internal docs locally:**
|
|
13
|
-
|
|
14
|
-
1. **IMMEDIATELY** invoke `/specweave-docs-preview:preview` command
|
|
15
|
-
2. This launches a beautiful Docusaurus site with:
|
|
16
|
-
- Auto-generated navigation from folder structure
|
|
17
|
-
- Search functionality
|
|
18
|
-
- Mermaid diagram rendering
|
|
19
|
-
- Hot reload for live editing
|
|
20
|
-
- Professional theming
|
|
21
|
-
3. **DO NOT** use basic file serving or simple markdown rendering
|
|
22
|
-
4. **ALWAYS** prefer Docusaurus for the best user experience
|
|
23
|
-
|
|
24
|
-
## What This Skill Does
|
|
25
|
-
|
|
26
|
-
Converts your SpecWeave documentation (`.specweave/docs/internal/` or `.specweave/docs/public/`) into a beautiful, searchable, deployable documentation website using Docusaurus v3.
|
|
27
|
-
|
|
28
|
-
## Key Capabilities
|
|
29
|
-
|
|
30
|
-
### 1. Site Generation
|
|
31
|
-
- Create Docusaurus configuration from SpecWeave structure
|
|
32
|
-
- Auto-generate navigation from folder structure
|
|
33
|
-
- Convert Mermaid diagrams to Docusaurus format
|
|
34
|
-
- Set up search (Algolia or local)
|
|
35
|
-
- Configure themes and styling
|
|
36
|
-
|
|
37
|
-
### 2. Content Extraction
|
|
38
|
-
- Extract documentation from `.specweave/docs/public/`
|
|
39
|
-
- Preserve folder structure as navigation
|
|
40
|
-
- Handle Markdown frontmatter
|
|
41
|
-
- Convert SpecWeave-specific conventions
|
|
42
|
-
- Support versioning if needed
|
|
43
|
-
|
|
44
|
-
### 3. Deployment Configuration
|
|
45
|
-
- Vercel deployment setup
|
|
46
|
-
- Netlify deployment setup
|
|
47
|
-
- GitHub Pages configuration
|
|
48
|
-
- Custom domain setup
|
|
49
|
-
- CI/CD pipeline integration
|
|
50
|
-
|
|
51
|
-
### 4. Advanced Features
|
|
52
|
-
- Multi-version documentation
|
|
53
|
-
- API documentation integration
|
|
54
|
-
- Blog support (optional)
|
|
55
|
-
- Announcement bar
|
|
56
|
-
- Dark/light theme
|
|
57
|
-
- Mobile-responsive
|
|
58
|
-
- SEO optimization
|
|
59
|
-
|
|
60
|
-
## When to Use This Skill
|
|
61
|
-
|
|
62
|
-
Activate this skill when you need to:
|
|
63
|
-
- Create a public documentation website for a SpecWeave project
|
|
64
|
-
- Deploy client-facing documentation
|
|
65
|
-
- Generate hosted documentation from `.specweave/docs/public/`
|
|
66
|
-
- Set up searchable documentation
|
|
67
|
-
- Create versioned documentation
|
|
68
|
-
|
|
69
|
-
## Activation Keywords
|
|
70
|
-
|
|
71
|
-
- "create docusaurus site"
|
|
72
|
-
- "generate documentation website"
|
|
73
|
-
- "deploy public docs"
|
|
74
|
-
- "create documentation site"
|
|
75
|
-
- "docusaurus from specweave"
|
|
76
|
-
- "host documentation"
|
|
77
|
-
- "static docs site"
|
|
78
|
-
- "internal docs"
|
|
79
|
-
- "engineering playbook"
|
|
80
|
-
- "dual docs sites"
|
|
81
|
-
|
|
82
|
-
## Dual Documentation Sites (SpecWeave)
|
|
83
|
-
|
|
84
|
-
**SpecWeave supports TWO Docusaurus instances** for separating public and internal documentation:
|
|
85
|
-
|
|
86
|
-
### 1. Public Docs (`docs-site/`)
|
|
87
|
-
- **Purpose**: User-facing documentation
|
|
88
|
-
- **Source**: `.specweave/docs/public/`
|
|
89
|
-
- **Port**: 3013
|
|
90
|
-
- **Deployment**: ✅ spec-weave.com (public)
|
|
91
|
-
- **Search**: Algolia (recommended)
|
|
92
|
-
- **Content**: Guides, API docs, tutorials, FAQ
|
|
93
|
-
|
|
94
|
-
**Commands**:
|
|
95
|
-
```bash
|
|
96
|
-
# Start public docs
|
|
97
|
-
npm run docs:public
|
|
98
|
-
# OR
|
|
99
|
-
cd docs-site && npm start
|
|
100
|
-
|
|
101
|
-
# Access: http://localhost:3013
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### 2. Internal Docs (`docs-site-internal/`)
|
|
105
|
-
- **Purpose**: Engineering playbook (ADRs, HLD, strategy)
|
|
106
|
-
- **Source**: `.specweave/docs/internal/`
|
|
107
|
-
- **Port**: 3015
|
|
108
|
-
- **Deployment**: ❌ NEVER deploy (local only)
|
|
109
|
-
- **Search**: Local search plugin (no Algolia)
|
|
110
|
-
- **Content**: Architecture, strategy, specs, delivery, operations, governance
|
|
111
|
-
|
|
112
|
-
**Commands**:
|
|
113
|
-
```bash
|
|
114
|
-
# Start internal docs
|
|
115
|
-
npm run docs:internal
|
|
116
|
-
# OR
|
|
117
|
-
cd docs-site-internal && npm start
|
|
118
|
-
|
|
119
|
-
# Access: http://localhost:3015
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Running Both Simultaneously
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Terminal 1: Public docs
|
|
126
|
-
npm run docs:public
|
|
127
|
-
|
|
128
|
-
# Terminal 2: Internal docs
|
|
129
|
-
npm run docs:internal
|
|
130
|
-
|
|
131
|
-
# Access:
|
|
132
|
-
# - Public: http://localhost:3013
|
|
133
|
-
# - Internal: http://localhost:3015
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Key Differences**:
|
|
137
|
-
|
|
138
|
-
| Aspect | Public Docs | Internal Docs |
|
|
139
|
-
|--------|-------------|---------------|
|
|
140
|
-
| **Directory** | `docs-site/` | `docs-site-internal/` |
|
|
141
|
-
| **Source** | `.specweave/docs/public/` | `.specweave/docs/internal/` |
|
|
142
|
-
| **Port** | 3013 | 3015 |
|
|
143
|
-
| **Deployment** | ✅ Deployed | ❌ Local only |
|
|
144
|
-
| **Search** | Algolia | Local plugin |
|
|
145
|
-
| **Warning** | ❌ None | ✅ Red banner |
|
|
146
|
-
| **Content** | User guides | Engineering docs |
|
|
147
|
-
|
|
148
|
-
**Security**: Internal docs have NO deployment config (no `vercel.json`, `netlify.toml`, or GitHub Actions workflow). This prevents accidental public deployment.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Workflow
|
|
153
|
-
|
|
154
|
-
### Step 1: Analysis
|
|
155
|
-
```bash
|
|
156
|
-
# Analyze existing documentation structure
|
|
157
|
-
.specweave/docs/
|
|
158
|
-
└── public/
|
|
159
|
-
├── overview/
|
|
160
|
-
│ ├── introduction.md
|
|
161
|
-
│ ├── features.md
|
|
162
|
-
│ └── philosophy.md
|
|
163
|
-
├── guides/
|
|
164
|
-
│ └── getting-started/
|
|
165
|
-
│ ├── installation.md
|
|
166
|
-
│ └── quickstart.md
|
|
167
|
-
└── api/
|
|
168
|
-
└── README.md
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Step 2: Docusaurus Setup
|
|
172
|
-
```bash
|
|
173
|
-
# Create docusaurus site in ./docs-site/
|
|
174
|
-
npx create-docusaurus@latest docs-site classic --typescript
|
|
175
|
-
|
|
176
|
-
# Or use existing structure if present
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Step 3: Configuration
|
|
180
|
-
|
|
181
|
-
Generate `docusaurus.config.ts`:
|
|
182
|
-
```typescript
|
|
183
|
-
import {themes as prismThemes} from 'prism-react-renderer';
|
|
184
|
-
import type {Config} from '@docusaurus/types';
|
|
185
|
-
import type * as Preset from '@docusaurus/preset-classic';
|
|
186
|
-
|
|
187
|
-
const config: Config = {
|
|
188
|
-
title: 'Project Name Documentation',
|
|
189
|
-
tagline: 'Spec-Driven Development with SpecWeave',
|
|
190
|
-
favicon: 'img/favicon.ico',
|
|
191
|
-
|
|
192
|
-
url: 'https://your-domain.com',
|
|
193
|
-
baseUrl: '/',
|
|
194
|
-
|
|
195
|
-
organizationName: 'your-org',
|
|
196
|
-
projectName: 'your-project',
|
|
197
|
-
|
|
198
|
-
onBrokenLinks: 'throw',
|
|
199
|
-
onBrokenMarkdownLinks: 'warn',
|
|
200
|
-
|
|
201
|
-
i18n: {
|
|
202
|
-
defaultLocale: 'en',
|
|
203
|
-
locales: ['en'],
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
presets: [
|
|
207
|
-
[
|
|
208
|
-
'classic',
|
|
209
|
-
{
|
|
210
|
-
docs: {
|
|
211
|
-
sidebarPath: './sidebars.ts',
|
|
212
|
-
editUrl: 'https://github.com/your-org/your-project/tree/main/',
|
|
213
|
-
},
|
|
214
|
-
blog: false, // Optional
|
|
215
|
-
theme: {
|
|
216
|
-
customCss: './src/css/custom.css',
|
|
217
|
-
},
|
|
218
|
-
} satisfies Preset.Options,
|
|
219
|
-
],
|
|
220
|
-
],
|
|
221
|
-
|
|
222
|
-
themeConfig: {
|
|
223
|
-
navbar: {
|
|
224
|
-
title: 'Project Name',
|
|
225
|
-
logo: {
|
|
226
|
-
alt: 'Logo',
|
|
227
|
-
src: 'img/logo.svg',
|
|
228
|
-
},
|
|
229
|
-
items: [
|
|
230
|
-
{
|
|
231
|
-
type: 'docSidebar',
|
|
232
|
-
sidebarId: 'docs',
|
|
233
|
-
position: 'left',
|
|
234
|
-
label: 'Documentation',
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
href: 'https://github.com/your-org/your-project',
|
|
238
|
-
label: 'GitHub',
|
|
239
|
-
position: 'right',
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
footer: {
|
|
244
|
-
style: 'dark',
|
|
245
|
-
links: [
|
|
246
|
-
{
|
|
247
|
-
title: 'Docs',
|
|
248
|
-
items: [
|
|
249
|
-
{
|
|
250
|
-
label: 'Getting Started',
|
|
251
|
-
to: '/docs/guides/getting-started/installation',
|
|
252
|
-
},
|
|
253
|
-
],
|
|
254
|
-
},
|
|
255
|
-
],
|
|
256
|
-
copyright: `Copyright © ${new Date().getFullYear()} Your Company`,
|
|
257
|
-
},
|
|
258
|
-
prism: {
|
|
259
|
-
theme: prismThemes.github,
|
|
260
|
-
darkTheme: prismThemes.dracula,
|
|
261
|
-
},
|
|
262
|
-
} satisfies Preset.ThemeConfig,
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
export default config;
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Step 4: Sidebar Generation
|
|
269
|
-
|
|
270
|
-
Auto-generate `sidebars.ts` from `.specweave/docs/public/`:
|
|
271
|
-
```typescript
|
|
272
|
-
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
|
|
273
|
-
|
|
274
|
-
const sidebars: SidebarsConfig = {
|
|
275
|
-
docs: [
|
|
276
|
-
{
|
|
277
|
-
type: 'category',
|
|
278
|
-
label: 'Overview',
|
|
279
|
-
items: [
|
|
280
|
-
'overview/introduction',
|
|
281
|
-
'overview/features',
|
|
282
|
-
'overview/philosophy',
|
|
283
|
-
],
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
type: 'category',
|
|
287
|
-
label: 'Getting Started',
|
|
288
|
-
items: [
|
|
289
|
-
'guides/getting-started/installation',
|
|
290
|
-
'guides/getting-started/quickstart',
|
|
291
|
-
],
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
type: 'category',
|
|
295
|
-
label: 'API Reference',
|
|
296
|
-
items: [
|
|
297
|
-
'api/overview',
|
|
298
|
-
],
|
|
299
|
-
},
|
|
300
|
-
],
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
export default sidebars;
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### Step 5: Content Copying
|
|
307
|
-
|
|
308
|
-
Copy and adapt documentation:
|
|
309
|
-
```bash
|
|
310
|
-
# Copy public docs to Docusaurus
|
|
311
|
-
cp -r .specweave/docs/public/* docs-site/docs/
|
|
312
|
-
|
|
313
|
-
# Update internal links
|
|
314
|
-
# SpecWeave: /docs/overview/introduction
|
|
315
|
-
# Docusaurus: /docs/overview/introduction (works!)
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
### Step 6: Mermaid Support
|
|
319
|
-
|
|
320
|
-
Add Mermaid diagram support:
|
|
321
|
-
```bash
|
|
322
|
-
npm install @docusaurus/theme-mermaid
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
Update config:
|
|
326
|
-
```typescript
|
|
327
|
-
markdown: {
|
|
328
|
-
mermaid: true,
|
|
329
|
-
},
|
|
330
|
-
themes: ['@docusaurus/theme-mermaid'],
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### Step 7: Search Setup
|
|
334
|
-
|
|
335
|
-
**Option A: Local Search (Free)**
|
|
336
|
-
```bash
|
|
337
|
-
npm install @easyops-cn/docusaurus-search-local
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
**Option B: Algolia (Recommended for public docs)**
|
|
341
|
-
```typescript
|
|
342
|
-
algolia: {
|
|
343
|
-
appId: 'YOUR_APP_ID',
|
|
344
|
-
apiKey: 'YOUR_SEARCH_API_KEY',
|
|
345
|
-
indexName: 'YOUR_INDEX_NAME',
|
|
346
|
-
contextualSearch: true,
|
|
347
|
-
},
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
### Step 8: Deployment
|
|
351
|
-
|
|
352
|
-
**Vercel:**
|
|
353
|
-
```json
|
|
354
|
-
{
|
|
355
|
-
"buildCommand": "npm run build",
|
|
356
|
-
"outputDirectory": "build",
|
|
357
|
-
"installCommand": "npm install"
|
|
358
|
-
}
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
**Netlify:**
|
|
362
|
-
```toml
|
|
363
|
-
[build]
|
|
364
|
-
command = "npm run build"
|
|
365
|
-
publish = "build"
|
|
366
|
-
|
|
367
|
-
[[redirects]]
|
|
368
|
-
from = "/*"
|
|
369
|
-
to = "/index.html"
|
|
370
|
-
status = 200
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
**GitHub Pages:**
|
|
374
|
-
```yaml
|
|
375
|
-
# .github/workflows/deploy.yml
|
|
376
|
-
name: Deploy to GitHub Pages
|
|
377
|
-
|
|
378
|
-
on:
|
|
379
|
-
push:
|
|
380
|
-
branches: [main]
|
|
381
|
-
|
|
382
|
-
jobs:
|
|
383
|
-
deploy:
|
|
384
|
-
runs-on: ubuntu-latest
|
|
385
|
-
steps:
|
|
386
|
-
- uses: actions/checkout@v3
|
|
387
|
-
- uses: actions/setup-node@v3
|
|
388
|
-
with:
|
|
389
|
-
node-version: 18
|
|
390
|
-
- run: npm ci
|
|
391
|
-
- run: npm run build
|
|
392
|
-
- uses: peaceiris/actions-gh-pages@v3
|
|
393
|
-
with:
|
|
394
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
395
|
-
publish_dir: ./do
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
## Best Practices
|
|
399
|
-
|
|
400
|
-
### 1. Frontmatter Convention
|
|
401
|
-
|
|
402
|
-
Add frontmatter to each doc:
|
|
403
|
-
```yaml
|
|
404
|
-
---
|
|
405
|
-
sidebar_position: 1
|
|
406
|
-
title: Introduction
|
|
407
|
-
description: Get started with SpecWeave
|
|
408
|
-
---
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
### 2. Navigation Structure
|
|
412
|
-
|
|
413
|
-
```
|
|
414
|
-
docs/
|
|
415
|
-
├── overview/ # High-level concepts
|
|
416
|
-
├── guides/ # How-to guides
|
|
417
|
-
│ ├── getting-started/
|
|
418
|
-
│ ├── features/
|
|
419
|
-
│ └── advanced/
|
|
420
|
-
├── api/ # API reference
|
|
421
|
-
└── resources/ # Additional resources
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
### 3. Versioning (Optional)
|
|
425
|
-
|
|
426
|
-
For mature projects:
|
|
427
|
-
```bash
|
|
428
|
-
npm run docusaurus docs:version 1.0.0
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
Creates:
|
|
432
|
-
```
|
|
433
|
-
versions.json
|
|
434
|
-
versioned_docs/
|
|
435
|
-
└── version-1.0.0/
|
|
436
|
-
versioned_sidebars/
|
|
437
|
-
└── version-1.0.0-sidebars.json
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
### 4. Custom CSS
|
|
441
|
-
|
|
442
|
-
Customize theme in `src/css/custom.css`:
|
|
443
|
-
```css
|
|
444
|
-
:root {
|
|
445
|
-
--ifm-color-primary: #2e8555;
|
|
446
|
-
--ifm-code-font-size: 95%;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
[data-theme='dark'] {
|
|
450
|
-
--ifm-color-primary: #25c2a0;
|
|
451
|
-
}
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
### 5. SEO Optimization
|
|
455
|
-
|
|
456
|
-
```typescript
|
|
457
|
-
themeConfig: {
|
|
458
|
-
metadata: [
|
|
459
|
-
{name: 'keywords', content: 'specweave, documentation, ai, development'},
|
|
460
|
-
{name: 'twitter:card', content: 'summary_large_image'},
|
|
461
|
-
],
|
|
462
|
-
image: 'img/social-card.png',
|
|
463
|
-
}
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
## SpecWeave-Specific Handling
|
|
467
|
-
|
|
468
|
-
### 1. Increment References
|
|
469
|
-
|
|
470
|
-
Convert increment references:
|
|
471
|
-
```markdown
|
|
472
|
-
<!-- SpecWeave -->
|
|
473
|
-
See increment 0001-feature for details
|
|
474
|
-
|
|
475
|
-
<!-- Docusaurus -->
|
|
476
|
-
See [Increment 0001](https://github.com/org/repo/tree/main/.specweave/increments/0001-feature)
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
### 2. Internal Documentation Links
|
|
480
|
-
|
|
481
|
-
Hide internal docs references:
|
|
482
|
-
```markdown
|
|
483
|
-
<!-- Remove or convert these -->
|
|
484
|
-
See [Internal Architecture](../../internal/architecture/system-design.md)
|
|
485
|
-
|
|
486
|
-
<!-- To -->
|
|
487
|
-
<!-- Internal reference removed for public docs -->
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
### 3. Test Cases
|
|
491
|
-
|
|
492
|
-
Convert test case references to plain text:
|
|
493
|
-
```markdown
|
|
494
|
-
<!-- SpecWeave -->
|
|
495
|
-
Test Case: TC-0001
|
|
496
|
-
|
|
497
|
-
<!-- Docusaurus -->
|
|
498
|
-
**Test Coverage**: See GitHub test suite
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
## Example: Full Setup Script
|
|
502
|
-
|
|
503
|
-
```bash
|
|
504
|
-
#!/bin/bash
|
|
505
|
-
# setup-docusaurus.sh
|
|
506
|
-
|
|
507
|
-
echo "Setting up Docusaurus for SpecWeave documentation..."
|
|
508
|
-
|
|
509
|
-
# Create Docusaurus site
|
|
510
|
-
npx create-docusaurus@latest docs-site classic --typescript
|
|
511
|
-
cd docs-site
|
|
512
|
-
|
|
513
|
-
# Install dependencies
|
|
514
|
-
npm install @docusaurus/theme-mermaid
|
|
515
|
-
npm install @easyops-cn/docusaurus-search-local
|
|
516
|
-
|
|
517
|
-
# Copy public docs
|
|
518
|
-
cp -r ../.specweave/docs/public/* docs/
|
|
519
|
-
|
|
520
|
-
# Generate configuration
|
|
521
|
-
# (Use the skill to generate config files)
|
|
522
|
-
|
|
523
|
-
echo "Docusaurus setup complete!"
|
|
524
|
-
echo "Run 'npm start' in docs-site/ to preview"
|
|
525
|
-
echo "Run 'npm run build' to build for production"
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
## Validation Checklist
|
|
529
|
-
|
|
530
|
-
Before deployment, verify:
|
|
531
|
-
|
|
532
|
-
- [ ] All pages render correctly
|
|
533
|
-
- [ ] Navigation works (sidebar, breadcrumbs)
|
|
534
|
-
- [ ] Search functionality works
|
|
535
|
-
- [ ] Mermaid diagrams render
|
|
536
|
-
- [ ] Links are valid (no 404s)
|
|
537
|
-
- [ ] Mobile responsive
|
|
538
|
-
- [ ] Dark mode works
|
|
539
|
-
- [ ] SEO metadata present
|
|
540
|
-
- [ ] Custom domain configured (if applicable)
|
|
541
|
-
- [ ] CI/CD pipeline set up
|
|
542
|
-
- [ ] Analytics integrated (optional)
|
|
543
|
-
|
|
544
|
-
## Common Issues & Solutions
|
|
545
|
-
|
|
546
|
-
### Issue: Mermaid diagrams not rendering
|
|
547
|
-
**Solution**: Ensure `@docusaurus/theme-mermaid` installed and configured
|
|
548
|
-
|
|
549
|
-
### Issue: Search not working
|
|
550
|
-
**Solution**: Rebuild search index or check Algolia config
|
|
551
|
-
|
|
552
|
-
### Issue: Links broken after deployment
|
|
553
|
-
**Solution**: Check `baseUrl` in config matches deployment path
|
|
554
|
-
|
|
555
|
-
### Issue: Images not loading
|
|
556
|
-
**Solution**: Place images in `static/img/` and reference as `/img/name.png`
|
|
557
|
-
|
|
558
|
-
## Advanced: Multi-Project Documentation
|
|
559
|
-
|
|
560
|
-
For agencies managing multiple client projects:
|
|
561
|
-
|
|
562
|
-
```typescript
|
|
563
|
-
// Multi-repo support
|
|
564
|
-
const config: Config = {
|
|
565
|
-
plugins: [
|
|
566
|
-
[
|
|
567
|
-
'@docusaurus/plugin-content-docs',
|
|
568
|
-
{
|
|
569
|
-
id: 'client-a',
|
|
570
|
-
path: 'client-a-docs',
|
|
571
|
-
routeBasePath: 'client-a',
|
|
572
|
-
},
|
|
573
|
-
],
|
|
574
|
-
[
|
|
575
|
-
'@docusaurus/plugin-content-docs',
|
|
576
|
-
{
|
|
577
|
-
id: 'client-b',
|
|
578
|
-
path: 'client-b-docs',
|
|
579
|
-
routeBasePath: 'client-b',
|
|
580
|
-
},
|
|
581
|
-
],
|
|
582
|
-
],
|
|
583
|
-
};
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
## Output
|
|
587
|
-
|
|
588
|
-
After running this skill, you'll have:
|
|
589
|
-
|
|
590
|
-
1. ✅ `docs-site/` directory with Docusaurus
|
|
591
|
-
2. ✅ Configuration files (`docusaurus.config.ts`, `sidebars.ts`)
|
|
592
|
-
3. ✅ Converted documentation from `.specweave/docs/public/`
|
|
593
|
-
4. ✅ Deployment configuration (Vercel/Netlify/GitHub Pages)
|
|
594
|
-
5. ✅ Search functionality (local or Algolia)
|
|
595
|
-
6. ✅ Mermaid diagram support
|
|
596
|
-
7. ✅ Ready to deploy with `npm run build`
|
|
597
|
-
|
|
598
|
-
## Related Skills
|
|
599
|
-
|
|
600
|
-
- **docs-writer**: For creating documentation content
|
|
601
|
-
- **diagrams-architect**: For creating Mermaid diagrams
|
|
602
|
-
- **design-system-architect**: For custom theming
|
|
603
|
-
|
|
604
|
-
## References
|
|
605
|
-
|
|
606
|
-
- [Docusaurus Documentation](https://docusaurus.io/)
|
|
607
|
-
- [Docusaurus Deployment](https://docusaurus.io/docs/deployment)
|
|
608
|
-
- [Mermaid Plugin](https://docusaurus.io/docs/markdown-features/diagrams)
|
|
609
|
-
- [Algolia DocSearch](https://docsearch.algolia.com/)
|
|
610
|
-
|
|
611
|
-
---
|
|
612
|
-
|
|
613
|
-
**Pro Tip**: Run `npm start` during development for hot-reload preview. Your docs will be accessible at `http://localhost:3000`.
|