specweave 0.30.19 → 0.32.2
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 +176 -2
- package/README.md +22 -0
- package/bin/specweave.js +18 -1
- package/dist/src/cli/commands/cache.d.ts +17 -0
- package/dist/src/cli/commands/cache.d.ts.map +1 -0
- package/dist/src/cli/commands/cache.js +126 -0
- package/dist/src/cli/commands/cache.js.map +1 -0
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/plan/increment-detector.js +2 -2
- package/dist/src/cli/commands/plan/increment-detector.js.map +1 -1
- package/dist/src/cli/commands/sync-spec-commits.js +1 -1
- package/dist/src/cli/commands/sync-spec-commits.js.map +1 -1
- package/dist/src/cli/commands/sync-specs.js +2 -2
- package/dist/src/cli/commands/sync-specs.js.map +1 -1
- package/dist/src/cli/helpers/github/increment-profile-selector.js +1 -1
- package/dist/src/cli/helpers/github/increment-profile-selector.js.map +1 -1
- package/dist/src/cli/workers/living-docs-worker.js +66 -1
- package/dist/src/cli/workers/living-docs-worker.js.map +1 -1
- package/dist/src/config/types.d.ts +203 -1208
- package/dist/src/config/types.d.ts.map +1 -1
- package/dist/src/core/discrepancy/increment-generator.d.ts.map +1 -1
- package/dist/src/core/discrepancy/increment-generator.js +5 -2
- package/dist/src/core/discrepancy/increment-generator.js.map +1 -1
- package/dist/src/core/external-tools/external-items-counter.d.ts +62 -0
- package/dist/src/core/external-tools/external-items-counter.d.ts.map +1 -0
- package/dist/src/core/external-tools/external-items-counter.js +206 -0
- package/dist/src/core/external-tools/external-items-counter.js.map +1 -0
- package/dist/src/core/external-tools/external-items-display.d.ts +39 -0
- package/dist/src/core/external-tools/external-items-display.d.ts.map +1 -0
- package/dist/src/core/external-tools/external-items-display.js +185 -0
- package/dist/src/core/external-tools/external-items-display.js.map +1 -0
- package/dist/src/core/external-tools/index.d.ts +8 -0
- package/dist/src/core/external-tools/index.d.ts.map +1 -0
- package/dist/src/core/external-tools/index.js +8 -0
- package/dist/src/core/external-tools/index.js.map +1 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.d.ts +39 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.js +188 -0
- package/dist/src/core/external-tools/providers/ado-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.d.ts +38 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.js +136 -0
- package/dist/src/core/external-tools/providers/github-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/providers/index.d.ts +7 -0
- package/dist/src/core/external-tools/providers/index.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/index.js +7 -0
- package/dist/src/core/external-tools/providers/index.js.map +1 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.d.ts +42 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.d.ts.map +1 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.js +153 -0
- package/dist/src/core/external-tools/providers/jira-items-adapter.js.map +1 -0
- package/dist/src/core/external-tools/types.d.ts +78 -0
- package/dist/src/core/external-tools/types.d.ts.map +1 -0
- package/dist/src/core/external-tools/types.js +19 -0
- package/dist/src/core/external-tools/types.js.map +1 -0
- package/dist/src/core/increment/duplicate-detector.js +2 -2
- package/dist/src/core/increment/duplicate-detector.js.map +1 -1
- package/dist/src/core/increment/increment-archiver.d.ts +24 -0
- package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
- package/dist/src/core/increment/increment-archiver.js +59 -2
- package/dist/src/core/increment/increment-archiver.js.map +1 -1
- package/dist/src/core/increment/increment-status.js +2 -2
- package/dist/src/core/increment/increment-status.js.map +1 -1
- package/dist/src/core/increment/increment-utils.d.ts +98 -37
- package/dist/src/core/increment/increment-utils.d.ts.map +1 -1
- package/dist/src/core/increment/increment-utils.js +119 -68
- package/dist/src/core/increment/increment-utils.js.map +1 -1
- package/dist/src/core/increment/metadata-validator.js +1 -1
- package/dist/src/core/increment/metadata-validator.js.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.d.ts.map +1 -1
- package/dist/src/core/increment/status-change-sync-trigger.js +4 -0
- package/dist/src/core/increment/status-change-sync-trigger.js.map +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js +1 -1
- package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
- package/dist/src/core/living-docs/hierarchy-mapper.js +3 -3
- package/dist/src/core/living-docs/hierarchy-mapper.js.map +1 -1
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.d.ts +18 -0
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.js +247 -0
- package/dist/src/core/living-docs/intelligent-analyzer/architecture-generator.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/deep-repo-analyzer.d.ts +15 -0
- package/dist/src/core/living-docs/intelligent-analyzer/deep-repo-analyzer.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/deep-repo-analyzer.js +138 -0
- package/dist/src/core/living-docs/intelligent-analyzer/deep-repo-analyzer.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/file-sampler.d.ts +24 -0
- package/dist/src/core/living-docs/intelligent-analyzer/file-sampler.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/file-sampler.js +198 -0
- package/dist/src/core/living-docs/intelligent-analyzer/file-sampler.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.d.ts +17 -0
- package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.js +241 -0
- package/dist/src/core/living-docs/intelligent-analyzer/inconsistency-detector.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts +28 -0
- package/dist/src/core/living-docs/intelligent-analyzer/index.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/index.js +197 -0
- package/dist/src/core/living-docs/intelligent-analyzer/index.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.d.ts +18 -0
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.js +154 -0
- package/dist/src/core/living-docs/intelligent-analyzer/organization-synthesizer.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/strategy-generator.d.ts +42 -0
- package/dist/src/core/living-docs/intelligent-analyzer/strategy-generator.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/strategy-generator.js +343 -0
- package/dist/src/core/living-docs/intelligent-analyzer/strategy-generator.js.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts +146 -0
- package/dist/src/core/living-docs/intelligent-analyzer/types.d.ts.map +1 -0
- package/dist/src/core/living-docs/intelligent-analyzer/types.js +7 -0
- package/dist/src/core/living-docs/intelligent-analyzer/types.js.map +1 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts +5 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +36 -2
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/llm/providers/azure-openai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/azure-openai-provider.js +1 -0
- package/dist/src/core/llm/providers/azure-openai-provider.js.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.js +2 -0
- package/dist/src/core/llm/providers/bedrock-provider.js.map +1 -1
- package/dist/src/core/llm/providers/openai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/openai-provider.js +1 -0
- package/dist/src/core/llm/providers/openai-provider.js.map +1 -1
- package/dist/src/core/llm/providers/vertex-ai-provider.d.ts.map +1 -1
- package/dist/src/core/llm/providers/vertex-ai-provider.js +1 -0
- package/dist/src/core/llm/providers/vertex-ai-provider.js.map +1 -1
- package/dist/src/core/sync/spec-increment-mapper.js +3 -3
- package/dist/src/core/sync/spec-increment-mapper.js.map +1 -1
- package/dist/src/importers/item-converter.d.ts +25 -0
- package/dist/src/importers/item-converter.d.ts.map +1 -1
- package/dist/src/importers/item-converter.js +135 -5
- package/dist/src/importers/item-converter.js.map +1 -1
- package/dist/src/init/architecture/types.d.ts +33 -140
- package/dist/src/init/architecture/types.d.ts.map +1 -1
- package/dist/src/init/compliance/types.d.ts +30 -27
- package/dist/src/init/compliance/types.d.ts.map +1 -1
- package/dist/src/init/repo/types.d.ts +11 -34
- package/dist/src/init/repo/types.d.ts.map +1 -1
- package/dist/src/init/research/src/config/types.d.ts +15 -82
- package/dist/src/init/research/src/config/types.d.ts.map +1 -1
- package/dist/src/init/research/types.d.ts +38 -93
- package/dist/src/init/research/types.d.ts.map +1 -1
- package/dist/src/init/team/types.d.ts +4 -42
- package/dist/src/init/team/types.d.ts.map +1 -1
- package/dist/src/types/dashboard-cache.d.ts +181 -0
- package/dist/src/types/dashboard-cache.d.ts.map +1 -0
- package/dist/src/types/dashboard-cache.js +65 -0
- package/dist/src/types/dashboard-cache.js.map +1 -0
- package/dist/src/utils/docs-validator.d.ts +131 -0
- package/dist/src/utils/docs-validator.d.ts.map +1 -0
- package/dist/src/utils/docs-validator.js +529 -0
- package/dist/src/utils/docs-validator.js.map +1 -0
- package/dist/src/utils/feature-id-collision.js +1 -1
- package/dist/src/utils/feature-id-collision.js.map +1 -1
- package/dist/src/utils/html-to-mdx.d.ts +1 -0
- package/dist/src/utils/html-to-mdx.d.ts.map +1 -1
- package/dist/src/utils/html-to-mdx.js +43 -5
- package/dist/src/utils/html-to-mdx.js.map +1 -1
- package/package.json +1 -5
- package/plugins/specweave/agents/pm/AGENT.md +10 -7
- package/plugins/specweave/commands/specweave-archive-features.md +5 -7
- package/plugins/specweave/commands/specweave-archive.md +2 -1
- package/plugins/specweave/commands/specweave-do.md +35 -1
- package/plugins/specweave/commands/specweave-done.md +96 -0
- package/plugins/specweave/commands/specweave-external.md +150 -0
- package/plugins/specweave/commands/specweave-import-external.md +45 -18
- package/plugins/specweave/commands/specweave-increment.md +331 -33
- package/plugins/specweave/commands/specweave-jobs.md +2 -2
- package/plugins/specweave/commands/specweave-progress.md +4 -4
- package/plugins/specweave/commands/specweave-restore-feature.md +5 -4
- package/plugins/specweave/commands/specweave-sync-docs.md +1 -1
- package/plugins/specweave/commands/specweave-sync-specs.md +216 -322
- package/plugins/specweave/commands/specweave-validate-features.md +13 -8
- package/plugins/specweave/hooks/docs-changed.sh.backup +79 -0
- package/plugins/specweave/hooks/hooks.json +33 -4
- package/plugins/specweave/hooks/human-input-required.sh.backup +75 -0
- package/plugins/specweave/hooks/lib/common-setup.sh +375 -0
- package/plugins/specweave/hooks/lib/crash-prevention.sh +336 -0
- package/plugins/specweave/hooks/post-first-increment.sh.backup +61 -0
- package/plugins/specweave/hooks/post-increment-change.sh.backup +98 -0
- package/plugins/specweave/hooks/post-increment-completion.sh.backup +231 -0
- package/plugins/specweave/hooks/post-increment-planning.sh.backup +1048 -0
- package/plugins/specweave/hooks/post-increment-status-change.sh.backup +147 -0
- package/plugins/specweave/hooks/post-spec-update.sh.backup +158 -0
- package/plugins/specweave/hooks/post-task-completion.sh +4 -23
- package/plugins/specweave/hooks/post-user-story-complete.sh.backup +179 -0
- package/plugins/specweave/hooks/pre-command-deduplication.sh +1 -6
- package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +83 -0
- package/plugins/specweave/hooks/pre-implementation.sh.backup +67 -0
- package/plugins/specweave/hooks/pre-task-completion.sh +8 -37
- package/plugins/specweave/hooks/pre-task-completion.sh.backup +194 -0
- package/plugins/specweave/hooks/pre-tool-use.sh +2 -11
- package/plugins/specweave/hooks/pre-tool-use.sh.backup +133 -0
- package/plugins/specweave/hooks/universal/dispatcher.mjs +135 -42
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +183 -0
- package/plugins/specweave/hooks/universal/hook-wrapper.cmd +26 -26
- package/plugins/specweave/hooks/universal/session-start.cmd +16 -16
- package/plugins/specweave/hooks/universal/session-start.ps1 +16 -16
- package/plugins/specweave/hooks/user-prompt-submit.sh +140 -38
- package/plugins/specweave/hooks/user-prompt-submit.sh.backup +386 -0
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +12 -0
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +89 -0
- package/plugins/specweave/hooks/v2/guards/bash-file-guard.sh +211 -0
- package/plugins/specweave/hooks/v2/guards/bash-file-guard.test.sh +163 -0
- package/plugins/specweave/hooks/v2/guards/completion-guard.sh +26 -28
- package/plugins/specweave/hooks/v2/guards/features-folder-guard.sh +50 -0
- package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +2 -2
- package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -1
- package/plugins/specweave/scripts/README.md +166 -0
- package/plugins/specweave/scripts/cleanup-state.sh +142 -0
- package/plugins/specweave/scripts/force-kill.sh +142 -0
- package/plugins/specweave/scripts/jobs.js +171 -0
- package/plugins/specweave/scripts/progress.js +170 -0
- package/plugins/specweave/scripts/read-costs.sh +132 -0
- package/plugins/specweave/scripts/read-jobs.sh +324 -0
- package/plugins/specweave/scripts/read-progress.sh +185 -0
- package/plugins/specweave/scripts/read-status.sh +146 -0
- package/plugins/specweave/scripts/read-workflow.sh +173 -0
- package/plugins/specweave/scripts/rebuild-dashboard-cache.sh +327 -0
- package/plugins/specweave/scripts/session-watchdog.sh +192 -0
- package/plugins/specweave/scripts/status.js +154 -0
- package/plugins/specweave/scripts/update-dashboard-cache.sh +281 -0
- package/plugins/specweave/skills/increment-planner/SKILL.md +333 -24
- package/plugins/specweave/skills/increment-planner/templates/spec-multi-project.md +17 -9
- package/plugins/specweave/skills/increment-planner/templates/spec-single-project.md +6 -2
- package/plugins/specweave/skills/instant-status/SKILL.md +70 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +353 -0
- package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-docs/commands/build.md +32 -4
- package/plugins/specweave-docs/commands/preview.md +43 -1
- package/plugins/specweave-docs/commands/validate.md +250 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +1262 -626
- package/plugins/specweave-github/hooks/post-task-completion.sh.backup +258 -0
- package/plugins/specweave-github/lib/enhanced-github-sync.js +220 -0
- package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +134 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +1254 -939
- package/plugins/specweave-release/hooks/post-task-completion.sh.backup +110 -0
- package/plugins/specweave/hooks/post-edit-spec.sh +0 -265
- package/plugins/specweave/hooks/post-write-spec.sh +0 -267
- package/plugins/specweave/hooks/pre-edit-spec.sh +0 -151
- package/plugins/specweave/hooks/pre-write-spec.sh +0 -151
|
@@ -1,446 +1,340 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specweave:sync-specs
|
|
3
|
-
description: Sync increment specifications to living docs structure.
|
|
3
|
+
description: Sync ALL increment specifications to living docs structure by default. Creates FS-XXX folders for each increment. Use with increment ID to sync single increment.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Sync Increment Specifications to Living Docs
|
|
7
7
|
|
|
8
|
-
Syncs
|
|
8
|
+
**DEFAULT BEHAVIOR**: Syncs ALL increments to living docs (not just one!)
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## STEP 1: Parse Arguments
|
|
12
|
+
## STEP 1: Parse Arguments & Determine Mode
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
Arguments provided:
|
|
15
|
+
Arguments provided: $ARGUMENTS
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
**Parse the input**:
|
|
19
|
-
- Check for increment ID: `0001`, `0002`, etc.
|
|
20
|
-
- If no increment ID: find the most recent increment
|
|
21
|
-
- Check for options: `--force`, `--dry-run`
|
|
18
|
+
**Parse the input to determine sync mode**:
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# Verify increment exists
|
|
31
|
-
INCREMENT_PATH=".specweave/increments/$INCREMENT_ID"
|
|
32
|
-
if [[ ! -d "$INCREMENT_PATH" ]]; then
|
|
33
|
-
echo "❌ Error: Increment $INCREMENT_ID not found"
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
```
|
|
20
|
+
| Input | Mode | Action |
|
|
21
|
+
|-------|------|--------|
|
|
22
|
+
| `/specweave:sync-specs` | **ALL** (default) | Sync ALL increments |
|
|
23
|
+
| `/specweave:sync-specs --all` | **ALL** (explicit) | Sync ALL increments |
|
|
24
|
+
| `/specweave:sync-specs 0106` | **SINGLE** | Sync only increment 0106 |
|
|
25
|
+
| `/specweave:sync-specs 0106 --dry-run` | **SINGLE + DRY** | Preview sync for 0106 |
|
|
26
|
+
| `/specweave:sync-specs --dry-run` | **ALL + DRY** | Preview sync for ALL |
|
|
37
27
|
|
|
38
|
-
**
|
|
39
|
-
```
|
|
40
|
-
🎯 Target increment: {increment_id}
|
|
41
|
-
📁 Increment path: .specweave/increments/{increment_id}
|
|
42
|
-
🔄 Mode: Specs-only sync (Universal Hierarchy)
|
|
43
|
-
|
|
44
|
-
Processing...
|
|
45
|
-
```
|
|
28
|
+
**CRITICAL**: No increment ID = sync ALL increments (this is the DEFAULT!)
|
|
46
29
|
|
|
47
30
|
---
|
|
48
31
|
|
|
49
|
-
## STEP 2:
|
|
50
|
-
|
|
51
|
-
### 2.1 Verify Spec File Exists
|
|
32
|
+
## STEP 2: Execute Sync Based on Mode
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
SPEC_FILE="$INCREMENT_PATH/spec.md"
|
|
55
|
-
if [[ ! -f "$SPEC_FILE" ]]; then
|
|
56
|
-
echo "❌ Error: No spec.md found in increment $INCREMENT_ID"
|
|
57
|
-
echo " Cannot sync specs without a spec file"
|
|
58
|
-
exit 1
|
|
59
|
-
fi
|
|
60
|
-
```
|
|
34
|
+
### MODE A: Sync ALL Increments (Default)
|
|
61
35
|
|
|
62
|
-
|
|
36
|
+
**This is the DEFAULT when no increment ID is provided!**
|
|
63
37
|
|
|
64
38
|
```bash
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if [[ -f "$TASKS_FILE" ]]; then
|
|
68
|
-
HAS_TASKS=true
|
|
69
|
-
echo "✅ Found tasks.md - will create bidirectional links"
|
|
70
|
-
else
|
|
71
|
-
echo "⚠️ No tasks.md - spec will sync without task links"
|
|
72
|
-
fi
|
|
39
|
+
# List ALL syncable increments (with spec.md)
|
|
40
|
+
ls -1 .specweave/increments/ | grep -E '^[0-9]{4}E?-' | sort
|
|
73
41
|
```
|
|
74
42
|
|
|
75
|
-
|
|
43
|
+
**Execute sync for EACH increment**:
|
|
76
44
|
|
|
77
|
-
```bash
|
|
78
|
-
METADATA_FILE="$INCREMENT_PATH/metadata.json"
|
|
79
|
-
if [[ -f "$METADATA_FILE" ]]; then
|
|
80
|
-
echo "✅ Found metadata.json - will include external links"
|
|
81
|
-
else
|
|
82
|
-
echo "⚠️ No metadata.json - no external tool links available"
|
|
83
|
-
fi
|
|
84
45
|
```
|
|
46
|
+
🔄 Syncing ALL increments to living docs...
|
|
85
47
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
## STEP 3: Execute Spec Sync
|
|
89
|
-
|
|
90
|
-
### 3.1 Run Sync Command
|
|
48
|
+
Found {N} increments with spec.md files.
|
|
49
|
+
```
|
|
91
50
|
|
|
92
|
-
**
|
|
51
|
+
**For each increment**, call the sync logic:
|
|
93
52
|
|
|
94
53
|
```typescript
|
|
95
|
-
import {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
54
|
+
import { LivingDocsSync } from './src/core/living-docs/living-docs-sync.js';
|
|
55
|
+
|
|
56
|
+
const sync = new LivingDocsSync(projectRoot);
|
|
57
|
+
|
|
58
|
+
// Get all increment folders
|
|
59
|
+
const incrementsDir = '.specweave/increments';
|
|
60
|
+
const entries = fs.readdirSync(incrementsDir);
|
|
61
|
+
const increments = entries.filter(e => /^\d{4}E?-/.test(e));
|
|
62
|
+
|
|
63
|
+
let successCount = 0;
|
|
64
|
+
let failCount = 0;
|
|
65
|
+
const results = [];
|
|
66
|
+
|
|
67
|
+
for (const incrementId of increments.sort()) {
|
|
68
|
+
// Check if spec.md exists
|
|
69
|
+
const specPath = path.join(incrementsDir, incrementId, 'spec.md');
|
|
70
|
+
if (!fs.existsSync(specPath)) {
|
|
71
|
+
console.log(` ⚠️ Skipping ${incrementId} (no spec.md)`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
const result = await sync.syncIncrement(incrementId, { dryRun, force });
|
|
77
|
+
if (result.success) {
|
|
78
|
+
successCount++;
|
|
79
|
+
results.push({ id: incrementId, featureId: result.featureId, status: '✅' });
|
|
80
|
+
} else {
|
|
81
|
+
failCount++;
|
|
82
|
+
results.push({ id: incrementId, featureId: '', status: '❌', error: result.errors[0] });
|
|
83
|
+
}
|
|
84
|
+
} catch (error) {
|
|
85
|
+
failCount++;
|
|
86
|
+
results.push({ id: incrementId, featureId: '', status: '❌', error: error.message });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
102
89
|
```
|
|
103
90
|
|
|
104
|
-
**
|
|
105
|
-
1. **Derive feature ID from increment number** (e.g., 0040 → FS-040, 0002 → FS-002)
|
|
106
|
-
2. **Read project/board from spec.md YAML frontmatter** (v0.31.0+ REQUIRED):
|
|
107
|
-
- For 1-level: `project:` field REQUIRED
|
|
108
|
-
- For 2-level: `project:` AND `board:` fields REQUIRED
|
|
109
|
-
- See [ADR-0190](/internal/architecture/adr/0190-spec-project-board-requirement.md)
|
|
110
|
-
3. **Smart project matching fallback** (only if YAML fields missing - deprecated):
|
|
111
|
-
- `**Project**:` field in spec.md body (legacy)
|
|
112
|
-
- `multiProject.activeProject` in config.json
|
|
113
|
-
- ADO area path / JIRA board mapping
|
|
114
|
-
- Git remote (repo name)
|
|
115
|
-
- **ASK USER if unsure** (multi-project mode)
|
|
116
|
-
4. Parse spec.md for user stories and acceptance criteria
|
|
117
|
-
5. Create living docs structure:
|
|
118
|
-
- 1-level: `.specweave/docs/internal/specs/{project}/FS-XXX/`
|
|
119
|
-
- 2-level: `.specweave/docs/internal/specs/{project}/{board}/FS-XXX/`
|
|
120
|
-
|
|
121
|
-
**CRITICAL**: Feature ID is DERIVED from increment number (ADR-0187)
|
|
122
|
-
- Increment 0002-user-authentication → FS-002
|
|
123
|
-
- Increment 0040-some-feature → FS-040
|
|
124
|
-
- NO date-based patterns like FS-YY-MM-DD-name
|
|
125
|
-
|
|
126
|
-
### 3.2 Project/Board Validation (v0.31.0+)
|
|
127
|
-
|
|
128
|
-
**Structure Level Detection** (from `src/utils/structure-level-detector.ts`):
|
|
129
|
-
- Detects 1-level vs 2-level from config (ADO, JIRA, umbrella, multiProject, folders)
|
|
130
|
-
- Validates spec.md has required fields based on structure level
|
|
131
|
-
- For 2-level: **ERROR if project OR board missing** (cannot sync)
|
|
132
|
-
- For 1-level: **WARNING if project missing** (uses fallback, deprecated)
|
|
133
|
-
|
|
134
|
-
**Expected spec.md frontmatter**:
|
|
135
|
-
|
|
136
|
-
```yaml
|
|
137
|
-
# 1-level structure
|
|
138
|
-
---
|
|
139
|
-
increment: 0001-feature-name
|
|
140
|
-
project: my-project # REQUIRED for 1-level
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
# 2-level structure
|
|
144
|
-
---
|
|
145
|
-
increment: 0001-feature-name
|
|
146
|
-
project: acme-corp # REQUIRED for 2-level
|
|
147
|
-
board: clinical-insights # REQUIRED for 2-level
|
|
148
|
-
---
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Migration**: See [Migration Guide](/public/guides/migration-v031-project-fields.md)
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## STEP 4: Report Distribution Results
|
|
156
|
-
|
|
157
|
-
### 4.1 Show What Was Created
|
|
91
|
+
**Output summary table**:
|
|
158
92
|
|
|
159
93
|
```
|
|
160
94
|
═══════════════════════════════════════════════════════
|
|
161
|
-
✅
|
|
95
|
+
✅ BULK SYNC COMPLETE
|
|
162
96
|
═══════════════════════════════════════════════════════
|
|
163
97
|
|
|
164
|
-
Increment
|
|
165
|
-
|
|
98
|
+
| Increment | Feature ID | Status |
|
|
99
|
+
|-----------|------------|--------|
|
|
100
|
+
| 0093-ado-permission-profile-fixes | FS-093 | ✅ |
|
|
101
|
+
| 0094-unit-test-alignment | FS-094 | ✅ |
|
|
102
|
+
| 0095-per-project-epic-hierarchy | FS-095 | ✅ |
|
|
103
|
+
| ... | ... | ... |
|
|
166
104
|
|
|
167
105
|
───────────────────────────────────────────────────────
|
|
168
|
-
📊
|
|
106
|
+
📊 SUMMARY
|
|
169
107
|
───────────────────────────────────────────────────────
|
|
170
108
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
📁 Feature (Required):
|
|
177
|
-
Path: .specweave/docs/internal/specs/_features/{FS-ID}/FEATURE.md
|
|
178
|
-
Status: Created/Updated
|
|
179
|
-
Projects: {list of projects}
|
|
180
|
-
|
|
181
|
-
📁 Project Contexts:
|
|
182
|
-
{for each project}
|
|
183
|
-
• {project}: .specweave/docs/internal/specs/{project}/{FS-ID}/README.md
|
|
184
|
-
|
|
185
|
-
📝 User Stories:
|
|
186
|
-
{for each project}
|
|
187
|
-
{project}:
|
|
188
|
-
{for each story}
|
|
189
|
-
• {story-id}: {story-title}
|
|
190
|
-
Path: .specweave/docs/internal/specs/{project}/{FS-ID}/{us-id}.md
|
|
109
|
+
Total increments: {N}
|
|
110
|
+
✅ Succeeded: {successCount}
|
|
111
|
+
❌ Failed: {failCount}
|
|
112
|
+
⏭️ Skipped: {skippedCount} (no spec.md)
|
|
191
113
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
───────────────────────────────────────────────────────
|
|
114
|
+
═══════════════════════════════════════════════════════
|
|
115
|
+
```
|
|
195
116
|
|
|
196
|
-
|
|
197
|
-
✅ Task → User Story Links:
|
|
198
|
-
Updated tasks.md with user story references
|
|
199
|
-
Each task now links to its parent user story
|
|
117
|
+
### MODE B: Sync SINGLE Increment
|
|
200
118
|
|
|
201
|
-
|
|
202
|
-
Each user story shows implementing tasks
|
|
203
|
-
Tasks linked back to increment #{increment_id}
|
|
204
|
-
{else}
|
|
205
|
-
⚠️ No tasks.md found - stories created without task links
|
|
206
|
-
{/if}
|
|
119
|
+
**Only when a specific increment ID is provided**:
|
|
207
120
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
121
|
+
```
|
|
122
|
+
🎯 Target increment: {increment_id}
|
|
123
|
+
📁 Increment path: .specweave/increments/{increment_id}
|
|
124
|
+
🔄 Mode: Single increment sync
|
|
125
|
+
```
|
|
211
126
|
|
|
212
|
-
**
|
|
213
|
-
|
|
214
|
-
**Project folder detection** (priority order):
|
|
215
|
-
1. `**Project**:` field in spec.md (explicit)
|
|
216
|
-
2. `multiProject.activeProject` in config.json
|
|
217
|
-
3. ADO area path mapping / JIRA board mapping
|
|
218
|
-
4. Git remote (repo name)
|
|
219
|
-
5. **ASK USER if multi-project mode and unsure**
|
|
220
|
-
|
|
221
|
-
.specweave/docs/internal/specs/
|
|
222
|
-
├── {project}/ ← Features + stories together
|
|
223
|
-
│ └── FS-XXX/ ← Feature ID derived from increment (0002 → FS-002)
|
|
224
|
-
│ ├── FEATURE.md ← Feature overview
|
|
225
|
-
│ ├── us-001-{title}.md ← User story 1
|
|
226
|
-
│ ├── us-002-{title}.md ← User story 2
|
|
227
|
-
│ └── ...
|
|
228
|
-
├── _epics/ ← Optional (SAFe/large orgs only)
|
|
229
|
-
│ └── EP-XXX/
|
|
230
|
-
│ └── EPIC.md
|
|
231
|
-
└── _archive/ ← Archived features
|
|
232
|
-
└── {project}/FS-XXX/
|
|
127
|
+
**Execute single sync**:
|
|
233
128
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
129
|
+
```typescript
|
|
130
|
+
const result = await sync.syncIncrement(incrementId, { dryRun, force });
|
|
131
|
+
```
|
|
237
132
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
✅
|
|
242
|
-
|
|
243
|
-
✅ Preserved external tool links (GitHub/Jira/ADO)
|
|
133
|
+
**Output**:
|
|
134
|
+
```
|
|
135
|
+
═══════════════════════════════════════════════════════
|
|
136
|
+
✅ SINGLE INCREMENT SYNC COMPLETE
|
|
137
|
+
═══════════════════════════════════════════════════════
|
|
244
138
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
• Delivery docs (CI/CD, testing)
|
|
249
|
-
• Governance docs (security, compliance)
|
|
250
|
-
• Strategy docs (PRDs, roadmaps)
|
|
139
|
+
Increment: {increment_id}
|
|
140
|
+
Feature ID: FS-{XXX} (derived from increment number)
|
|
141
|
+
Project: {project}
|
|
251
142
|
|
|
252
|
-
|
|
143
|
+
Files created:
|
|
144
|
+
• {project}/FS-{XXX}/FEATURE.md
|
|
145
|
+
• {project}/FS-{XXX}/us-001-*.md
|
|
146
|
+
• {project}/FS-{XXX}/us-002-*.md
|
|
147
|
+
...
|
|
253
148
|
|
|
254
149
|
═══════════════════════════════════════════════════════
|
|
255
150
|
```
|
|
256
151
|
|
|
257
152
|
---
|
|
258
153
|
|
|
259
|
-
## STEP
|
|
154
|
+
## STEP 3: Identify Missing/New Specs
|
|
260
155
|
|
|
261
|
-
|
|
262
|
-
🎯 NEXT STEPS
|
|
263
|
-
───────────────────────────────────────────────────────
|
|
264
|
-
|
|
265
|
-
1. Review generated specs:
|
|
266
|
-
cd .specweave/docs/internal/specs/
|
|
267
|
-
ls -la {project}/{FS-ID}/
|
|
268
|
-
|
|
269
|
-
2. Verify bidirectional links (if applicable):
|
|
270
|
-
• Check tasks.md has "User Story:" links
|
|
271
|
-
• Check user stories have "Implementation:" sections
|
|
272
|
-
|
|
273
|
-
3. Sync to external tools (if configured):
|
|
274
|
-
{if GitHub configured}
|
|
275
|
-
• GitHub: /specweave-github:sync-spec
|
|
276
|
-
{/if}
|
|
277
|
-
{if Jira configured}
|
|
278
|
-
• Jira: /specweave-jira:sync-spec
|
|
279
|
-
{/if}
|
|
280
|
-
{if ADO configured}
|
|
281
|
-
• Azure DevOps: /specweave-ado:sync-spec
|
|
282
|
-
{/if}
|
|
283
|
-
|
|
284
|
-
4. Update other docs (if needed):
|
|
285
|
-
• Full sync: /specweave:sync-docs
|
|
286
|
-
• Architecture only: Update ADRs manually
|
|
287
|
-
• Operations only: Update runbooks manually
|
|
288
|
-
|
|
289
|
-
5. Commit changes:
|
|
290
|
-
git add .specweave/docs/internal/specs/
|
|
291
|
-
git commit -m "docs: sync specs from increment {increment_id}"
|
|
292
|
-
```
|
|
156
|
+
After sync, compare increments vs specs:
|
|
293
157
|
|
|
294
|
-
|
|
158
|
+
```bash
|
|
159
|
+
# Get all increment numbers
|
|
160
|
+
INCREMENT_NUMS=$(ls -1 .specweave/increments/ | grep -E '^[0-9]{4}E?-' | sed 's/^\([0-9]*E\?\).*/\1/')
|
|
295
161
|
|
|
296
|
-
|
|
162
|
+
# Get all FS-XXX folders in specs
|
|
163
|
+
SPEC_NUMS=$(ls -1 .specweave/docs/internal/specs/*/FS-* 2>/dev/null | grep -oE 'FS-[0-9]+E?' | sed 's/FS-//')
|
|
297
164
|
|
|
298
|
-
|
|
165
|
+
# Find missing (increments without corresponding FS-XXX)
|
|
166
|
+
echo "Checking for gaps..."
|
|
299
167
|
```
|
|
300
|
-
❌ Error: Increment '{increment_id}' not found
|
|
301
168
|
|
|
302
|
-
|
|
303
|
-
{list .specweave/increments/*/}
|
|
304
|
-
|
|
305
|
-
Usage: /specweave:sync-specs [increment_id] [--dry-run]
|
|
306
|
-
```
|
|
169
|
+
**Report gaps** (increments without corresponding specs):
|
|
307
170
|
|
|
308
|
-
### Error: No Spec File
|
|
309
171
|
```
|
|
310
|
-
|
|
172
|
+
📊 GAP ANALYSIS
|
|
173
|
+
───────────────────────────────────────────────────────
|
|
311
174
|
|
|
312
|
-
|
|
313
|
-
|
|
175
|
+
{if gaps found}
|
|
176
|
+
⚠️ Found {N} increments without corresponding specs:
|
|
177
|
+
• 0106-ci-health-improvements → FS-106 missing
|
|
178
|
+
• 0113-enhanced-living-docs-architecture → FS-113 missing
|
|
314
179
|
|
|
315
|
-
|
|
180
|
+
These were synced in this run.
|
|
181
|
+
{else}
|
|
182
|
+
✅ All increments have corresponding spec folders!
|
|
183
|
+
{/if}
|
|
316
184
|
```
|
|
317
185
|
|
|
318
|
-
|
|
319
|
-
```
|
|
320
|
-
❌ Error: Failed to distribute specs
|
|
186
|
+
---
|
|
321
187
|
|
|
322
|
-
|
|
188
|
+
## STEP 4: Feature ID Derivation Rules
|
|
323
189
|
|
|
324
|
-
|
|
325
|
-
• Invalid spec.md format
|
|
326
|
-
• Missing user stories
|
|
327
|
-
• Corrupted YAML frontmatter
|
|
190
|
+
**CRITICAL**: Feature ID is ALWAYS derived from increment number:
|
|
328
191
|
|
|
329
|
-
|
|
330
|
-
|
|
192
|
+
| Increment ID | Feature ID |
|
|
193
|
+
|--------------|------------|
|
|
194
|
+
| 0002-user-authentication | FS-002 |
|
|
195
|
+
| 0040-some-feature | FS-040 |
|
|
196
|
+
| 0106-ci-health | FS-106 |
|
|
197
|
+
| 0111E-dora-metrics-fix | FS-111E |
|
|
198
|
+
|
|
199
|
+
**Rules**:
|
|
200
|
+
- Increment `XXXX-name` → Feature `FS-XXX` (3-digit minimum)
|
|
201
|
+
- Increment `XXXXE-name` (external) → Feature `FS-XXXE`
|
|
202
|
+
- NO date-based patterns (FS-YY-MM-DD-name is WRONG)
|
|
203
|
+
- See ADR-0187 for rationale
|
|
331
204
|
|
|
332
205
|
---
|
|
333
206
|
|
|
334
207
|
## OPTIONS
|
|
335
208
|
|
|
336
209
|
### --dry-run
|
|
337
|
-
|
|
210
|
+
Preview what would be synced without making changes:
|
|
338
211
|
|
|
339
212
|
```bash
|
|
340
|
-
/specweave:sync-specs
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
Output:
|
|
344
|
-
```
|
|
345
|
-
🔍 DRY RUN MODE - No files will be modified
|
|
346
|
-
|
|
347
|
-
Would create/update:
|
|
348
|
-
• Feature: specweave/FS-031/FEATURE.md
|
|
349
|
-
• User story: specweave/FS-031/us-001-api-sync.md
|
|
350
|
-
• User story: specweave/FS-031/us-002-status-mapping.md
|
|
351
|
-
• Tasks.md: Would add 5 user story links
|
|
352
|
-
|
|
353
|
-
Total: 4 files would be affected
|
|
354
|
-
|
|
355
|
-
Note: Feature ID FS-031 derived from increment number 0031
|
|
213
|
+
/specweave:sync-specs --dry-run # Preview ALL
|
|
214
|
+
/specweave:sync-specs 0106 --dry-run # Preview single
|
|
356
215
|
```
|
|
357
216
|
|
|
358
217
|
### --force
|
|
359
218
|
Overwrite existing files without prompting:
|
|
360
219
|
|
|
361
220
|
```bash
|
|
362
|
-
/specweave:sync-specs
|
|
221
|
+
/specweave:sync-specs --force # Force ALL
|
|
222
|
+
/specweave:sync-specs 0106 --force # Force single
|
|
363
223
|
```
|
|
364
224
|
|
|
365
225
|
---
|
|
366
226
|
|
|
367
227
|
## EXAMPLES
|
|
368
228
|
|
|
369
|
-
### Example 1: Sync
|
|
229
|
+
### Example 1: Sync ALL (Default - Most Common)
|
|
370
230
|
```
|
|
371
231
|
User: /specweave:sync-specs
|
|
372
232
|
|
|
373
233
|
Output:
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
234
|
+
🔄 Syncing ALL increments to living docs...
|
|
235
|
+
|
|
236
|
+
Found 25 increments with spec.md files.
|
|
237
|
+
|
|
238
|
+
| Increment | Feature ID | Status |
|
|
239
|
+
|-----------|------------|--------|
|
|
240
|
+
| 0093-ado-permission-profile-fixes | FS-093 | ✅ |
|
|
241
|
+
| 0094-unit-test-alignment | FS-094 | ✅ |
|
|
242
|
+
| 0095-per-project-epic-hierarchy | FS-095 | ✅ |
|
|
243
|
+
| 0096-ado-import-fixes | FS-096 | ✅ |
|
|
244
|
+
| 0097-umbrella-module-detection | FS-097 | ✅ |
|
|
245
|
+
| ... | ... | ... |
|
|
246
|
+
| 0116-livingspec-universal-standard | FS-116 | ✅ |
|
|
247
|
+
|
|
248
|
+
📊 SUMMARY: 25 succeeded, 0 failed
|
|
384
249
|
```
|
|
385
250
|
|
|
386
|
-
### Example 2: Sync
|
|
251
|
+
### Example 2: Sync Single Increment
|
|
387
252
|
```
|
|
388
|
-
User: /specweave:sync-specs
|
|
253
|
+
User: /specweave:sync-specs 0106
|
|
389
254
|
|
|
390
255
|
Output:
|
|
391
|
-
🎯 Target increment:
|
|
392
|
-
📁 Increment path: .specweave/increments/
|
|
393
|
-
🔄 Mode:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
📁 Total files created: 5
|
|
256
|
+
🎯 Target increment: 0106-ci-health-improvements
|
|
257
|
+
📁 Increment path: .specweave/increments/0106-ci-health-improvements
|
|
258
|
+
🔄 Mode: Single increment sync
|
|
259
|
+
|
|
260
|
+
✅ Synced 0106-ci-health-improvements → FS-106
|
|
261
|
+
Created: specweave/FS-106/FEATURE.md
|
|
262
|
+
Created: specweave/FS-106/us-001-*.md
|
|
399
263
|
```
|
|
400
264
|
|
|
401
|
-
### Example 3: Dry Run
|
|
265
|
+
### Example 3: Dry Run ALL
|
|
402
266
|
```
|
|
403
|
-
User: /specweave:sync-specs
|
|
267
|
+
User: /specweave:sync-specs --dry-run
|
|
404
268
|
|
|
405
269
|
Output:
|
|
406
270
|
🔍 DRY RUN MODE - No files will be modified
|
|
407
271
|
|
|
408
|
-
Would sync
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
272
|
+
Would sync 25 increments:
|
|
273
|
+
• 0093 → FS-093 (exists, would update)
|
|
274
|
+
• 0094 → FS-094 (exists, would update)
|
|
275
|
+
• 0106 → FS-106 (NEW - would create)
|
|
276
|
+
• 0113 → FS-113 (NEW - would create)
|
|
277
|
+
...
|
|
413
278
|
|
|
414
279
|
No changes made (dry run mode)
|
|
415
280
|
```
|
|
416
281
|
|
|
417
282
|
---
|
|
418
283
|
|
|
284
|
+
## ERROR HANDLING
|
|
285
|
+
|
|
286
|
+
### Error: No Increments Found
|
|
287
|
+
```
|
|
288
|
+
❌ Error: No increments found in .specweave/increments/
|
|
289
|
+
|
|
290
|
+
Create an increment first:
|
|
291
|
+
/specweave:increment "feature name"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Error: Specific Increment Not Found
|
|
295
|
+
```
|
|
296
|
+
❌ Error: Increment '0999' not found
|
|
297
|
+
|
|
298
|
+
Available increments:
|
|
299
|
+
0093-ado-permission-profile-fixes
|
|
300
|
+
0094-unit-test-alignment
|
|
301
|
+
...
|
|
302
|
+
|
|
303
|
+
Usage: /specweave:sync-specs [increment_id]
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Error: Missing spec.md
|
|
307
|
+
```
|
|
308
|
+
⚠️ Skipping 0107-incomplete-feature (no spec.md)
|
|
309
|
+
|
|
310
|
+
Increment must have a spec.md file to sync.
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
419
315
|
## IMPORTANT NOTES
|
|
420
316
|
|
|
421
|
-
1. **
|
|
422
|
-
2. **
|
|
423
|
-
3. **
|
|
424
|
-
4. **Project
|
|
425
|
-
5. **
|
|
426
|
-
6. **External Links**: Preserves GitHub/Jira/ADO links from metadata.json
|
|
317
|
+
1. **DEFAULT = ALL**: Running without arguments syncs ALL increments
|
|
318
|
+
2. **Idempotent**: Safe to run multiple times (updates existing, creates missing)
|
|
319
|
+
3. **Feature ID derivation**: Always from increment number (not stored in metadata)
|
|
320
|
+
4. **Project detection**: Reads `project:` from spec.md YAML frontmatter
|
|
321
|
+
5. **External sync**: Triggers GitHub/JIRA/ADO sync if configured
|
|
427
322
|
|
|
428
323
|
---
|
|
429
324
|
|
|
430
325
|
## WHEN TO USE THIS COMMAND
|
|
431
326
|
|
|
432
|
-
✅ **Use `/specweave:sync-specs` when**:
|
|
433
|
-
- You
|
|
434
|
-
-
|
|
435
|
-
-
|
|
436
|
-
-
|
|
327
|
+
✅ **Use `/specweave:sync-specs` (no args) when**:
|
|
328
|
+
- You want to ensure ALL increments are in living docs
|
|
329
|
+
- After creating multiple increments
|
|
330
|
+
- To fix gaps in specs folder
|
|
331
|
+
- Regular maintenance sync
|
|
437
332
|
|
|
438
|
-
|
|
439
|
-
- You want to
|
|
440
|
-
-
|
|
441
|
-
-
|
|
442
|
-
- You need comprehensive documentation sync
|
|
333
|
+
✅ **Use `/specweave:sync-specs <id>` when**:
|
|
334
|
+
- You only want to sync one specific increment
|
|
335
|
+
- After updating a single spec.md
|
|
336
|
+
- Debugging sync issues for one increment
|
|
443
337
|
|
|
444
338
|
---
|
|
445
339
|
|
|
446
|
-
**
|
|
340
|
+
**Execute this command now. Default = sync ALL increments.**
|