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.
Files changed (188) hide show
  1. package/.claude-plugin/README.md +2 -2
  2. package/CLAUDE.md +269 -51
  3. package/README.md +33 -10
  4. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +1 -1
  5. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +1 -1
  6. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
  7. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +1 -1
  8. package/dist/plugins/specweave-github/lib/github-spec-content-sync.d.ts.map +1 -1
  9. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js +4 -1
  10. package/dist/plugins/specweave-github/lib/github-spec-content-sync.js.map +1 -1
  11. package/dist/plugins/specweave-github/lib/github-spec-sync.d.ts +1 -1
  12. package/dist/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  13. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts +9 -0
  14. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.d.ts.map +1 -1
  15. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js +10 -1
  16. package/dist/plugins/specweave-github/lib/github-sync-bidirectional.js.map +1 -1
  17. package/dist/plugins/specweave-github/lib/progress-comment-builder.js +2 -2
  18. package/dist/plugins/specweave-github/lib/progress-comment-builder.js.map +1 -1
  19. package/dist/plugins/specweave-github/lib/types.d.ts +1 -1
  20. package/dist/src/cli/commands/init.d.ts.map +1 -1
  21. package/dist/src/cli/commands/init.js +313 -1
  22. package/dist/src/cli/commands/init.js.map +1 -1
  23. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  24. package/dist/src/cli/helpers/issue-tracker/index.js +41 -24
  25. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  26. package/dist/src/config/import-config.d.ts +69 -0
  27. package/dist/src/config/import-config.d.ts.map +1 -0
  28. package/dist/src/config/import-config.js +136 -0
  29. package/dist/src/config/import-config.js.map +1 -0
  30. package/dist/src/config/types.d.ts +10 -10
  31. package/dist/src/core/living-docs/living-docs-sync.d.ts +2 -0
  32. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  33. package/dist/src/core/living-docs/living-docs-sync.js +10 -1
  34. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  35. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +2 -2
  36. package/dist/src/core/living-docs/task-project-specific-generator.js +2 -2
  37. package/dist/src/core/repo-structure/prompt-consolidator.d.ts +2 -2
  38. package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
  39. package/dist/src/core/repo-structure/prompt-consolidator.js +3 -15
  40. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  41. package/dist/src/core/repo-structure/repo-structure-manager.d.ts +1 -1
  42. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  43. package/dist/src/core/repo-structure/repo-structure-manager.js +3 -6
  44. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  45. package/dist/src/core/spec-content-sync.d.ts +4 -1
  46. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  47. package/dist/src/core/spec-content-sync.js +139 -4
  48. package/dist/src/core/spec-content-sync.js.map +1 -1
  49. package/dist/src/core/spec-task-mapper.d.ts.map +1 -1
  50. package/dist/src/core/spec-task-mapper.js +9 -8
  51. package/dist/src/core/spec-task-mapper.js.map +1 -1
  52. package/dist/src/core/status-line-validator.d.ts +63 -0
  53. package/dist/src/core/status-line-validator.d.ts.map +1 -0
  54. package/dist/src/core/status-line-validator.js +253 -0
  55. package/dist/src/core/status-line-validator.js.map +1 -0
  56. package/dist/src/core/sync/bidirectional-engine.d.ts +10 -1
  57. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  58. package/dist/src/core/sync/bidirectional-engine.js +10 -1
  59. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  60. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  61. package/dist/src/core/sync/profile-manager.js +3 -0
  62. package/dist/src/core/sync/profile-manager.js.map +1 -1
  63. package/dist/src/core/sync/project-context.d.ts.map +1 -1
  64. package/dist/src/core/sync/project-context.js +3 -0
  65. package/dist/src/core/sync/project-context.js.map +1 -1
  66. package/dist/src/core/sync/status-sync-engine.d.ts +1 -1
  67. package/dist/src/core/sync/status-sync-engine.js +1 -1
  68. package/dist/src/core/types/origin-metadata.d.ts +153 -0
  69. package/dist/src/core/types/origin-metadata.d.ts.map +1 -0
  70. package/dist/src/core/types/origin-metadata.js +166 -0
  71. package/dist/src/core/types/origin-metadata.js.map +1 -0
  72. package/dist/src/core/types/sync-profile.d.ts +8 -2
  73. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  74. package/dist/src/core/types/sync-profile.js.map +1 -1
  75. package/dist/src/core/types/sync-settings.d.ts +73 -0
  76. package/dist/src/core/types/sync-settings.d.ts.map +1 -0
  77. package/dist/src/core/types/sync-settings.js +90 -0
  78. package/dist/src/core/types/sync-settings.js.map +1 -0
  79. package/dist/src/core/utils/permission-checker.d.ts +100 -0
  80. package/dist/src/core/utils/permission-checker.d.ts.map +1 -0
  81. package/dist/src/core/utils/permission-checker.js +166 -0
  82. package/dist/src/core/utils/permission-checker.js.map +1 -0
  83. package/dist/src/generators/spec/spec-parser.js +3 -3
  84. package/dist/src/generators/spec/spec-parser.js.map +1 -1
  85. package/dist/src/generators/spec/task-parser.js +4 -4
  86. package/dist/src/generators/spec/task-parser.js.map +1 -1
  87. package/dist/src/id-generators/task-id-generator.d.ts +96 -0
  88. package/dist/src/id-generators/task-id-generator.d.ts.map +1 -0
  89. package/dist/src/id-generators/task-id-generator.js +143 -0
  90. package/dist/src/id-generators/task-id-generator.js.map +1 -0
  91. package/dist/src/id-generators/us-id-generator.d.ts +96 -0
  92. package/dist/src/id-generators/us-id-generator.d.ts.map +1 -0
  93. package/dist/src/id-generators/us-id-generator.js +143 -0
  94. package/dist/src/id-generators/us-id-generator.js.map +1 -0
  95. package/dist/src/importers/ado-importer.d.ts +43 -0
  96. package/dist/src/importers/ado-importer.d.ts.map +1 -0
  97. package/dist/src/importers/ado-importer.js +234 -0
  98. package/dist/src/importers/ado-importer.js.map +1 -0
  99. package/dist/src/importers/external-importer.d.ts +96 -0
  100. package/dist/src/importers/external-importer.d.ts.map +1 -0
  101. package/dist/src/importers/external-importer.js +13 -0
  102. package/dist/src/importers/external-importer.js.map +1 -0
  103. package/dist/src/importers/github-importer.d.ts +37 -0
  104. package/dist/src/importers/github-importer.d.ts.map +1 -0
  105. package/dist/src/importers/github-importer.js +161 -0
  106. package/dist/src/importers/github-importer.js.map +1 -0
  107. package/dist/src/importers/import-coordinator.d.ts +90 -0
  108. package/dist/src/importers/import-coordinator.d.ts.map +1 -0
  109. package/dist/src/importers/import-coordinator.js +182 -0
  110. package/dist/src/importers/import-coordinator.js.map +1 -0
  111. package/dist/src/importers/item-converter.d.ts +91 -0
  112. package/dist/src/importers/item-converter.d.ts.map +1 -0
  113. package/dist/src/importers/item-converter.js +221 -0
  114. package/dist/src/importers/item-converter.js.map +1 -0
  115. package/dist/src/importers/jira-importer.d.ts +42 -0
  116. package/dist/src/importers/jira-importer.d.ts.map +1 -0
  117. package/dist/src/importers/jira-importer.js +221 -0
  118. package/dist/src/importers/jira-importer.js.map +1 -0
  119. package/dist/src/init/repo/types.d.ts +2 -2
  120. package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
  121. package/dist/src/integrations/jira/jira-mapper.js +1 -1
  122. package/dist/src/living-docs/fs-id-allocator.d.ts +149 -0
  123. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -0
  124. package/dist/src/living-docs/fs-id-allocator.js +325 -0
  125. package/dist/src/living-docs/fs-id-allocator.js.map +1 -0
  126. package/dist/src/living-docs/id-registry.d.ts +124 -0
  127. package/dist/src/living-docs/id-registry.d.ts.map +1 -0
  128. package/dist/src/living-docs/id-registry.js +230 -0
  129. package/dist/src/living-docs/id-registry.js.map +1 -0
  130. package/dist/src/progress/us-progress-tracker.d.ts +68 -0
  131. package/dist/src/progress/us-progress-tracker.d.ts.map +1 -0
  132. package/dist/src/progress/us-progress-tracker.js +120 -0
  133. package/dist/src/progress/us-progress-tracker.js.map +1 -0
  134. package/package.json +1 -1
  135. package/plugins/specweave/.claude-plugin/plugin.json +16 -2
  136. package/plugins/specweave/agents/architect/AGENT.md +11 -2
  137. package/plugins/specweave/agents/test-aware-planner/AGENT.md +81 -25
  138. package/plugins/specweave/commands/specweave-import-docs.md +278 -88
  139. package/plugins/specweave/commands/specweave-progress.md +45 -97
  140. package/plugins/specweave/hooks/post-increment-completion.sh +168 -26
  141. package/plugins/specweave/hooks/post-increment-planning.sh +148 -4
  142. package/plugins/specweave/hooks/post-task-completion.sh +64 -4
  143. package/plugins/specweave/lib/hooks/sync-cache.js +294 -0
  144. package/plugins/specweave/lib/hooks/sync-living-docs.js +32 -1
  145. package/plugins/specweave/lib/hooks/sync-us-tasks.js +23 -13
  146. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  147. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  148. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
  149. package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
  150. package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
  151. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
  152. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  153. package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
  154. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  155. package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
  156. package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
  157. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  158. package/plugins/specweave-github/hooks/post-task-completion.sh +37 -22
  159. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  160. package/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
  161. package/plugins/specweave-github/lib/enhanced-github-sync.ts +1 -1
  162. package/plugins/specweave-github/lib/github-spec-content-sync.js +2 -1
  163. package/plugins/specweave-github/lib/github-spec-content-sync.ts +4 -1
  164. package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  165. package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
  166. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  167. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +10 -1
  168. package/plugins/specweave-github/lib/progress-comment-builder.js +1 -1
  169. package/plugins/specweave-github/lib/progress-comment-builder.ts +2 -2
  170. package/plugins/specweave-github/lib/types.ts +1 -1
  171. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  172. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  173. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  174. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  175. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
  176. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  177. package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
  178. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  179. package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
  180. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  181. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +252 -0
  182. package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
  183. package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
  184. package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
  185. package/src/templates/.env.example +5 -0
  186. package/src/templates/config-permissions-guide.md +413 -0
  187. package/src/templates/config.json.template +68 -0
  188. package/src/templates/tasks.md.template +180 -201
@@ -1,136 +1,326 @@
1
1
  ---
2
2
  name: specweave:import-docs
3
- description: Import brownfield documentation from Notion exports, Confluence, GitHub Wiki, or any markdown folder. Automatically classifies files as specs, modules, team docs, or legacy.
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 Brownfield Documentation
6
+ # Import Documentation (AI-Powered)
7
7
 
8
- Import existing documentation from Notion exports, Confluence, GitHub Wiki, or any markdown folder.
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. **Analyzes markdown files** in source directory (recursively)
13
- 2. **Classifies files** based on content:
14
- - **Specs** - Contains "user story", "acceptance criteria", "feature"
15
- - **Modules** - Contains "module", "component", "architecture"
16
- - **Team** - Contains "onboarding", "convention", "workflow"
17
- - **Legacy** - Everything else (no strong match)
18
- 3. **Copies files** to appropriate destinations
19
- 4. **Creates migration report** with classification details
20
- 5. **Updates config** with import history
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 <source-path> [options]
68
+ /specweave:import-docs /path/to/docs
26
69
  ```
27
70
 
28
- ### Options
71
+ That's it! No flags, no config, no source type. Just point and import.
72
+
73
+ ### Options (All Optional)
29
74
 
30
- - `--source=<type>` - Source type: `notion`, `confluence`, `wiki`, `custom` (required)
31
- - `--project=<id>` - Target project ID (default: active project)
32
- - `--preserve-structure` - Preserve original folder structure
33
- - `--dry-run` - Preview classification without importing
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: Notion Export
82
+ ### Example 1: Simplest Import (Zero Config)
38
83
 
39
84
  ```bash
40
- # Export Notion workspace to /tmp/notion-export/
41
- # Then import:
42
-
43
- /specweave:import-docs /tmp/notion-export/ --source=notion
44
-
45
- # Result:
46
- # πŸ“Š Analysis Results:
47
- # Total files: 47
48
- # - Specs: 12 files β†’ specs/
49
- # - Modules: 18 files β†’ modules/
50
- # - Team docs: 5 files β†’ team/
51
- # - Legacy: 12 files β†’ legacy/notion/
52
- # βœ… Import complete!
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: Confluence Export
126
+ ### Example 2: Dry Run (Preview)
56
127
 
57
128
  ```bash
58
- /specweave:import-docs /path/to/confluence/ --source=confluence --project=web-app
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
- # Imports to: projects/web-app/specs/, modules/, team/, legacy/confluence/
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 3: Dry Run (Preview)
157
+ ### Example 4: Evernote Export (Auto-Converts)
64
158
 
65
159
  ```bash
66
- /specweave:import-docs /tmp/docs/ --source=custom --dry-run
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
- # Shows classification without importing files
69
- # Use this to preview results before actual import
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 4: Preserve Structure
207
+ ### Example 6: Lower Confidence Threshold
73
208
 
74
209
  ```bash
75
- /specweave:import-docs /path/to/wiki/ --source=wiki --preserve-structure
210
+ # Accept files with 75%+ confidence (vs default 90%)
211
+ # More aggressive auto-classification
76
212
 
77
- # Preserves original folder structure:
78
- # legacy/wiki/engineering/backend/auth.md
79
- # legacy/wiki/engineering/frontend/components.md
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
- - **Export Format**: Markdown & CSV
86
- - **Steps**:
87
- 1. In Notion: Settings β†’ Export β†’ Export all workspace content
88
- 2. Choose "Markdown & CSV" format
89
- 3. Download ZIP file
90
- 4. Extract to folder (e.g., `/tmp/notion-export/`)
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
- - **Export Format**: HTML or Markdown
95
- - **Steps**:
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 exported files
99
- 4. Run import command
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
- - **Export Format**: Git repository
103
- - **Steps**:
104
- 1. Clone wiki: `git clone https://github.com/user/repo.wiki.git`
105
- 2. Run import command on cloned directory
106
-
107
- ### Custom (Any Markdown)
108
- - Any folder containing `.md` or `.markdown` files
109
- - Recursive search through subdirectories
110
-
111
- ## Classification Algorithm
112
-
113
- Files are classified using keyword analysis:
114
-
115
- ### Specs (70%+ confidence)
116
- - Keywords: "user story", "acceptance criteria", "feature", "requirement"
117
- - Patterns: "As a [user], I want [goal]", "Given-When-Then"
118
- - Example: Feature specs, PRDs, user stories
119
-
120
- ### Modules (70%+ confidence)
121
- - Keywords: "module", "component", "service", "architecture"
122
- - Patterns: API docs, technical design, integration points
123
- - Example: Auth module, payment processing, ML pipeline
124
-
125
- ### Team (70%+ confidence)
126
- - Keywords: "onboarding", "convention", "workflow", "pr process"
127
- - Patterns: Team processes, coding standards, deployment guides
128
- - Example: Onboarding guide, code review checklist
129
-
130
- ### Legacy (<70% confidence)
131
- - No strong match to above categories
132
- - Uncertain classification
133
- - Requires manual review
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
- echo ""
22
- echo "πŸ“Š Increment Progress"
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
- Status: in-progress
115
- Tasks: 72/85 completed (84%)
116
- Next: /specweave:do 0037-project-specific-tasks
37
+ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘ 84% (72/85 tasks)
117
38
 
118
- ⏸️ planning: 0039-ultra-smart-next-command
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: 1
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
- - **Active increments** (in-progress): Shown first with green indicator
132
- - **Other non-completed**: planning, paused, blocked, etc.
133
- - **Task completion**: X/Y completed (Z%)
134
- - **Next action**: Which command to run
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+).