specweave 0.17.7 → 0.17.9
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 +365 -9
- package/dist/locales/de/.gitkeep +0 -0
- package/dist/locales/de/cli.json +108 -0
- package/dist/locales/en/cli.json +287 -0
- package/dist/locales/en/errors.json +7 -0
- package/dist/locales/en/templates.json +6 -0
- package/dist/locales/es/.gitkeep +0 -0
- package/dist/locales/es/cli.json +41 -0
- package/dist/locales/fr/.gitkeep +0 -0
- package/dist/locales/fr/cli.json +108 -0
- package/dist/locales/ja/.gitkeep +0 -0
- package/dist/locales/ja/cli.json +108 -0
- package/dist/locales/ko/.gitkeep +0 -0
- package/dist/locales/ko/cli.json +108 -0
- package/dist/locales/pt/.gitkeep +0 -0
- package/dist/locales/pt/cli.json +108 -0
- package/dist/locales/ru/.gitkeep +0 -0
- package/dist/locales/ru/cli.json +269 -0
- package/dist/locales/zh/.gitkeep +0 -0
- package/dist/locales/zh/cli.json +108 -0
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts +9 -4
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js +82 -12
- package/dist/plugins/specweave/lib/hooks/sync-living-docs.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts +2 -2
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +69 -10
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
- package/dist/src/cli/commands/detect-project.d.ts +9 -0
- package/dist/src/cli/commands/detect-project.d.ts.map +1 -0
- package/dist/src/cli/commands/detect-project.js +85 -0
- package/dist/src/cli/commands/detect-project.js.map +1 -0
- package/dist/src/cli/commands/detect-specs.d.ts +9 -0
- package/dist/src/cli/commands/detect-specs.d.ts.map +1 -0
- package/dist/src/cli/commands/detect-specs.js +73 -0
- package/dist/src/cli/commands/detect-specs.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +8 -15
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/core/living-docs/content-classifier.d.ts +83 -0
- package/dist/src/core/living-docs/content-classifier.d.ts.map +1 -0
- package/dist/src/core/living-docs/content-classifier.js +393 -0
- package/dist/src/core/living-docs/content-classifier.js.map +1 -0
- package/dist/src/core/living-docs/content-distributor.d.ts +126 -0
- package/dist/src/core/living-docs/content-distributor.d.ts.map +1 -0
- package/dist/src/core/living-docs/content-distributor.js +339 -0
- package/dist/src/core/living-docs/content-distributor.js.map +1 -0
- package/dist/src/core/living-docs/content-parser.d.ts +140 -0
- package/dist/src/core/living-docs/content-parser.d.ts.map +1 -0
- package/dist/src/core/living-docs/content-parser.js +316 -0
- package/dist/src/core/living-docs/content-parser.js.map +1 -0
- package/dist/src/core/living-docs/cross-linker.d.ts +126 -0
- package/dist/src/core/living-docs/cross-linker.d.ts.map +1 -0
- package/dist/src/core/living-docs/cross-linker.js +374 -0
- package/dist/src/core/living-docs/cross-linker.js.map +1 -0
- package/dist/src/core/living-docs/index.d.ts +89 -0
- package/dist/src/core/living-docs/index.d.ts.map +1 -0
- package/dist/src/core/living-docs/index.js +169 -0
- package/dist/src/core/living-docs/index.js.map +1 -0
- package/dist/src/core/living-docs/project-detector.d.ts +103 -0
- package/dist/src/core/living-docs/project-detector.d.ts.map +1 -0
- package/dist/src/core/living-docs/project-detector.js +314 -0
- package/dist/src/core/living-docs/project-detector.js.map +1 -0
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +51 -22
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +2 -0
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +126 -62
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/spec-content-sync.d.ts +6 -0
- package/dist/src/core/spec-content-sync.d.ts.map +1 -1
- package/dist/src/core/spec-content-sync.js +25 -7
- package/dist/src/core/spec-content-sync.js.map +1 -1
- package/dist/src/core/spec-detector.d.ts +54 -0
- package/dist/src/core/spec-detector.d.ts.map +1 -0
- package/dist/src/core/spec-detector.js +197 -0
- package/dist/src/core/spec-detector.js.map +1 -0
- package/dist/src/core/spec-identifier-detector.d.ts +49 -0
- package/dist/src/core/spec-identifier-detector.d.ts.map +1 -0
- package/dist/src/core/spec-identifier-detector.js +198 -0
- package/dist/src/core/spec-identifier-detector.js.map +1 -0
- package/dist/src/core/types/spec-identifier.d.ts +67 -0
- package/dist/src/core/types/spec-identifier.d.ts.map +1 -0
- package/dist/src/core/types/spec-identifier.js +23 -0
- package/dist/src/core/types/spec-identifier.js.map +1 -0
- package/dist/src/utils/docs-preview/config-generator.d.ts.map +1 -1
- package/dist/src/utils/docs-preview/config-generator.js +11 -0
- package/dist/src/utils/docs-preview/config-generator.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/lib/hooks/sync-living-docs.js +61 -5
- package/plugins/specweave/lib/hooks/sync-living-docs.ts +102 -13
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs-preview/commands/preview.md +11 -11
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/post-task-completion.sh +59 -30
- package/plugins/specweave-github/lib/github-spec-content-sync.js +55 -6
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +84 -12
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -4
- package/plugins/specweave-release/.claude-plugin/plugin.json +3 -15
- package/src/templates/AGENTS.md.template +297 -0
- package/plugins/specweave/plugin.json +0 -22
- package/plugins/specweave-ado/plugin.json +0 -20
- package/plugins/specweave-github/plugin.json +0 -19
- package/plugins/specweave-jira/plugin.json +0 -20
|
@@ -25,12 +25,54 @@ import fs from 'fs/promises';
|
|
|
25
25
|
|
|
26
26
|
export interface GitHubContentSyncOptions {
|
|
27
27
|
specPath: string;
|
|
28
|
-
owner
|
|
29
|
-
repo
|
|
28
|
+
owner?: string; // Optional: will be auto-detected from project config
|
|
29
|
+
repo?: string; // Optional: will be auto-detected from project config
|
|
30
30
|
dryRun?: boolean;
|
|
31
31
|
verbose?: boolean;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Get GitHub owner/repo from project config
|
|
36
|
+
*/
|
|
37
|
+
async function getGitHubRepoForProject(
|
|
38
|
+
project: string,
|
|
39
|
+
specPath: string
|
|
40
|
+
): Promise<{ owner: string; repo: string } | null> {
|
|
41
|
+
try {
|
|
42
|
+
// Find project root
|
|
43
|
+
let currentDir = path.dirname(specPath);
|
|
44
|
+
let configPath = path.join(currentDir, '.specweave', 'config.json');
|
|
45
|
+
|
|
46
|
+
// Search upward for .specweave/config.json
|
|
47
|
+
while (!await fs.access(configPath).then(() => true).catch(() => false)) {
|
|
48
|
+
const parentDir = path.dirname(currentDir);
|
|
49
|
+
if (parentDir === currentDir) {
|
|
50
|
+
return null; // Reached root
|
|
51
|
+
}
|
|
52
|
+
currentDir = parentDir;
|
|
53
|
+
configPath = path.join(currentDir, '.specweave', 'config.json');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Read config
|
|
57
|
+
const configContent = await fs.readFile(configPath, 'utf-8');
|
|
58
|
+
const config = JSON.parse(configContent);
|
|
59
|
+
|
|
60
|
+
// Get project config
|
|
61
|
+
const projectConfig = config.specs?.projects?.[project];
|
|
62
|
+
|
|
63
|
+
if (!projectConfig?.github) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
owner: projectConfig.github.owner,
|
|
69
|
+
repo: projectConfig.github.repo
|
|
70
|
+
};
|
|
71
|
+
} catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
34
76
|
/**
|
|
35
77
|
* Sync spec content to GitHub issue
|
|
36
78
|
* Creates issue if it doesn't exist, updates if it does
|
|
@@ -38,7 +80,7 @@ export interface GitHubContentSyncOptions {
|
|
|
38
80
|
export async function syncSpecContentToGitHub(
|
|
39
81
|
options: GitHubContentSyncOptions
|
|
40
82
|
): Promise<ContentSyncResult> {
|
|
41
|
-
|
|
83
|
+
let { specPath, owner, repo, dryRun = false, verbose = false } = options;
|
|
42
84
|
|
|
43
85
|
try {
|
|
44
86
|
// 1. Parse spec content
|
|
@@ -52,12 +94,33 @@ export async function syncSpecContentToGitHub(
|
|
|
52
94
|
}
|
|
53
95
|
|
|
54
96
|
if (verbose) {
|
|
55
|
-
console.log(`📄 Parsed spec: ${spec.
|
|
97
|
+
console.log(`📄 Parsed spec: ${spec.identifier.compact}`);
|
|
98
|
+
console.log(` Project: ${spec.project}`);
|
|
56
99
|
console.log(` Title: ${spec.title}`);
|
|
57
100
|
console.log(` User Stories: ${spec.userStories.length}`);
|
|
58
101
|
}
|
|
59
102
|
|
|
60
|
-
// 2.
|
|
103
|
+
// 2. Auto-detect owner/repo from project config if not provided
|
|
104
|
+
if (!owner || !repo) {
|
|
105
|
+
const repoConfig = await getGitHubRepoForProject(spec.project, specPath);
|
|
106
|
+
|
|
107
|
+
if (!repoConfig) {
|
|
108
|
+
return {
|
|
109
|
+
success: false,
|
|
110
|
+
action: 'error',
|
|
111
|
+
error: `No GitHub repository configured for project "${spec.project}". Add specs.projects.${spec.project}.github in config.json`,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
owner = repoConfig.owner;
|
|
116
|
+
repo = repoConfig.repo;
|
|
117
|
+
|
|
118
|
+
if (verbose) {
|
|
119
|
+
console.log(` Auto-detected repo: ${owner}/${repo}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 3. Check if issue already exists
|
|
61
124
|
const existingIssueNumber = await hasExternalLink(specPath, 'github');
|
|
62
125
|
|
|
63
126
|
const client = GitHubClientV2.fromRepo(owner, repo);
|
|
@@ -89,8 +152,9 @@ async function createGitHubIssue(
|
|
|
89
152
|
const { specPath, dryRun, verbose } = options;
|
|
90
153
|
|
|
91
154
|
try {
|
|
92
|
-
// Build issue title and body
|
|
93
|
-
|
|
155
|
+
// Build issue title and body using compact format
|
|
156
|
+
// Examples: [BE-JIRA-AUTH-123] User Authentication, [FE-user-login-ui] Login UI
|
|
157
|
+
const title = `[${spec.identifier.compact}] ${spec.title}`;
|
|
94
158
|
const body = buildExternalDescription(spec);
|
|
95
159
|
|
|
96
160
|
if (verbose) {
|
|
@@ -112,8 +176,13 @@ async function createGitHubIssue(
|
|
|
112
176
|
};
|
|
113
177
|
}
|
|
114
178
|
|
|
115
|
-
// Create issue
|
|
116
|
-
const labels = [
|
|
179
|
+
// Create issue with project-specific labels
|
|
180
|
+
const labels = [
|
|
181
|
+
'specweave',
|
|
182
|
+
'spec',
|
|
183
|
+
spec.project, // backend, frontend, mobile, etc.
|
|
184
|
+
spec.metadata.priority || 'P2'
|
|
185
|
+
].filter(Boolean);
|
|
117
186
|
const issue = await client.createEpicIssue(title, body, undefined, labels);
|
|
118
187
|
|
|
119
188
|
if (verbose) {
|
|
@@ -164,8 +233,11 @@ async function updateGitHubIssue(
|
|
|
164
233
|
}
|
|
165
234
|
|
|
166
235
|
// Detect changes
|
|
236
|
+
// Strip any ID prefix from title (flexible format: [BE-JIRA-123], [FE-login-ui], etc.)
|
|
237
|
+
const cleanTitle = issue.title.replace(/^\[[A-Z]{2,4}-[A-Z0-9-]+\]\s*/, '');
|
|
238
|
+
|
|
167
239
|
const changes = detectContentChanges(spec, {
|
|
168
|
-
title:
|
|
240
|
+
title: cleanTitle,
|
|
169
241
|
description: issue.body || '',
|
|
170
242
|
userStoryCount: countUserStoriesInBody(issue.body || ''),
|
|
171
243
|
});
|
|
@@ -190,8 +262,8 @@ async function updateGitHubIssue(
|
|
|
190
262
|
}
|
|
191
263
|
}
|
|
192
264
|
|
|
193
|
-
// Build updated content
|
|
194
|
-
const newTitle = `[${spec.
|
|
265
|
+
// Build updated content using compact format
|
|
266
|
+
const newTitle = `[${spec.identifier.compact}] ${spec.title}`;
|
|
195
267
|
const newBody = buildExternalDescription(spec);
|
|
196
268
|
|
|
197
269
|
if (dryRun) {
|
|
@@ -24,19 +24,7 @@
|
|
|
24
24
|
"independent-release",
|
|
25
25
|
"brownfield-release"
|
|
26
26
|
],
|
|
27
|
-
"repository":
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"directory": "plugins/specweave-release"
|
|
31
|
-
},
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18.0.0"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"specweave": ">=0.14.0"
|
|
37
|
-
},
|
|
38
|
-
"skills": "skills",
|
|
39
|
-
"agents": "agents",
|
|
40
|
-
"commands": "commands",
|
|
41
|
-
"hooks": "hooks/hooks.json"
|
|
27
|
+
"repository": "https://github.com/anton-abyzov/specweave",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"hooks": "./hooks/hooks.json"
|
|
42
30
|
}
|
|
@@ -985,6 +985,303 @@ cat plugins/specweave-github/commands/github-sync.md
|
|
|
985
985
|
|
|
986
986
|
---
|
|
987
987
|
|
|
988
|
+
## 📖 Documentation Preview with Docusaurus (Port 3016)
|
|
989
|
+
|
|
990
|
+
**IMPORTANT**: SpecWeave supports beautiful documentation preview using Docusaurus. This is NOT just for Claude Code - it works for ALL tools!
|
|
991
|
+
|
|
992
|
+
### Overview
|
|
993
|
+
|
|
994
|
+
The `/specweave-docs-preview:preview` command launches an interactive Docusaurus development server to preview your living documentation at **http://localhost:3016** (NOT port 3000!).
|
|
995
|
+
|
|
996
|
+
**Why Port 3016?**
|
|
997
|
+
- Port 3000 is commonly used by other development servers (React, Next.js, etc.)
|
|
998
|
+
- Port 3016 avoids conflicts with client projects
|
|
999
|
+
- This is the default for ALL SpecWeave documentation preview
|
|
1000
|
+
|
|
1001
|
+
### Quick Start
|
|
1002
|
+
|
|
1003
|
+
**For Claude Code** (slash command):
|
|
1004
|
+
```bash
|
|
1005
|
+
/specweave-docs-preview:preview
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
**For Other Tools** (manual execution):
|
|
1009
|
+
```bash
|
|
1010
|
+
# 1. Read the command file
|
|
1011
|
+
cat plugins/specweave-docs-preview/commands/preview.md
|
|
1012
|
+
|
|
1013
|
+
# 2. Execute the workflow manually (follow the instructions in preview.md)
|
|
1014
|
+
# The command will:
|
|
1015
|
+
# - Install Docusaurus (~30 seconds first time)
|
|
1016
|
+
# - Generate configuration
|
|
1017
|
+
# - Create sidebar from folder structure
|
|
1018
|
+
# - Start server on http://localhost:3016
|
|
1019
|
+
# - Open browser automatically
|
|
1020
|
+
|
|
1021
|
+
# 3. Access the documentation
|
|
1022
|
+
# Open browser to: http://localhost:3016
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
### Common MDX Compilation Errors (MUST READ!)
|
|
1026
|
+
|
|
1027
|
+
**Problem**: Docusaurus uses MDX (Markdown + JSX) which has stricter parsing rules than regular Markdown. Files with certain patterns may cause compilation errors like:
|
|
1028
|
+
|
|
1029
|
+
```
|
|
1030
|
+
Error: MDX compilation failed for file ".../adr-001-signalr-vs-websockets.md"
|
|
1031
|
+
Cause: Unexpected character `1` (U+0031) before name
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
**Solutions** (in order of preference):
|
|
1035
|
+
|
|
1036
|
+
#### Solution 1: Use Frontmatter for Problematic Files
|
|
1037
|
+
|
|
1038
|
+
Add YAML frontmatter to files with numeric prefixes or special characters:
|
|
1039
|
+
|
|
1040
|
+
```markdown
|
|
1041
|
+
---
|
|
1042
|
+
id: adr-001-signalr-vs-websockets
|
|
1043
|
+
title: ADR 001: SignalR vs WebSockets
|
|
1044
|
+
sidebar_label: SignalR vs WebSockets
|
|
1045
|
+
---
|
|
1046
|
+
|
|
1047
|
+
# ADR 001: SignalR vs WebSockets
|
|
1048
|
+
|
|
1049
|
+
[Rest of content...]
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
#### Solution 2: Exclude Problematic Files
|
|
1053
|
+
|
|
1054
|
+
If certain files can't be fixed, exclude them from the build:
|
|
1055
|
+
|
|
1056
|
+
**Edit `.specweave/config.json`:**
|
|
1057
|
+
```json
|
|
1058
|
+
{
|
|
1059
|
+
"documentation": {
|
|
1060
|
+
"preview": {
|
|
1061
|
+
"enabled": true,
|
|
1062
|
+
"port": 3016,
|
|
1063
|
+
"excludeFolders": ["legacy", "node_modules", "problematic-folder"]
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
#### Solution 3: Use MDX1 Compatibility Mode
|
|
1070
|
+
|
|
1071
|
+
The config generator already adds MDX1 compatibility mode to handle most common issues:
|
|
1072
|
+
|
|
1073
|
+
```javascript
|
|
1074
|
+
// This is already in the generated docusaurus.config.js
|
|
1075
|
+
markdown: {
|
|
1076
|
+
mermaid: true,
|
|
1077
|
+
format: 'mdx',
|
|
1078
|
+
mdx1Compat: {
|
|
1079
|
+
comments: true,
|
|
1080
|
+
admonitions: true,
|
|
1081
|
+
headingIds: true,
|
|
1082
|
+
},
|
|
1083
|
+
}
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1086
|
+
#### Solution 4: Fix Special Characters in Content
|
|
1087
|
+
|
|
1088
|
+
MDX interprets `<`, `>`, `{`, `}` as JSX. Escape them in your markdown:
|
|
1089
|
+
|
|
1090
|
+
**Bad** (causes MDX errors):
|
|
1091
|
+
```markdown
|
|
1092
|
+
Use <Component> to render the UI
|
|
1093
|
+
Configure {apiKey} in the settings
|
|
1094
|
+
```
|
|
1095
|
+
|
|
1096
|
+
**Good** (works):
|
|
1097
|
+
```markdown
|
|
1098
|
+
Use `<Component>` to render the UI
|
|
1099
|
+
Configure `{apiKey}` in the settings
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
Or use code blocks:
|
|
1103
|
+
```markdown
|
|
1104
|
+
```
|
|
1105
|
+
Use <Component> to render the UI
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
### Configuration Reference
|
|
1109
|
+
|
|
1110
|
+
**Default Configuration** (`.specweave/config.json`):
|
|
1111
|
+
```json
|
|
1112
|
+
{
|
|
1113
|
+
"documentation": {
|
|
1114
|
+
"preview": {
|
|
1115
|
+
"enabled": true,
|
|
1116
|
+
"autoInstall": true,
|
|
1117
|
+
"port": 3016,
|
|
1118
|
+
"openBrowser": true,
|
|
1119
|
+
"theme": "default",
|
|
1120
|
+
"excludeFolders": ["legacy", "node_modules"]
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
**Configuration Options**:
|
|
1127
|
+
- `enabled`: Enable/disable docs preview (default: true)
|
|
1128
|
+
- `autoInstall`: Auto-install Docusaurus on first run (default: true)
|
|
1129
|
+
- `port`: Port for dev server (default: 3016, NEVER use 3000!)
|
|
1130
|
+
- `openBrowser`: Auto-open browser (default: true)
|
|
1131
|
+
- `theme`: Theme variant ("default", "classic", "dark")
|
|
1132
|
+
- `excludeFolders`: Folders to exclude from build (array)
|
|
1133
|
+
|
|
1134
|
+
### Features
|
|
1135
|
+
|
|
1136
|
+
**What You Get**:
|
|
1137
|
+
- ✅ Auto-generated navigation from folder structure
|
|
1138
|
+
- ✅ Search functionality (instant local search)
|
|
1139
|
+
- ✅ Beautiful theming (light/dark mode)
|
|
1140
|
+
- ✅ Mermaid diagram rendering
|
|
1141
|
+
- ✅ Hot reload (edit markdown, see changes instantly)
|
|
1142
|
+
- ✅ Professional typography and layout
|
|
1143
|
+
- ✅ Mobile responsive design
|
|
1144
|
+
|
|
1145
|
+
**Hot Reload**:
|
|
1146
|
+
- Edit any file in `.specweave/docs/internal/`
|
|
1147
|
+
- Save the file
|
|
1148
|
+
- Browser refreshes automatically
|
|
1149
|
+
- No need to restart server!
|
|
1150
|
+
|
|
1151
|
+
### Troubleshooting
|
|
1152
|
+
|
|
1153
|
+
**Port Already in Use:**
|
|
1154
|
+
```bash
|
|
1155
|
+
# Error: Port 3016 is already in use
|
|
1156
|
+
# Solution 1: Change port in config
|
|
1157
|
+
vim .specweave/config.json
|
|
1158
|
+
# Change "port": 3016 to "port": 3017
|
|
1159
|
+
|
|
1160
|
+
# Solution 2: Stop the service
|
|
1161
|
+
lsof -i :3016 # Find PID
|
|
1162
|
+
kill -9 <PID> # Kill the process
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
**Build Fails with MDX Errors:**
|
|
1166
|
+
```bash
|
|
1167
|
+
# Check which files are causing errors
|
|
1168
|
+
# Look for files with:
|
|
1169
|
+
# - Numeric prefixes (adr-001-, spec-123-)
|
|
1170
|
+
# - Special characters in content (<, >, {, })
|
|
1171
|
+
# - JSX-like syntax
|
|
1172
|
+
|
|
1173
|
+
# Fix using Solution 1-4 above (add frontmatter, exclude files, etc.)
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
**Node.js Version:**
|
|
1177
|
+
```bash
|
|
1178
|
+
# Error: Node.js 18+ required
|
|
1179
|
+
# Solution: Update Node.js
|
|
1180
|
+
nvm install 20 # Using nvm
|
|
1181
|
+
# Or download from nodejs.org
|
|
1182
|
+
node --version # Verify
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
### Best Practices
|
|
1186
|
+
|
|
1187
|
+
**1. Always Use Port 3016** (NOT 3000):
|
|
1188
|
+
```json
|
|
1189
|
+
// ✅ CORRECT
|
|
1190
|
+
{"documentation": {"preview": {"port": 3016}}}
|
|
1191
|
+
|
|
1192
|
+
// ❌ WRONG
|
|
1193
|
+
{"documentation": {"preview": {"port": 3000}}}
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
**2. Add Frontmatter to ADRs/Specs:**
|
|
1197
|
+
```markdown
|
|
1198
|
+
---
|
|
1199
|
+
id: unique-identifier
|
|
1200
|
+
title: Human-Readable Title
|
|
1201
|
+
sidebar_label: Short Label
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
# Your content here
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
**3. Escape Special Characters:**
|
|
1208
|
+
```markdown
|
|
1209
|
+
Use backticks: `<Component>`, `{variable}`
|
|
1210
|
+
Or code blocks for multiline
|
|
1211
|
+
```
|
|
1212
|
+
|
|
1213
|
+
**4. Test Before Committing:**
|
|
1214
|
+
```bash
|
|
1215
|
+
# Start preview locally
|
|
1216
|
+
/specweave-docs-preview:preview
|
|
1217
|
+
|
|
1218
|
+
# Check for errors in console
|
|
1219
|
+
# Fix any MDX compilation errors
|
|
1220
|
+
# Then commit
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
### Integration with SpecWeave Workflow
|
|
1224
|
+
|
|
1225
|
+
**After Creating Increment:**
|
|
1226
|
+
```bash
|
|
1227
|
+
/specweave:increment "User Authentication"
|
|
1228
|
+
# → Creates spec.md, plan.md, tasks.md
|
|
1229
|
+
|
|
1230
|
+
/specweave-docs-preview:preview
|
|
1231
|
+
# → Preview shows new spec in sidebar
|
|
1232
|
+
```
|
|
1233
|
+
|
|
1234
|
+
**After Completing Increment:**
|
|
1235
|
+
```bash
|
|
1236
|
+
/specweave:done 0008
|
|
1237
|
+
# → Syncs spec.md to .specweave/docs/internal/specs/
|
|
1238
|
+
|
|
1239
|
+
# Hot reload automatically shows the new spec!
|
|
1240
|
+
# No need to restart preview server
|
|
1241
|
+
```
|
|
1242
|
+
|
|
1243
|
+
### For Non-Claude Tools: Manual Execution
|
|
1244
|
+
|
|
1245
|
+
**Step-by-Step Workflow:**
|
|
1246
|
+
|
|
1247
|
+
```bash
|
|
1248
|
+
# 1. Load the command
|
|
1249
|
+
cat plugins/specweave-docs-preview/commands/preview.md
|
|
1250
|
+
|
|
1251
|
+
# 2. Create or verify config
|
|
1252
|
+
vim .specweave/config.json
|
|
1253
|
+
# Ensure "documentation.preview.enabled" is true
|
|
1254
|
+
# Ensure "documentation.preview.port" is 3016
|
|
1255
|
+
|
|
1256
|
+
# 3. Run the preview (follow instructions from preview.md)
|
|
1257
|
+
# The command will guide you through:
|
|
1258
|
+
# - Installing Docusaurus (first time only)
|
|
1259
|
+
# - Generating config and sidebar
|
|
1260
|
+
# - Starting server on port 3016
|
|
1261
|
+
# - Opening browser
|
|
1262
|
+
|
|
1263
|
+
# 4. Access documentation
|
|
1264
|
+
# Open: http://localhost:3016
|
|
1265
|
+
|
|
1266
|
+
# 5. Edit docs and see changes live
|
|
1267
|
+
# Edit any file in .specweave/docs/internal/
|
|
1268
|
+
# Browser refreshes automatically!
|
|
1269
|
+
|
|
1270
|
+
# 6. Stop server when done
|
|
1271
|
+
# Press Ctrl+C in terminal
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
### Summary
|
|
1275
|
+
|
|
1276
|
+
- 🌐 **Default Port**: 3016 (NOT 3000!)
|
|
1277
|
+
- 📁 **Source**: `.specweave/docs/internal/`
|
|
1278
|
+
- 🔧 **Config**: `.specweave/config.json`
|
|
1279
|
+
- 🔄 **Hot Reload**: Automatic
|
|
1280
|
+
- ⚠️ **MDX Errors**: Add frontmatter or escape special chars
|
|
1281
|
+
- ✅ **Works for ALL tools** (Claude Code, Cursor, Copilot, etc.)
|
|
1282
|
+
|
|
1283
|
+
---
|
|
1284
|
+
|
|
988
1285
|
## Build & Test Commands
|
|
989
1286
|
|
|
990
1287
|
```bash
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "specweave",
|
|
3
|
-
"description": "SpecWeave framework. Provides increment planning (PM, Architect, Tech Lead agents), specification generation, TDD workflow, living docs sync, and brownfield support. Essential for all SpecWeave projects.",
|
|
4
|
-
"version": "0.8.0",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SpecWeave Team",
|
|
7
|
-
"url": "https://spec-weave.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://spec-weave.com",
|
|
10
|
-
"repository": "https://github.com/anton-abyzov/specweave",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"specweave",
|
|
14
|
-
"core",
|
|
15
|
-
"increment-planning",
|
|
16
|
-
"specifications",
|
|
17
|
-
"tdd",
|
|
18
|
-
"pm",
|
|
19
|
-
"architect",
|
|
20
|
-
"living-docs"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "specweave-ado",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Azure DevOps integration for SpecWeave - sync increments with ADO work items, track progress, and manage project workflows",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SpecWeave Team",
|
|
7
|
-
"url": "https://spec-weave.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://spec-weave.com",
|
|
10
|
-
"repository": "https://github.com/anton-abyzov/specweave",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"azure-devops",
|
|
13
|
-
"ado",
|
|
14
|
-
"project-management",
|
|
15
|
-
"work-items",
|
|
16
|
-
"sync",
|
|
17
|
-
"integration"
|
|
18
|
-
],
|
|
19
|
-
"license": "MIT"
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "specweave-github",
|
|
3
|
-
"description": "GitHub Issues integration for SpecWeave increments. Bidirectional sync between SpecWeave increments and GitHub Issues. Automatically creates issues from increments, tracks progress, and closes issues on completion. Uses GitHub CLI (gh) for seamless integration.",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SpecWeave Team",
|
|
7
|
-
"url": "https://spec-weave.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://spec-weave.com",
|
|
10
|
-
"repository": "https://github.com/anton-abyzov/specweave",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"github",
|
|
14
|
-
"issues",
|
|
15
|
-
"integration",
|
|
16
|
-
"sync",
|
|
17
|
-
"specweave"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "specweave-jira",
|
|
3
|
-
"description": "JIRA integration for SpecWeave increments. Bidirectional sync between SpecWeave increments and JIRA epics/stories. Automatically creates JIRA issues from increments, tracks progress, and updates status.",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "SpecWeave Team",
|
|
7
|
-
"url": "https://spec-weave.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://spec-weave.com",
|
|
10
|
-
"repository": "https://github.com/anton-abyzov/specweave",
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"jira",
|
|
14
|
-
"atlassian",
|
|
15
|
-
"integration",
|
|
16
|
-
"sync",
|
|
17
|
-
"specweave",
|
|
18
|
-
"project-management"
|
|
19
|
-
]
|
|
20
|
-
}
|