specweave 0.22.13 β 0.22.14
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-plugin/README.md +2 -2
- package/CLAUDE.md +269 -51
- package/README.md +33 -10
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
- package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -1
- 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 +4 -1
- package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +1 -1
- package/dist/plugins/specweave-github/lib/github-spec-sync.js +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +9 -0
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +10 -1
- package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js +2 -2
- package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -1
- package/dist/plugins/specweave-github/lib/types.d.ts +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +313 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/index.js +41 -24
- package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
- package/dist/src/config/import-config.d.ts +69 -0
- package/dist/src/config/import-config.d.ts.map +1 -0
- package/dist/src/config/import-config.js +136 -0
- package/dist/src/config/import-config.js.map +1 -0
- package/dist/src/config/types.d.ts +10 -10
- package/dist/src/core/living-docs/living-docs-sync.d.ts +2 -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 +10 -1
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/living-docs/task-project-specific-generator.d.ts +2 -2
- package/dist/src/core/living-docs/task-project-specific-generator.js +2 -2
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts +2 -2
- package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
- package/dist/src/core/repo-structure/prompt-consolidator.js +3 -15
- package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
- package/dist/src/core/repo-structure/repo-structure-manager.js +3 -6
- package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
- package/dist/src/core/spec-content-sync.d.ts +4 -1
- package/dist/src/core/spec-content-sync.d.ts.map +1 -1
- package/dist/src/core/spec-content-sync.js +139 -4
- package/dist/src/core/spec-content-sync.js.map +1 -1
- package/dist/src/core/spec-task-mapper.d.ts.map +1 -1
- package/dist/src/core/spec-task-mapper.js +9 -8
- package/dist/src/core/spec-task-mapper.js.map +1 -1
- package/dist/src/core/status-line-validator.d.ts +63 -0
- package/dist/src/core/status-line-validator.d.ts.map +1 -0
- package/dist/src/core/status-line-validator.js +253 -0
- package/dist/src/core/status-line-validator.js.map +1 -0
- package/dist/src/core/sync/bidirectional-engine.d.ts +10 -1
- package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
- package/dist/src/core/sync/bidirectional-engine.js +10 -1
- package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
- package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
- package/dist/src/core/sync/profile-manager.js +3 -0
- package/dist/src/core/sync/profile-manager.js.map +1 -1
- package/dist/src/core/sync/project-context.d.ts.map +1 -1
- package/dist/src/core/sync/project-context.js +3 -0
- package/dist/src/core/sync/project-context.js.map +1 -1
- package/dist/src/core/sync/status-sync-engine.d.ts +1 -1
- package/dist/src/core/sync/status-sync-engine.js +1 -1
- package/dist/src/core/types/origin-metadata.d.ts +153 -0
- package/dist/src/core/types/origin-metadata.d.ts.map +1 -0
- package/dist/src/core/types/origin-metadata.js +166 -0
- package/dist/src/core/types/origin-metadata.js.map +1 -0
- package/dist/src/core/types/sync-profile.d.ts +8 -2
- package/dist/src/core/types/sync-profile.d.ts.map +1 -1
- package/dist/src/core/types/sync-profile.js.map +1 -1
- package/dist/src/core/types/sync-settings.d.ts +73 -0
- package/dist/src/core/types/sync-settings.d.ts.map +1 -0
- package/dist/src/core/types/sync-settings.js +90 -0
- package/dist/src/core/types/sync-settings.js.map +1 -0
- package/dist/src/core/utils/permission-checker.d.ts +100 -0
- package/dist/src/core/utils/permission-checker.d.ts.map +1 -0
- package/dist/src/core/utils/permission-checker.js +166 -0
- package/dist/src/core/utils/permission-checker.js.map +1 -0
- package/dist/src/generators/spec/spec-parser.js +3 -3
- package/dist/src/generators/spec/spec-parser.js.map +1 -1
- package/dist/src/generators/spec/task-parser.js +4 -4
- package/dist/src/generators/spec/task-parser.js.map +1 -1
- package/dist/src/id-generators/task-id-generator.d.ts +96 -0
- package/dist/src/id-generators/task-id-generator.d.ts.map +1 -0
- package/dist/src/id-generators/task-id-generator.js +143 -0
- package/dist/src/id-generators/task-id-generator.js.map +1 -0
- package/dist/src/id-generators/us-id-generator.d.ts +96 -0
- package/dist/src/id-generators/us-id-generator.d.ts.map +1 -0
- package/dist/src/id-generators/us-id-generator.js +143 -0
- package/dist/src/id-generators/us-id-generator.js.map +1 -0
- package/dist/src/importers/ado-importer.d.ts +43 -0
- package/dist/src/importers/ado-importer.d.ts.map +1 -0
- package/dist/src/importers/ado-importer.js +234 -0
- package/dist/src/importers/ado-importer.js.map +1 -0
- package/dist/src/importers/external-importer.d.ts +96 -0
- package/dist/src/importers/external-importer.d.ts.map +1 -0
- package/dist/src/importers/external-importer.js +13 -0
- package/dist/src/importers/external-importer.js.map +1 -0
- package/dist/src/importers/github-importer.d.ts +37 -0
- package/dist/src/importers/github-importer.d.ts.map +1 -0
- package/dist/src/importers/github-importer.js +161 -0
- package/dist/src/importers/github-importer.js.map +1 -0
- package/dist/src/importers/import-coordinator.d.ts +90 -0
- package/dist/src/importers/import-coordinator.d.ts.map +1 -0
- package/dist/src/importers/import-coordinator.js +182 -0
- package/dist/src/importers/import-coordinator.js.map +1 -0
- package/dist/src/importers/item-converter.d.ts +91 -0
- package/dist/src/importers/item-converter.d.ts.map +1 -0
- package/dist/src/importers/item-converter.js +221 -0
- package/dist/src/importers/item-converter.js.map +1 -0
- package/dist/src/importers/jira-importer.d.ts +42 -0
- package/dist/src/importers/jira-importer.d.ts.map +1 -0
- package/dist/src/importers/jira-importer.js +221 -0
- package/dist/src/importers/jira-importer.js.map +1 -0
- package/dist/src/init/repo/types.d.ts +2 -2
- package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
- package/dist/src/integrations/jira/jira-mapper.js +1 -1
- package/dist/src/living-docs/fs-id-allocator.d.ts +149 -0
- package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -0
- package/dist/src/living-docs/fs-id-allocator.js +325 -0
- package/dist/src/living-docs/fs-id-allocator.js.map +1 -0
- package/dist/src/living-docs/id-registry.d.ts +124 -0
- package/dist/src/living-docs/id-registry.d.ts.map +1 -0
- package/dist/src/living-docs/id-registry.js +230 -0
- package/dist/src/living-docs/id-registry.js.map +1 -0
- package/dist/src/progress/us-progress-tracker.d.ts +68 -0
- package/dist/src/progress/us-progress-tracker.d.ts.map +1 -0
- package/dist/src/progress/us-progress-tracker.js +120 -0
- package/dist/src/progress/us-progress-tracker.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +16 -2
- package/plugins/specweave/agents/architect/AGENT.md +11 -2
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +81 -25
- package/plugins/specweave/commands/specweave-import-docs.md +278 -88
- package/plugins/specweave/commands/specweave-progress.md +45 -97
- package/plugins/specweave/hooks/post-increment-completion.sh +168 -26
- package/plugins/specweave/hooks/post-increment-planning.sh +148 -4
- package/plugins/specweave/hooks/post-task-completion.sh +64 -4
- package/plugins/specweave/lib/hooks/sync-cache.js +294 -0
- package/plugins/specweave/lib/hooks/sync-living-docs.js +32 -1
- package/plugins/specweave/lib/hooks/sync-us-tasks.js +23 -13
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/post-task-completion.sh +37 -22
- package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
- package/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
- package/plugins/specweave-github/lib/enhanced-github-sync.ts +1 -1
- package/plugins/specweave-github/lib/github-spec-content-sync.js +2 -1
- package/plugins/specweave-github/lib/github-spec-content-sync.ts +4 -1
- package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
- package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
- package/plugins/specweave-github/lib/github-sync-bidirectional.ts +10 -1
- package/plugins/specweave-github/lib/progress-comment-builder.js +1 -1
- package/plugins/specweave-github/lib/progress-comment-builder.ts +2 -2
- package/plugins/specweave-github/lib/types.ts +1 -1
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +252 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
- package/src/templates/.env.example +5 -0
- package/src/templates/config-permissions-guide.md +413 -0
- package/src/templates/config.json.template +68 -0
- package/src/templates/tasks.md.template +180 -201
|
@@ -1,136 +1,326 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specweave:import-docs
|
|
3
|
-
description:
|
|
3
|
+
description: Intelligently import ANY documentation (Notion, Confluence, Evernote, Google Docs, markdown) with AI-powered content analysis and automatic living docs integration.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Import
|
|
6
|
+
# Import Documentation (AI-Powered)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**One command. Any source. Intelligent classification.**
|
|
9
|
+
|
|
10
|
+
Import documentation from **anywhere** - Notion, Confluence, Evernote, Google Docs, or plain markdown. SpecWeave uses AI to understand content, classify documents, and merge intelligently into living docs.
|
|
11
|
+
|
|
12
|
+
## Philosophy
|
|
13
|
+
|
|
14
|
+
**You shouldn't need to tell SpecWeave where docs came from.** Just point it at a folder of markdown files, and SpecWeave figures out:
|
|
15
|
+
- What type of document it is (spec, architecture, guide)
|
|
16
|
+
- Where it should go in living docs
|
|
17
|
+
- How to merge with existing content
|
|
18
|
+
- What needs manual review
|
|
9
19
|
|
|
10
20
|
## What This Does
|
|
11
21
|
|
|
12
|
-
1. **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
### 1. **Smart Source Detection** (Zero Config)
|
|
23
|
+
SpecWeave auto-detects export format:
|
|
24
|
+
- Notion export? β Detects `.csv` metadata, nested folders
|
|
25
|
+
- Confluence? β Detects `index.html`, attachment structure
|
|
26
|
+
- Evernote? β Detects `.enex` format (converts to markdown)
|
|
27
|
+
- Google Docs? β Detects HTML export structure
|
|
28
|
+
- Plain markdown? β Works with any folder
|
|
29
|
+
|
|
30
|
+
**You don't specify `--source`** - SpecWeave figures it out.
|
|
31
|
+
|
|
32
|
+
### 2. **AI-Powered Content Classification**
|
|
33
|
+
LLM analyzes ACTUAL content (not just keywords):
|
|
34
|
+
- **Feature Specs** - User stories, acceptance criteria, business requirements
|
|
35
|
+
- **Architecture** - Technical design, system diagrams, ADRs
|
|
36
|
+
- **API Docs** - Endpoints, request/response formats, authentication
|
|
37
|
+
- **User Guides** - How-tos, tutorials, onboarding
|
|
38
|
+
- **Team Process** - Conventions, workflows, PR guidelines
|
|
39
|
+
- **Legacy** - Needs review (ambiguous content)
|
|
40
|
+
|
|
41
|
+
**Confidence Scoring**: 90%+ = Auto-classify, <90% = Flag for review
|
|
42
|
+
|
|
43
|
+
### 3. **Intelligent Merging** (Not Overwriting)
|
|
44
|
+
When docs already exist:
|
|
45
|
+
- **Specs**: Merge user stories (preserve existing, add new)
|
|
46
|
+
- **Architecture**: Create versioned files (design-v1.md, design-v2.md)
|
|
47
|
+
- **Guides**: Detect duplicates, suggest consolidation
|
|
48
|
+
- **Legacy**: Never overwrite (safe copy to legacy/)
|
|
49
|
+
|
|
50
|
+
### 4. **Living Docs Integration**
|
|
51
|
+
Automatically updates:
|
|
52
|
+
- Feature registry with imported specs
|
|
53
|
+
- Architecture index with design docs
|
|
54
|
+
- Cross-reference links between documents
|
|
55
|
+
- Traceability metadata (source, import date)
|
|
56
|
+
|
|
57
|
+
### 5. **Migration Report**
|
|
58
|
+
Shows what happened:
|
|
59
|
+
- Classification decisions with confidence scores
|
|
60
|
+
- Merge conflicts detected
|
|
61
|
+
- Files that need manual review
|
|
62
|
+
- Suggested next steps
|
|
21
63
|
|
|
22
64
|
## Usage
|
|
23
65
|
|
|
66
|
+
**Simplest form** (SpecWeave does everything):
|
|
24
67
|
```bash
|
|
25
|
-
/specweave:import-docs
|
|
68
|
+
/specweave:import-docs /path/to/docs
|
|
26
69
|
```
|
|
27
70
|
|
|
28
|
-
|
|
71
|
+
That's it! No flags, no config, no source type. Just point and import.
|
|
72
|
+
|
|
73
|
+
### Options (All Optional)
|
|
29
74
|
|
|
30
|
-
- `--
|
|
31
|
-
- `--
|
|
32
|
-
- `--
|
|
33
|
-
- `--
|
|
75
|
+
- `--project=<id>` - Target project (default: active project from config)
|
|
76
|
+
- `--dry-run` - Preview without making changes
|
|
77
|
+
- `--confidence=<threshold>` - Min confidence for auto-classification (default: 90)
|
|
78
|
+
- `--merge-strategy=<smart|skip|overwrite>` - How to handle conflicts (default: smart)
|
|
34
79
|
|
|
35
80
|
## Examples
|
|
36
81
|
|
|
37
|
-
### Example 1:
|
|
82
|
+
### Example 1: Simplest Import (Zero Config)
|
|
38
83
|
|
|
39
84
|
```bash
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
/specweave:import-docs /tmp/notion-export
|
|
44
|
-
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
85
|
+
# Just downloaded Notion export to /tmp/notion-export/
|
|
86
|
+
# No need to specify it's from Notion!
|
|
87
|
+
|
|
88
|
+
/specweave:import-docs /tmp/notion-export
|
|
89
|
+
|
|
90
|
+
# Output:
|
|
91
|
+
# π Analyzing /tmp/notion-export...
|
|
92
|
+
# β Detected source: Notion export (found Database.csv)
|
|
93
|
+
# β Found 47 markdown files
|
|
94
|
+
#
|
|
95
|
+
# π€ AI Classification (using Claude)...
|
|
96
|
+
# β Analyzed 47 files
|
|
97
|
+
#
|
|
98
|
+
# π Classification Results:
|
|
99
|
+
# Feature Specs: 12 files (avg confidence: 95%)
|
|
100
|
+
# β’ Product Requirements.md β FS-048
|
|
101
|
+
# β’ User Stories.md β FS-049
|
|
102
|
+
# ...
|
|
103
|
+
#
|
|
104
|
+
# Architecture: 18 files (avg confidence: 92%)
|
|
105
|
+
# β’ System Design.md β architecture/design/
|
|
106
|
+
# β’ API Architecture.md β architecture/api/
|
|
107
|
+
# ...
|
|
108
|
+
#
|
|
109
|
+
# User Guides: 5 files (avg confidence: 88%)
|
|
110
|
+
# β’ Getting Started.md β guides/
|
|
111
|
+
# ...
|
|
112
|
+
#
|
|
113
|
+
# Needs Review: 12 files (confidence <90%)
|
|
114
|
+
# β’ Meeting Notes.md β legacy/ (68% confidence)
|
|
115
|
+
# ...
|
|
116
|
+
#
|
|
117
|
+
# π Living Docs Integration...
|
|
118
|
+
# β Created 12 feature specs (FS-048 through FS-059)
|
|
119
|
+
# β Updated architecture index
|
|
120
|
+
# β Created 23 cross-reference links
|
|
121
|
+
#
|
|
122
|
+
# β
Import complete! 35/47 files auto-classified (74%)
|
|
123
|
+
# π‘ Review 12 files in legacy/ for manual classification
|
|
53
124
|
```
|
|
54
125
|
|
|
55
|
-
### Example 2:
|
|
126
|
+
### Example 2: Dry Run (Preview)
|
|
56
127
|
|
|
57
128
|
```bash
|
|
58
|
-
|
|
129
|
+
# Preview what would happen WITHOUT making changes
|
|
130
|
+
/specweave:import-docs /path/to/docs --dry-run
|
|
131
|
+
|
|
132
|
+
# Output shows:
|
|
133
|
+
# - Source detection results
|
|
134
|
+
# - AI classification decisions
|
|
135
|
+
# - Where files would go
|
|
136
|
+
# - Merge conflicts that would occur
|
|
137
|
+
# - NO actual changes made
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Example 3: Confluence Export (Auto-Detected)
|
|
59
141
|
|
|
60
|
-
|
|
142
|
+
```bash
|
|
143
|
+
# Exported Confluence space to /path/to/confluence/
|
|
144
|
+
# SpecWeave auto-detects it's Confluence!
|
|
145
|
+
|
|
146
|
+
/specweave:import-docs /path/to/confluence
|
|
147
|
+
|
|
148
|
+
# Output:
|
|
149
|
+
# π Analyzing /path/to/confluence...
|
|
150
|
+
# β Detected source: Confluence export (found index.html)
|
|
151
|
+
# β Converting HTML to markdown (38 files)...
|
|
152
|
+
# β Found 38 markdown files
|
|
153
|
+
#
|
|
154
|
+
# [Rest of AI classification...]
|
|
61
155
|
```
|
|
62
156
|
|
|
63
|
-
### Example
|
|
157
|
+
### Example 4: Evernote Export (Auto-Converts)
|
|
64
158
|
|
|
65
159
|
```bash
|
|
66
|
-
|
|
160
|
+
# Exported Evernote notebook to /tmp/evernote.enex
|
|
161
|
+
# SpecWeave auto-detects and converts!
|
|
162
|
+
|
|
163
|
+
/specweave:import-docs /tmp/evernote.enex
|
|
164
|
+
|
|
165
|
+
# Output:
|
|
166
|
+
# π Analyzing /tmp/evernote.enex...
|
|
167
|
+
# β Detected source: Evernote export (.enex format)
|
|
168
|
+
# β Converting ENEX to markdown (142 notes)...
|
|
169
|
+
# β Extracted 142 markdown files
|
|
170
|
+
#
|
|
171
|
+
# [Rest of AI classification...]
|
|
172
|
+
```
|
|
67
173
|
|
|
68
|
-
|
|
69
|
-
|
|
174
|
+
### Example 5: Intelligent Merging
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# You already have FS-048 in living docs
|
|
178
|
+
# SpecWeave merges intelligently (doesn't overwrite!)
|
|
179
|
+
|
|
180
|
+
/specweave:import-docs /tmp/updated-requirements
|
|
181
|
+
|
|
182
|
+
# Output:
|
|
183
|
+
# π Analyzing /tmp/updated-requirements...
|
|
184
|
+
# β Detected source: Plain markdown folder
|
|
185
|
+
#
|
|
186
|
+
# π€ AI Classification...
|
|
187
|
+
# β Feature Requirements.md β FS-048 (ALREADY EXISTS)
|
|
188
|
+
#
|
|
189
|
+
# π Intelligent Merging...
|
|
190
|
+
# FS-048: User Authentication
|
|
191
|
+
# Existing: 3 user stories (US-001, US-002, US-003)
|
|
192
|
+
# Imported: 5 user stories (US-001, US-002, US-004, US-005, US-006)
|
|
193
|
+
#
|
|
194
|
+
# Merge strategy:
|
|
195
|
+
# β US-001: Keep existing (no changes)
|
|
196
|
+
# β US-002: Merge (updated acceptance criteria)
|
|
197
|
+
# β US-003: Keep existing (not in import)
|
|
198
|
+
# β US-004: Add new (from import)
|
|
199
|
+
# β US-005: Add new (from import)
|
|
200
|
+
# β US-006: Add new (from import)
|
|
201
|
+
#
|
|
202
|
+
# Result: 6 user stories total (3 preserved, 1 merged, 3 new)
|
|
203
|
+
#
|
|
204
|
+
# β
Smart merge complete! No data lost.
|
|
70
205
|
```
|
|
71
206
|
|
|
72
|
-
### Example
|
|
207
|
+
### Example 6: Lower Confidence Threshold
|
|
73
208
|
|
|
74
209
|
```bash
|
|
75
|
-
|
|
210
|
+
# Accept files with 75%+ confidence (vs default 90%)
|
|
211
|
+
# More aggressive auto-classification
|
|
76
212
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
#
|
|
213
|
+
/specweave:import-docs /tmp/messy-docs --confidence=75
|
|
214
|
+
|
|
215
|
+
# Output:
|
|
216
|
+
# [More files auto-classified, fewer in "Needs Review"]
|
|
80
217
|
```
|
|
81
218
|
|
|
82
|
-
## Supported Sources
|
|
219
|
+
## Supported Sources (All Auto-Detected)
|
|
220
|
+
|
|
221
|
+
SpecWeave automatically detects the source format. You never need to specify `--source`.
|
|
83
222
|
|
|
84
223
|
### Notion
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
1.
|
|
88
|
-
2. Choose "Markdown & CSV"
|
|
89
|
-
3.
|
|
90
|
-
4.
|
|
91
|
-
5. Run import command
|
|
224
|
+
**Auto-Detection**: Finds `Database.csv` or Notion-specific folder structure
|
|
225
|
+
**Export Steps**:
|
|
226
|
+
1. Notion β Settings β Export β Export all workspace content
|
|
227
|
+
2. Choose "Markdown & CSV"
|
|
228
|
+
3. Extract ZIP to folder
|
|
229
|
+
4. Run: `/specweave:import-docs /path/to/export`
|
|
92
230
|
|
|
93
231
|
### Confluence
|
|
94
|
-
-
|
|
95
|
-
|
|
232
|
+
**Auto-Detection**: Finds `index.html` or Confluence metadata
|
|
233
|
+
**Export Steps**:
|
|
96
234
|
1. Space tools β Content Tools β Export
|
|
97
235
|
2. Choose HTML or Markdown
|
|
98
|
-
3. Extract
|
|
99
|
-
4. Run import
|
|
236
|
+
3. Extract files
|
|
237
|
+
4. Run: `/specweave:import-docs /path/to/export`
|
|
238
|
+
|
|
239
|
+
### Evernote
|
|
240
|
+
**Auto-Detection**: Finds `.enex` file format
|
|
241
|
+
**Export Steps**:
|
|
242
|
+
1. Evernote β File β Export β Export as ENEX
|
|
243
|
+
2. Save .enex file
|
|
244
|
+
3. Run: `/specweave:import-docs /path/to/export.enex`
|
|
245
|
+
|
|
246
|
+
**Note**: SpecWeave auto-converts ENEX to markdown
|
|
247
|
+
|
|
248
|
+
### Google Docs
|
|
249
|
+
**Auto-Detection**: Finds HTML export structure
|
|
250
|
+
**Export Steps**:
|
|
251
|
+
1. File β Download β Web Page (.html)
|
|
252
|
+
2. Extract ZIP
|
|
253
|
+
3. Run: `/specweave:import-docs /path/to/export`
|
|
100
254
|
|
|
101
255
|
### GitHub Wiki
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
1. Clone
|
|
105
|
-
2. Run import
|
|
106
|
-
|
|
107
|
-
###
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
## Classification
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
###
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
- Example
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
256
|
+
**Auto-Detection**: Finds `.git` folder with wiki structure
|
|
257
|
+
**Export Steps**:
|
|
258
|
+
1. Clone: `git clone https://github.com/user/repo.wiki.git`
|
|
259
|
+
2. Run: `/specweave:import-docs ./repo.wiki`
|
|
260
|
+
|
|
261
|
+
### Plain Markdown
|
|
262
|
+
**Auto-Detection**: Finds `.md` or `.markdown` files
|
|
263
|
+
**No export needed** - just point at any folder
|
|
264
|
+
|
|
265
|
+
## AI Classification (How It Works)
|
|
266
|
+
|
|
267
|
+
SpecWeave uses Claude to analyze **actual content**, not just keywords.
|
|
268
|
+
|
|
269
|
+
### What Claude Analyzes
|
|
270
|
+
|
|
271
|
+
For each file, Claude examines:
|
|
272
|
+
1. **Document Structure**: Headings, lists, tables, code blocks
|
|
273
|
+
2. **Content Patterns**: User stories, acceptance criteria, technical terms
|
|
274
|
+
3. **Writing Style**: Business vs technical language
|
|
275
|
+
4. **Relationships**: References to other documents
|
|
276
|
+
5. **Intent**: What problem is this document solving?
|
|
277
|
+
|
|
278
|
+
### Classification Categories
|
|
279
|
+
|
|
280
|
+
**Feature Specs** (90%+ confidence required)
|
|
281
|
+
- **Indicators**: User stories, acceptance criteria, business requirements
|
|
282
|
+
- **Example Content**: "As a user, I want...", "Given-When-Then", "AC-001"
|
|
283
|
+
- **Living Docs Destination**: `.specweave/docs/internal/specs/`
|
|
284
|
+
|
|
285
|
+
**Architecture Docs** (90%+ confidence)
|
|
286
|
+
- **Indicators**: System design, technical decisions, diagrams
|
|
287
|
+
- **Example Content**: "Architecture", "Component diagram", "Database schema"
|
|
288
|
+
- **Living Docs Destination**: `.specweave/docs/internal/architecture/`
|
|
289
|
+
|
|
290
|
+
**API Documentation** (90%+ confidence)
|
|
291
|
+
- **Indicators**: Endpoints, request/response, authentication
|
|
292
|
+
- **Example Content**: "POST /api/users", "Authorization: Bearer", "HTTP 200"
|
|
293
|
+
- **Living Docs Destination**: `.specweave/docs/internal/architecture/api/`
|
|
294
|
+
|
|
295
|
+
**User Guides** (90%+ confidence)
|
|
296
|
+
- **Indicators**: Step-by-step instructions, tutorials, screenshots
|
|
297
|
+
- **Example Content**: "Getting Started", "How to...", "Step 1:"
|
|
298
|
+
- **Living Docs Destination**: `.specweave/docs/public/guides/`
|
|
299
|
+
|
|
300
|
+
**Team Process** (90%+ confidence)
|
|
301
|
+
- **Indicators**: Conventions, workflows, team agreements
|
|
302
|
+
- **Example Content**: "PR process", "Code review checklist", "Onboarding"
|
|
303
|
+
- **Living Docs Destination**: `.specweave/docs/internal/team/`
|
|
304
|
+
|
|
305
|
+
**ADRs** (95%+ confidence - strict!)
|
|
306
|
+
- **Indicators**: "Architecture Decision Record", "ADR-XXXX", "Status: Accepted"
|
|
307
|
+
- **Example Content**: "## Context", "## Decision", "## Consequences"
|
|
308
|
+
- **Living Docs Destination**: `.specweave/docs/internal/architecture/adr/`
|
|
309
|
+
|
|
310
|
+
**Needs Manual Review** (<90% confidence)
|
|
311
|
+
- **Indicators**: Ambiguous content, mixed types, meeting notes
|
|
312
|
+
- **Example Content**: Anything Claude isn't confident about
|
|
313
|
+
- **Living Docs Destination**: `.specweave/docs/internal/legacy/needs-review/`
|
|
314
|
+
|
|
315
|
+
### Confidence Scoring
|
|
316
|
+
|
|
317
|
+
Claude provides a confidence score (0-100%) for each classification:
|
|
318
|
+
|
|
319
|
+
- **95-100%**: Extremely confident (rare, only for very clear docs like ADRs)
|
|
320
|
+
- **90-94%**: High confidence (default threshold for auto-classification)
|
|
321
|
+
- **80-89%**: Medium confidence (flagged for review, not auto-classified)
|
|
322
|
+
- **70-79%**: Low confidence (definitely needs review)
|
|
323
|
+
- **<70%**: Very uncertain (goes to legacy/)
|
|
134
324
|
|
|
135
325
|
## Destination Folders
|
|
136
326
|
|
|
@@ -17,120 +17,68 @@ Simple, fast progress check for all active increments.
|
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
#!/bin/bash
|
|
20
|
+
#
|
|
21
|
+
# Enhanced progress tracking with User Story grouping (v0.23.0+)
|
|
22
|
+
# Uses TypeScript script for accurate task parsing and US-level progress
|
|
23
|
+
#
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
echo "================================"
|
|
24
|
-
echo ""
|
|
25
|
-
|
|
26
|
-
# Counters
|
|
27
|
-
active_count=0
|
|
28
|
-
other_count=0
|
|
29
|
-
|
|
30
|
-
# Scan all increments
|
|
31
|
-
for dir in .specweave/increments/*/; do
|
|
32
|
-
[ ! -d "$dir" ] && continue
|
|
33
|
-
|
|
34
|
-
increment=$(basename "$dir")
|
|
35
|
-
metadata="$dir/metadata.json"
|
|
36
|
-
|
|
37
|
-
# Skip if no metadata
|
|
38
|
-
[ ! -f "$metadata" ] && continue
|
|
39
|
-
|
|
40
|
-
# Get status
|
|
41
|
-
inc_status=$(jq -r '.status' "$metadata" 2>/dev/null)
|
|
42
|
-
|
|
43
|
-
# Skip completed/archived
|
|
44
|
-
[ "$inc_status" = "completed" ] && continue
|
|
45
|
-
[ "$inc_status" = "archived" ] && continue
|
|
46
|
-
|
|
47
|
-
# Count for summary
|
|
48
|
-
if [ "$inc_status" = "in-progress" ]; then
|
|
49
|
-
active_count=$((active_count + 1))
|
|
50
|
-
else
|
|
51
|
-
other_count=$((other_count + 1))
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# Get task stats from tasks.md
|
|
55
|
-
tasks_file="$dir/tasks.md"
|
|
56
|
-
if [ -f "$tasks_file" ]; then
|
|
57
|
-
# Count tasks (headers with T-NNN format - both ### and ####)
|
|
58
|
-
total=$(grep -cE '^#{3,4}\s*T-[0-9]' "$tasks_file" 2>/dev/null | tr -d '\n' || echo "0")
|
|
59
|
-
# Count completed (various formats)
|
|
60
|
-
completed=$(grep -cE '(β
COMPLETE|\[COMPLETED\]|\[x\] Completed)' "$tasks_file" 2>/dev/null | tr -d '\n' || echo "0")
|
|
61
|
-
|
|
62
|
-
# Ensure we have valid numbers (fallback to 0 if empty)
|
|
63
|
-
total=${total:-0}
|
|
64
|
-
completed=${completed:-0}
|
|
65
|
-
|
|
66
|
-
if [ "$total" -gt 0 ] 2>/dev/null; then
|
|
67
|
-
percent=$((completed * 100 / total))
|
|
68
|
-
else
|
|
69
|
-
percent=0
|
|
70
|
-
fi
|
|
71
|
-
else
|
|
72
|
-
total=0
|
|
73
|
-
completed=0
|
|
74
|
-
percent=0
|
|
75
|
-
fi
|
|
76
|
-
|
|
77
|
-
# Display based on status
|
|
78
|
-
if [ "$inc_status" = "in-progress" ]; then
|
|
79
|
-
echo "π’ ACTIVE: $increment"
|
|
80
|
-
echo " Status: $inc_status"
|
|
81
|
-
echo " Tasks: $completed/$total completed ($percent%)"
|
|
82
|
-
echo " Next: /specweave:do $increment"
|
|
83
|
-
echo ""
|
|
84
|
-
else
|
|
85
|
-
echo "βΈοΈ $inc_status: $increment"
|
|
86
|
-
echo " Tasks: $completed/$total ($percent%)"
|
|
87
|
-
echo ""
|
|
88
|
-
fi
|
|
89
|
-
done
|
|
90
|
-
|
|
91
|
-
echo "================================"
|
|
92
|
-
echo "Summary:"
|
|
93
|
-
echo " Active increments: $active_count"
|
|
94
|
-
echo " Other non-completed: $other_count"
|
|
95
|
-
|
|
96
|
-
if [ "$active_count" -eq 0 ]; then
|
|
97
|
-
echo ""
|
|
98
|
-
echo "π‘ No active work. Run /specweave:increment to start new work"
|
|
99
|
-
elif [ "$active_count" -gt 0 ]; then
|
|
100
|
-
echo ""
|
|
101
|
-
echo "π‘ Continue with /specweave:do"
|
|
102
|
-
fi
|
|
103
|
-
|
|
104
|
-
echo ""
|
|
25
|
+
# Call TypeScript progress script
|
|
26
|
+
npx tsx "$(dirname "${BASH_SOURCE[0]}")"/../../../scripts/show-progress.ts "$@"
|
|
105
27
|
```
|
|
106
28
|
|
|
107
29
|
## Example Output
|
|
108
30
|
|
|
31
|
+
### Legacy Format (no User Stories)
|
|
109
32
|
```
|
|
110
33
|
π Increment Progress
|
|
111
|
-
|
|
34
|
+
============================================================
|
|
112
35
|
|
|
113
36
|
π’ ACTIVE: 0037-project-specific-tasks
|
|
114
|
-
|
|
115
|
-
Tasks: 72/85 completed (84%)
|
|
116
|
-
Next: /specweave:do 0037-project-specific-tasks
|
|
37
|
+
ββββββββββββββββββββββββββββββ 84% (72/85 tasks)
|
|
117
38
|
|
|
118
|
-
|
|
119
|
-
Tasks: 0/45 (0%)
|
|
39
|
+
Next: /specweave:do 0037-project-specific-tasks
|
|
120
40
|
|
|
121
|
-
|
|
41
|
+
============================================================
|
|
122
42
|
Summary:
|
|
123
43
|
Active increments: 1
|
|
124
|
-
Other non-completed:
|
|
44
|
+
Other non-completed: 0
|
|
125
45
|
|
|
126
46
|
π‘ Continue with /specweave:do
|
|
127
47
|
```
|
|
128
48
|
|
|
49
|
+
### Enhanced Format (with User Story grouping)
|
|
50
|
+
```
|
|
51
|
+
π Increment Progress
|
|
52
|
+
============================================================
|
|
53
|
+
|
|
54
|
+
βΈοΈ ACTIVE: 0047-us-task-linkage
|
|
55
|
+
ββββββββββββββββββββββββββββββ 59% (13/22 tasks)
|
|
56
|
+
|
|
57
|
+
Progress by User Story:
|
|
58
|
+
β
US-001: ββββββββββββββββββββ 100% (4/4)
|
|
59
|
+
β
US-002: ββββββββββββββββββββ 100% (3/3)
|
|
60
|
+
ββ US-003: ββββββββββββββββββββ 60% (3/5)
|
|
61
|
+
β
US-004: ββββββββββββββββββββ 100% (3/3)
|
|
62
|
+
ββ US-005: ββββββββββββββββββββ 0% (0/4)
|
|
63
|
+
ββ US-006: ββββββββββββββββββββ 0% (0/3)
|
|
64
|
+
|
|
65
|
+
Resume: /specweave:resume 0047-us-task-linkage
|
|
66
|
+
|
|
67
|
+
============================================================
|
|
68
|
+
Summary:
|
|
69
|
+
Active increments: 0
|
|
70
|
+
Other non-completed: 1
|
|
71
|
+
|
|
72
|
+
π‘ No active work. Run /specweave:increment to start new work
|
|
73
|
+
```
|
|
74
|
+
|
|
129
75
|
## What It Shows
|
|
130
76
|
|
|
131
|
-
- **
|
|
132
|
-
- **
|
|
133
|
-
- **
|
|
134
|
-
- **
|
|
77
|
+
- **Overall progress**: Visual bar + percentage + task count
|
|
78
|
+
- **Per-User Story progress** (if US linkage exists): Completion status for each US
|
|
79
|
+
- **Progress bars**: Color-coded (green β₯80%, yellow 50-79%, red <50%)
|
|
80
|
+
- **Completion indicators**: β
for 100% complete USs
|
|
81
|
+
- **Orphan tasks warning**: If tasks exist without User Story linkage
|
|
82
|
+
- **Next action**: Command to continue work
|
|
135
83
|
|
|
136
|
-
**Note**: Skips completed and archived increments.
|
|
84
|
+
**Note**: Skips completed and archived increments. Automatically detects and displays US-level progress for increments using US-task linkage (v0.23.0+).
|