jell-utils 0.0.18 → 0.2.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 (178) hide show
  1. package/.claude/commands/tm/add-dependency.md +58 -0
  2. package/.claude/commands/tm/add-subtask.md +79 -0
  3. package/.claude/commands/tm/add-task.md +81 -0
  4. package/.claude/commands/tm/analyze-complexity.md +124 -0
  5. package/.claude/commands/tm/analyze-project.md +100 -0
  6. package/.claude/commands/tm/auto-implement-tasks.md +100 -0
  7. package/.claude/commands/tm/command-pipeline.md +80 -0
  8. package/.claude/commands/tm/complexity-report.md +120 -0
  9. package/.claude/commands/tm/convert-task-to-subtask.md +74 -0
  10. package/.claude/commands/tm/expand-all-tasks.md +52 -0
  11. package/.claude/commands/tm/expand-task.md +52 -0
  12. package/.claude/commands/tm/fix-dependencies.md +82 -0
  13. package/.claude/commands/tm/help.md +101 -0
  14. package/.claude/commands/tm/init-project-quick.md +49 -0
  15. package/.claude/commands/tm/init-project.md +53 -0
  16. package/.claude/commands/tm/install-taskmaster.md +118 -0
  17. package/.claude/commands/tm/learn.md +106 -0
  18. package/.claude/commands/tm/list-tasks-by-status.md +42 -0
  19. package/.claude/commands/tm/list-tasks-with-subtasks.md +30 -0
  20. package/.claude/commands/tm/list-tasks.md +46 -0
  21. package/.claude/commands/tm/next-task.md +69 -0
  22. package/.claude/commands/tm/parse-prd-with-research.md +51 -0
  23. package/.claude/commands/tm/parse-prd.md +52 -0
  24. package/.claude/commands/tm/project-status.md +67 -0
  25. package/.claude/commands/tm/quick-install-taskmaster.md +23 -0
  26. package/.claude/commands/tm/remove-all-subtasks.md +94 -0
  27. package/.claude/commands/tm/remove-dependency.md +65 -0
  28. package/.claude/commands/tm/remove-subtask.md +87 -0
  29. package/.claude/commands/tm/remove-subtasks.md +89 -0
  30. package/.claude/commands/tm/remove-task.md +110 -0
  31. package/.claude/commands/tm/setup-models.md +52 -0
  32. package/.claude/commands/tm/show-task.md +85 -0
  33. package/.claude/commands/tm/smart-workflow.md +58 -0
  34. package/.claude/commands/tm/sync-readme.md +120 -0
  35. package/.claude/commands/tm/tm-main.md +147 -0
  36. package/.claude/commands/tm/to-cancelled.md +58 -0
  37. package/.claude/commands/tm/to-deferred.md +50 -0
  38. package/.claude/commands/tm/to-done.md +47 -0
  39. package/.claude/commands/tm/to-in-progress.md +39 -0
  40. package/.claude/commands/tm/to-pending.md +35 -0
  41. package/.claude/commands/tm/to-review.md +43 -0
  42. package/.claude/commands/tm/update-single-task.md +122 -0
  43. package/.claude/commands/tm/update-task.md +75 -0
  44. package/.claude/commands/tm/update-tasks-from-id.md +111 -0
  45. package/.claude/commands/tm/validate-dependencies.md +72 -0
  46. package/.claude/commands/tm/view-models.md +52 -0
  47. package/.claude/settings.local.json +30 -0
  48. package/.cursor/commands/tm/add-dependency.md +55 -0
  49. package/.cursor/commands/tm/add-subtask.md +76 -0
  50. package/.cursor/commands/tm/add-task.md +78 -0
  51. package/.cursor/commands/tm/analyze-complexity.md +121 -0
  52. package/.cursor/commands/tm/analyze-project.md +97 -0
  53. package/.cursor/commands/tm/auto-implement-tasks.md +97 -0
  54. package/.cursor/commands/tm/command-pipeline.md +77 -0
  55. package/.cursor/commands/tm/complexity-report.md +117 -0
  56. package/.cursor/commands/tm/convert-task-to-subtask.md +71 -0
  57. package/.cursor/commands/tm/expand-all-tasks.md +51 -0
  58. package/.cursor/commands/tm/expand-task.md +49 -0
  59. package/.cursor/commands/tm/fix-dependencies.md +81 -0
  60. package/.cursor/commands/tm/help.md +98 -0
  61. package/.cursor/commands/tm/init-project-quick.md +46 -0
  62. package/.cursor/commands/tm/init-project.md +50 -0
  63. package/.cursor/commands/tm/install-taskmaster.md +117 -0
  64. package/.cursor/commands/tm/learn.md +103 -0
  65. package/.cursor/commands/tm/list-tasks-by-status.md +39 -0
  66. package/.cursor/commands/tm/list-tasks-with-subtasks.md +29 -0
  67. package/.cursor/commands/tm/list-tasks.md +43 -0
  68. package/.cursor/commands/tm/next-task.md +66 -0
  69. package/.cursor/commands/tm/parse-prd-with-research.md +48 -0
  70. package/.cursor/commands/tm/parse-prd.md +49 -0
  71. package/.cursor/commands/tm/project-status.md +64 -0
  72. package/.cursor/commands/tm/quick-install-taskmaster.md +22 -0
  73. package/.cursor/commands/tm/remove-all-subtasks.md +93 -0
  74. package/.cursor/commands/tm/remove-dependency.md +62 -0
  75. package/.cursor/commands/tm/remove-subtask.md +84 -0
  76. package/.cursor/commands/tm/remove-subtasks.md +86 -0
  77. package/.cursor/commands/tm/remove-task.md +107 -0
  78. package/.cursor/commands/tm/setup-models.md +51 -0
  79. package/.cursor/commands/tm/show-task.md +82 -0
  80. package/.cursor/commands/tm/smart-workflow.md +55 -0
  81. package/.cursor/commands/tm/sync-readme.md +117 -0
  82. package/.cursor/commands/tm/tm-main.md +146 -0
  83. package/.cursor/commands/tm/to-cancelled.md +55 -0
  84. package/.cursor/commands/tm/to-deferred.md +47 -0
  85. package/.cursor/commands/tm/to-done.md +44 -0
  86. package/.cursor/commands/tm/to-in-progress.md +36 -0
  87. package/.cursor/commands/tm/to-pending.md +32 -0
  88. package/.cursor/commands/tm/to-review.md +40 -0
  89. package/.cursor/commands/tm/update-single-task.md +119 -0
  90. package/.cursor/commands/tm/update-task.md +72 -0
  91. package/.cursor/commands/tm/update-tasks-from-id.md +108 -0
  92. package/.cursor/commands/tm/validate-dependencies.md +71 -0
  93. package/.cursor/commands/tm/view-models.md +51 -0
  94. package/.cursor/mcp.json +20 -0
  95. package/.cursor/rules/cursor_rules.mdc +53 -0
  96. package/.cursor/rules/self_improve.mdc +72 -0
  97. package/.cursor/rules/taskmaster/dev_workflow.mdc +424 -0
  98. package/.cursor/rules/taskmaster/taskmaster.mdc +573 -0
  99. package/.env.example +12 -0
  100. package/.gemini/commands/tm/add-dependency.toml +58 -0
  101. package/.gemini/commands/tm/add-subtask.toml +79 -0
  102. package/.gemini/commands/tm/add-task.toml +81 -0
  103. package/.gemini/commands/tm/analyze-complexity.toml +124 -0
  104. package/.gemini/commands/tm/analyze-project.toml +100 -0
  105. package/.gemini/commands/tm/auto-implement-tasks.toml +100 -0
  106. package/.gemini/commands/tm/command-pipeline.toml +80 -0
  107. package/.gemini/commands/tm/complexity-report.toml +120 -0
  108. package/.gemini/commands/tm/convert-task-to-subtask.toml +74 -0
  109. package/.gemini/commands/tm/expand-all-tasks.toml +54 -0
  110. package/.gemini/commands/tm/expand-task.toml +52 -0
  111. package/.gemini/commands/tm/fix-dependencies.toml +84 -0
  112. package/.gemini/commands/tm/help.toml +101 -0
  113. package/.gemini/commands/tm/init-project-quick.toml +49 -0
  114. package/.gemini/commands/tm/init-project.toml +53 -0
  115. package/.gemini/commands/tm/install-taskmaster.toml +120 -0
  116. package/.gemini/commands/tm/learn.toml +106 -0
  117. package/.gemini/commands/tm/list-tasks-by-status.toml +42 -0
  118. package/.gemini/commands/tm/list-tasks-with-subtasks.toml +32 -0
  119. package/.gemini/commands/tm/list-tasks.toml +46 -0
  120. package/.gemini/commands/tm/next-task.toml +69 -0
  121. package/.gemini/commands/tm/parse-prd-with-research.toml +51 -0
  122. package/.gemini/commands/tm/parse-prd.toml +52 -0
  123. package/.gemini/commands/tm/project-status.toml +67 -0
  124. package/.gemini/commands/tm/quick-install-taskmaster.toml +25 -0
  125. package/.gemini/commands/tm/remove-all-subtasks.toml +96 -0
  126. package/.gemini/commands/tm/remove-dependency.toml +65 -0
  127. package/.gemini/commands/tm/remove-subtask.toml +87 -0
  128. package/.gemini/commands/tm/remove-subtasks.toml +89 -0
  129. package/.gemini/commands/tm/remove-task.toml +110 -0
  130. package/.gemini/commands/tm/setup-models.toml +54 -0
  131. package/.gemini/commands/tm/show-task.toml +85 -0
  132. package/.gemini/commands/tm/smart-workflow.toml +58 -0
  133. package/.gemini/commands/tm/sync-readme.toml +120 -0
  134. package/.gemini/commands/tm/tm-main.toml +149 -0
  135. package/.gemini/commands/tm/to-cancelled.toml +58 -0
  136. package/.gemini/commands/tm/to-deferred.toml +50 -0
  137. package/.gemini/commands/tm/to-done.toml +47 -0
  138. package/.gemini/commands/tm/to-in-progress.toml +39 -0
  139. package/.gemini/commands/tm/to-pending.toml +35 -0
  140. package/.gemini/commands/tm/to-review.toml +43 -0
  141. package/.gemini/commands/tm/update-single-task.toml +122 -0
  142. package/.gemini/commands/tm/update-task.toml +75 -0
  143. package/.gemini/commands/tm/update-tasks-from-id.toml +111 -0
  144. package/.gemini/commands/tm/validate-dependencies.toml +74 -0
  145. package/.gemini/commands/tm/view-models.toml +54 -0
  146. package/.gemini/settings.json +20 -0
  147. package/.mcp.json +15 -0
  148. package/.releaserc.json +115 -0
  149. package/.taskmaster/CLAUDE.md +435 -0
  150. package/.taskmaster/config.json +44 -0
  151. package/.taskmaster/docs/prd.txt +584 -0
  152. package/.taskmaster/state.json +6 -0
  153. package/.taskmaster/tasks/tasks.json +304 -0
  154. package/.taskmaster/templates/example_prd.txt +47 -0
  155. package/.taskmaster/templates/example_prd_rpg.txt +511 -0
  156. package/CLAUDE.md +5 -0
  157. package/README.md +551 -0
  158. package/coverage/clover.xml +412 -0
  159. package/coverage/coverage-final.json +2 -0
  160. package/coverage/lcov-report/base.css +224 -0
  161. package/coverage/lcov-report/block-navigation.js +87 -0
  162. package/coverage/lcov-report/favicon.png +0 -0
  163. package/coverage/lcov-report/index.html +116 -0
  164. package/coverage/lcov-report/index.js.html +2884 -0
  165. package/coverage/lcov-report/prettify.css +1 -0
  166. package/coverage/lcov-report/prettify.js +2 -0
  167. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  168. package/coverage/lcov-report/sorter.js +196 -0
  169. package/coverage/lcov.info +896 -0
  170. package/internal-docs/CLAUDE.md +139 -0
  171. package/internal-docs/DEPLOYMENT.md +351 -0
  172. package/internal-docs/NPM_DEPLOYMENT_GUIDE.md +203 -0
  173. package/internal-docs/OBSIDIAN_PROJECT_PROMPT.md +302 -0
  174. package/internal-docs/TEST_RESULTS.md +153 -0
  175. package/internal-docs/TEST_SIMULATION.md +27 -0
  176. package/lib/index.d.ts +226 -39
  177. package/lib/index.js +767 -121
  178. package/package.json +54 -17
@@ -0,0 +1,511 @@
1
+ <rpg-method>
2
+ # Repository Planning Graph (RPG) Method - PRD Template
3
+
4
+ This template teaches you (AI or human) how to create structured, dependency-aware PRDs using the RPG methodology from Microsoft Research. The key insight: separate WHAT (functional) from HOW (structural), then connect them with explicit dependencies.
5
+
6
+ ## Core Principles
7
+
8
+ 1. **Dual-Semantics**: Think functional (capabilities) AND structural (code organization) separately, then map them
9
+ 2. **Explicit Dependencies**: Never assume - always state what depends on what
10
+ 3. **Topological Order**: Build foundation first, then layers on top
11
+ 4. **Progressive Refinement**: Start broad, refine iteratively
12
+
13
+ ## How to Use This Template
14
+
15
+ - Follow the instructions in each `<instruction>` block
16
+ - Look at `<example>` blocks to see good vs bad patterns
17
+ - Fill in the content sections with your project details
18
+ - The AI reading this will learn the RPG method by following along
19
+ - Task Master will parse the resulting PRD into dependency-aware tasks
20
+
21
+ ## Recommended Tools for Creating PRDs
22
+
23
+ When using this template to **create** a PRD (not parse it), use **code-context-aware AI assistants** for best results:
24
+
25
+ **Why?** The AI needs to understand your existing codebase to make good architectural decisions about modules, dependencies, and integration points.
26
+
27
+ **Recommended tools:**
28
+ - **Claude Code** (claude-code CLI) - Best for structured reasoning and large contexts
29
+ - **Cursor/Windsurf** - IDE integration with full codebase context
30
+ - **Gemini CLI** (gemini-cli) - Massive context window for large codebases
31
+ - **Codex/Grok CLI** - Strong code generation with context awareness
32
+
33
+ **Note:** Once your PRD is created, `task-master parse-prd` works with any configured AI model - it just needs to read the PRD text itself, not your codebase.
34
+ </rpg-method>
35
+
36
+ ---
37
+
38
+ <overview>
39
+ <instruction>
40
+ Start with the problem, not the solution. Be specific about:
41
+ - What pain point exists?
42
+ - Who experiences it?
43
+ - Why existing solutions don't work?
44
+ - What success looks like (measurable outcomes)?
45
+
46
+ Keep this section focused - don't jump into implementation details yet.
47
+ </instruction>
48
+
49
+ ## Problem Statement
50
+ [Describe the core problem. Be concrete about user pain points.]
51
+
52
+ ## Target Users
53
+ [Define personas, their workflows, and what they're trying to achieve.]
54
+
55
+ ## Success Metrics
56
+ [Quantifiable outcomes. Examples: "80% task completion via autopilot", "< 5% manual intervention rate"]
57
+
58
+ </overview>
59
+
60
+ ---
61
+
62
+ <functional-decomposition>
63
+ <instruction>
64
+ Now think about CAPABILITIES (what the system DOES), not code structure yet.
65
+
66
+ Step 1: Identify high-level capability domains
67
+ - Think: "What major things does this system do?"
68
+ - Examples: Data Management, Core Processing, Presentation Layer
69
+
70
+ Step 2: For each capability, enumerate specific features
71
+ - Use explore-exploit strategy:
72
+ * Exploit: What features are REQUIRED for core value?
73
+ * Explore: What features make this domain COMPLETE?
74
+
75
+ Step 3: For each feature, define:
76
+ - Description: What it does in one sentence
77
+ - Inputs: What data/context it needs
78
+ - Outputs: What it produces/returns
79
+ - Behavior: Key logic or transformations
80
+
81
+ <example type="good">
82
+ Capability: Data Validation
83
+ Feature: Schema validation
84
+ - Description: Validate JSON payloads against defined schemas
85
+ - Inputs: JSON object, schema definition
86
+ - Outputs: Validation result (pass/fail) + error details
87
+ - Behavior: Iterate fields, check types, enforce constraints
88
+
89
+ Feature: Business rule validation
90
+ - Description: Apply domain-specific validation rules
91
+ - Inputs: Validated data object, rule set
92
+ - Outputs: Boolean + list of violated rules
93
+ - Behavior: Execute rules sequentially, short-circuit on failure
94
+ </example>
95
+
96
+ <example type="bad">
97
+ Capability: validation.js
98
+ (Problem: This is a FILE, not a CAPABILITY. Mixing structure into functional thinking.)
99
+
100
+ Capability: Validation
101
+ Feature: Make sure data is good
102
+ (Problem: Too vague. No inputs/outputs. Not actionable.)
103
+ </example>
104
+ </instruction>
105
+
106
+ ## Capability Tree
107
+
108
+ ### Capability: [Name]
109
+ [Brief description of what this capability domain covers]
110
+
111
+ #### Feature: [Name]
112
+ - **Description**: [One sentence]
113
+ - **Inputs**: [What it needs]
114
+ - **Outputs**: [What it produces]
115
+ - **Behavior**: [Key logic]
116
+
117
+ #### Feature: [Name]
118
+ - **Description**:
119
+ - **Inputs**:
120
+ - **Outputs**:
121
+ - **Behavior**:
122
+
123
+ ### Capability: [Name]
124
+ ...
125
+
126
+ </functional-decomposition>
127
+
128
+ ---
129
+
130
+ <structural-decomposition>
131
+ <instruction>
132
+ NOW think about code organization. Map capabilities to actual file/folder structure.
133
+
134
+ Rules:
135
+ 1. Each capability maps to a module (folder or file)
136
+ 2. Features within a capability map to functions/classes
137
+ 3. Use clear module boundaries - each module has ONE responsibility
138
+ 4. Define what each module exports (public interface)
139
+
140
+ The goal: Create a clear mapping between "what it does" (functional) and "where it lives" (structural).
141
+
142
+ <example type="good">
143
+ Capability: Data Validation
144
+ → Maps to: src/validation/
145
+ ├── schema-validator.js (Schema validation feature)
146
+ ├── rule-validator.js (Business rule validation feature)
147
+ └── index.js (Public exports)
148
+
149
+ Exports:
150
+ - validateSchema(data, schema)
151
+ - validateRules(data, rules)
152
+ </example>
153
+
154
+ <example type="bad">
155
+ Capability: Data Validation
156
+ → Maps to: src/utils.js
157
+ (Problem: "utils" is not a clear module boundary. Where do I find validation logic?)
158
+
159
+ Capability: Data Validation
160
+ → Maps to: src/validation/everything.js
161
+ (Problem: One giant file. Features should map to separate files for maintainability.)
162
+ </example>
163
+ </instruction>
164
+
165
+ ## Repository Structure
166
+
167
+ ```
168
+ project-root/
169
+ ├── src/
170
+ │ ├── [module-name]/ # Maps to: [Capability Name]
171
+ │ │ ├── [file].js # Maps to: [Feature Name]
172
+ │ │ └── index.js # Public exports
173
+ │ └── [module-name]/
174
+ ├── tests/
175
+ └── docs/
176
+ ```
177
+
178
+ ## Module Definitions
179
+
180
+ ### Module: [Name]
181
+ - **Maps to capability**: [Capability from functional decomposition]
182
+ - **Responsibility**: [Single clear purpose]
183
+ - **File structure**:
184
+ ```
185
+ module-name/
186
+ ├── feature1.js
187
+ ├── feature2.js
188
+ └── index.js
189
+ ```
190
+ - **Exports**:
191
+ - `functionName()` - [what it does]
192
+ - `ClassName` - [what it does]
193
+
194
+ </structural-decomposition>
195
+
196
+ ---
197
+
198
+ <dependency-graph>
199
+ <instruction>
200
+ This is THE CRITICAL SECTION for Task Master parsing.
201
+
202
+ Define explicit dependencies between modules. This creates the topological order for task execution.
203
+
204
+ Rules:
205
+ 1. List modules in dependency order (foundation first)
206
+ 2. For each module, state what it depends on
207
+ 3. Foundation modules should have NO dependencies
208
+ 4. Every non-foundation module should depend on at least one other module
209
+ 5. Think: "What must EXIST before I can build this module?"
210
+
211
+ <example type="good">
212
+ Foundation Layer (no dependencies):
213
+ - error-handling: No dependencies
214
+ - config-manager: No dependencies
215
+ - base-types: No dependencies
216
+
217
+ Data Layer:
218
+ - schema-validator: Depends on [base-types, error-handling]
219
+ - data-ingestion: Depends on [schema-validator, config-manager]
220
+
221
+ Core Layer:
222
+ - algorithm-engine: Depends on [base-types, error-handling]
223
+ - pipeline-orchestrator: Depends on [algorithm-engine, data-ingestion]
224
+ </example>
225
+
226
+ <example type="bad">
227
+ - validation: Depends on API
228
+ - API: Depends on validation
229
+ (Problem: Circular dependency. This will cause build/runtime issues.)
230
+
231
+ - user-auth: Depends on everything
232
+ (Problem: Too many dependencies. Should be more focused.)
233
+ </example>
234
+ </instruction>
235
+
236
+ ## Dependency Chain
237
+
238
+ ### Foundation Layer (Phase 0)
239
+ No dependencies - these are built first.
240
+
241
+ - **[Module Name]**: [What it provides]
242
+ - **[Module Name]**: [What it provides]
243
+
244
+ ### [Layer Name] (Phase 1)
245
+ - **[Module Name]**: Depends on [[module-from-phase-0], [module-from-phase-0]]
246
+ - **[Module Name]**: Depends on [[module-from-phase-0]]
247
+
248
+ ### [Layer Name] (Phase 2)
249
+ - **[Module Name]**: Depends on [[module-from-phase-1], [module-from-foundation]]
250
+
251
+ [Continue building up layers...]
252
+
253
+ </dependency-graph>
254
+
255
+ ---
256
+
257
+ <implementation-roadmap>
258
+ <instruction>
259
+ Turn the dependency graph into concrete development phases.
260
+
261
+ Each phase should:
262
+ 1. Have clear entry criteria (what must exist before starting)
263
+ 2. Contain tasks that can be parallelized (no inter-dependencies within phase)
264
+ 3. Have clear exit criteria (how do we know phase is complete?)
265
+ 4. Build toward something USABLE (not just infrastructure)
266
+
267
+ Phase ordering follows topological sort of dependency graph.
268
+
269
+ <example type="good">
270
+ Phase 0: Foundation
271
+ Entry: Clean repository
272
+ Tasks:
273
+ - Implement error handling utilities
274
+ - Create base type definitions
275
+ - Setup configuration system
276
+ Exit: Other modules can import foundation without errors
277
+
278
+ Phase 1: Data Layer
279
+ Entry: Phase 0 complete
280
+ Tasks:
281
+ - Implement schema validator (uses: base types, error handling)
282
+ - Build data ingestion pipeline (uses: validator, config)
283
+ Exit: End-to-end data flow from input to validated output
284
+ </example>
285
+
286
+ <example type="bad">
287
+ Phase 1: Build Everything
288
+ Tasks:
289
+ - API
290
+ - Database
291
+ - UI
292
+ - Tests
293
+ (Problem: No clear focus. Too broad. Dependencies not considered.)
294
+ </example>
295
+ </instruction>
296
+
297
+ ## Development Phases
298
+
299
+ ### Phase 0: [Foundation Name]
300
+ **Goal**: [What foundational capability this establishes]
301
+
302
+ **Entry Criteria**: [What must be true before starting]
303
+
304
+ **Tasks**:
305
+ - [ ] [Task name] (depends on: [none or list])
306
+ - Acceptance criteria: [How we know it's done]
307
+ - Test strategy: [What tests prove it works]
308
+
309
+ - [ ] [Task name] (depends on: [none or list])
310
+
311
+ **Exit Criteria**: [Observable outcome that proves phase complete]
312
+
313
+ **Delivers**: [What can users/developers do after this phase?]
314
+
315
+ ---
316
+
317
+ ### Phase 1: [Layer Name]
318
+ **Goal**:
319
+
320
+ **Entry Criteria**: Phase 0 complete
321
+
322
+ **Tasks**:
323
+ - [ ] [Task name] (depends on: [[tasks-from-phase-0]])
324
+ - [ ] [Task name] (depends on: [[tasks-from-phase-0]])
325
+
326
+ **Exit Criteria**:
327
+
328
+ **Delivers**:
329
+
330
+ ---
331
+
332
+ [Continue with more phases...]
333
+
334
+ </implementation-roadmap>
335
+
336
+ ---
337
+
338
+ <test-strategy>
339
+ <instruction>
340
+ Define how testing will be integrated throughout development (TDD approach).
341
+
342
+ Specify:
343
+ 1. Test pyramid ratios (unit vs integration vs e2e)
344
+ 2. Coverage requirements
345
+ 3. Critical test scenarios
346
+ 4. Test generation guidelines for Surgical Test Generator
347
+
348
+ This section guides the AI when generating tests during the RED phase of TDD.
349
+
350
+ <example type="good">
351
+ Critical Test Scenarios for Data Validation module:
352
+ - Happy path: Valid data passes all checks
353
+ - Edge cases: Empty strings, null values, boundary numbers
354
+ - Error cases: Invalid types, missing required fields
355
+ - Integration: Validator works with ingestion pipeline
356
+ </example>
357
+ </instruction>
358
+
359
+ ## Test Pyramid
360
+
361
+ ```
362
+ /\
363
+ /E2E\ ← [X]% (End-to-end, slow, comprehensive)
364
+ /------\
365
+ /Integration\ ← [Y]% (Module interactions)
366
+ /------------\
367
+ / Unit Tests \ ← [Z]% (Fast, isolated, deterministic)
368
+ /----------------\
369
+ ```
370
+
371
+ ## Coverage Requirements
372
+ - Line coverage: [X]% minimum
373
+ - Branch coverage: [X]% minimum
374
+ - Function coverage: [X]% minimum
375
+ - Statement coverage: [X]% minimum
376
+
377
+ ## Critical Test Scenarios
378
+
379
+ ### [Module/Feature Name]
380
+ **Happy path**:
381
+ - [Scenario description]
382
+ - Expected: [What should happen]
383
+
384
+ **Edge cases**:
385
+ - [Scenario description]
386
+ - Expected: [What should happen]
387
+
388
+ **Error cases**:
389
+ - [Scenario description]
390
+ - Expected: [How system handles failure]
391
+
392
+ **Integration points**:
393
+ - [What interactions to test]
394
+ - Expected: [End-to-end behavior]
395
+
396
+ ## Test Generation Guidelines
397
+ [Specific instructions for Surgical Test Generator about what to focus on, what patterns to follow, project-specific test conventions]
398
+
399
+ </test-strategy>
400
+
401
+ ---
402
+
403
+ <architecture>
404
+ <instruction>
405
+ Describe technical architecture, data models, and key design decisions.
406
+
407
+ Keep this section AFTER functional/structural decomposition - implementation details come after understanding structure.
408
+ </instruction>
409
+
410
+ ## System Components
411
+ [Major architectural pieces and their responsibilities]
412
+
413
+ ## Data Models
414
+ [Core data structures, schemas, database design]
415
+
416
+ ## Technology Stack
417
+ [Languages, frameworks, key libraries]
418
+
419
+ **Decision: [Technology/Pattern]**
420
+ - **Rationale**: [Why chosen]
421
+ - **Trade-offs**: [What we're giving up]
422
+ - **Alternatives considered**: [What else we looked at]
423
+
424
+ </architecture>
425
+
426
+ ---
427
+
428
+ <risks>
429
+ <instruction>
430
+ Identify risks that could derail development and how to mitigate them.
431
+
432
+ Categories:
433
+ - Technical risks (complexity, unknowns)
434
+ - Dependency risks (blocking issues)
435
+ - Scope risks (creep, underestimation)
436
+ </instruction>
437
+
438
+ ## Technical Risks
439
+ **Risk**: [Description]
440
+ - **Impact**: [High/Medium/Low - effect on project]
441
+ - **Likelihood**: [High/Medium/Low]
442
+ - **Mitigation**: [How to address]
443
+ - **Fallback**: [Plan B if mitigation fails]
444
+
445
+ ## Dependency Risks
446
+ [External dependencies, blocking issues]
447
+
448
+ ## Scope Risks
449
+ [Scope creep, underestimation, unclear requirements]
450
+
451
+ </risks>
452
+
453
+ ---
454
+
455
+ <appendix>
456
+ ## References
457
+ [Papers, documentation, similar systems]
458
+
459
+ ## Glossary
460
+ [Domain-specific terms]
461
+
462
+ ## Open Questions
463
+ [Things to resolve during development]
464
+ </appendix>
465
+
466
+ ---
467
+
468
+ <task-master-integration>
469
+ # How Task Master Uses This PRD
470
+
471
+ When you run `task-master parse-prd <file>.txt`, the parser:
472
+
473
+ 1. **Extracts capabilities** → Main tasks
474
+ - Each `### Capability:` becomes a top-level task
475
+
476
+ 2. **Extracts features** → Subtasks
477
+ - Each `#### Feature:` becomes a subtask under its capability
478
+
479
+ 3. **Parses dependencies** → Task dependencies
480
+ - `Depends on: [X, Y]` sets task.dependencies = ["X", "Y"]
481
+
482
+ 4. **Orders by phases** → Task priorities
483
+ - Phase 0 tasks = highest priority
484
+ - Phase N tasks = lower priority, properly sequenced
485
+
486
+ 5. **Uses test strategy** → Test generation context
487
+ - Feeds test scenarios to Surgical Test Generator during implementation
488
+
489
+ **Result**: A dependency-aware task graph that can be executed in topological order.
490
+
491
+ ## Why RPG Structure Matters
492
+
493
+ Traditional flat PRDs lead to:
494
+ - ❌ Unclear task dependencies
495
+ - ❌ Arbitrary task ordering
496
+ - ❌ Circular dependencies discovered late
497
+ - ❌ Poorly scoped tasks
498
+
499
+ RPG-structured PRDs provide:
500
+ - ✅ Explicit dependency chains
501
+ - ✅ Topological execution order
502
+ - ✅ Clear module boundaries
503
+ - ✅ Validated task graph before implementation
504
+
505
+ ## Tips for Best Results
506
+
507
+ 1. **Spend time on dependency graph** - This is the most valuable section for Task Master
508
+ 2. **Keep features atomic** - Each feature should be independently testable
509
+ 3. **Progressive refinement** - Start broad, use `task-master expand` to break down complex tasks
510
+ 4. **Use research mode** - `task-master parse-prd --research` leverages AI for better task generation
511
+ </task-master-integration>
package/CLAUDE.md ADDED
@@ -0,0 +1,5 @@
1
+ # Claude Code Instructions
2
+
3
+ ## Task Master AI Instructions
4
+ **Import Task Master's development workflow commands and guidelines, treat as if import is in the main CLAUDE.md file.**
5
+ @./.taskmaster/CLAUDE.md