specweave 0.22.12 → 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 +2 -2
  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,4 +1,15 @@
1
- # Implementation Tasks: {{INCREMENT_TITLE}}
1
+ ---
2
+ total_tasks: {{TOTAL_TASKS}}
3
+ completed: 0
4
+ by_user_story:
5
+ {{#USER_STORIES}}
6
+ {{US_ID}}: {{TASK_COUNT}}
7
+ {{/USER_STORIES}}
8
+ test_mode: {{TEST_MODE}}
9
+ coverage_target: {{COVERAGE_TARGET}}
10
+ ---
11
+
12
+ # Tasks: {{INCREMENT_TITLE}}
2
13
 
3
14
  **Increment**: {{INCREMENT_ID}}
4
15
  **Status**: Planning
@@ -6,149 +17,172 @@
6
17
 
7
18
  ---
8
19
 
9
- ## Task Overview
10
-
11
- **Total Tasks**: {{TOTAL_TASKS}}
12
- **Estimated Duration**: {{ESTIMATED_DURATION}}
13
- **Priority**: {{PRIORITY}}
14
-
15
- ---
16
-
17
- ## Task Template
20
+ ## Task Format (US-Task Linkage - v0.23.0)
18
21
 
19
- Use this template for each task:
22
+ **NEW**: All tasks MUST explicitly link to their parent User Story and Acceptance Criteria.
20
23
 
24
+ ### Required Fields for Each Task:
21
25
  ```markdown
22
26
  ### T-XXX: Task Title
23
- **Priority**: P0 | P1 | P2 | P3
24
- **Estimate**: X hours
25
- **Status**: pending | in_progress | completed | blocked
26
- **AC-IDs**: AC-US-XXX-YY (links to spec.md acceptance criteria)
27
- **GitHub Issue**: #NNN (auto-populated after sync)
28
- **Assignee**: @username (optional)
29
-
30
- **Description**:
31
- Brief description of what this task accomplishes.
32
-
33
- **Implementation**:
34
- - [ ] Create/update ClassName with method()
35
- - [ ] Implement core feature logic
36
- - [ ] Add error handling for edge cases
37
- - [ ] Add JSDoc comments
38
- - [ ] Update related type definitions
39
27
 
40
- **Test Plan** (BDD):
41
- - **Given** [precondition describing initial state]
42
- - **When** [action or event that triggers behavior]
43
- - **Then** [expected result or outcome]
28
+ **User Story**: US-XXX
29
+ **Satisfies ACs**: AC-USXX-YY, AC-USXX-ZZ
30
+ **Status**: [ ] pending | [x] completed | [~] in_progress | [-] canceled
31
+ **Priority**: P0 (Critical) | P1 (Important) | P2 (Nice-to-have) | P3 (Future)
32
+ **Estimated Effort**: X hours | X days
44
33
 
45
- **Test Cases**:
46
- - Unit (`class-name.test.ts`):
47
- - method_withValidInput_returnsExpectedResult
48
- - method_withInvalidInput_throwsError
49
- - Coverage: >95%
50
- - Integration (`feature.integration.test.ts`):
51
- - fullWorkflow_happyPath_succeeds
52
- - Coverage: >85%
34
+ **Description**: What this task accomplishes and why it's needed.
53
35
 
54
- **Files to Create** (if applicable):
55
- - `path/to/new/file.ts`
56
- - `path/to/another/file.md`
36
+ **Implementation Steps**:
37
+ 1. Create/update file or component
38
+ 2. Implement core logic
39
+ 3. Add error handling
40
+ 4. Add tests
41
+ 5. Update documentation
57
42
 
58
- **Files to Modify** (if applicable):
59
- - `path/to/existing/file.ts`
60
- - `path/to/another/existing.md`
43
+ **Test Plan**:
44
+ - Unit tests: Specific test cases to write
45
+ - Integration tests: End-to-end scenarios
46
+ - Coverage target: 95% (unit), 85% (integration)
61
47
 
62
- **Code Examples** (optional - snippets for clarity):
63
- ```typescript
64
- // Example implementation approach
65
- export function exampleFunction() {
66
- // Code here
67
- }
68
- ```
48
+ **Files Affected**:
49
+ - `path/to/file.ts` (create/modify)
50
+ - `path/to/test.ts` (create)
51
+
52
+ **Dependencies**: T-XXX (optional - tasks that must complete first)
69
53
  ```
70
54
 
71
- **Dependencies** (optional - tasks that must complete first):
72
- - T-001 (must complete first)
73
- - T-002 (must complete first)
55
+ ### Hierarchical Structure
74
56
 
75
- **Blocks** (optional - tasks waiting on this):
76
- - T-005 (waiting on this)
77
- - T-006 (waiting on this)
57
+ Tasks are **grouped by User Story** for traceability:
58
+
59
+ ```markdown
60
+ ## User Story: US-001 - User Story Title
61
+
62
+ **Linked ACs**: AC-US1-01, AC-US1-02, AC-US1-03
63
+ **Tasks**: X total, Y completed
64
+
65
+ ### T-001: First task for this US
66
+ **User Story**: US-001
67
+ **Satisfies ACs**: AC-US1-01, AC-US1-02
68
+ ...
69
+
70
+ ### T-002: Second task for this US
71
+ **User Story**: US-001
72
+ **Satisfies ACs**: AC-US1-03
73
+ ...
78
74
 
79
75
  ---
76
+
77
+ ## User Story: US-002 - Another User Story
78
+
79
+ **Linked ACs**: AC-US2-01, AC-US2-02
80
+ **Tasks**: X total, Y completed
81
+
82
+ ### T-003: First task for US-002
83
+ **User Story**: US-002
84
+ **Satisfies ACs**: AC-US2-01
85
+ ...
80
86
  ```
81
87
 
82
88
  ---
83
89
 
84
- ## Phase 1: Foundation (Week 1) - X tasks
90
+ {{#USER_STORIES}}
91
+ ## User Story: {{US_ID}} - {{US_TITLE}}
85
92
 
86
- ### T-001: Example Task
87
- **Priority**: P0
88
- **Estimate**: 2 hours
89
- **Status**: pending
90
- **AC-IDs**: AC-US1-01, AC-US1-02
91
- **GitHub Issue**: (will be populated after sync)
92
- **Assignee**: (assign in GitHub after sync)
93
+ **Linked ACs**: {{AC_IDS}}
94
+ **Tasks**: {{TASK_COUNT}} total, 0 completed
93
95
 
94
- **Description**:
95
- This is an example task showing the canonical template format following ADR-0047.
96
+ {{#TASKS}}
97
+ ### {{TASK_ID}}: {{TASK_TITLE}}
98
+
99
+ **User Story**: {{US_ID}}
100
+ **Satisfies ACs**: {{SATISFIES_ACS}}
101
+ **Status**: [ ] pending
102
+ **Priority**: {{PRIORITY}}
103
+ **Estimated Effort**: {{ESTIMATE}}
96
104
 
97
- **Implementation**:
98
- - [ ] Define ExampleInterface with id and name fields
99
- - [ ] Create ExampleClass implementing ExampleInterface
100
- - [ ] Add constructor with parameter properties
101
- - [ ] Add JSDoc comments for interface and class
102
- - [ ] Export both interface and class
105
+ **Description**: {{DESCRIPTION}}
106
+
107
+ **Implementation Steps**:
108
+ {{#IMPLEMENTATION_STEPS}}
109
+ - [ ] {{STEP}}
110
+ {{/IMPLEMENTATION_STEPS}}
103
111
 
104
112
  **Test Plan** (BDD):
105
- - **Given** ExampleClass constructor receives valid id and name
106
- - **When** new ExampleClass('123', 'Test') is instantiated
107
- - **Then** instance has correct id and name properties
113
+ - **Given** {{GIVEN}}
114
+ - **When** {{WHEN}}
115
+ - **Then** {{THEN}}
108
116
 
109
117
  **Test Cases**:
110
- - Unit (`example-class.test.ts`):
111
- - constructor_withValidParams_createsInstance
112
- - constructor_withEmptyId_throwsError
113
- - interface_conformsToContract
118
+ - Unit (`{{TEST_FILE}}`):
119
+ {{#UNIT_TESTS}}
120
+ - {{TEST_NAME}}
121
+ {{/UNIT_TESTS}}
114
122
  - Coverage: >95%
123
+ {{#HAS_INTEGRATION_TESTS}}
124
+ - Integration (`{{INTEGRATION_TEST_FILE}}`):
125
+ {{#INTEGRATION_TESTS}}
126
+ - {{TEST_NAME}}
127
+ {{/INTEGRATION_TESTS}}
128
+ - Coverage: >85%
129
+ {{/HAS_INTEGRATION_TESTS}}
130
+
131
+ **Files Affected**:
132
+ {{#FILES_TO_CREATE}}
133
+ - `{{FILE_PATH}}` (create)
134
+ {{/FILES_TO_CREATE}}
135
+ {{#FILES_TO_MODIFY}}
136
+ - `{{FILE_PATH}}` (modify)
137
+ {{/FILES_TO_MODIFY}}
138
+
139
+ {{#HAS_DEPENDENCIES}}
140
+ **Dependencies**: {{DEPENDENCIES}}
141
+ {{/HAS_DEPENDENCIES}}
142
+
143
+ ---
144
+
145
+ {{/TASKS}}
146
+ {{/USER_STORIES}}
115
147
 
116
- **Files to Create**:
117
- - `src/example/new-file.ts`
118
- - `tests/unit/example/example-class.test.ts`
148
+ ## Validation Rules (v0.23.0)
119
149
 
120
- **Files to Modify**:
121
- - `src/example/existing-file.ts`
150
+ Before closing this increment, the following MUST be true:
122
151
 
123
- **Code Examples**:
124
- ```typescript
125
- export interface ExampleInterface {
126
- id: string;
127
- name: string;
128
- }
152
+ 1. **All tasks completed**: Every task marked `[x] completed`
153
+ 2. **All ACs covered**: Every AC-ID from spec.md has at least one task
154
+ 3. **No orphan tasks**: Every task has **Satisfies ACs** field
155
+ 4. **Valid linkage**: All US-IDs and AC-IDs exist in spec.md
129
156
 
130
- export class ExampleClass implements ExampleInterface {
131
- constructor(public id: string, public name: string) {}
132
- }
157
+ **Validation commands**:
158
+ ```bash
159
+ # Check AC coverage and task linkage
160
+ /specweave:validate {{INCREMENT_ID}}
161
+
162
+ # Close increment (validates automatically)
163
+ /specweave:done {{INCREMENT_ID}}
133
164
  ```
134
165
 
135
- **Dependencies**:
136
- None (foundation task)
166
+ ---
167
+
168
+ ## Progress Tracking
137
169
 
138
- **Blocks**:
139
- - T-003 (needs types from this task)
140
- - T-004 (needs interfaces from this task)
170
+ **By User Story**:
171
+ {{#USER_STORIES}}
172
+ - {{US_ID}}: 0/{{TASK_COUNT}} tasks completed (0%)
173
+ {{/USER_STORIES}}
174
+
175
+ **Overall**: 0/{{TOTAL_TASKS}} tasks completed (0%)
141
176
 
142
177
  ---
143
178
 
144
- ## Task Dependencies
179
+ ## Task Dependencies (Auto-Generated)
145
180
 
146
181
  ```mermaid
147
182
  graph TD
148
- T001[T-001: Example Task] --> T003[T-003: Dependent Task]
149
- T001 --> T004[T-004: Another Dependent]
150
- T002[T-002: Another Foundation] --> T003
151
- T003 --> T005[T-005: Higher Level Task]
183
+ {{#TASK_DEPENDENCIES}}
184
+ {{FROM_TASK}}[{{FROM_TASK_TITLE}}] --> {{TO_TASK}}[{{TO_TASK_TITLE}}]
185
+ {{/TASK_DEPENDENCIES}}
152
186
  ```
153
187
 
154
188
  ---
@@ -156,124 +190,69 @@ graph TD
156
190
  ## Testing Checklist
157
191
 
158
192
  **Unit Tests** (per component):
159
- - ✅ Component A
160
- - Component B
161
- - ✅ Component C
193
+ {{#COMPONENTS}}
194
+ - [ ] {{COMPONENT_NAME}}
195
+ {{/COMPONENTS}}
162
196
 
163
197
  **Integration Tests**:
164
- - Full workflow (end-to-end)
165
- - Error handling
166
- - Edge cases
198
+ - [ ] Full workflow (end-to-end)
199
+ - [ ] Error handling
200
+ - [ ] Edge cases
167
201
 
168
202
  **E2E Tests** (if applicable):
169
- - ✅ User workflow A
170
- - User workflow B
171
-
172
- **Performance Tests** (if applicable):
173
- - ✅ Load testing
174
- - ✅ Stress testing
175
-
176
- ---
177
-
178
- ## Rollout Plan
179
-
180
- ### Week 1: Foundation
181
- - Days 1-2: Tasks T-001 to T-003
182
- - Days 3-5: Tasks T-004 to T-006
183
-
184
- ### Week 2: Core Implementation
185
- - Days 1-3: Tasks T-007 to T-010
186
- - Days 4-5: Tasks T-011 to T-012
187
-
188
- ### Week 3: Integration & Testing
189
- - Days 1-2: Tasks T-013 to T-014
190
- - Days 3-5: Comprehensive testing and polish
203
+ {{#E2E_TESTS}}
204
+ - [ ] {{E2E_TEST_NAME}}
205
+ {{/E2E_TESTS}}
191
206
 
192
207
  ---
193
208
 
194
209
  ## Success Criteria
195
210
 
196
- **Must Have**:
197
- - All tasks completed
198
- - All tests passing
199
- - Documentation updated
200
- - Code review approved
211
+ **Must Have** (P0/P1):
212
+ - [ ] All critical and important tasks completed
213
+ - [ ] All tests passing (unit, integration, E2E)
214
+ - [ ] 100% AC coverage validated
215
+ - [ ] Documentation updated (CLAUDE.md, README.md)
216
+ - [ ] Code review approved
201
217
 
202
- **Nice to Have** (for next increment):
203
- - Future enhancement 1
204
- - Future enhancement 2
218
+ **Nice to Have** (P2/P3 - can defer):
219
+ {{#NICE_TO_HAVE}}
220
+ - [ ] {{FEATURE}}
221
+ {{/NICE_TO_HAVE}}
205
222
 
206
223
  ---
207
224
 
208
- ## GitHub Sync Instructions
209
-
210
- ### Initial Sync
211
-
212
- After creating this tasks.md file, sync to GitHub:
213
-
214
- ```bash
215
- # Sync all tasks to GitHub (creates epic + task issues)
216
- /specweave.github.sync-tasks {{INCREMENT_ID}}
217
- ```
218
-
219
- This will:
220
- 1. Create a GitHub Milestone (e.g., v0.4.0)
221
- 2. Create an Epic Issue for the increment
222
- 3. Create individual GitHub Issues for each task
223
- 4. Link task issues to epic
224
- 5. Update this file with GitHub issue numbers
225
- 6. Store mapping in `.github-sync.yaml`
226
-
227
- ### During Development
225
+ ## Rollout Plan
228
226
 
229
- As you work on tasks:
230
- - `/specweave.do` - Completes next task AND closes GitHub issue
231
- - Progress automatically syncs to epic issue
232
- - Subtasks sync as checkboxes in GitHub
227
+ ### Week 1: Foundation
228
+ {{#WEEK_1_TASKS}}
229
+ - Days {{DAYS}}: Tasks {{TASK_RANGE}}
230
+ {{/WEEK_1_TASKS}}
233
231
 
234
- ### Manual Operations
232
+ ### Week 2: Core Implementation
233
+ {{#WEEK_2_TASKS}}
234
+ - Days {{DAYS}}: Tasks {{TASK_RANGE}}
235
+ {{/WEEK_2_TASKS}}
235
236
 
236
- ```bash
237
- # Force re-sync (if drift detected)
238
- /specweave.github.sync-tasks {{INCREMENT_ID}} --force
237
+ ### Week 3: Integration & Testing
238
+ {{#WEEK_3_TASKS}}
239
+ - Days {{DAYS}}: Tasks {{TASK_RANGE}}
240
+ {{/WEEK_3_TASKS}}
239
241
 
240
- # Check sync status
241
- /specweave.github.status {{INCREMENT_ID}}
242
+ ---
242
243
 
243
- # Manually create issue for specific task
244
- /specweave.github.create-issue {{INCREMENT_ID}} T-001
245
- ```
244
+ ## Notes
246
245
 
247
- ---
246
+ **Important**:
247
+ - This tasks.md uses **hierarchical structure grouped by User Story** (v0.23.0+)
248
+ - All tasks MUST link to parent US and ACs for traceability
249
+ - Validation enforces 100% AC coverage before increment closure
250
+ - Living docs sync automatically based on task-AC linkage
248
251
 
249
- ## Field Reference
250
-
251
- ### Required Fields
252
- - **Priority**: P0 (critical), P1 (high), P2 (medium), P3 (low)
253
- - **Estimate**: Hours or days (e.g., "2 hours", "3 days")
254
- - **Status**: pending, in_progress, completed, blocked
255
- - **AC-IDs**: Links to spec.md acceptance criteria (e.g., "AC-US1-01, AC-US1-02")
256
- - **Description**: What this task accomplishes
257
- - **Implementation**: Checkable technical steps to complete the task
258
- - **Test Plan (BDD)**: Given-When-Then test scenarios
259
- - **Test Cases**: Unit and integration test cases with coverage targets
260
-
261
- ### Optional Fields (Enhanced for GitHub Sync)
262
- - **GitHub Issue**: Auto-populated after `/specweave.github.sync-tasks`
263
- - **Assignee**: GitHub username (assign in GitHub UI or via `@username`)
264
- - **Dependencies**: Tasks that must complete first (linked in GitHub via "depends on")
265
- - **Blocks**: Tasks waiting on this one (linked in GitHub via "blocks")
266
- - **Files to Create/Modify**: Context for reviewers and developers
267
- - **Code Examples**: Snippets showing implementation approach (TypeScript, pseudocode, etc.)
268
-
269
- ### Task Status Lifecycle
270
- 1. **pending** - Not started, in backlog
271
- 2. **in_progress** - Currently being worked on
272
- 3. **blocked** - Cannot proceed (dependency, blocker)
273
- 4. **completed** - Done, tests passing, reviewed
252
+ **See**: `CLAUDE.md` section "Task Format with US-Task Linkage" for detailed guide
274
253
 
275
254
  ---
276
255
 
277
- **Version**: 1.0
256
+ **Version**: 2.0 (US-Task Linkage)
278
257
  **Last Updated**: {{LAST_UPDATED}}
279
258
  **Total Estimate**: {{TOTAL_HOURS}} hours ({{TOTAL_WEEKS}} weeks)