specweave 0.22.13 → 0.23.0

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 (312) hide show
  1. package/.claude-plugin/README.md +2 -2
  2. package/CLAUDE.md +447 -52
  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/import-external.d.ts +22 -0
  21. package/dist/src/cli/commands/import-external.d.ts.map +1 -0
  22. package/dist/src/cli/commands/import-external.js +282 -0
  23. package/dist/src/cli/commands/import-external.js.map +1 -0
  24. package/dist/src/cli/commands/init.d.ts.map +1 -1
  25. package/dist/src/cli/commands/init.js +359 -1
  26. package/dist/src/cli/commands/init.js.map +1 -1
  27. package/dist/src/cli/helpers/github-repo-selector.d.ts +59 -0
  28. package/dist/src/cli/helpers/github-repo-selector.d.ts.map +1 -0
  29. package/dist/src/cli/helpers/github-repo-selector.js +265 -0
  30. package/dist/src/cli/helpers/github-repo-selector.js.map +1 -0
  31. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  32. package/dist/src/cli/helpers/issue-tracker/index.js +41 -24
  33. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  34. package/dist/src/config/import-config.d.ts +69 -0
  35. package/dist/src/config/import-config.d.ts.map +1 -0
  36. package/dist/src/config/import-config.js +136 -0
  37. package/dist/src/config/import-config.js.map +1 -0
  38. package/dist/src/config/types.d.ts +26 -26
  39. package/dist/src/core/increment/ac-status-manager.d.ts.map +1 -1
  40. package/dist/src/core/increment/ac-status-manager.js +4 -2
  41. package/dist/src/core/increment/ac-status-manager.js.map +1 -1
  42. package/dist/src/core/increment/completion-validator.d.ts +30 -1
  43. package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
  44. package/dist/src/core/increment/completion-validator.js +151 -3
  45. package/dist/src/core/increment/completion-validator.js.map +1 -1
  46. package/dist/src/core/increment/increment-archiver.d.ts +25 -0
  47. package/dist/src/core/increment/increment-archiver.d.ts.map +1 -1
  48. package/dist/src/core/increment/increment-archiver.js +130 -3
  49. package/dist/src/core/increment/increment-archiver.js.map +1 -1
  50. package/dist/src/core/living-docs/feature-archiver.d.ts +37 -0
  51. package/dist/src/core/living-docs/feature-archiver.d.ts.map +1 -1
  52. package/dist/src/core/living-docs/feature-archiver.js +262 -18
  53. package/dist/src/core/living-docs/feature-archiver.js.map +1 -1
  54. package/dist/src/core/living-docs/feature-id-manager.d.ts +17 -0
  55. package/dist/src/core/living-docs/feature-id-manager.d.ts.map +1 -1
  56. package/dist/src/core/living-docs/feature-id-manager.js +25 -0
  57. package/dist/src/core/living-docs/feature-id-manager.js.map +1 -1
  58. package/dist/src/core/living-docs/living-docs-sync.d.ts +16 -0
  59. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  60. package/dist/src/core/living-docs/living-docs-sync.js +56 -1
  61. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  62. package/dist/src/core/living-docs/task-project-specific-generator.d.ts +2 -2
  63. package/dist/src/core/living-docs/task-project-specific-generator.js +2 -2
  64. package/dist/src/core/repo-structure/prompt-consolidator.d.ts +2 -2
  65. package/dist/src/core/repo-structure/prompt-consolidator.d.ts.map +1 -1
  66. package/dist/src/core/repo-structure/prompt-consolidator.js +3 -15
  67. package/dist/src/core/repo-structure/prompt-consolidator.js.map +1 -1
  68. package/dist/src/core/repo-structure/repo-structure-manager.d.ts +1 -1
  69. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  70. package/dist/src/core/repo-structure/repo-structure-manager.js +3 -6
  71. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  72. package/dist/src/core/spec-content-sync.d.ts +4 -1
  73. package/dist/src/core/spec-content-sync.d.ts.map +1 -1
  74. package/dist/src/core/spec-content-sync.js +139 -4
  75. package/dist/src/core/spec-content-sync.js.map +1 -1
  76. package/dist/src/core/spec-task-mapper.d.ts.map +1 -1
  77. package/dist/src/core/spec-task-mapper.js +9 -8
  78. package/dist/src/core/spec-task-mapper.js.map +1 -1
  79. package/dist/src/core/status-line-validator.d.ts +63 -0
  80. package/dist/src/core/status-line-validator.d.ts.map +1 -0
  81. package/dist/src/core/status-line-validator.js +253 -0
  82. package/dist/src/core/status-line-validator.js.map +1 -0
  83. package/dist/src/core/sync/bidirectional-engine.d.ts +10 -1
  84. package/dist/src/core/sync/bidirectional-engine.d.ts.map +1 -1
  85. package/dist/src/core/sync/bidirectional-engine.js +10 -1
  86. package/dist/src/core/sync/bidirectional-engine.js.map +1 -1
  87. package/dist/src/core/sync/profile-manager.d.ts.map +1 -1
  88. package/dist/src/core/sync/profile-manager.js +3 -0
  89. package/dist/src/core/sync/profile-manager.js.map +1 -1
  90. package/dist/src/core/sync/project-context.d.ts.map +1 -1
  91. package/dist/src/core/sync/project-context.js +3 -0
  92. package/dist/src/core/sync/project-context.js.map +1 -1
  93. package/dist/src/core/sync/status-sync-engine.d.ts +1 -1
  94. package/dist/src/core/sync/status-sync-engine.js +1 -1
  95. package/dist/src/core/sync/sync-event-logger.d.ts +15 -1
  96. package/dist/src/core/sync/sync-event-logger.d.ts.map +1 -1
  97. package/dist/src/core/sync/sync-event-logger.js +39 -1
  98. package/dist/src/core/sync/sync-event-logger.js.map +1 -1
  99. package/dist/src/core/types/origin-metadata.d.ts +153 -0
  100. package/dist/src/core/types/origin-metadata.d.ts.map +1 -0
  101. package/dist/src/core/types/origin-metadata.js +166 -0
  102. package/dist/src/core/types/origin-metadata.js.map +1 -0
  103. package/dist/src/core/types/sync-config-validator.d.ts +57 -0
  104. package/dist/src/core/types/sync-config-validator.d.ts.map +1 -0
  105. package/dist/src/core/types/sync-config-validator.js +116 -0
  106. package/dist/src/core/types/sync-config-validator.js.map +1 -0
  107. package/dist/src/core/types/sync-profile.d.ts +8 -2
  108. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  109. package/dist/src/core/types/sync-profile.js.map +1 -1
  110. package/dist/src/core/types/sync-settings.d.ts +73 -0
  111. package/dist/src/core/types/sync-settings.d.ts.map +1 -0
  112. package/dist/src/core/types/sync-settings.js +90 -0
  113. package/dist/src/core/types/sync-settings.js.map +1 -0
  114. package/dist/src/core/utils/permission-checker.d.ts +100 -0
  115. package/dist/src/core/utils/permission-checker.d.ts.map +1 -0
  116. package/dist/src/core/utils/permission-checker.js +166 -0
  117. package/dist/src/core/utils/permission-checker.js.map +1 -0
  118. package/dist/src/generators/spec/spec-parser.js +3 -3
  119. package/dist/src/generators/spec/spec-parser.js.map +1 -1
  120. package/dist/src/generators/spec/task-parser.js +4 -4
  121. package/dist/src/generators/spec/task-parser.js.map +1 -1
  122. package/dist/src/id-generators/task-id-generator.d.ts +96 -0
  123. package/dist/src/id-generators/task-id-generator.d.ts.map +1 -0
  124. package/dist/src/id-generators/task-id-generator.js +143 -0
  125. package/dist/src/id-generators/task-id-generator.js.map +1 -0
  126. package/dist/src/id-generators/us-id-generator.d.ts +96 -0
  127. package/dist/src/id-generators/us-id-generator.d.ts.map +1 -0
  128. package/dist/src/id-generators/us-id-generator.js +143 -0
  129. package/dist/src/id-generators/us-id-generator.js.map +1 -0
  130. package/dist/src/importers/ado-importer.d.ts +43 -0
  131. package/dist/src/importers/ado-importer.d.ts.map +1 -0
  132. package/dist/src/importers/ado-importer.js +234 -0
  133. package/dist/src/importers/ado-importer.js.map +1 -0
  134. package/dist/src/importers/duplicate-detector.d.ts +107 -0
  135. package/dist/src/importers/duplicate-detector.d.ts.map +1 -0
  136. package/dist/src/importers/duplicate-detector.js +189 -0
  137. package/dist/src/importers/duplicate-detector.js.map +1 -0
  138. package/dist/src/importers/external-importer.d.ts +96 -0
  139. package/dist/src/importers/external-importer.d.ts.map +1 -0
  140. package/dist/src/importers/external-importer.js +13 -0
  141. package/dist/src/importers/external-importer.js.map +1 -0
  142. package/dist/src/importers/github-importer.d.ts +37 -0
  143. package/dist/src/importers/github-importer.d.ts.map +1 -0
  144. package/dist/src/importers/github-importer.js +161 -0
  145. package/dist/src/importers/github-importer.js.map +1 -0
  146. package/dist/src/importers/import-coordinator.d.ts +105 -0
  147. package/dist/src/importers/import-coordinator.d.ts.map +1 -0
  148. package/dist/src/importers/import-coordinator.js +224 -0
  149. package/dist/src/importers/import-coordinator.js.map +1 -0
  150. package/dist/src/importers/item-converter.d.ts +96 -0
  151. package/dist/src/importers/item-converter.d.ts.map +1 -0
  152. package/dist/src/importers/item-converter.js +246 -0
  153. package/dist/src/importers/item-converter.js.map +1 -0
  154. package/dist/src/importers/jira-importer.d.ts +42 -0
  155. package/dist/src/importers/jira-importer.d.ts.map +1 -0
  156. package/dist/src/importers/jira-importer.js +221 -0
  157. package/dist/src/importers/jira-importer.js.map +1 -0
  158. package/dist/src/importers/rate-limiter.d.ts +128 -0
  159. package/dist/src/importers/rate-limiter.d.ts.map +1 -0
  160. package/dist/src/importers/rate-limiter.js +200 -0
  161. package/dist/src/importers/rate-limiter.js.map +1 -0
  162. package/dist/src/init/compliance/types.d.ts +2 -2
  163. package/dist/src/init/repo/types.d.ts +2 -2
  164. package/dist/src/integrations/ado/ado-client.d.ts +6 -0
  165. package/dist/src/integrations/ado/ado-client.d.ts.map +1 -1
  166. package/dist/src/integrations/ado/ado-client.js +23 -0
  167. package/dist/src/integrations/ado/ado-client.js.map +1 -1
  168. package/dist/src/integrations/jira/jira-client.d.ts +6 -0
  169. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  170. package/dist/src/integrations/jira/jira-client.js +38 -0
  171. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  172. package/dist/src/integrations/jira/jira-mapper.d.ts +1 -1
  173. package/dist/src/integrations/jira/jira-mapper.js +1 -1
  174. package/dist/src/living-docs/fs-id-allocator.d.ts +149 -0
  175. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -0
  176. package/dist/src/living-docs/fs-id-allocator.js +325 -0
  177. package/dist/src/living-docs/fs-id-allocator.js.map +1 -0
  178. package/dist/src/living-docs/id-registry.d.ts +124 -0
  179. package/dist/src/living-docs/id-registry.d.ts.map +1 -0
  180. package/dist/src/living-docs/id-registry.js +230 -0
  181. package/dist/src/living-docs/id-registry.js.map +1 -0
  182. package/dist/src/progress/us-progress-tracker.d.ts +68 -0
  183. package/dist/src/progress/us-progress-tracker.d.ts.map +1 -0
  184. package/dist/src/progress/us-progress-tracker.js +120 -0
  185. package/dist/src/progress/us-progress-tracker.js.map +1 -0
  186. package/dist/src/sync/external-item-sync-service.d.ts +150 -0
  187. package/dist/src/sync/external-item-sync-service.d.ts.map +1 -0
  188. package/dist/src/sync/external-item-sync-service.js +241 -0
  189. package/dist/src/sync/external-item-sync-service.js.map +1 -0
  190. package/dist/src/sync/format-preservation-sync.d.ts +90 -0
  191. package/dist/src/sync/format-preservation-sync.d.ts.map +1 -0
  192. package/dist/src/sync/format-preservation-sync.js +173 -0
  193. package/dist/src/sync/format-preservation-sync.js.map +1 -0
  194. package/dist/src/sync/index.d.ts +8 -0
  195. package/dist/src/sync/index.d.ts.map +1 -0
  196. package/dist/src/sync/index.js +6 -0
  197. package/dist/src/sync/index.js.map +1 -0
  198. package/dist/src/sync/sync-coordinator.d.ts +49 -0
  199. package/dist/src/sync/sync-coordinator.d.ts.map +1 -0
  200. package/dist/src/sync/sync-coordinator.js +248 -0
  201. package/dist/src/sync/sync-coordinator.js.map +1 -0
  202. package/dist/src/sync/sync-metadata.d.ts +75 -0
  203. package/dist/src/sync/sync-metadata.d.ts.map +1 -0
  204. package/dist/src/sync/sync-metadata.js +100 -0
  205. package/dist/src/sync/sync-metadata.js.map +1 -0
  206. package/dist/src/types/living-docs-us-file.d.ts +63 -0
  207. package/dist/src/types/living-docs-us-file.d.ts.map +1 -0
  208. package/dist/src/types/living-docs-us-file.js +27 -0
  209. package/dist/src/types/living-docs-us-file.js.map +1 -0
  210. package/dist/src/validators/format-preservation-validator.d.ts +127 -0
  211. package/dist/src/validators/format-preservation-validator.d.ts.map +1 -0
  212. package/dist/src/validators/format-preservation-validator.js +187 -0
  213. package/dist/src/validators/format-preservation-validator.js.map +1 -0
  214. package/package.json +3 -2
  215. package/plugins/specweave/.claude-plugin/plugin.json +36 -2
  216. package/plugins/specweave/agents/architect/AGENT.md +11 -2
  217. package/plugins/specweave/agents/test-aware-planner/AGENT.md +81 -25
  218. package/plugins/specweave/commands/specweave-archive-features.md +11 -1
  219. package/plugins/specweave/commands/specweave-import-external.md +407 -0
  220. package/plugins/specweave/commands/specweave-progress.md +45 -97
  221. package/plugins/specweave/hooks/post-edit-spec.sh +41 -0
  222. package/plugins/specweave/hooks/post-increment-completion.sh +168 -26
  223. package/plugins/specweave/hooks/post-increment-planning.sh +148 -4
  224. package/plugins/specweave/hooks/post-spec-update.sh +0 -0
  225. package/plugins/specweave/hooks/post-task-completion.sh +75 -5
  226. package/plugins/specweave/hooks/post-write-spec.sh +37 -0
  227. package/plugins/specweave/lib/hooks/auto-transition.js +1 -1
  228. package/plugins/specweave/lib/hooks/auto-transition.ts +1 -1
  229. package/plugins/specweave/lib/hooks/invoke-translator-skill.js +1 -1
  230. package/plugins/specweave/lib/hooks/invoke-translator-skill.ts +1 -1
  231. package/plugins/specweave/lib/hooks/sync-cache.js +294 -0
  232. package/plugins/specweave/lib/hooks/sync-living-docs.js +67 -2
  233. package/plugins/specweave/lib/hooks/sync-us-tasks.js +200 -14
  234. package/plugins/specweave/lib/hooks/translate-file.js +1 -1
  235. package/plugins/specweave/lib/hooks/translate-file.ts +1 -1
  236. package/plugins/specweave/lib/hooks/update-ac-status.js +1 -1
  237. package/plugins/specweave/lib/hooks/update-ac-status.ts +1 -1
  238. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.d.ts +115 -0
  239. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js +345 -0
  240. package/plugins/specweave/lib/vendor/core/increment/ac-status-manager.js.map +1 -0
  241. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.d.ts +106 -0
  242. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +220 -0
  243. package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -0
  244. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.d.ts +60 -0
  245. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js +192 -0
  246. package/plugins/specweave/lib/vendor/core/increment/auto-transition-manager.js.map +1 -0
  247. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.d.ts +52 -0
  248. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js +276 -0
  249. package/plugins/specweave/lib/vendor/core/increment/duplicate-detector.js.map +1 -0
  250. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.d.ts +163 -0
  251. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js +541 -0
  252. package/plugins/specweave/lib/vendor/core/increment/metadata-manager.js.map +1 -0
  253. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +157 -0
  254. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js +191 -0
  255. package/plugins/specweave/lib/vendor/core/types/increment-metadata.js.map +1 -0
  256. package/plugins/specweave/lib/vendor/generators/spec/task-parser.d.ts +95 -0
  257. package/plugins/specweave/lib/vendor/generators/spec/task-parser.js +301 -0
  258. package/plugins/specweave/lib/vendor/generators/spec/task-parser.js.map +1 -0
  259. package/plugins/specweave/lib/vendor/utils/logger.d.ts +48 -0
  260. package/plugins/specweave/lib/vendor/utils/logger.js +53 -0
  261. package/plugins/specweave/lib/vendor/utils/logger.js.map +1 -0
  262. package/plugins/specweave/lib/vendor/utils/translation.d.ts +187 -0
  263. package/plugins/specweave/lib/vendor/utils/translation.js +414 -0
  264. package/plugins/specweave/lib/vendor/utils/translation.js.map +1 -0
  265. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  266. package/plugins/specweave-ado/lib/ado-multi-project-sync.js +0 -1
  267. package/plugins/specweave-ado/lib/conflict-resolver.ts +1 -1
  268. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +1 -1
  269. package/plugins/specweave-backend/.claude-plugin/plugin.json +1 -1
  270. package/plugins/specweave-confluent/.claude-plugin/plugin.json +1 -1
  271. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +1 -1
  272. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  273. package/plugins/specweave-docs/.claude-plugin/plugin.json +1 -1
  274. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  275. package/plugins/specweave-figma/.claude-plugin/plugin.json +1 -1
  276. package/plugins/specweave-frontend/.claude-plugin/plugin.json +1 -1
  277. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  278. package/plugins/specweave-github/commands/specweave-github-update-user-story.md +1 -1
  279. package/plugins/specweave-github/hooks/post-task-completion.sh +37 -22
  280. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +1 -1
  281. package/plugins/specweave-github/lib/enhanced-github-sync.js +1 -1
  282. package/plugins/specweave-github/lib/enhanced-github-sync.ts +1 -1
  283. package/plugins/specweave-github/lib/github-spec-content-sync.js +2 -1
  284. package/plugins/specweave-github/lib/github-spec-content-sync.ts +4 -1
  285. package/plugins/specweave-github/lib/github-spec-sync.js +1 -1
  286. package/plugins/specweave-github/lib/github-spec-sync.ts +1 -1
  287. package/plugins/specweave-github/lib/github-sync-bidirectional.js +1 -1
  288. package/plugins/specweave-github/lib/github-sync-bidirectional.ts +10 -1
  289. package/plugins/specweave-github/lib/progress-comment-builder.js +1 -1
  290. package/plugins/specweave-github/lib/progress-comment-builder.ts +2 -2
  291. package/plugins/specweave-github/lib/types.ts +1 -1
  292. package/plugins/specweave-github/skills/github-issue-standard/SKILL.md +1 -1
  293. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  294. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  295. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
  296. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  297. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  298. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +1 -1
  299. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  300. package/plugins/specweave-mobile/.claude-plugin/plugin.json +1 -1
  301. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  302. package/plugins/specweave-payments/.claude-plugin/plugin.json +1 -1
  303. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  304. package/plugins/specweave-testing/.claude-plugin/plugin.json +1 -1
  305. package/plugins/specweave-tooling/.claude-plugin/plugin.json +1 -1
  306. package/plugins/specweave-ui/.claude-plugin/plugin.json +1 -1
  307. package/src/templates/.env.example +5 -0
  308. package/src/templates/config-permissions-guide.md +413 -0
  309. package/src/templates/config.json.template +68 -0
  310. package/src/templates/tasks.md.template +180 -201
  311. package/plugins/specweave-ado/lib/enhanced-ado-sync.js +0 -170
  312. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +0 -5442
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Increment Metadata Types
3
+ *
4
+ * Defines the schema for increment metadata tracking (status, type, timestamps).
5
+ * Part of increment 0007: Smart Status Management
6
+ */
7
+ /**
8
+ * Increment status enum
9
+ * Tracks the lifecycle state of an increment
10
+ */
11
+ export declare enum IncrementStatus {
12
+ /** Planning phase - spec/plan/tasks being created (does NOT count towards WIP limits) */
13
+ PLANNING = "planning",
14
+ /** Currently being worked on */
15
+ ACTIVE = "active",
16
+ /** Planned but not ready to start yet (does NOT count towards WIP limits) */
17
+ BACKLOG = "backlog",
18
+ /** Temporarily stopped (blocked by external dependency, deprioritized) */
19
+ PAUSED = "paused",
20
+ /** All tasks complete, increment finished */
21
+ COMPLETED = "completed",
22
+ /** Work abandoned (requirements changed, obsolete, etc.) */
23
+ ABANDONED = "abandoned"
24
+ }
25
+ /**
26
+ * Increment type enum
27
+ * Determines rules and limits applied to the increment
28
+ */
29
+ export declare enum IncrementType {
30
+ /** Critical production fix (bypasses all limits) */
31
+ HOTFIX = "hotfix",
32
+ /** Standard feature development (limit: 2 active) */
33
+ FEATURE = "feature",
34
+ /** Production bug fix with SRE investigation (unlimited, urgent) */
35
+ BUG = "bug",
36
+ /** Change request from stakeholders (limit: 2 active) */
37
+ CHANGE_REQUEST = "change-request",
38
+ /** Code improvement (limit: 1 active) */
39
+ REFACTOR = "refactor",
40
+ /** POC/spike work (unlimited, auto-abandon after 14 days) */
41
+ EXPERIMENT = "experiment"
42
+ }
43
+ /**
44
+ * Increment metadata schema
45
+ * Stored in .specweave/increments/{id}/metadata.json
46
+ */
47
+ export interface IncrementMetadata {
48
+ /** Increment ID (e.g., "0007-smart-increment-discipline") */
49
+ id: string;
50
+ /** Current status */
51
+ status: IncrementStatus;
52
+ /** Increment type */
53
+ type: IncrementType;
54
+ /** Creation timestamp (ISO 8601) */
55
+ created: string;
56
+ /** Last activity timestamp (ISO 8601) */
57
+ lastActivity: string;
58
+ /** Testing mode for this increment (defaults to global config) */
59
+ testMode?: 'TDD' | 'test-after' | 'manual';
60
+ /** Coverage target percentage (70-95, defaults to global config) */
61
+ coverageTarget?: number;
62
+ /** Reason for moving to backlog (only if status = backlog) */
63
+ backlogReason?: string;
64
+ /** Timestamp when moved to backlog (ISO 8601) */
65
+ backlogAt?: string;
66
+ /** Reason for pausing (only if status = paused) */
67
+ pausedReason?: string;
68
+ /** Timestamp when paused (ISO 8601) */
69
+ pausedAt?: string;
70
+ /** Reason for abandoning (only if status = abandoned) */
71
+ abandonedReason?: string;
72
+ /** Timestamp when abandoned (ISO 8601) */
73
+ abandonedAt?: string;
74
+ }
75
+ /**
76
+ * Increment metadata with additional computed fields
77
+ * Used for rich status displays
78
+ */
79
+ export interface IncrementMetadataExtended extends IncrementMetadata {
80
+ /** Progress percentage (0-100) */
81
+ progress?: number;
82
+ /** Number of completed tasks */
83
+ completedTasks?: number;
84
+ /** Total number of tasks */
85
+ totalTasks?: number;
86
+ /** Age in days since creation */
87
+ ageInDays?: number;
88
+ /** Days since paused (if paused) */
89
+ daysPaused?: number;
90
+ }
91
+ /**
92
+ * Valid status transitions
93
+ * Enforces increment lifecycle rules
94
+ */
95
+ export declare const VALID_TRANSITIONS: Record<IncrementStatus, IncrementStatus[]>;
96
+ /**
97
+ * Type-based limits
98
+ * Maximum active increments per type
99
+ *
100
+ * null = unlimited (no limit enforcement)
101
+ * User can configure per-project in .specweave/config.json
102
+ */
103
+ export declare const TYPE_LIMITS: Record<IncrementType, number | null>;
104
+ /**
105
+ * Staleness thresholds (days)
106
+ * When to warn about stale increments
107
+ */
108
+ export declare const STALENESS_THRESHOLDS: {
109
+ /** Warn if paused for more than this many days */
110
+ PAUSED: number;
111
+ /** Warn if active for more than this many days */
112
+ ACTIVE: number;
113
+ /** Auto-abandon experiments after this many days */
114
+ EXPERIMENT: number;
115
+ };
116
+ /**
117
+ * Default metadata for new increments
118
+ *
119
+ * NOTE: New increments start in PLANNING status by default.
120
+ * They auto-transition to ACTIVE when tasks.md is created or first task starts.
121
+ */
122
+ export declare function createDefaultMetadata(id: string, type?: IncrementType): IncrementMetadata;
123
+ /**
124
+ * Check if status transition is valid
125
+ */
126
+ export declare function isValidTransition(from: IncrementStatus, to: IncrementStatus): boolean;
127
+ /**
128
+ * Check if increment is stale (paused too long or active too long)
129
+ */
130
+ export declare function isStale(metadata: IncrementMetadata): boolean;
131
+ /**
132
+ * Check if increment should be auto-abandoned (experiments only)
133
+ */
134
+ export declare function shouldAutoAbandon(metadata: IncrementMetadata): boolean;
135
+ /**
136
+ * Statuses that count toward WIP (Work In Progress) limits
137
+ *
138
+ * ACTIVE: Currently executing tasks, consumes team capacity
139
+ * PAUSED: Temporarily blocked but still holding resources/context
140
+ *
141
+ * Statuses that do NOT count:
142
+ * - PLANNING: Lightweight spec/planning work, parallel-safe
143
+ * - BACKLOG: Not started yet
144
+ * - COMPLETED: Already done
145
+ * - ABANDONED: Cancelled
146
+ */
147
+ export declare const WIP_COUNTED_STATUSES: IncrementStatus[];
148
+ /**
149
+ * Check if increment status counts toward WIP (Work In Progress) limits
150
+ */
151
+ export declare function countsTowardWipLimit(status: IncrementStatus): boolean;
152
+ /**
153
+ * Validate if a status transition is allowed
154
+ * @throws Error if transition is invalid
155
+ */
156
+ export declare function validateTransition(from: IncrementStatus, to: IncrementStatus): void;
157
+ //# sourceMappingURL=increment-metadata.d.ts.map
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Increment Metadata Types
3
+ *
4
+ * Defines the schema for increment metadata tracking (status, type, timestamps).
5
+ * Part of increment 0007: Smart Status Management
6
+ */
7
+ /**
8
+ * Increment status enum
9
+ * Tracks the lifecycle state of an increment
10
+ */
11
+ export var IncrementStatus;
12
+ (function (IncrementStatus) {
13
+ /** Planning phase - spec/plan/tasks being created (does NOT count towards WIP limits) */
14
+ IncrementStatus["PLANNING"] = "planning";
15
+ /** Currently being worked on */
16
+ IncrementStatus["ACTIVE"] = "active";
17
+ /** Planned but not ready to start yet (does NOT count towards WIP limits) */
18
+ IncrementStatus["BACKLOG"] = "backlog";
19
+ /** Temporarily stopped (blocked by external dependency, deprioritized) */
20
+ IncrementStatus["PAUSED"] = "paused";
21
+ /** All tasks complete, increment finished */
22
+ IncrementStatus["COMPLETED"] = "completed";
23
+ /** Work abandoned (requirements changed, obsolete, etc.) */
24
+ IncrementStatus["ABANDONED"] = "abandoned";
25
+ })(IncrementStatus || (IncrementStatus = {}));
26
+ /**
27
+ * Increment type enum
28
+ * Determines rules and limits applied to the increment
29
+ */
30
+ export var IncrementType;
31
+ (function (IncrementType) {
32
+ /** Critical production fix (bypasses all limits) */
33
+ IncrementType["HOTFIX"] = "hotfix";
34
+ /** Standard feature development (limit: 2 active) */
35
+ IncrementType["FEATURE"] = "feature";
36
+ /** Production bug fix with SRE investigation (unlimited, urgent) */
37
+ IncrementType["BUG"] = "bug";
38
+ /** Change request from stakeholders (limit: 2 active) */
39
+ IncrementType["CHANGE_REQUEST"] = "change-request";
40
+ /** Code improvement (limit: 1 active) */
41
+ IncrementType["REFACTOR"] = "refactor";
42
+ /** POC/spike work (unlimited, auto-abandon after 14 days) */
43
+ IncrementType["EXPERIMENT"] = "experiment";
44
+ })(IncrementType || (IncrementType = {}));
45
+ /**
46
+ * Valid status transitions
47
+ * Enforces increment lifecycle rules
48
+ */
49
+ export const VALID_TRANSITIONS = {
50
+ [IncrementStatus.PLANNING]: [
51
+ IncrementStatus.ACTIVE, // Move to active when tasks start
52
+ IncrementStatus.BACKLOG, // Move to backlog if deprioritized
53
+ IncrementStatus.ABANDONED // Cancel planning
54
+ ],
55
+ [IncrementStatus.ACTIVE]: [
56
+ IncrementStatus.BACKLOG,
57
+ IncrementStatus.PAUSED,
58
+ IncrementStatus.COMPLETED,
59
+ IncrementStatus.ABANDONED
60
+ ],
61
+ [IncrementStatus.BACKLOG]: [
62
+ IncrementStatus.PLANNING, // Resume planning
63
+ IncrementStatus.ACTIVE,
64
+ IncrementStatus.ABANDONED
65
+ ],
66
+ [IncrementStatus.PAUSED]: [
67
+ IncrementStatus.ACTIVE,
68
+ IncrementStatus.ABANDONED
69
+ ],
70
+ [IncrementStatus.COMPLETED]: [
71
+ // NEW: Allow reopening completed increments when issues discovered
72
+ IncrementStatus.ACTIVE, // Reopen for fixes
73
+ IncrementStatus.ABANDONED // Mark as failed (rare)
74
+ ],
75
+ [IncrementStatus.ABANDONED]: [
76
+ IncrementStatus.ACTIVE // Can un-abandon if needed (rare)
77
+ ]
78
+ };
79
+ /**
80
+ * Type-based limits
81
+ * Maximum active increments per type
82
+ *
83
+ * null = unlimited (no limit enforcement)
84
+ * User can configure per-project in .specweave/config.json
85
+ */
86
+ export const TYPE_LIMITS = {
87
+ [IncrementType.HOTFIX]: null, // Unlimited (emergency work)
88
+ [IncrementType.FEATURE]: 2, // Max 2 active (context switching cost)
89
+ [IncrementType.BUG]: null, // Unlimited (production issues)
90
+ [IncrementType.CHANGE_REQUEST]: 2, // Max 2 active (stakeholder-driven)
91
+ [IncrementType.REFACTOR]: 1, // Max 1 active (needs focus)
92
+ [IncrementType.EXPERIMENT]: null // Unlimited (exploratory work)
93
+ };
94
+ /**
95
+ * Staleness thresholds (days)
96
+ * When to warn about stale increments
97
+ */
98
+ export const STALENESS_THRESHOLDS = {
99
+ /** Warn if paused for more than this many days */
100
+ PAUSED: 7,
101
+ /** Warn if active for more than this many days */
102
+ ACTIVE: 30,
103
+ /** Auto-abandon experiments after this many days */
104
+ EXPERIMENT: 14
105
+ };
106
+ /**
107
+ * Default metadata for new increments
108
+ *
109
+ * NOTE: New increments start in PLANNING status by default.
110
+ * They auto-transition to ACTIVE when tasks.md is created or first task starts.
111
+ */
112
+ export function createDefaultMetadata(id, type = IncrementType.FEATURE) {
113
+ const now = new Date().toISOString();
114
+ return {
115
+ id,
116
+ status: IncrementStatus.PLANNING, // Start in planning phase
117
+ type,
118
+ created: now,
119
+ lastActivity: now
120
+ };
121
+ }
122
+ /**
123
+ * Check if status transition is valid
124
+ */
125
+ export function isValidTransition(from, to) {
126
+ const allowedTransitions = VALID_TRANSITIONS[from];
127
+ return allowedTransitions.includes(to);
128
+ }
129
+ /**
130
+ * Check if increment is stale (paused too long or active too long)
131
+ */
132
+ export function isStale(metadata) {
133
+ const now = new Date();
134
+ if (metadata.status === IncrementStatus.PAUSED && metadata.pausedAt) {
135
+ const pausedDate = new Date(metadata.pausedAt);
136
+ const daysPaused = (now.getTime() - pausedDate.getTime()) / (1000 * 60 * 60 * 24);
137
+ return daysPaused > STALENESS_THRESHOLDS.PAUSED;
138
+ }
139
+ if (metadata.status === IncrementStatus.ACTIVE) {
140
+ const createdDate = new Date(metadata.created);
141
+ const daysActive = (now.getTime() - createdDate.getTime()) / (1000 * 60 * 60 * 24);
142
+ return daysActive > STALENESS_THRESHOLDS.ACTIVE;
143
+ }
144
+ return false;
145
+ }
146
+ /**
147
+ * Check if increment should be auto-abandoned (experiments only)
148
+ */
149
+ export function shouldAutoAbandon(metadata) {
150
+ if (metadata.type !== IncrementType.EXPERIMENT) {
151
+ return false;
152
+ }
153
+ const now = new Date();
154
+ const lastActivityDate = new Date(metadata.lastActivity);
155
+ const daysSinceActivity = (now.getTime() - lastActivityDate.getTime()) / (1000 * 60 * 60 * 24);
156
+ return daysSinceActivity > STALENESS_THRESHOLDS.EXPERIMENT;
157
+ }
158
+ /**
159
+ * Statuses that count toward WIP (Work In Progress) limits
160
+ *
161
+ * ACTIVE: Currently executing tasks, consumes team capacity
162
+ * PAUSED: Temporarily blocked but still holding resources/context
163
+ *
164
+ * Statuses that do NOT count:
165
+ * - PLANNING: Lightweight spec/planning work, parallel-safe
166
+ * - BACKLOG: Not started yet
167
+ * - COMPLETED: Already done
168
+ * - ABANDONED: Cancelled
169
+ */
170
+ export const WIP_COUNTED_STATUSES = [
171
+ IncrementStatus.ACTIVE,
172
+ IncrementStatus.PAUSED // Paused work still blocks team capacity
173
+ ];
174
+ /**
175
+ * Check if increment status counts toward WIP (Work In Progress) limits
176
+ */
177
+ export function countsTowardWipLimit(status) {
178
+ return WIP_COUNTED_STATUSES.includes(status);
179
+ }
180
+ /**
181
+ * Validate if a status transition is allowed
182
+ * @throws Error if transition is invalid
183
+ */
184
+ export function validateTransition(from, to) {
185
+ if (!isValidTransition(from, to)) {
186
+ const validTransitions = VALID_TRANSITIONS[from];
187
+ throw new Error(`Invalid transition: ${from} → ${to}.\n` +
188
+ `Valid transitions from ${from}: ${validTransitions.join(', ')}`);
189
+ }
190
+ }
191
+ //# sourceMappingURL=increment-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"increment-metadata.js","sourceRoot":"","sources":["../../../../src/core/types/increment-metadata.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,eAkBX;AAlBD,WAAY,eAAe;IACzB,yFAAyF;IACzF,wCAAqB,CAAA;IAErB,gCAAgC;IAChC,oCAAiB,CAAA;IAEjB,6EAA6E;IAC7E,sCAAmB,CAAA;IAEnB,0EAA0E;IAC1E,oCAAiB,CAAA;IAEjB,6CAA6C;IAC7C,0CAAuB,CAAA;IAEvB,4DAA4D;IAC5D,0CAAuB,CAAA;AACzB,CAAC,EAlBW,eAAe,KAAf,eAAe,QAkB1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,aAkBX;AAlBD,WAAY,aAAa;IACvB,oDAAoD;IACpD,kCAAiB,CAAA;IAEjB,qDAAqD;IACrD,oCAAmB,CAAA;IAEnB,oEAAoE;IACpE,4BAAW,CAAA;IAEX,yDAAyD;IACzD,kDAAiC,CAAA;IAEjC,yCAAyC;IACzC,sCAAqB,CAAA;IAErB,6DAA6D;IAC7D,0CAAyB,CAAA;AAC3B,CAAC,EAlBW,aAAa,KAAb,aAAa,QAkBxB;AAoED;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA+C;IAC3E,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE;QAC1B,eAAe,CAAC,MAAM,EAAM,kCAAkC;QA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ACb,uBAAuB,IAAI,MAAM,EAAE,KAAK;YACxC,0BAA0B,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Task Parser with US-Task Linkage Support
3
+ *
4
+ * Parses tasks.md files to extract task metadata including new US linkage fields:
5
+ * - userStory: US-ID this task implements (e.g., "US-001")
6
+ * - satisfiesACs: List of AC-IDs this task satisfies (e.g., ["AC-US1-01", "AC-US1-02"])
7
+ *
8
+ * Supports hierarchical task structure grouped by User Story.
9
+ */
10
+ /**
11
+ * Task metadata extracted from tasks.md
12
+ */
13
+ export interface Task {
14
+ /** Task ID (e.g., "T-001") */
15
+ id: string;
16
+ /** Task title */
17
+ title: string;
18
+ /** User Story this task implements (optional for backward compatibility) */
19
+ userStory?: string;
20
+ /** Acceptance Criteria IDs this task satisfies (optional) */
21
+ satisfiesACs?: string[];
22
+ /** Task completion status */
23
+ status: TaskStatus;
24
+ /** Priority level (P0, P1, P2, P3) */
25
+ priority?: string;
26
+ /** Estimated effort (e.g., "4 hours", "2 days") */
27
+ estimatedEffort?: string;
28
+ /** Task dependencies (task IDs this depends on) */
29
+ dependencies?: string[];
30
+ /** Full task description */
31
+ description?: string;
32
+ /** Files affected by this task */
33
+ filesAffected?: string[];
34
+ /** Line number in tasks.md (for error reporting) */
35
+ lineNumber?: number;
36
+ }
37
+ /**
38
+ * Task completion status
39
+ */
40
+ export type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'transferred' | 'canceled';
41
+ /**
42
+ * Tasks grouped by User Story
43
+ */
44
+ export interface TasksByUserStory {
45
+ [usId: string]: Task[];
46
+ }
47
+ /**
48
+ * Validation error for task linkage
49
+ */
50
+ export interface TaskLinkageError {
51
+ taskId: string;
52
+ field: 'userStory' | 'satisfiesACs';
53
+ value: string;
54
+ message: string;
55
+ suggestedFix?: string;
56
+ }
57
+ /**
58
+ * Parse tasks.md and extract all tasks with US linkage
59
+ *
60
+ * @param tasksPath - Path to tasks.md file
61
+ * @returns Map of User Story ID → Tasks
62
+ * @throws Error if tasks.md cannot be read or is malformed
63
+ */
64
+ export declare function parseTasksWithUSLinks(tasksPath: string): TasksByUserStory;
65
+ /**
66
+ * Validate task US and AC linkage
67
+ *
68
+ * @param task - Task to validate
69
+ * @param validUSIds - List of valid US-IDs from spec.md
70
+ * @param validACIds - List of valid AC-IDs from spec.md
71
+ * @returns Array of validation errors (empty if valid)
72
+ */
73
+ export declare function validateTaskLinkage(task: Task, validUSIds: string[], validACIds: string[]): TaskLinkageError[];
74
+ /**
75
+ * Get all tasks (flattened, not grouped by US)
76
+ *
77
+ * @param tasksByUS - Tasks grouped by User Story
78
+ * @returns Array of all tasks
79
+ */
80
+ export declare function getAllTasks(tasksByUS: TasksByUserStory): Task[];
81
+ /**
82
+ * Count tasks by status
83
+ *
84
+ * @param tasksByUS - Tasks grouped by User Story
85
+ * @returns Map of status → count
86
+ */
87
+ export declare function countTasksByStatus(tasksByUS: TasksByUserStory): Record<TaskStatus, number>;
88
+ /**
89
+ * Calculate completion percentage
90
+ *
91
+ * @param tasksByUS - Tasks grouped by User Story
92
+ * @returns Completion percentage (0-100)
93
+ */
94
+ export declare function calculateCompletionPercentage(tasksByUS: TasksByUserStory): number;
95
+ //# sourceMappingURL=task-parser.d.ts.map