claude-autopm 1.25.0 → 1.27.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 (40) hide show
  1. package/README.md +111 -0
  2. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +1 -18
  3. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +1 -18
  4. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +1 -18
  5. package/autopm/.claude/agents/frameworks/react-ui-expert.md +1 -18
  6. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +1 -18
  7. package/autopm/.claude/agents/frameworks/ux-design-expert.md +1 -18
  8. package/autopm/.claude/agents/languages/bash-scripting-expert.md +1 -18
  9. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +1 -18
  10. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +1 -18
  11. package/autopm/.claude/agents/languages/python-backend-engineer.md +1 -18
  12. package/autopm/.claude/agents/languages/python-backend-expert.md +1 -18
  13. package/autopm/.claude/commands/pm/epic-decompose.md +19 -5
  14. package/autopm/.claude/commands/pm/prd-new.md +14 -1
  15. package/autopm/.claude/includes/task-creation-excellence.md +18 -0
  16. package/autopm/.claude/lib/ai-task-generator.js +84 -0
  17. package/autopm/.claude/lib/cli-parser.js +148 -0
  18. package/autopm/.claude/lib/commands/pm/epicStatus.js +263 -0
  19. package/autopm/.claude/lib/dependency-analyzer.js +157 -0
  20. package/autopm/.claude/lib/frontmatter.js +224 -0
  21. package/autopm/.claude/lib/task-utils.js +64 -0
  22. package/autopm/.claude/scripts/pm-epic-decompose-local.js +158 -0
  23. package/autopm/.claude/scripts/pm-epic-list-local.js +103 -0
  24. package/autopm/.claude/scripts/pm-epic-show-local.js +70 -0
  25. package/autopm/.claude/scripts/pm-epic-update-local.js +56 -0
  26. package/autopm/.claude/scripts/pm-prd-list-local.js +111 -0
  27. package/autopm/.claude/scripts/pm-prd-new-local.js +196 -0
  28. package/autopm/.claude/scripts/pm-prd-parse-local.js +360 -0
  29. package/autopm/.claude/scripts/pm-prd-show-local.js +101 -0
  30. package/autopm/.claude/scripts/pm-prd-update-local.js +153 -0
  31. package/autopm/.claude/scripts/pm-sync-download-local.js +424 -0
  32. package/autopm/.claude/scripts/pm-sync-upload-local.js +473 -0
  33. package/autopm/.claude/scripts/pm-task-list-local.js +86 -0
  34. package/autopm/.claude/scripts/pm-task-show-local.js +92 -0
  35. package/autopm/.claude/scripts/pm-task-update-local.js +109 -0
  36. package/autopm/.claude/scripts/setup-local-mode.js +127 -0
  37. package/package.json +5 -3
  38. package/scripts/create-task-issues.sh +26 -0
  39. package/scripts/fix-invalid-command-refs.sh +4 -3
  40. package/scripts/fix-invalid-refs-simple.sh +8 -3
package/README.md CHANGED
@@ -328,6 +328,117 @@ claude --dangerously-skip-permissions .
328
328
 
329
329
  ---
330
330
 
331
+ ## 🔧 Advanced Tools
332
+
333
+ ### Epic Sync (JavaScript)
334
+
335
+ Complete epic synchronization workflow in one command:
336
+
337
+ ```bash
338
+ # Full epic sync (create epic + tasks + update references)
339
+ node .claude/lib/commands/pm/epicSync.js sync fullstack/01-infrastructure
340
+
341
+ # Individual operations
342
+ node .claude/lib/commands/pm/epicSync.js create-epic fullstack/01-infrastructure
343
+ node .claude/lib/commands/pm/epicSync.js create-tasks fullstack/01-infrastructure 2
344
+ node .claude/lib/commands/pm/epicSync.js update-epic fullstack/01-infrastructure 2
345
+ ```
346
+
347
+ **Features:**
348
+ - Creates GitHub epic issue with labels and stats
349
+ - Creates task issues for all tasks in epic
350
+ - Updates epic file with GitHub URLs
351
+ - Renames task files to match issue numbers
352
+ - Updates all cross-references automatically
353
+
354
+ ### Issue Sync (JavaScript)
355
+
356
+ Synchronize local development progress with GitHub issues:
357
+
358
+ ```bash
359
+ # Full sync workflow
360
+ node .claude/lib/commands/pm/issueSync.js sync 123 .claude/epics/auth/updates/123
361
+
362
+ # Mark task as complete
363
+ node .claude/lib/commands/pm/issueSync.js sync 456 ./updates --complete
364
+
365
+ # Dry run (preview without posting)
366
+ node .claude/lib/commands/pm/issueSync.js sync 789 ./updates --dry-run
367
+
368
+ # Individual operations
369
+ node .claude/lib/commands/pm/issueSync.js gather 123 ./updates
370
+ node .claude/lib/commands/pm/issueSync.js format 123 ./updates
371
+ ```
372
+
373
+ **Features:**
374
+ - Gathers updates from multiple sources (progress, notes, commits)
375
+ - Formats professional GitHub comments
376
+ - Posts updates to issues
377
+ - Updates frontmatter with sync timestamps
378
+ - Preflight validation (auth, issue exists, etc.)
379
+ - Supports completion workflow
380
+
381
+ **What gets synced:**
382
+ - Progress updates and completion %
383
+ - Technical notes and decisions
384
+ - Recent commits (auto-detected or manual)
385
+ - Acceptance criteria updates
386
+ - Next steps and blockers
387
+
388
+ ### Epic Status (JavaScript)
389
+
390
+ Track epic progress with detailed status reporting:
391
+
392
+ ```bash
393
+ # Show epic status
394
+ node .claude/lib/commands/pm/epicStatus.js fullstack/01-infrastructure
395
+
396
+ # List available epics
397
+ node .claude/lib/commands/pm/epicStatus.js
398
+ ```
399
+
400
+ **Features:**
401
+ - Counts tasks by status (completed/in-progress/pending)
402
+ - Calculates progress percentage
403
+ - Visual progress bar
404
+ - Sub-epic breakdown
405
+ - Comprehensive status reporting
406
+
407
+ **Example output:**
408
+ ```
409
+ Epic: fullstack/01-infrastructure
410
+ ==================================
411
+
412
+ Total tasks: 12
413
+ Completed: 8 (67%)
414
+ In Progress: 2
415
+ Pending: 2
416
+
417
+ Progress: [=================================-------------] 67%
418
+
419
+ Sub-Epic Breakdown:
420
+ -------------------
421
+ backend 6 tasks (4 completed)
422
+ frontend 4 tasks (3 completed)
423
+ infrastructure 2 tasks (1 completed)
424
+ ```
425
+
426
+ ### Why JavaScript Tools?
427
+
428
+ **Replaced 10 Bash scripts** (~2600 lines) with **3 JavaScript tools** (~1500 lines):
429
+
430
+ **Benefits:**
431
+ - ✅ Zero parsing errors (no heredoc/awk/sed complexity)
432
+ - 🧪 Fully testable (all functions exported)
433
+ - 📖 More readable and maintainable
434
+ - 🚀 50% less code
435
+ - 💾 Better error handling
436
+ - 🔍 Easier debugging
437
+
438
+ **Backward compatible:** Old Bash scripts still work, but new JS tools are recommended.
439
+
440
+ ---
441
+
331
442
  ## 🤝 Contributing
332
443
 
333
444
  We welcome contributions! See [CONTRIBUTING.md](docs/development/contributing.md) for:
@@ -39,24 +39,7 @@ Access E2E testing frameworks and patterns:
39
39
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
40
40
  - `mcp://context7/project-management/estimation` - Effort estimation
41
41
 
42
- ## Task Creation Excellence
43
-
44
- When creating implementation tasks (for epic decomposition or project planning):
45
-
46
- 1. **Query Context7 First**: Access latest agile/PM best practices
47
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
48
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
49
- 4. **Technology-Specific Details**: Leverage your E2E testing expertise in technical details
50
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
51
-
52
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
53
-
54
- **Quality Standards**:
55
- - Tasks completable in 1-3 days maximum
56
- - Action-oriented titles (verb + noun)
57
- - Specific E2E test framework and scenario guidance
58
- - Dependency and parallelization mapping
59
- - Test automation, visual regression, and accessibility testing considerations
42
+ @include includes/task-creation-excellence.md
60
43
 
61
44
  ## E2E Testing Methodology
62
45
 
@@ -37,24 +37,7 @@ Use this agent for NATS messaging system including pub/sub, request/reply, and q
37
37
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
38
38
  - `mcp://context7/project-management/estimation` - Effort estimation
39
39
 
40
- ## Task Creation Excellence
41
-
42
- When creating implementation tasks (for epic decomposition or project planning):
43
-
44
- 1. **Query Context7 First**: Access latest agile/PM best practices
45
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
46
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
47
- 4. **Technology-Specific Details**: Leverage your NATS messaging expertise in technical details
48
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
49
-
50
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
51
-
52
- **Quality Standards**:
53
- - Tasks completable in 1-3 days maximum
54
- - Action-oriented titles (verb + noun)
55
- - Specific NATS messaging pattern and JetStream guidance
56
- - Dependency and parallelization mapping
57
- - Pub/sub, clustering, and high availability considerations
40
+ @include includes/task-creation-excellence.md
58
41
 
59
42
  ## Core Expertise
60
43
 
@@ -45,24 +45,7 @@ Before starting any implementation, you have access to live documentation throug
45
45
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
46
46
  - `mcp://context7/project-management/estimation` - Effort estimation
47
47
 
48
- ## Task Creation Excellence
49
-
50
- When creating implementation tasks (for epic decomposition or project planning):
51
-
52
- 1. **Query Context7 First**: Access latest agile/PM best practices
53
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
54
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
55
- 4. **Technology-Specific Details**: Leverage your React expertise in technical details
56
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
57
-
58
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
59
-
60
- **Quality Standards**:
61
- - Tasks completable in 1-3 days maximum
62
- - Action-oriented titles (verb + noun)
63
- - Specific React implementation guidance
64
- - Dependency and parallelization mapping
65
- - Component architecture and state management considerations
48
+ @include includes/task-creation-excellence.md
66
49
 
67
50
  **Core Expertise:**
68
51
 
@@ -32,24 +32,7 @@ Before implementing any UI solution, access live documentation through context7:
32
32
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
33
33
  - `mcp://context7/project-management/estimation` - Effort estimation
34
34
 
35
- ## Task Creation Excellence
36
-
37
- When creating implementation tasks (for epic decomposition or project planning):
38
-
39
- 1. **Query Context7 First**: Access latest agile/PM best practices
40
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
41
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
42
- 4. **Technology-Specific Details**: Leverage your React UI expertise in technical details
43
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
44
-
45
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
46
-
47
- **Quality Standards**:
48
- - Tasks completable in 1-3 days maximum
49
- - Action-oriented titles (verb + noun)
50
- - Specific React UI framework implementation guidance
51
- - Dependency and parallelization mapping
52
- - Component design system and accessibility considerations
35
+ @include includes/task-creation-excellence.md
53
36
 
54
37
  ## Test-Driven Development (TDD) Methodology
55
38
 
@@ -40,24 +40,7 @@ Access Tailwind CSS documentation through context7:
40
40
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
41
41
  - `mcp://context7/project-management/estimation` - Effort estimation
42
42
 
43
- ## Task Creation Excellence
44
-
45
- When creating implementation tasks (for epic decomposition or project planning):
46
-
47
- 1. **Query Context7 First**: Access latest agile/PM best practices
48
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
49
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
50
- 4. **Technology-Specific Details**: Leverage your TailwindCSS expertise in technical details
51
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
52
-
53
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
54
-
55
- **Quality Standards**:
56
- - Tasks completable in 1-3 days maximum
57
- - Action-oriented titles (verb + noun)
58
- - Specific TailwindCSS utility and design system guidance
59
- - Dependency and parallelization mapping
60
- - Responsive design and theme customization considerations
43
+ @include includes/task-creation-excellence.md
61
44
 
62
45
  ## When to Use This Agent
63
46
 
@@ -41,24 +41,7 @@ Access UX design and accessibility documentation:
41
41
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
42
42
  - `mcp://context7/project-management/estimation` - Effort estimation
43
43
 
44
- ## Task Creation Excellence
45
-
46
- When creating implementation tasks (for epic decomposition or project planning):
47
-
48
- 1. **Query Context7 First**: Access latest agile/PM best practices
49
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
50
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
51
- 4. **Technology-Specific Details**: Leverage your UX design expertise in technical details
52
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
53
-
54
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
55
-
56
- **Quality Standards**:
57
- - Tasks completable in 1-3 days maximum
58
- - Action-oriented titles (verb + noun)
59
- - Specific UX/UI design and accessibility guidance
60
- - Dependency and parallelization mapping
61
- - User research, interaction design, and accessibility compliance considerations
44
+ @include includes/task-creation-excellence.md
62
45
 
63
46
  ## Core Expertise
64
47
 
@@ -50,24 +50,7 @@ Before starting any implementation, you have access to live documentation throug
50
50
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
51
51
  - `mcp://context7/project-management/estimation` - Effort estimation
52
52
 
53
- ## Task Creation Excellence
54
-
55
- When creating implementation tasks (for epic decomposition or project planning):
56
-
57
- 1. **Query Context7 First**: Access latest agile/PM best practices
58
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
59
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development (with bats for Bash)
60
- 4. **Technology-Specific Details**: Leverage your Bash/scripting expertise in technical details
61
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
62
-
63
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
64
-
65
- **Quality Standards**:
66
- - Tasks completable in 1-3 days maximum
67
- - Action-oriented titles (verb + noun)
68
- - Specific shell scripting implementation guidance
69
- - Dependency and parallelization mapping
70
- - Security and portability considerations included
53
+ @include includes/task-creation-excellence.md
71
54
 
72
55
  ## Core Expertise
73
56
 
@@ -48,24 +48,7 @@ Before starting any implementation, you have access to live documentation throug
48
48
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
49
49
  - `mcp://context7/project-management/estimation` - Effort estimation
50
50
 
51
- ## Task Creation Excellence
52
-
53
- When creating implementation tasks (for epic decomposition or project planning):
54
-
55
- 1. **Query Context7 First**: Access latest agile/PM best practices
56
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
57
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
58
- 4. **Technology-Specific Details**: Leverage your JavaScript/TypeScript expertise in technical details
59
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
60
-
61
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
62
-
63
- **Quality Standards**:
64
- - Tasks completable in 1-3 days maximum
65
- - Action-oriented titles (verb + noun)
66
- - Specific technical implementation guidance
67
- - Dependency and parallelization mapping
68
- - No vague descriptions or missing acceptance criteria
51
+ @include includes/task-creation-excellence.md
69
52
 
70
53
  ## Core Expertise
71
54
 
@@ -52,24 +52,7 @@ Before starting any implementation, you have access to live documentation throug
52
52
  3. **Security Standards**: Access current security recommendations
53
53
  4. **Performance Patterns**: Get latest Node.js optimization techniques
54
54
 
55
- ## Task Creation Excellence
56
-
57
- When creating implementation tasks (for epic decomposition or project planning):
58
-
59
- 1. **Query Context7 First**: Access latest agile/PM best practices
60
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
61
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
62
- 4. **Technology-Specific Details**: Leverage your Node.js/backend expertise in technical details
63
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
64
-
65
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
66
-
67
- **Quality Standards**:
68
- - Tasks completable in 1-3 days maximum
69
- - Action-oriented titles (verb + noun)
70
- - Specific technical implementation guidance for backend/APIs
71
- - Dependency and parallelization mapping
72
- - Security and performance considerations included
55
+ @include includes/task-creation-excellence.md
73
56
 
74
57
  ## Core Expertise
75
58
 
@@ -45,24 +45,7 @@ Before starting any implementation, you have access to live documentation throug
45
45
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
46
46
  - `mcp://context7/project-management/estimation` - Effort estimation
47
47
 
48
- ## Task Creation Excellence
49
-
50
- When creating implementation tasks (for epic decomposition or project planning):
51
-
52
- 1. **Query Context7 First**: Access latest agile/PM best practices
53
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
54
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
55
- 4. **Technology-Specific Details**: Leverage your Python backend expertise in technical details
56
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
57
-
58
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
59
-
60
- **Quality Standards**:
61
- - Tasks completable in 1-3 days maximum
62
- - Action-oriented titles (verb + noun)
63
- - Specific Python/FastAPI implementation guidance
64
- - Dependency and parallelization mapping
65
- - API design, database integration, and async pattern considerations
48
+ @include includes/task-creation-excellence.md
66
49
 
67
50
  **Core Expertise:**
68
51
 
@@ -32,24 +32,7 @@ Before implementing any Python backend solution, access live documentation throu
32
32
  - `mcp://context7/agile/acceptance-criteria` - Writing effective AC
33
33
  - `mcp://context7/project-management/estimation` - Effort estimation
34
34
 
35
- ## Task Creation Excellence
36
-
37
- When creating implementation tasks (for epic decomposition or project planning):
38
-
39
- 1. **Query Context7 First**: Access latest agile/PM best practices
40
- 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
41
- 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
42
- 4. **Technology-Specific Details**: Leverage your Python backend expertise in technical details
43
- 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
44
-
45
- **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
46
-
47
- **Quality Standards**:
48
- - Tasks completable in 1-3 days maximum
49
- - Action-oriented titles (verb + noun)
50
- - Specific Python framework implementation guidance
51
- - Dependency and parallelization mapping
52
- - Architecture patterns, ORM integration, and async support considerations
35
+ @include includes/task-creation-excellence.md
53
36
 
54
37
  ## Test-Driven Development (TDD) Methodology
55
38
 
@@ -10,13 +10,13 @@ Break epic into concrete, actionable tasks.
10
10
 
11
11
  **Single Epic:**
12
12
  ```bash
13
- /pm:epic-decompose <feature_name>
13
+ /pm:epic-decompose <feature_name> [--local]
14
14
  ```
15
15
 
16
16
  **Multi-Epic (decomposes ALL epics at once):**
17
17
  ```bash
18
- /pm:epic-decompose <feature_name>
19
- # Example: /pm:epic-decompose ecommerce-platform
18
+ /pm:epic-decompose <feature_name> [--local]
19
+ # Example: /pm:epic-decompose ecommerce-platform --local
20
20
  # This will automatically decompose ALL epics:
21
21
  # - 01-infrastructure
22
22
  # - 02-auth-backend
@@ -26,8 +26,22 @@ Break epic into concrete, actionable tasks.
26
26
 
27
27
  **Single Epic from Multi-Epic structure:**
28
28
  ```bash
29
- /pm:epic-decompose <feature_name>/<epic_folder>
30
- # Example: /pm:epic-decompose ecommerce-platform/01-infrastructure
29
+ /pm:epic-decompose <feature_name>/<epic_folder> [--local]
30
+ # Example: /pm:epic-decompose ecommerce-platform/01-infrastructure --local
31
+ ```
32
+
33
+ ## Flags
34
+
35
+ `--local`, `-l`
36
+ : Use local mode (offline workflow)
37
+ : Creates task files in `.claude/epics/` directory structure
38
+ : No GitHub/Azure synchronization
39
+ : Task files remain local-only until manually synced
40
+ : Ideal for offline work or projects without remote tracking
41
+
42
+ Example:
43
+ ```
44
+ /pm:epic-decompose user-authentication --local
31
45
  ```
32
46
 
33
47
  ## Required Documentation Access
@@ -8,7 +8,20 @@ Launch interactive brainstorming session for new product requirement document.
8
8
 
9
9
  ## Usage
10
10
  ```
11
- /pm:prd-new <feature_name>
11
+ /pm:prd-new <feature_name> [--local]
12
+ ```
13
+
14
+ ## Flags
15
+
16
+ `--local`, `-l`
17
+ : Use local mode (offline workflow)
18
+ : Creates PRD files in `.claude/prds/` directory
19
+ : No GitHub/Azure synchronization required
20
+ : Ideal for working offline or without remote provider configured
21
+
22
+ Example:
23
+ ```
24
+ /pm:prd-new user-authentication --local
12
25
  ```
13
26
 
14
27
  ## Required Documentation Access
@@ -0,0 +1,18 @@
1
+ ## Task Creation Excellence
2
+
3
+ When creating implementation tasks (for epic decomposition or project planning):
4
+
5
+ 1. **Query Context7 First**: Access latest agile/PM best practices
6
+ 2. **Follow INVEST Criteria**: Tasks must be Independent, Negotiable, Valuable, Estimable, Small, Testable
7
+ 3. **Include TDD Requirements**: Every task must enforce Test-Driven Development
8
+ 4. **Technology-Specific Details**: Leverage your technology-specific expertise in technical details
9
+ 5. **Clear Acceptance Criteria**: Specific, measurable, testable criteria
10
+
11
+ **Task Structure Template**: Use frontmatter with name, status, created, depends_on, parallel, conflicts_with. Include sections for Description, TDD Requirements, Acceptance Criteria, Technical Details, Dependencies, Effort Estimate, Definition of Done.
12
+
13
+ **Quality Standards**:
14
+ - Tasks completable in 1-3 days maximum
15
+ - Action-oriented titles (verb + noun)
16
+ - Specific technical implementation guidance
17
+ - Dependency and parallelization mapping
18
+ - No vague descriptions or missing acceptance criteria
@@ -0,0 +1,84 @@
1
+ /**
2
+ * AI Task Generator
3
+ *
4
+ * Generates tasks from epic content using AI providers (OpenAI, Claude, etc.)
5
+ * Supports dependency injection for testing with mock providers.
6
+ *
7
+ * Usage:
8
+ * const { TaskGenerator } = require('./ai-task-generator');
9
+ *
10
+ * const generator = new TaskGenerator();
11
+ * const tasks = await generator.generate(epicContent, { maxTasks: 10 });
12
+ */
13
+
14
+ /**
15
+ * Task Generator using AI providers
16
+ */
17
+ class TaskGenerator {
18
+ constructor(provider = null) {
19
+ this.provider = provider; // Allow injection for testing
20
+ }
21
+
22
+ /**
23
+ * Generate tasks from epic content
24
+ *
25
+ * @param {string} epicContent - Epic markdown content
26
+ * @param {Object} options - Generation options
27
+ * @param {number} [options.maxTasks=15] - Maximum number of tasks to generate
28
+ * @param {number} [options.minHours=2] - Minimum estimated hours per task
29
+ * @param {number} [options.maxHours=8] - Maximum estimated hours per task
30
+ * @returns {Promise<Array>} Array of task objects
31
+ */
32
+ async generate(epicContent, options = {}) {
33
+ const {
34
+ maxTasks = 15,
35
+ minHours = 2,
36
+ maxHours = 8
37
+ } = options;
38
+
39
+ if (!this.provider) {
40
+ throw new Error('AI provider not configured. Use TaskGenerator(provider) or set via setProvider');
41
+ }
42
+
43
+ // Generate tasks using AI provider
44
+ const tasks = await this.provider.generateTasks(epicContent, {
45
+ maxTasks,
46
+ minHours,
47
+ maxHours
48
+ });
49
+
50
+ // Validate and normalize tasks
51
+ return tasks.map((task, index) => this.normalizeTask(task, index + 1));
52
+ }
53
+
54
+ /**
55
+ * Normalize task object to standard format
56
+ *
57
+ * @param {Object} task - Raw task from AI
58
+ * @param {number} taskNumber - Task sequence number
59
+ * @returns {Object} Normalized task object
60
+ */
61
+ normalizeTask(task, taskNumber) {
62
+ return {
63
+ number: taskNumber,
64
+ title: task.title || `Task ${taskNumber}`,
65
+ description: task.description || '',
66
+ acceptance_criteria: task.acceptance_criteria || [],
67
+ estimated_hours: task.estimated_hours || 4,
68
+ dependencies: task.dependencies || [],
69
+ priority: task.priority || 'medium',
70
+ tags: task.tags || []
71
+ };
72
+ }
73
+
74
+ /**
75
+ * Set AI provider (for dependency injection)
76
+ *
77
+ * @param {Object} provider - AI provider instance
78
+ */
79
+ setProvider(provider) {
80
+ this.provider = provider;
81
+ }
82
+ }
83
+
84
+ module.exports = { TaskGenerator };