aiag-cli 2.2.3 → 2.4.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 (100) hide show
  1. package/README.md +72 -37
  2. package/dist/api/client.d.ts +9 -1
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +20 -0
  5. package/dist/api/client.js.map +1 -1
  6. package/dist/api/endpoints.d.ts +2 -0
  7. package/dist/api/endpoints.d.ts.map +1 -1
  8. package/dist/api/endpoints.js +2 -0
  9. package/dist/api/endpoints.js.map +1 -1
  10. package/dist/api/types.d.ts +34 -0
  11. package/dist/api/types.d.ts.map +1 -1
  12. package/dist/cli.js +60 -9
  13. package/dist/cli.js.map +1 -1
  14. package/dist/commands/commit.d.ts.map +1 -1
  15. package/dist/commands/commit.js +37 -1
  16. package/dist/commands/commit.js.map +1 -1
  17. package/dist/commands/complete.d.ts.map +1 -1
  18. package/dist/commands/complete.js +11 -1
  19. package/dist/commands/complete.js.map +1 -1
  20. package/dist/commands/feature.d.ts +11 -0
  21. package/dist/commands/feature.d.ts.map +1 -0
  22. package/dist/commands/feature.js +153 -0
  23. package/dist/commands/feature.js.map +1 -0
  24. package/dist/commands/init.d.ts +1 -1
  25. package/dist/commands/init.d.ts.map +1 -1
  26. package/dist/commands/init.js +29 -78
  27. package/dist/commands/init.js.map +1 -1
  28. package/dist/commands/prd.d.ts +12 -0
  29. package/dist/commands/prd.d.ts.map +1 -0
  30. package/dist/commands/prd.js +179 -0
  31. package/dist/commands/prd.js.map +1 -0
  32. package/dist/commands/session.d.ts +29 -0
  33. package/dist/commands/session.d.ts.map +1 -1
  34. package/dist/commands/session.js +270 -120
  35. package/dist/commands/session.js.map +1 -1
  36. package/dist/commands/sync.d.ts +10 -0
  37. package/dist/commands/sync.d.ts.map +1 -1
  38. package/dist/commands/sync.js +95 -2
  39. package/dist/commands/sync.js.map +1 -1
  40. package/dist/commands/work.d.ts.map +1 -1
  41. package/dist/commands/work.js +13 -1
  42. package/dist/commands/work.js.map +1 -1
  43. package/dist/prompts/index.d.ts +2 -0
  44. package/dist/prompts/index.d.ts.map +1 -1
  45. package/dist/prompts/index.js +2 -0
  46. package/dist/prompts/index.js.map +1 -1
  47. package/dist/prompts/prd.d.ts +28 -0
  48. package/dist/prompts/prd.d.ts.map +1 -0
  49. package/dist/prompts/prd.js +105 -0
  50. package/dist/prompts/prd.js.map +1 -0
  51. package/dist/skills/index.d.ts +12 -0
  52. package/dist/skills/index.d.ts.map +1 -0
  53. package/dist/skills/index.js +12 -0
  54. package/dist/skills/index.js.map +1 -0
  55. package/dist/skills/installer.d.ts +38 -0
  56. package/dist/skills/installer.d.ts.map +1 -0
  57. package/dist/skills/installer.js +153 -0
  58. package/dist/skills/installer.js.map +1 -0
  59. package/dist/skills/loader.d.ts +34 -0
  60. package/dist/skills/loader.d.ts.map +1 -0
  61. package/dist/skills/loader.js +134 -0
  62. package/dist/skills/loader.js.map +1 -0
  63. package/dist/skills/runner.d.ts +14 -0
  64. package/dist/skills/runner.d.ts.map +1 -0
  65. package/dist/skills/runner.js +238 -0
  66. package/dist/skills/runner.js.map +1 -0
  67. package/dist/types.d.ts +160 -0
  68. package/dist/types.d.ts.map +1 -1
  69. package/dist/utils/prd.d.ts +21 -0
  70. package/dist/utils/prd.d.ts.map +1 -1
  71. package/dist/utils/prd.js +69 -0
  72. package/dist/utils/prd.js.map +1 -1
  73. package/dist/utils/sessionManager.d.ts +63 -0
  74. package/dist/utils/sessionManager.d.ts.map +1 -0
  75. package/dist/utils/sessionManager.js +372 -0
  76. package/dist/utils/sessionManager.js.map +1 -0
  77. package/dist/utils/taskmasterConverter.d.ts +72 -0
  78. package/dist/utils/taskmasterConverter.d.ts.map +1 -0
  79. package/dist/utils/taskmasterConverter.js +401 -0
  80. package/dist/utils/taskmasterConverter.js.map +1 -0
  81. package/dist/utils/taskmasterParser.d.ts +35 -0
  82. package/dist/utils/taskmasterParser.d.ts.map +1 -0
  83. package/dist/utils/taskmasterParser.js +259 -0
  84. package/dist/utils/taskmasterParser.js.map +1 -0
  85. package/package.json +1 -1
  86. package/templates/skills/prd-taskmaster/.taskmaster/docs/prd.md +2571 -0
  87. package/templates/skills/prd-taskmaster/.taskmaster/scripts/execution-state.py +87 -0
  88. package/templates/skills/prd-taskmaster/.taskmaster/scripts/learn-accuracy.py +113 -0
  89. package/templates/skills/prd-taskmaster/.taskmaster/scripts/rollback.sh +71 -0
  90. package/templates/skills/prd-taskmaster/.taskmaster/scripts/security-audit.py +130 -0
  91. package/templates/skills/prd-taskmaster/.taskmaster/scripts/track-time.py +133 -0
  92. package/templates/skills/prd-taskmaster/LICENSE +21 -0
  93. package/templates/skills/prd-taskmaster/README.md +608 -0
  94. package/templates/skills/prd-taskmaster/SKILL.md +1258 -0
  95. package/templates/skills/prd-taskmaster/reference/taskmaster-integration-guide.md +645 -0
  96. package/templates/skills/prd-taskmaster/reference/validation-checklist.md +394 -0
  97. package/templates/skills/prd-taskmaster/scripts/setup-taskmaster.sh +112 -0
  98. package/templates/skills/prd-taskmaster/templates/CLAUDE.md.template +635 -0
  99. package/templates/skills/prd-taskmaster/templates/taskmaster-prd-comprehensive.md +983 -0
  100. package/templates/skills/prd-taskmaster/templates/taskmaster-prd-minimal.md +103 -0
@@ -0,0 +1,1258 @@
1
+ ---
2
+ name: PRD Generator for TaskMaster
3
+ description: Smart PRD generator with TaskMaster integration. Detects existing PRDs and offers execute/update/replace options. Generates comprehensive technical PRDs optimized for task breakdown, validates with 13 automated checks, and optionally executes tasks autonomously with datetime tracking and rollback support. Use when user requests "PRD", "product requirements", or mentions task-driven development. Default: PRD generation + handoff to TaskMaster. Optional: autonomous execution with 4 modes.
4
+ allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, AskUserQuestion]
5
+ ---
6
+
7
+ # PRD Generator for TaskMaster v2.0
8
+
9
+ Smart PRD generation system that detects existing PRDs and offers flexible workflows. Primarily generates comprehensive, engineer-focused product requirements documents optimized for TaskMaster task breakdown. Optionally executes tasks autonomously with quality control, datetime tracking, and validation checkpoints.
10
+
11
+ ## When to Use This Skill
12
+
13
+ Activate when user:
14
+ - Requests a PRD or product requirements document
15
+ - Says "I want a PRD", "create requirements", "write requirements"
16
+ - Mentions taskmaster or task-driven development
17
+ - Asks to document product/feature requirements for engineering
18
+
19
+ Do NOT activate for:
20
+ - Code documentation (API docs, technical reference)
21
+ - Test specifications or QA documentation
22
+ - Project management timelines without product context
23
+ - PDF document creation
24
+
25
+ ## Core Principles
26
+
27
+ **Quality Over Speed**: Planning is 95% of the work. Take time to create comprehensive PRDs that enable successful implementation.
28
+
29
+ **Taskmaster Required**: This skill REQUIRES taskmaster (MCP or CLI). Will block and prompt for installation if not detected.
30
+
31
+ **Engineer-Focused**: Primary audience is engineering teams. Include technical depth, code examples, architecture considerations, and implementation details.
32
+
33
+ **Validation-Driven**: Automated checks ensure PRD quality before delivery. 13 validation checks run automatically.
34
+
35
+ **User Testing Checkpoints**: Every 5 tasks, insert user validation checkpoint to catch issues early.
36
+
37
+ **Complete Automation**: Provides 4 autonomous execution modes with git policies, progress logging, and datetime tracking.
38
+
39
+ ## Workflow Overview (12 Steps)
40
+
41
+ 1. **Enable Plan Mode & Check State** - Resume detection + interactive prompts
42
+ 2. **Detect Existing PRD** - Smart detection with execute/update/replace options
43
+ 3. **Detect Taskmaster** - MCP > CLI > Block if missing
44
+ 4. **Discovery Questions** - 12+ detailed questions (if generating new PRD)
45
+ 5. **Initialize Taskmaster** - Via MCP/CLI (if not already initialized)
46
+ 6. **Generate PRD** - Comprehensive 11-section document (if creating new)
47
+ 7. **Validate Quality** - 13 automated checks
48
+ 8. **Parse & Expand** - Combined operation with research
49
+ 9. **Insert User Tests** - Checkpoint every 5 tasks
50
+ 10. **Setup Tracking** - DateTime, rollback, accuracy scripts
51
+ 11. **Choose Next Action** - Handoff to TaskMaster OR autonomous execution
52
+ 12. **Summary & Start** - Present overview and begin work
53
+
54
+ ---
55
+
56
+ ## Detailed Implementation
57
+
58
+ ### Step 1: Enable Plan Mode & Check for Incomplete Work
59
+
60
+ **FIRST ACTION** when skill activates:
61
+
62
+ ```
63
+ 1. Check for incomplete work from previous session:
64
+ - Run: python3 .taskmaster/scripts/execution-state.py (if exists)
65
+ - If incomplete work found: Offer to resume
66
+
67
+ 2. Enable plan mode (if not already enabled):
68
+ - This ensures AskUserQuestion tool works properly
69
+ - Inform user: "Enabling plan mode for interactive prompts..."
70
+
71
+ 3. Proceed to Step 2
72
+ ```
73
+
74
+ **Auto-Resume if Crash Detected:**
75
+
76
+ ```
77
+ If execution-state.py reports incomplete work:
78
+
79
+ 🔍 Detected incomplete work from previous session
80
+
81
+ 📍 Last Activity:
82
+ - Mode: {mode}
83
+ - Task: {task_id}
84
+ - Subtask: {subtask_id}
85
+ - Last updated: {timestamp}
86
+ - Completed: Tasks {completed_list}
87
+
88
+ Resume from:
89
+ 1. Last subtask (continue where crashed)
90
+ 2. Restart current task
91
+ 3. Last checkpoint
92
+ 4. Start fresh
93
+
94
+ Type: 1, 2, 3, or 4
95
+ ```
96
+
97
+ ---
98
+
99
+ ### Step 2: Detect Existing PRD (Smart Detection)
100
+
101
+ **SECOND ACTION**: Check if PRD already exists before generating new one.
102
+
103
+ **Detection Logic:**
104
+
105
+ ```
106
+ 1. Check if .taskmaster/ exists:
107
+ - Use Glob: .taskmaster/
108
+ - NO → New project, proceed to Step 3 (detect taskmaster)
109
+ - YES → Continue to check for PRD
110
+
111
+ 2. Check for existing PRD:
112
+ - Use Glob: .taskmaster/docs/*.md or .taskmaster/docs/prd.*
113
+ - Read .taskmaster/tasks/tasks.json to get task count and status
114
+ - Found PRD → Show existing PRD options (below)
115
+ - No PRD → Proceed to Step 3 (detect taskmaster)
116
+ ```
117
+
118
+ **If Existing PRD Found:**
119
+
120
+ ```
121
+ 🔍 Found existing PRD: {filename}
122
+
123
+ 📄 PRD Details:
124
+ - Created: {date from file}
125
+ - Location: .taskmaster/docs/{filename}
126
+ - Tasks: {X total} ({Y completed}, {Z pending})
127
+ - Status: {% complete}
128
+
129
+ What would you like to do?
130
+
131
+ 1. Execute tasks from existing PRD
132
+ → Skip to Step 11 (choose execution mode)
133
+ → Start working on pending tasks
134
+
135
+ 2. Update/refine existing PRD
136
+ → Edit current PRD with new requirements
137
+ → Re-parse to update tasks
138
+ → Merge with existing task list
139
+
140
+ 3. Create new PRD (replace current)
141
+ → Confirm: "This will replace existing PRD. Continue?"
142
+ → Proceed to Step 3 (full PRD generation workflow)
143
+
144
+ 4. Review existing PRD
145
+ → Show summary of current PRD
146
+ → Display task breakdown
147
+ → Exit skill
148
+
149
+ Type: 1, 2, 3, or 4
150
+ ```
151
+
152
+ **Option 1: Execute Existing Tasks**
153
+ ```
154
+ User selects: 1
155
+
156
+ ✅ Using existing PRD: {filename}
157
+ 📋 Remaining tasks: {Z} pending tasks
158
+ 📍 Next checkpoint: {next USER-TEST}
159
+
160
+ → Skip to Step 11 (choose execution mode)
161
+ ```
162
+
163
+ **Option 2: Update Existing PRD**
164
+ ```
165
+ User selects: 2
166
+
167
+ 📝 What changes would you like to make?
168
+
169
+ [User provides changes]
170
+
171
+ ✅ Updating PRD...
172
+ → Edit existing PRD file with changes
173
+ → Re-run parse-prd with --append flag
174
+ → Continue to Step 8 (insert user tests for new tasks only)
175
+ → Proceed to Step 11
176
+ ```
177
+
178
+ **Option 3: Replace PRD**
179
+ ```
180
+ User selects: 3
181
+
182
+ ⚠️ WARNING: This will replace your existing PRD and task list.
183
+
184
+ Current work:
185
+ - {Y} tasks completed
186
+ - {Z} tasks pending
187
+ - All completed work will be preserved in git history
188
+ - Task files will be regenerated
189
+
190
+ Type "yes" to confirm replacement, or "no" to cancel.
191
+
192
+ [If yes]
193
+ ✅ Creating new PRD (old PRD backed up to .taskmaster/docs/prd-backup-{timestamp}.md)
194
+ → Proceed to Step 3 (full workflow)
195
+ ```
196
+
197
+ **Option 4: Review**
198
+ ```
199
+ User selects: 4
200
+
201
+ 📄 Current PRD Summary:
202
+ - Title: {title}
203
+ - Created: {date}
204
+ - Goals: {list top 3 goals}
205
+ - Requirements: {count functional requirements}
206
+ - Tasks: {X total} ({Y completed}, {Z pending})
207
+
208
+ [Display executive summary and key sections]
209
+
210
+ ✅ Review complete. Skill exiting.
211
+ ```
212
+
213
+ **If No PRD Found (but .taskmaster/ exists):**
214
+ ```
215
+ 🔍 Found .taskmaster/ directory (initialized)
216
+ 📄 No PRD found
217
+
218
+ Creating PRD for TaskMaster...
219
+ → Proceed to Step 3 (detect taskmaster, already initialized)
220
+ ```
221
+
222
+ ---
223
+
224
+ ### Step 3: Detect Taskmaster (MANDATORY - Blocks if Missing)
225
+
226
+ **CRITICAL**: Must detect taskmaster BEFORE proceeding with PRD generation.
227
+
228
+ **Detection Priority:**
229
+
230
+ ```
231
+ 1. Check for MCP Task-Master-AI (PREFERRED):
232
+ - Attempt: mcp__task-master-ai__get_tasks with projectRoot
233
+ - If successful: TASKMASTER_METHOD="MCP" ✅
234
+ - Note: MCP provides superior integration (direct function calls)
235
+
236
+ 2. Fallback to CLI:
237
+ - Run: which taskmaster
238
+ - Run: taskmaster --version
239
+ - If found: TASKMASTER_METHOD="CLI" ✅
240
+
241
+ 3. Neither Available:
242
+ - TASKMASTER_METHOD="NONE" ❌
243
+ - BLOCK and display installation instructions
244
+ ```
245
+
246
+ **If Taskmaster Not Found:**
247
+
248
+ ```
249
+ ⚠️ Taskmaster Required
250
+
251
+ This skill REQUIRES taskmaster (MCP or CLI) to function properly.
252
+
253
+ I didn't detect taskmaster in your environment.
254
+
255
+ Option 1 (RECOMMENDED): Install MCP Task-Master-AI
256
+ • Add to Claude Code MCP settings
257
+ • Provides seamless integration with direct function calls
258
+ • See: https://github.com/cyanheads/task-master-ai
259
+ • Installation: Add to your MCP config, restart Claude Code
260
+
261
+ Option 2: Install CLI
262
+ • Run: npm install -g task-master-ai
263
+ • Use command-line interface
264
+ • See: https://github.com/cyanheads/task-master-ai
265
+
266
+ Please install taskmaster and type 'done' when ready.
267
+
268
+ [WAIT for user to install and confirm]
269
+ [RE-DETECT after user confirms]
270
+ [PROCEED only if detection successful]
271
+ ```
272
+
273
+ **NO PROCEEDING WITHOUT TASKMASTER DETECTED**
274
+
275
+ ---
276
+
277
+ ### Step 4: Discovery (Comprehensive Requirements Gathering)
278
+
279
+ Ask detailed questions to ensure comprehensive PRD:
280
+
281
+ **Essential Questions (5):**
282
+ 1. What problem does this solve? (user pain point, business impact)
283
+ 2. Who is the target user/audience?
284
+ 3. What is the proposed solution or feature?
285
+ 4. What are the key success metrics? (how we measure success)
286
+ 5. What constraints exist? (technical, timeline, resources)
287
+
288
+ **Technical Context (4):**
289
+ 6. Is this for an existing codebase or greenfield project?
290
+ 7. What tech stack? (if known)
291
+ 8. Any integration requirements? (third-party services, internal systems)
292
+ 9. Performance/scale requirements? (users, data volume, latency)
293
+
294
+ **Taskmaster Specific (3):**
295
+ 10. Have you used taskmaster before? (helps calibrate detail level)
296
+ 11. What's the estimated complexity? (simple feature, typical project, complex system)
297
+ 12. Timeline expectations? (helps with phasing and task breakdown)
298
+
299
+ **Open-Ended (1):**
300
+ 13. Anything else I should know? (edge cases, constraints, context)
301
+
302
+ **Smart Defaults:**
303
+ - If user provides minimal answers, use best guesses and document assumptions
304
+ - Default to comprehensive detail
305
+ - Assume engineer audience unless specified otherwise
306
+
307
+ ---
308
+
309
+ ### Step 5: Initialize Taskmaster Project
310
+
311
+ **CRITICAL**: Initialize ONLY via taskmaster MCP/CLI. NEVER create .taskmaster/ manually.
312
+
313
+ #### If TASKMASTER_METHOD="MCP":
314
+
315
+ ```
316
+ Use mcp__task-master-ai__initialize_project:
317
+ - projectRoot: ${PWD} (absolute path)
318
+ - yes: true (skip prompts)
319
+ - storeTasksInGit: true
320
+ - initGit: false (if git already exists)
321
+ - skipInstall: false
322
+ - rules: ["claude"]
323
+
324
+ Result: .taskmaster/ structure created by taskmaster
325
+ ```
326
+
327
+ #### If TASKMASTER_METHOD="CLI":
328
+
329
+ ```bash
330
+ taskmaster init --yes --store-tasks-in-git --rules=claude
331
+ ```
332
+
333
+ **Output:**
334
+ ```
335
+ ✅ Taskmaster Initialized
336
+ Created: .taskmaster/docs/
337
+ Created: .taskmaster/tasks/
338
+ Created: .taskmaster/reports/
339
+ Created: .taskmaster/state/
340
+ Updated: .gitignore
341
+ ```
342
+
343
+ ---
344
+
345
+ ### Step 6: Generate Comprehensive PRD
346
+
347
+ Write PRD to `.taskmaster/docs/prd.md`
348
+
349
+ **11 Essential Sections:**
350
+
351
+ 1. **Executive Summary** (2-3 sentences: problem + solution + impact)
352
+
353
+ 2. **Problem Statement**
354
+ - Current situation and pain points
355
+ - User impact (who's affected, how)
356
+ - Business impact (cost, opportunity)
357
+ - Why solve this now
358
+
359
+ 3. **Goals & Success Metrics** (SMART format)
360
+ - 3-5 specific goals
361
+ - Each with: metric, baseline, target, timeframe
362
+ - Example: "Increase user activation from 45% to 65% within 3 months"
363
+
364
+ 4. **User Stories** (Agile format with taskmaster focus)
365
+ - As a [user], I want to [action] so that I can [benefit]
366
+ - Detailed acceptance criteria (becomes task completion criteria)
367
+ - Each story suggests 1-3 implementation tasks
368
+
369
+ 5. **Functional Requirements**
370
+ - Numbered (REQ-001, REQ-002, etc.)
371
+ - Prioritized (Must/Should/Could have)
372
+ - Each requirement is atomic and testable
373
+ - Includes implementation hints for task breakdown
374
+
375
+ 6. **Non-Functional Requirements**
376
+ - Performance (with specific targets: "< 200ms p95")
377
+ - Security (authentication, encryption, compliance)
378
+ - Scalability (user load, data volume)
379
+ - Reliability (uptime, error rates)
380
+ - Accessibility (WCAG standards)
381
+ - Compatibility (browsers, devices, OS)
382
+
383
+ 7. **Technical Considerations**
384
+ - Architecture implications
385
+ - API specifications (with request/response examples)
386
+ - Database schema changes (with SQL/schema examples)
387
+ - Dependencies (internal and external)
388
+ - Migration strategy (for existing systems)
389
+ - Testing strategy (unit, integration, e2e)
390
+
391
+ 8. **Implementation Roadmap** (Taskmaster Optimization)
392
+ - Phase breakdown (Phase 1, 2, 3...)
393
+ - Task sequencing (what depends on what)
394
+ - Complexity estimates (for taskmaster scheduling)
395
+ - Suggested task breakdown per requirement
396
+
397
+ 9. **Out of Scope**
398
+ - Explicitly list what will NOT be included
399
+ - Prevents scope creep
400
+ - Note future considerations
401
+
402
+ 10. **Open Questions & Risks**
403
+ - Unresolved decisions with owners
404
+ - Known risks with mitigation strategies
405
+ - Areas needing further research
406
+
407
+ 11. **Validation Checkpoints**
408
+ - Milestones where we verify progress
409
+ - Quality gates for task completion
410
+
411
+ ---
412
+
413
+ ### Step 7: Validate PRD Quality (13 Automated Checks)
414
+
415
+ **Required Elements (5 checks):**
416
+ 1. ✅ Executive summary exists (2-3 sentences)
417
+ 2. ✅ Problem statement includes user AND business impact
418
+ 3. ✅ All goals have SMART metrics (Specific, Measurable, Achievable, Relevant, Time-bound)
419
+ 4. ✅ User stories have acceptance criteria (minimum 3 per story)
420
+ 5. ✅ Out of scope explicitly defined
421
+
422
+ **Functional Requirements (3 checks):**
423
+ 6. ✅ All functional requirements are testable (not vague)
424
+ 7. ✅ Each requirement has priority (Must/Should/Could)
425
+ 8. ✅ Requirements are numbered (REQ-001, REQ-002, etc.)
426
+
427
+ **Technical Considerations (2 checks):**
428
+ 9. ✅ Technical considerations address architecture
429
+ 10. ✅ Non-functional requirements include specific targets (not "fast" but "< 200ms p95")
430
+
431
+ **Taskmaster-Specific (3 checks):**
432
+ 11. ✅ Requirements have task breakdown hints
433
+ 12. ✅ Dependencies identified for task sequencing
434
+ 13. ✅ Acceptance criteria are concrete (can become task completion checks)
435
+
436
+ **Validation Output:**
437
+ ```
438
+ ✅ PRD Quality Validation: 13/13 PASSED
439
+ ✅ All required elements present
440
+ ✅ All functional requirements testable
441
+ ✅ Taskmaster optimization complete
442
+
443
+ Quality Score: 60/60 (EXCELLENT)
444
+ Safe to proceed with task generation.
445
+
446
+ OR
447
+
448
+ ⚠️ PRD Quality Validation: 11/13 (2 warnings)
449
+ ✅ Required elements: 5/5
450
+ ✅ Functional requirements: 3/3
451
+ ✅ Technical considerations: 2/2
452
+ ⚠️ Taskmaster optimization: 1/3
453
+
454
+ Warnings:
455
+ - REQ-007: "should be performant" is vague
456
+ Suggestion: Replace with "< 200ms response time for 95th percentile"
457
+ - User Story 2: Only 2 acceptance criteria (minimum 3 recommended)
458
+ Suggestion: Add edge case criterion
459
+
460
+ Quality Score: 55/60 (GOOD - minor improvements suggested)
461
+ ```
462
+
463
+ ---
464
+
465
+ ### Step 8: Parse PRD & Expand Tasks (Single Combined Operation)
466
+
467
+ **IMPORTANT**: Combine parse-prd + expand-all with research into ONE operation.
468
+
469
+ **Auto-Calculate Task Count:**
470
+ ```
471
+ numTasks = (count of functional requirements × 1.5) rounded
472
+ Minimum: 10 tasks
473
+ Maximum: 40 tasks
474
+ ```
475
+
476
+ #### If TASKMASTER_METHOD="MCP":
477
+
478
+ ```
479
+ 1. Parse PRD with research:
480
+ Use mcp__task-master-ai__parse_prd:
481
+ - projectRoot: ${PWD}
482
+ - input: ".taskmaster/docs/prd.md"
483
+ - numTasks: Auto-calculated based on requirements count
484
+ - research: true (ALWAYS use research for better quality)
485
+ - append: false
486
+
487
+ 2. Immediately expand ALL tasks with research:
488
+ Use mcp__task-master-ai__expand_all:
489
+ - projectRoot: ${PWD}
490
+ - research: true (ALWAYS use research)
491
+ - force: false
492
+ ```
493
+
494
+ #### If TASKMASTER_METHOD="CLI":
495
+
496
+ ```bash
497
+ # Combined operation:
498
+ taskmaster parse-prd --input .taskmaster/docs/prd.md --research --num-tasks auto && \
499
+ taskmaster expand-all --research
500
+ ```
501
+
502
+ **Result:**
503
+ ```
504
+ ✅ Tasks Generated: 22 tasks from PRD
505
+ ✅ Tasks Expanded: 94 subtasks created
506
+ - Phase 1: 5 tasks, 18 subtasks
507
+ - Phase 2: 6 tasks, 28 subtasks
508
+ - Phase 3: 5 tasks, 22 subtasks
509
+ - Phase 4: 4 tasks, 18 subtasks
510
+ - Phase 5: 2 tasks, 8 subtasks
511
+ ```
512
+
513
+ ---
514
+
515
+ ### Step 9: Insert User Testing Tasks (Every 5 Tasks)
516
+
517
+ **CRITICAL NEW REQUIREMENT**: After tasks are expanded, insert user-facing testing tasks.
518
+
519
+ **Logic:**
520
+ ```
521
+ For every 5 tasks:
522
+ - Insert a new task: "USER-TEST-{N}"
523
+ - Title: "User Validation Checkpoint {N}"
524
+ - Description: "Manually test functionality from Tasks {start} to {end}"
525
+
526
+ Example:
527
+ - TASK-001 to TASK-005 → Insert USER-TEST-1 after TASK-005
528
+ - TASK-006 to TASK-010 → Insert USER-TEST-2 after TASK-010
529
+ ```
530
+
531
+ **User Testing Task Template:**
532
+
533
+ ```markdown
534
+ # USER-TEST-{N}: User Validation Checkpoint {N}
535
+
536
+ ## Purpose
537
+ Manual testing of functionality implemented in Tasks {start}-{end}
538
+
539
+ ## Prerequisites
540
+ All subtasks in Tasks {start}-{end} must be completed and merged to main branch.
541
+
542
+ ## Testing Checklist
543
+
544
+ ### Functionality Tests
545
+ [For each requirement covered in these 5 tasks, add:]
546
+ - [ ] Test Requirement REQ-{X}: [Description]
547
+ - Expected: [What should happen]
548
+ - Actual: [User fills in]
549
+
550
+ ### Integration Tests
551
+ - [ ] Test integration between components
552
+ - [ ] Verify no regressions in existing features
553
+
554
+ ### Performance Tests
555
+ - [ ] Measure response time (should be < [target])
556
+ - [ ] Test under expected load
557
+
558
+ ## Acceptance Criteria
559
+ - ✅ All functionality tests pass
560
+ - ✅ No critical bugs found
561
+ - ✅ Performance meets targets
562
+
563
+ ## If Tests Fail
564
+ 1. Document issue in .taskmaster/docs/progress.md
565
+ 2. Type "issues" and describe what failed
566
+ 3. I'll create fix tasks before proceeding
567
+ 4. Do NOT continue to next tasks until fixed
568
+
569
+ ## When Complete
570
+ Type "passed" to continue to next tasks.
571
+ ```
572
+
573
+ **Implementation:**
574
+
575
+ #### If TASKMASTER_METHOD="MCP":
576
+ ```
577
+ Use mcp__task-master-ai__add_task for each checkpoint:
578
+ - projectRoot: ${PWD}
579
+ - title: "User Validation Checkpoint {N}"
580
+ - description: "Manually test functionality from Tasks {start} to {end}"
581
+ - details: [Full testing checklist template above]
582
+ - dependencies: "{end}" (depends on last task in group)
583
+ - priority: "high"
584
+ ```
585
+
586
+ #### If TASKMASTER_METHOD="CLI":
587
+ ```bash
588
+ taskmaster add-task \
589
+ --title="User Validation Checkpoint {N}" \
590
+ --description="Manual testing checkpoint" \
591
+ --dependencies="{end}" \
592
+ --priority=high
593
+ ```
594
+
595
+ **Result:**
596
+ ```
597
+ ✨ Inserted user validation checkpoints:
598
+ ✅ USER-TEST-1 (after Task 5)
599
+ ✅ USER-TEST-2 (after Task 10)
600
+ ✅ USER-TEST-3 (after Task 15)
601
+ ✅ USER-TEST-4 (after Task 20)
602
+
603
+ 📊 Updated task count: 26 tasks (22 implementation + 4 user tests)
604
+ ```
605
+
606
+ ---
607
+
608
+ ### Step 10: Setup Tracking Scripts
609
+
610
+ Create automation scripts in `.taskmaster/scripts/`:
611
+
612
+ **Scripts to Create:**
613
+
614
+ 1. **track-time.py** - Real datetime tracking with UTC timestamps
615
+ 2. **rollback.sh** - Git rollback to any task checkpoint
616
+ 3. **learn-accuracy.py** - Estimation accuracy learning
617
+ 4. **security-audit.py** - Auto-generate security checklist
618
+ 5. **execution-state.py** - Crash recovery state management
619
+
620
+ **All scripts are included in this skill's implementation and will be auto-generated.**
621
+
622
+ See sections below for complete script implementations.
623
+
624
+ ---
625
+
626
+ ---
627
+
628
+ ### Step 11: Choose Next Action (Handoff vs Autonomous Execution)
629
+
630
+ **CRITICAL CHOICE**: After PRD and tasks are ready, ask user how they want to proceed.
631
+
632
+ **Use AskUserQuestion tool** to present two main options:
633
+
634
+ ```
635
+ Use AskUserQuestion:
636
+
637
+ questions:
638
+ - question: "Your PRD and tasks are ready. How would you like to proceed?"
639
+ header: "Next Action"
640
+ multiSelect: false
641
+ options:
642
+ - label: "Show TaskMaster Commands"
643
+ description: "Hand off to TaskMaster. I'll show you the commands to run tasks manually. Full control."
644
+
645
+ - label: "Autonomous Execution"
646
+ description: "I'll execute tasks for you autonomously with 4 execution modes to choose from."
647
+ ```
648
+
649
+ **Option A: Handoff to TaskMaster (DEFAULT)**
650
+
651
+ If user selects "Show TaskMaster Commands":
652
+
653
+ ```
654
+ ✅ PRD Complete: .taskmaster/docs/prd.md
655
+ 📋 Tasks Ready: {X} tasks ({Y} subtasks)
656
+ 📍 Next checkpoint: {next USER-TEST}
657
+
658
+ 🚀 TaskMaster Commands (Use these to work on tasks):
659
+
660
+ Sequential Execution:
661
+ taskmaster next-task # Get next available task
662
+ taskmaster get-task {id} # Work on specific task
663
+ taskmaster set-task-status {id} --status=done
664
+
665
+ Parallel Execution (for independent tasks):
666
+ taskmaster get-tasks --status=pending --with-subtasks
667
+ # Work on multiple tasks simultaneously
668
+
669
+ Progress Tracking:
670
+ taskmaster get-tasks --with-subtasks # See all tasks
671
+ python3 .taskmaster/scripts/track-time.py start {task_id}
672
+ python3 .taskmaster/scripts/track-time.py complete {task_id}
673
+
674
+ Quality & Safety:
675
+ bash .taskmaster/scripts/rollback.sh {task_id} # Rollback to checkpoint
676
+ python3 .taskmaster/scripts/security-audit.py # Security check
677
+
678
+ 📚 Documentation:
679
+ - PRD: .taskmaster/docs/prd.md
680
+ - Tasks: .taskmaster/tasks/
681
+ - Progress: .taskmaster/docs/progress.md
682
+
683
+ 💡 Tip: Use TaskMaster MCP tools for the best experience!
684
+
685
+ Ready to start? Run: taskmaster next-task
686
+ ```
687
+
688
+ Then EXIT the skill (skill complete).
689
+
690
+ ---
691
+
692
+ **Option B: Autonomous Execution**
693
+
694
+ If user selects "Autonomous Execution":
695
+
696
+ Ask follow-up question with 4 execution modes:
697
+
698
+ ```
699
+ Use AskUserQuestion:
700
+
701
+ questions:
702
+ - question: "Select autonomous execution mode:"
703
+ header: "Execution Mode"
704
+ multiSelect: false
705
+ options:
706
+ - label: "Sequential to Checkpoint"
707
+ description: "Work autonomously until next user test. Stops for validation. RECOMMENDED for quality control."
708
+
709
+ - label: "Parallel to Checkpoint"
710
+ description: "Run independent tasks in parallel until next user test. Faster execution."
711
+
712
+ - label: "Full Autonomous"
713
+ description: "Run ALL tasks in parallel without stopping. ⚠️ Skips user validation."
714
+
715
+ - label: "Manual Control"
716
+ description: "You decide which tasks to run. Full control over execution."
717
+ ```
718
+
719
+ **Execution Mode Details:**
720
+
721
+ **Mode 1: Sequential to Checkpoint**
722
+ - Executes tasks one-by-one until next USER-TEST
723
+ - Stops for user validation
724
+ - Best for quality control
725
+ - RECOMMENDED for first-time features
726
+
727
+ **Mode 2: Parallel to Checkpoint**
728
+ - Executes independent tasks in parallel
729
+ - Stops at next USER-TEST
730
+ - Faster execution
731
+ - Good for experienced users
732
+
733
+ **Mode 3: Full Autonomous**
734
+ - Runs ALL tasks in parallel without stopping
735
+ - Auto-completes USER-TEST tasks
736
+ - Fastest execution
737
+ - WARNING: Skips manual validation
738
+
739
+ **Mode 4: Manual Control**
740
+ - User decides which tasks to run
741
+ - Full control over execution
742
+ - No autonomous execution
743
+
744
+ **All execution modes include:**
745
+ - Strict git branching policies (branch per task, sub-branch per subtask)
746
+ - Commit checkpoints after every task
747
+ - Progress logging to .taskmaster/docs/progress.md
748
+ - Datetime tracking with track-time.py
749
+ - Autonomous execution (no user input except at checkpoints)
750
+
751
+ **After mode selected:**
752
+
753
+ 1. Store their selection
754
+ 2. Output the corresponding full execution prompt
755
+ 3. Recognize if user types "begin" or "start"
756
+ 4. Begin autonomous execution
757
+
758
+ **Claude Recommendation:**
759
+
760
+ Based on context, recommend the best option:
761
+ - First-time feature OR critical system → Mode 1 (Sequential)
762
+ - Experienced user OR non-critical → Mode 2 (Parallel)
763
+ - Trusted implementation OR time-critical → Mode 3 (Full)
764
+ - Complex requirements OR learning → Mode 4 (Manual)
765
+
766
+ Display recommendation: "⭐ Claude Recommends: Mode {N}"
767
+
768
+ See full execution prompt templates in "EXECUTION PROMPT TEMPLATES" section below.
769
+
770
+ ---
771
+
772
+ ### Step 12: Present Final Summary
773
+
774
+ **Summary depends on the path taken:**
775
+
776
+ ---
777
+
778
+ **If Handoff to TaskMaster (Step 11 Option A):**
779
+
780
+ ```
781
+ ✅ PRD COMPLETE
782
+
783
+ 📄 PRD Created: .taskmaster/docs/prd.md
784
+ ✅ Taskmaster Initialized: Using {MCP/CLI}
785
+ 📋 Tasks Generated: {X} tasks ({Y} implementation + {Z} user tests)
786
+ 🔄 Tasks Expanded: {N} subtasks
787
+ 📊 Scripts Created: .taskmaster/scripts/ (5 automation scripts)
788
+
789
+ 📊 Overview:
790
+ - Feature: {name}
791
+ - Complexity: {Simple/Medium/Complex}
792
+ - Estimated Effort: {X} tasks, ~{Y} hours
793
+ - Key Goal: {primary success metric}
794
+
795
+ 🎯 Key Requirements:
796
+ 1. {Top functional requirement}
797
+ 2. {Second functional requirement}
798
+ 3. {Third functional requirement}
799
+
800
+ ⚠️ Quality Validation: {score}/60
801
+ ✅ All 13 validation checks passed
802
+
803
+ 📋 Task Breakdown:
804
+ - Phase 1: {X} tasks
805
+ - Phase 2: {X} tasks
806
+ - Phase 3: {X} tasks
807
+ - Phase 4: {X} tasks
808
+
809
+ 👤 User Testing Checkpoints:
810
+ - USER-TEST-1: After Task {N}
811
+ - USER-TEST-2: After Task {N}
812
+ - USER-TEST-3: After Task {N}
813
+
814
+ 🚀 Next Steps:
815
+
816
+ Run: taskmaster next-task
817
+
818
+ Or use TaskMaster MCP tools to manage tasks.
819
+
820
+ See commands above for full TaskMaster usage.
821
+
822
+ ✨ PRD generation complete! Ready to build.
823
+ ```
824
+
825
+ Then EXIT skill.
826
+
827
+ ---
828
+
829
+ **If Autonomous Execution (Step 11 Option B):**
830
+
831
+ ```
832
+ ✅ PRD COMPLETE - STARTING AUTONOMOUS EXECUTION
833
+
834
+ 📄 PRD: .taskmaster/docs/prd.md
835
+ ✅ Taskmaster: Using {MCP/CLI}
836
+ 📋 Tasks: {X} tasks ({Y} implementation + {Z} user tests)
837
+ 🔄 Subtasks: {N} subtasks
838
+ 📊 Scripts: Ready (.taskmaster/scripts/)
839
+
840
+ 📊 Overview:
841
+ - Feature: {name}
842
+ - Complexity: {Simple/Medium/Complex}
843
+ - Mode: {Selected execution mode}
844
+ - Next Checkpoint: {next USER-TEST}
845
+
846
+ ⚠️ Quality: {score}/60 ✅
847
+
848
+ 🚀 Execution Starting!
849
+
850
+ Selected: {execution mode name}
851
+
852
+ [If Sequential/Parallel:]
853
+ Next: Tasks {start}-{end} → USER-TEST-{N}
854
+ Working autonomously until checkpoint...
855
+
856
+ [If Full Autonomous:]
857
+ All {X} tasks will execute in parallel
858
+ Working autonomously until complete...
859
+
860
+ [If Manual:]
861
+ Awaiting your commands...
862
+
863
+ Type "begin" or "start" to execute!
864
+ ```
865
+
866
+ Then PROCEED to autonomous execution using the selected mode's prompt template (see EXECUTION PROMPT TEMPLATES section).
867
+
868
+ ---
869
+
870
+ ## TOP 5 ENHANCEMENTS
871
+
872
+ ### Enhancement 1: Real DateTime Tracking (B2)
873
+
874
+ **Script: `.taskmaster/scripts/track-time.py`**
875
+
876
+ Created automatically during Step 8.
877
+
878
+ **Features:**
879
+ - UTC timestamp tracking (start/end)
880
+ - Precise duration calculation
881
+ - JSON state persistence
882
+ - CLI interface for easy use
883
+
884
+ **Usage in Execution:**
885
+ ```bash
886
+ # Before task starts:
887
+ python3 .taskmaster/scripts/track-time.py start {task_id}
888
+
889
+ # Before subtask starts:
890
+ python3 .taskmaster/scripts/track-time.py start {task_id} {subtask_id}
891
+
892
+ # After subtask completes:
893
+ python3 .taskmaster/scripts/track-time.py complete {task_id} {subtask_id}
894
+
895
+ # After task completes:
896
+ python3 .taskmaster/scripts/track-time.py complete {task_id}
897
+ ```
898
+
899
+ **Output:**
900
+ ```
901
+ 📅 Started: 2025-01-29 14:23:15 UTC
902
+ [... work happens ...]
903
+ ✅ COMPLETED
904
+ 📅 Ended: 2025-01-29 14:41:32 UTC
905
+ ⏱️ Actual: 18 min (18.3 min)
906
+ 📊 vs Estimate: 18 min - Within 2% ✅
907
+ ```
908
+
909
+ See TOP_5_ADDITIONS.md for complete script code.
910
+
911
+ ---
912
+
913
+ ### Enhancement 2: Instant Rollback Command (A1)
914
+
915
+ **Script: `.taskmaster/scripts/rollback.sh`**
916
+
917
+ **Trigger:** User types "rollback to task X" at ANY time during execution
918
+
919
+ **Features:**
920
+ - Revert to any checkpoint tag
921
+ - Backup current state before rollback
922
+ - Update progress.md with rollback note
923
+ - Safety confirmation before destructive action
924
+
925
+ **Usage:**
926
+ ```
927
+ USER: rollback to task 3
928
+
929
+ CLAUDE:
930
+ 🔄 Initiating rollback to Task 3...
931
+
932
+ ⚠️ This will:
933
+ - Discard all changes after Task 3
934
+ - Reset to checkpoint-task-003
935
+ - Preserve current work in rollback-backup-{timestamp}
936
+
937
+ Type "yes" to confirm.
938
+
939
+ USER: yes
940
+
941
+ CLAUDE:
942
+ 💾 Backed up to: rollback-backup-20250129-143045
943
+ ✅ Rolled back to Task 3
944
+ 📝 Updated progress.md
945
+
946
+ What next?
947
+ 1. Resume from here
948
+ 2. Redo Task 3
949
+ 3. Skip to different task
950
+ 4. Manual control
951
+
952
+ Type: 1, 2, 3, or 4
953
+ ```
954
+
955
+ See TOP_5_ADDITIONS.md for complete script code.
956
+
957
+ ---
958
+
959
+ ### Enhancement 3: Accuracy Learning System (B3)
960
+
961
+ **Script: `.taskmaster/scripts/learn-accuracy.py`**
962
+
963
+ **Trigger:** After every 10 completed tasks (at USER-TEST checkpoints)
964
+
965
+ **Features:**
966
+ - Tracks estimated vs actual time
967
+ - Calculates average accuracy percentage
968
+ - Generates adjustment factor
969
+ - Recommends estimate adjustments
970
+
971
+ **Usage:**
972
+ ```
973
+ After USER-TEST-2 passes:
974
+
975
+ 📊 Running estimation accuracy analysis...
976
+
977
+ Tasks Analyzed: 10
978
+ Average Accuracy: 123%
979
+ Adjustment Factor: 1.23x
980
+
981
+ Recent Tasks:
982
+ Task 6: 45min (est: 30min) - 150% ⚠️
983
+ Task 7: 22min (est: 25min) - 88% ✅
984
+ Task 8: 38min (est: 35min) - 109% ✅
985
+ Task 9: 67min (est: 45min) - 149% ⚠️
986
+ Task 10: 28min (est: 20min) - 140% ⚠️
987
+
988
+ ⚠️ You're taking 23% longer than estimated.
989
+
990
+ Apply adjustment to remaining tasks?
991
+ 1. Yes, increase all future estimates by 23%
992
+ 2. No, keep current estimates
993
+ 3. Manually review
994
+
995
+ Type: 1, 2, or 3
996
+ ```
997
+
998
+ See TOP_5_ADDITIONS.md for complete script code.
999
+
1000
+ ---
1001
+
1002
+ ### Enhancement 4: Security Audit Checklist (D2)
1003
+
1004
+ **Script: `.taskmaster/scripts/security-audit.py`**
1005
+
1006
+ **Trigger:** Before final USER-TEST checkpoint
1007
+
1008
+ **Features:**
1009
+ - Scans codebase for security-relevant patterns
1010
+ - Auto-generates checklist based on detected features
1011
+ - Includes standard security checks
1012
+ - Offers automated security scans
1013
+
1014
+ **Usage:**
1015
+ ```
1016
+ Before USER-TEST-4 (final checkpoint):
1017
+
1018
+ 🔒 Generating security audit checklist...
1019
+
1020
+ ### Authentication
1021
+ - [ ] Passwords hashed with bcrypt (cost ≥ 10)
1022
+ - [ ] Session tokens cryptographically secure
1023
+
1024
+ ### OAuth
1025
+ - [ ] OAuth tokens encrypted at rest
1026
+ - [ ] OAuth state parameter prevents CSRF
1027
+
1028
+ ### Database
1029
+ - [ ] All queries use parameterized statements
1030
+ - [ ] No SQL injection vulnerabilities
1031
+
1032
+ ### General Security
1033
+ - [ ] HTTPS enforced in production
1034
+ - [ ] CSRF protection enabled
1035
+ - [ ] Rate limiting on auth endpoints
1036
+ - [ ] Security headers set (CSP, X-Frame-Options)
1037
+
1038
+ Run automated scans?
1039
+ 1. Yes, run npm audit + recommended scans
1040
+ 2. Manual review only
1041
+ 3. Skip for now
1042
+
1043
+ Type: 1, 2, or 3
1044
+ ```
1045
+
1046
+ See TOP_5_ADDITIONS.md for complete script code.
1047
+
1048
+ ---
1049
+
1050
+ ### Enhancement 5: Auto-Resume After Crash (A2)
1051
+
1052
+ **Script: `.taskmaster/scripts/execution-state.py`**
1053
+
1054
+ **Trigger:** At Step 0 (before anything else) if previous session crashed
1055
+
1056
+ **Features:**
1057
+ - Persistent execution state tracking
1058
+ - Detects incomplete work
1059
+ - Offers resume points
1060
+ - Continues where crashed
1061
+
1062
+ **Usage:**
1063
+ ```
1064
+ [Claude crashes mid-task]
1065
+ [User restarts 10 minutes later]
1066
+
1067
+ USER: continue
1068
+
1069
+ CLAUDE:
1070
+ 🔍 Checking for incomplete work...
1071
+
1072
+ Found it!
1073
+
1074
+ 📍 Last Activity:
1075
+ - Mode: Sequential to Checkpoint
1076
+ - Task: TASK-007 (OAuth callback handler)
1077
+ - Subtask: 3/5 (Handle error responses)
1078
+ - Last updated: 2025-01-29 16:45:23 UTC (10 min ago)
1079
+ - Completed: Tasks 1-6 ✅
1080
+
1081
+ Resume from:
1082
+ 1. Last subtask (continue TASK-007 subtask 3)
1083
+ 2. Restart current task (redo TASK-007)
1084
+ 3. Last checkpoint (restart from TASK-006)
1085
+ 4. Start fresh
1086
+
1087
+ Type: 1, 2, 3, or 4
1088
+ ```
1089
+
1090
+ See TOP_5_ADDITIONS.md for complete script code.
1091
+
1092
+ ---
1093
+
1094
+ ## EXECUTION PROMPT TEMPLATES
1095
+
1096
+ ### Template 1: Sequential to Checkpoint
1097
+
1098
+ ```
1099
+ Execute tasks sequentially from {current_task} until USER-TEST-{N}.
1100
+
1101
+ DATETIME TRACKING:
1102
+ Before each task:
1103
+ python3 .taskmaster/scripts/track-time.py start {task_id}
1104
+ Before each subtask:
1105
+ python3 .taskmaster/scripts/track-time.py start {task_id} {subtask_id}
1106
+ After each subtask:
1107
+ python3 .taskmaster/scripts/track-time.py complete {task_id} {subtask_id}
1108
+ After each task:
1109
+ python3 .taskmaster/scripts/track-time.py complete {task_id}
1110
+
1111
+ STRICT GIT POLICY:
1112
+ 1. When starting a task:
1113
+ - Create feature branch: git checkout -b task-{id}-{slug}
1114
+
1115
+ 2. For each subtask:
1116
+ - Create sub-branch: git checkout -b task-{id}-subtask-{n}
1117
+ - Complete subtask implementation
1118
+ - Run tests
1119
+ - Commit: git commit -m "Complete task-{id} subtask-{n}: [description]
1120
+
1121
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1122
+
1123
+ Co-Authored-By: Claude <noreply@anthropic.com>"
1124
+ - Merge to task branch: git checkout task-{id}-{slug} && git merge task-{id}-subtask-{n}
1125
+ - Delete sub-branch: git branch -d task-{id}-subtask-{n}
1126
+
1127
+ 3. When task complete:
1128
+ - Verify ALL subtasks merged
1129
+ - Merge to main: git checkout main && git merge task-{id}-{slug}
1130
+ - Create checkpoint tag: git tag -a checkpoint-task-{id} -m "Completed task {id}"
1131
+ - Delete feature branch: git branch -d task-{id}-{slug}
1132
+
1133
+ PROGRESS LOGGING:
1134
+ After EVERY task completion, append to .taskmaster/docs/progress.md:
1135
+
1136
+ ## Task {id}: {title} - COMPLETED
1137
+ **Completed**: {timestamp}
1138
+ **Duration**: {actual_minutes} min (estimated: {estimated_minutes} min)
1139
+ **Subtasks**: {n} completed
1140
+ **Tests**: {pass/fail}
1141
+ **Issues**: {any issues encountered}
1142
+ **Git**: Merged to main, tagged as checkpoint-task-{id}
1143
+
1144
+ AUTONOMOUS EXECUTION RULES:
1145
+ - Do NOT ask user for input unless critical error
1146
+ - If task fails tests: retry once, then log and skip
1147
+ - If dependency missing: log and skip
1148
+ - Continue until USER-TEST-{N} reached
1149
+ - Update execution state after each task
1150
+
1151
+ ROLLBACK SUPPORT:
1152
+ If user types "rollback to task X" at ANY TIME:
1153
+ 1. STOP current work immediately
1154
+ 2. Run: bash .taskmaster/scripts/rollback.sh X
1155
+ 3. Wait for user confirmation
1156
+ 4. Resume as user directs
1157
+
1158
+ WHEN COMPLETE:
1159
+ Stop and report:
1160
+ "✅ Tasks {start}-{end} completed
1161
+ 📋 Next: USER-TEST-{N} - User validation required
1162
+ 📝 Progress: .taskmaster/docs/progress.md
1163
+ 🌳 Git: All tasks merged with checkpoints"
1164
+ ```
1165
+
1166
+ ---
1167
+
1168
+ ### Template 2: Parallel to Checkpoint
1169
+
1170
+ Similar to Template 1 but with:
1171
+ - Launch up to 3 concurrent tasks
1172
+ - Handle merge conflicts automatically
1173
+ - Wait for dependencies before starting dependent tasks
1174
+ - All tasks still follow git policy (branch per task)
1175
+
1176
+ ---
1177
+
1178
+ ### Template 3: Full Autonomous
1179
+
1180
+ Similar to Template 2 but:
1181
+ - No stops for USER-TEST (auto-completes them)
1182
+ - Maximum parallelization (up to 5 concurrent)
1183
+ - Runs automated tests for USER-TEST tasks
1184
+ - Only stops when ALL tasks complete
1185
+
1186
+ ---
1187
+
1188
+ ### Template 4: Manual Control
1189
+
1190
+ ```
1191
+ Awaiting user commands:
1192
+ - "next task" - Get next task
1193
+ - "task {id}" - Work on specific task
1194
+ - "status" - Show progress
1195
+ - "parallel {id1,id2}" - Run specific tasks in parallel
1196
+
1197
+ Git policies enforced.
1198
+ Progress logged to progress.md.
1199
+ Datetime tracking active.
1200
+ ```
1201
+
1202
+ ---
1203
+
1204
+ ## Reference
1205
+
1206
+ For complete script implementations, see:
1207
+ - TOP_5_ADDITIONS.md (all 5 automation scripts)
1208
+ - USER_EXPERIENCE_EXAMPLE.md (user flow walkthrough)
1209
+ - CHANGES_SUMMARY.md (what changed from v1)
1210
+
1211
+ ## Tips for Best Results
1212
+
1213
+ **Understand the Workflow:**
1214
+ - This skill PRIMARILY generates PRDs (with optional execution)
1215
+ - If you already have a PRD, the skill will detect it and offer options
1216
+ - Default behavior: Generate PRD → Hand off to TaskMaster
1217
+ - Optional: Choose autonomous execution after PRD is ready
1218
+
1219
+ **Provide Context Upfront:**
1220
+ - More detail in discovery → Better PRD
1221
+ - Share constraints, dependencies, assumptions
1222
+ - Mention existing systems to integrate with
1223
+
1224
+ **Be Specific About Success:**
1225
+ - Quantify goals (not "improve UX" but "increase NPS from 45 to 60")
1226
+ - Define what "done" looks like
1227
+ - Specify how you'll measure success
1228
+
1229
+ **Choose the Right Path:**
1230
+ - **Handoff to TaskMaster** (Default): Best if you want full control
1231
+ - **Autonomous Execution**: Best if you trust the process and want speed
1232
+ - Sequential to Checkpoint: Quality-focused, stops for validation
1233
+ - Parallel to Checkpoint: Faster, stops at checkpoints
1234
+ - Full Autonomous: Maximum speed, skips validation
1235
+ - Manual Control: You decide every step
1236
+
1237
+ **If Using Existing PRD:**
1238
+ - Option 1: Execute tasks (pick up where you left off)
1239
+ - Option 2: Update PRD (add new requirements)
1240
+ - Option 3: Replace PRD (start fresh, old PRD backed up)
1241
+ - Option 4: Review PRD (just read it)
1242
+
1243
+ **Leverage Automation (if using autonomous execution):**
1244
+ - Use datetime tracking to improve estimates
1245
+ - Use rollback if you need to undo work
1246
+ - Let accuracy learning adjust your estimates
1247
+ - Review security audit before deployment
1248
+
1249
+ **Trust the Process:**
1250
+ - USER-TEST checkpoints catch issues early
1251
+ - Git checkpoints allow easy rollback
1252
+ - Progress.md shows exactly what happened
1253
+ - TaskMaster integration ensures smooth workflow
1254
+
1255
+ ---
1256
+
1257
+ **Remember**: A comprehensive PRD with automated quality control and TaskMaster integration is the foundation of successful implementation. This skill focuses on creating that foundation. Execution is optional - you can always hand off to TaskMaster for more control.
1258
+