@vfarcic/dot-ai 0.36.0 → 0.38.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.
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: prd-create
3
+ description: Create documentation-first PRDs that guide development through user-facing content
4
+ category: project-management
5
+ ---
6
+
7
+ # PRD Creation Slash Command
8
+
9
+ ## Instructions
10
+
11
+ You are helping create a documentation-first Product Requirements Document (PRD) for a new feature. This process involves three components:
12
+
13
+ 1. **GitHub Issue**: Short, immutable concept description that links to the detailed PRD
14
+ 2. **PRD File**: Project management document with milestone tracking, progress logs, and references to documentation
15
+ 3. **Documentation Updates**: Actual user-facing content written directly into documentation files with PRD traceability comments
16
+
17
+ ## Process
18
+
19
+ ### Step 1: Understand the Feature Concept
20
+ Ask the user to describe the feature idea to understand the core concept and scope.
21
+
22
+ ### Step 2: Create GitHub Issue FIRST
23
+ Create the GitHub issue immediately to get the issue ID. This ID is required for proper PRD file naming.
24
+
25
+ ### Step 3: Create PRD File with Correct Naming
26
+ Create the PRD file using the actual GitHub issue ID: `prds/[issue-id]-[feature-name].md`
27
+
28
+ ### Step 4: Update GitHub Issue with PRD Link
29
+ Add the PRD file link to the GitHub issue description now that the filename is known.
30
+
31
+ ### Step 5: Analyze Existing Documentation Architecture
32
+ BEFORE making any documentation changes, perform systematic analysis of ALL documentation files:
33
+
34
+ **A. Discover All Documentation Files**
35
+ ```bash
36
+ # Find all documentation files (adapt for your project's documentation format)
37
+ find . -name "*.md" -not -path "*/node_modules/*" | sort
38
+
39
+ # Or for other formats:
40
+ find . -name "*.rst" -o -name "*.txt" -o -name "*.adoc" | sort
41
+ ```
42
+
43
+ **B. Identify Feature/Capability References**
44
+ ```bash
45
+ # Search for existing feature lists and capability references
46
+ grep -r -i "capability\|feature\|guide.*\|provides.*\|main.*\|Key.*Features" docs/ README*
47
+
48
+ # Look for documentation indexes and cross-reference patterns
49
+ grep -r "- \*\*\[.*\]\|### .*Guide\|## Documentation" docs/ README*
50
+ ```
51
+
52
+ **C. Use Task Tool for Pattern Analysis**
53
+ Use the Task tool to analyze ALL discovered files to understand:
54
+ - Current documentation structure and patterns
55
+ - Consistent section naming conventions
56
+ - How features are introduced and described
57
+ - Whether there are verification/setup patterns for features
58
+ - Cross-reference architecture between docs
59
+ - Tone and style consistency
60
+ - Documentation indexes/lists that should include new content
61
+
62
+ ### Step 6: Plan Complete Documentation Changes
63
+ Based on the analysis, create comprehensive checklist of ALL documentation files that need updates:
64
+
65
+ **Create systematic checklist:**
66
+ - [ ] New documentation files to create
67
+ - [ ] Existing files with capability/feature lists that need updates
68
+ - [ ] Documentation indexes (like README.md sections) that should include new content
69
+ - [ ] Setup/configuration guides that need new sections
70
+ - [ ] Cross-reference sections ("See Also") that should link to new content
71
+ - [ ] Any files that mention related functionality and should acknowledge new capability
72
+
73
+ **Document the rationale for each update to ensure nothing is missed.**
74
+
75
+ ### Step 7: Write Documentation Content First
76
+ Create/update ALL user-facing documentation content with `<!-- PRD-[issue-id] -->` comments for traceability, following established patterns.
77
+
78
+ ### Step 8: Create PRD as Project Tracker
79
+ Work through the PRD template focusing on project management, milestone tracking, and references to the documentation content.
80
+
81
+ **Key Principle**: Focus on 5-10 major milestones rather than exhaustive task lists. Each milestone should represent meaningful progress that can be clearly validated.
82
+
83
+ **Good Milestones Examples:**
84
+ - [ ] Core functionality implemented and working
85
+ - [ ] Documentation complete and tested
86
+ - [ ] Integration with existing systems working
87
+ - [ ] Feature ready for user testing
88
+ - [ ] Feature launched and available
89
+
90
+ **Avoid Micro-Tasks:**
91
+ - ❌ Update README.md file
92
+ - ❌ Write test for function X
93
+ - ❌ Fix typo in documentation
94
+ - ❌ Individual file modifications
95
+
96
+ **Milestone Characteristics:**
97
+ - **Meaningful**: Represents significant progress toward completion
98
+ - **Testable**: Clear success criteria that can be validated
99
+ - **User-focused**: Relates to user value or feature capability
100
+ - **Manageable**: Can be completed in reasonable timeframe
101
+
102
+ ## GitHub Issue Template (Keep Short & Stable)
103
+
104
+ **Initial Issue Creation (without PRD link):**
105
+ ```markdown
106
+ ## PRD: [Feature Name]
107
+
108
+ **Problem**: [1-2 sentence problem description]
109
+
110
+ **Solution**: [1-2 sentence solution overview]
111
+
112
+ **Detailed PRD**: Will be added after PRD file creation
113
+
114
+ **Priority**: [High/Medium/Low]
115
+ ```
116
+
117
+ **Issue Update (after PRD file created):**
118
+ ```markdown
119
+ ## PRD: [Feature Name]
120
+
121
+ **Problem**: [1-2 sentence problem description]
122
+
123
+ **Solution**: [1-2 sentence solution overview]
124
+
125
+ **Detailed PRD**: See [prds/[actual-issue-id]-[feature-name].md](./prds/[actual-issue-id]-[feature-name].md)
126
+
127
+ **Priority**: [High/Medium/Low]
128
+ ```
129
+
130
+ ## Discussion Guidelines
131
+
132
+ ### Documentation-First Planning Questions:
133
+ 1. **Architecture Analysis**: "What are the existing documentation patterns and structures I need to follow?"
134
+ 2. **User Experience**: "Walk me through the complete user journey - what will they read and do?"
135
+ 3. **Documentation Impact**: "Which existing docs need updates? What new docs are needed?"
136
+ 4. **Content Planning**: "What specific examples, commands, and workflows need to be documented?"
137
+ 5. **Cross-File Story**: "How does the user story flow across multiple documentation files?"
138
+ 6. **Pattern Consistency**: "How do other features handle setup, verification, and cross-references?"
139
+ 7. **Testable Claims**: "What commands and examples can be automatically tested to ensure accuracy?"
140
+ 8. **Implementation Phases**: "How can we deliver value incrementally through documentation updates?"
141
+ 9. **Terminology Consistency**: "How do we ensure terminology and examples are consistent across ALL affected files?"
142
+ 10. **Traceability**: "How will we track which documentation changes relate to this feature?"
143
+
144
+ ### Content Creation Process:
145
+ 1. **Analyze Documentation Architecture**: Use Task tool to understand existing patterns across ALL docs
146
+ 2. **Map Complete Documentation Changes**: Identify all files that need updates (don't miss any!)
147
+ 3. **Write User-Facing Content**: Create actual documentation content with examples following established patterns
148
+ 4. **Add Traceability**: Include `<!-- PRD-[issue-id] -->` comments in documentation
149
+ 5. **Update ALL Affected Files**: Ensure every file mentioned in PRD documentation map gets updated
150
+ 6. **Plan Implementation**: Break down development tasks that enable documented functionality
151
+ 7. **Validation Strategy**: Ensure all documented claims can be automatically tested
152
+
153
+ ### Discussion Tips:
154
+ - **Clarify ambiguity**: If something isn't clear, ask follow-up questions until you understand
155
+ - **Challenge assumptions**: Help the user think through edge cases, alternatives, and unintended consequences
156
+ - **Prioritize ruthlessly**: Help distinguish between must-have and nice-to-have based on user impact
157
+ - **Think about users**: Always bring the conversation back to user value, experience, and outcomes
158
+ - **Consider feasibility**: While not diving into implementation details, ensure scope is realistic
159
+ - **Focus on major milestones**: Create 5-10 meaningful milestones rather than exhaustive micro-tasks
160
+ - **Think cross-functionally**: Consider impact on different teams, systems, and stakeholders
161
+
162
+ ## Workflow
163
+
164
+ 1. **Concept Discussion**: Get the basic idea and validate the need
165
+ 2. **Create GitHub Issue FIRST**: Short, stable concept description to get issue ID
166
+ 3. **Create PRD File**: Detailed document using actual issue ID: `prds/[issue-id]-[feature-name].md`
167
+ 4. **Update GitHub Issue**: Add link to PRD file now that filename is known
168
+ 5. **Section-by-Section Discussion**: Work through each template section systematically
169
+ 6. **Milestone Definition**: Define 5-10 major milestones that represent meaningful progress
170
+ 7. **Review & Validation**: Ensure completeness and clarity
171
+
172
+ **CRITICAL**: Steps 2-4 must happen in this exact order to avoid the chicken-and-egg problem of needing the issue ID for the filename.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: prd-done
3
+ description: Complete PRD implementation workflow - create branch, push changes, create PR, merge, and close issue
4
+ category: project-management
5
+ ---
6
+
7
+ # Complete PRD Implementation
8
+
9
+ Complete the PRD implementation workflow including branch management, pull request creation, and issue closure.
10
+
11
+ ## Workflow Steps
12
+
13
+ ### 1. Pre-Completion Validation
14
+ - [ ] **All PRD checkboxes completed**: Verify every requirement is implemented and tested
15
+ - [ ] **All tests passing**: Run `npm test` to ensure quality standards
16
+ - [ ] **Documentation updated**: All user-facing docs reflect implemented functionality
17
+ - [ ] **No outstanding blockers**: All dependencies resolved and technical debt addressed
18
+
19
+ ### 2. Branch and Commit Management
20
+ - [ ] **Create feature branch**: `git checkout -b feature/prd-[issue-id]-[feature-name]`
21
+ - [ ] **Commit all changes**: Ensure all implementation work is committed
22
+ - [ ] **Clean commit history**: Squash or organize commits for clear history
23
+ - [ ] **Push to remote**: `git push -u origin feature/prd-[issue-id]-[feature-name]`
24
+
25
+ ### 3. Pull Request Creation
26
+ - [ ] **Create PR**: Use `gh pr create` with comprehensive description
27
+ - [ ] **Link to PRD**: Reference the original issue and PRD file
28
+ - [ ] **Review checklist**: Include testing, documentation, and quality confirmations
29
+ - [ ] **Request reviews**: Assign appropriate team members for code review
30
+
31
+ ### 4. Review and Merge Process
32
+ - [ ] **Check PR status**: Use `gh pr view [pr-number]` to check for any ongoing reviews or processes
33
+ - [ ] **Wait for completion**: Do NOT merge if PR comments indicate reviews, checks, or processes are still in progress
34
+ - [ ] **Address review feedback**: Make any required changes from code review
35
+ - [ ] **Verify all checks pass**: Ensure all CI/CD, tests, and automated processes are complete and passing
36
+ - [ ] **Merge to main**: Complete the pull request merge only after all feedback addressed and processes complete
37
+ - [ ] **Verify deployment**: Ensure feature works in production environment
38
+ - [ ] **Monitor for issues**: Watch for any post-deployment problems
39
+
40
+ ### 5. Issue Closure
41
+ - [ ] **Update PRD status**: Mark PRD as "Complete" with completion date
42
+ - [ ] **Close GitHub issue**: Add final completion comment and close
43
+ - [ ] **Archive artifacts**: Save any temporary files or testing data if needed
44
+ - [ ] **Team notification**: Announce feature completion to relevant stakeholders
45
+
46
+ ## Success Criteria
47
+ ✅ **Feature is live and functional**
48
+ ✅ **All tests passing in production**
49
+ ✅ **Documentation is accurate and complete**
50
+ ✅ **PRD issue is closed with completion summary**
51
+ ✅ **Team is notified of feature availability**
52
+
53
+ The PRD implementation is only considered done when users can successfully use the feature as documented.
@@ -0,0 +1,247 @@
1
+ ---
2
+ name: prd-next
3
+ description: Analyze existing PRD to identify and recommend the single highest-priority task to work on next
4
+ category: project-management
5
+ ---
6
+
7
+ # PRD Next - Work On the Next Task
8
+
9
+ ## Instructions
10
+
11
+ You are helping analyze an existing Product Requirements Document (PRD) to suggest the single highest-priority task to work on next, then discuss its design if the user confirms they want to work on it.
12
+
13
+ ## Process Overview
14
+
15
+ 1. **Check Context Clarity** - Determine if PRD is obvious from recent conversation
16
+ 2. **Auto-Detect Target PRD** - If context unclear, intelligently determine which PRD to analyze
17
+ 3. **Analyze Current Implementation** - Understand what's implemented vs what's missing (skip if recent context available)
18
+ 4. **Identify the Single Best Next Task** - Find the one task that should be worked on next
19
+ 5. **Present Recommendation** - Give clear rationale and wait for confirmation
20
+ 6. **Design Discussion** - If confirmed, dive into implementation design details
21
+
22
+ ## Step 0: Context Awareness Check
23
+
24
+ **FIRST: Check if PRD context is already clear from recent conversation:**
25
+
26
+ **Skip detection/analysis if recent conversation shows:**
27
+ - **Recent PRD work discussed** - "We just worked on PRD 29", "Just completed PRD update", etc.
28
+ - **Specific PRD mentioned** - "PRD #X", "MCP Prompts PRD", etc.
29
+ - **PRD-specific commands used** - Recent use of `prd-update-progress`, `prd-start` with specific PRD
30
+ - **Clear work context** - Discussion of specific features, tasks, or requirements for a known PRD
31
+
32
+ **If context is clear:**
33
+ - Skip to Step 6 (Single Task Recommendation) using the known PRD
34
+ - Use conversation history to understand current state and recent progress
35
+ - Proceed directly with task recommendation based on known PRD status
36
+
37
+ **If context is unclear:**
38
+ - Continue to Step 1 (PRD Detection) for full analysis
39
+
40
+ ## Step 1: Smart PRD Detection (Only if Context Unclear)
41
+
42
+ **Auto-detect the target PRD using these context clues (in priority order):**
43
+
44
+ 1. **Git Branch Analysis** - Check current branch name for PRD patterns:
45
+ - `feature/prd-12-*` → PRD 12
46
+ - `prd-13-*` → PRD 13
47
+ - `feature/prd-*` → Extract PRD number
48
+
49
+ 2. **Recent Git Commits** - Look at recent commit messages for PRD references:
50
+ - "fix: PRD 12 documentation" → PRD 12
51
+ - "feat: implement prd-13 features" → PRD 13
52
+
53
+ 3. **Git Status Analysis** - Check modified/staged files for PRD clues:
54
+ - Modified `prds/12-*.md` → PRD 12
55
+ - Changes in feature-specific directories
56
+
57
+ 4. **Available PRDs Discovery** - List all PRDs in `prds/` directory:
58
+ - `prds/12-documentation-testing.md`
59
+ - `prds/13-cicd-documentation-testing.md`
60
+
61
+ 5. **Fallback to User Choice** - Only if context detection fails, ask user to specify
62
+
63
+ **PRD Detection Implementation:**
64
+ ```bash
65
+ # Use these tools to gather context:
66
+ # 1. Check git branch: gitStatus shows current branch
67
+ # 2. Check git status: Look for modified PRD files
68
+ # 3. List PRDs: Use LS or Glob to find prds/*.md files
69
+ # 4. Recent commits: Use Bash 'git log --oneline -n 5' for recent context
70
+ ```
71
+
72
+ **Detection Logic:**
73
+ - **High Confidence**: Branch name matches PRD pattern (e.g., `feature/prd-12-documentation-testing`)
74
+ - **Medium Confidence**: Modified PRD files in git status or recent commits mention PRD
75
+ - **Low Confidence**: Multiple PRDs available, use heuristics (most recent, largest)
76
+ - **No Context**: Present available options to user
77
+
78
+ **Example Detection Outputs:**
79
+ ```markdown
80
+ 🎯 **Auto-detected PRD 12** (Documentation Testing)
81
+ - Branch: `feature/prd-12-documentation-testing` ✅
82
+ - Modified files: `prds/12-documentation-testing.md` ✅
83
+ - Recent commits mention PRD 12 features ✅
84
+ ```
85
+
86
+ **Once PRD is identified:**
87
+ - Read the PRD file from `prds/[issue-id]-[feature-name].md`
88
+ - Analyze completion status across all sections
89
+ - Identify patterns in completed vs remaining work
90
+
91
+ ## Step 2: Documentation & Implementation Analysis (Only if Context Unclear)
92
+
93
+ Before assessing task priorities, analyze both the documented specifications and current implementation state:
94
+
95
+ ### Documentation Analysis (Documentation-First PRDs)
96
+ For PRDs using the documentation-first approach:
97
+ - **Read referenced documentation**: Check the "Content Location Map" in PRD to find where feature specs live
98
+ - **Understand target state**: What functionality is documented but not yet implemented
99
+ - **Check documentation completeness**: Are all user workflows and examples fully documented
100
+ - **Validate cross-references**: Do all documentation links and references work correctly
101
+
102
+ ### Code Discovery
103
+ - **Search for related files**: Use Grep/Glob to find files related to the feature
104
+ - **Identify key modules**: Locate main implementation files mentioned in PRD
105
+ - **Find test files**: Discover existing test coverage for the feature
106
+ - **Check dependencies**: Review imports and module relationships
107
+
108
+ ### Implementation vs Documentation Gap Analysis
109
+ - **Compare docs vs code**: What's documented vs actually implemented
110
+ - **Partial implementations**: Identify half-finished features or TODO comments
111
+ - **Documentation validation**: Can documented examples and commands actually work
112
+ - **Architecture alignment**: Does current code match documented behavior and PRD architecture decisions
113
+ - **Quality assessment**: Code style, error handling, test coverage gaps
114
+
115
+ ### Technical Feasibility Analysis
116
+ - **Dependency conflicts**: Are PRD requirements compatible with existing code
117
+ - **Breaking changes**: Will remaining tasks require refactoring existing code
118
+ - **Integration points**: How new work connects with current implementation
119
+ - **Technical debt**: Issues that might block or slow future work
120
+
121
+ ## Step 3: Completion Assessment (Only if Context Unclear)
122
+
123
+ ### Analyze Checkbox States
124
+ Count and categorize all checkboxes:
125
+ - **Completed**: `[x]` items
126
+ - **Pending**: `[ ]` items
127
+ - **Deferred**: `[~]` items
128
+ - **Blocked**: `[!]` items
129
+
130
+ ### Phase Analysis
131
+ For each implementation phase:
132
+ - Calculate completion percentage
133
+ - Identify bottlenecks or stalled work
134
+ - Assess readiness to move to next phase
135
+
136
+ ### Requirement Coverage
137
+ Review requirement categories:
138
+ - **Functional Requirements**: Core feature completion
139
+ - **Non-Functional Requirements**: Quality and performance aspects
140
+ - **Success Criteria**: Measurable outcomes
141
+ - **Dependencies**: External requirements
142
+ - **Risk Mitigation**: Risk management progress
143
+
144
+ ## Step 4: Dependency Analysis (Only if Context Unclear)
145
+
146
+ ### Identify Critical Path Items
147
+ Look for items that:
148
+ - **Block other work** - Must be completed before others can start
149
+ - **Enable major capabilities** - Unlock significant value when completed
150
+ - **Resolve current blockers** - Remove impediments to progress
151
+
152
+ ### Dependency Patterns
153
+
154
+ #### PRD-Level Dependencies
155
+ - **Sequential dependencies** - A must be done before B
156
+ - **Parallel opportunities** - Multiple items that can be worked simultaneously
157
+ - **Foundation requirements** - Core capabilities needed by multiple features
158
+ - **Integration points** - Items that connect different parts of the system
159
+
160
+ #### Code-Level Dependencies
161
+ - **Import dependencies** - Modules that depend on others being implemented first
162
+ - **Interface contracts** - APIs/types that must be defined before consumers
163
+ - **Database schema** - Data model changes needed before business logic
164
+ - **Test dependencies** - Tests that require certain infrastructure or mocks
165
+ - **Build/deployment** - Configuration changes that affect multiple components
166
+
167
+ ## Step 5: Strategic Value Assessment (Only if Context Unclear)
168
+
169
+ ### High-Value Next Steps
170
+ Prioritize items that:
171
+ - **Unblock multiple other items** - High leverage impact
172
+ - **Deliver user-visible value** - Direct user benefit
173
+ - **Reduce technical risk** - Address major uncertainties
174
+ - **Enable validation** - Allow testing of key assumptions
175
+ - **Provide learning** - Generate insights for future work
176
+
177
+ ### Low-Priority Items
178
+ Identify items that:
179
+ - **Have many dependencies** - Can't be started yet
180
+ - **Are nice-to-have** - Don't impact core value proposition
181
+ - **Are optimization-focused** - Improve existing working features
182
+ - **Require external dependencies** - Waiting on others
183
+
184
+ ## Step 6: Single Task Recommendation
185
+
186
+ **Note**: If you arrived here from Step 0 (clear context), use the conversation history and known PRD state to make your recommendation. If you came through the full analysis, use your detailed findings.
187
+
188
+ Present findings in this focused format:
189
+
190
+ ```markdown
191
+ # Next Task Recommendation: [Feature Name]
192
+
193
+ ## Recommended Task: [Specific Task Name]
194
+
195
+ **Why this task**: [2-3 sentences explaining why this is the highest priority right now]
196
+
197
+ **What it unlocks**: [What becomes possible after completing this]
198
+
199
+ **Dependencies**: [What's already complete that makes this ready to work on]
200
+
201
+ **Effort estimate**: [Realistic time estimate]
202
+
203
+ **Success criteria**: [How you'll know it's done]
204
+
205
+ ---
206
+
207
+ **Do you want to work on this task?**
208
+
209
+ If yes, I'll help you design the implementation approach. If no, let me know what you'd prefer to work on instead.
210
+ ```
211
+
212
+ ## Step 7: Design Discussion (If Confirmed)
213
+
214
+ If the user confirms they want to work on the recommended task, then dive into:
215
+
216
+ ### Implementation Planning
217
+ - **Architecture approach**: How this fits into existing codebase
218
+ - **Key components**: What needs to be built/modified
219
+ - **Integration points**: How it connects with existing code
220
+ - **Testing strategy**: How to validate the implementation
221
+
222
+ ### Design Decisions
223
+ - **Technical choices**: Framework/library decisions to make
224
+ - **Interface design**: APIs, data structures, user interfaces
225
+ - **Error handling**: How to handle failure cases
226
+ - **Performance considerations**: Scalability and optimization needs
227
+
228
+ ### Implementation Steps
229
+ - **Step-by-step breakdown**: Logical sequence of implementation
230
+ - **Quick wins**: Parts that can be completed first for validation
231
+ - **Risk mitigation**: Addressing the biggest uncertainties first
232
+ - **Testing checkpoints**: When and how to validate progress
233
+
234
+ ### Questions to Resolve
235
+ - **Open decisions**: Design choices that need to be made
236
+ - **Clarifications needed**: Requirements that need more detail
237
+ - **Assumptions to validate**: Things we're assuming that should be confirmed
238
+
239
+ ## Success Criteria
240
+
241
+ This command should:
242
+ - ✅ Identify the single highest-value task to work on next based on current PRD state
243
+ - ✅ Provide clear, compelling rationale for why this specific task should be prioritized
244
+ - ✅ Wait for user confirmation before proceeding
245
+ - ✅ If confirmed, provide detailed implementation design guidance
246
+ - ✅ Keep teams focused on the most important work rather than overwhelming them with options
247
+ - ✅ Enable immediate action by transitioning from recommendation to design discussion
@@ -0,0 +1,186 @@
1
+ ---
2
+ name: prd-start
3
+ description: Start working on a PRD implementation
4
+ category: project-management
5
+ ---
6
+
7
+ # PRD Start - Begin Implementation Work
8
+
9
+ ## Instructions
10
+
11
+ You are helping initiate active implementation work on a specific Product Requirements Document (PRD). This command bridges the gap between PRD planning and actual development work by setting up the implementation context and providing clear next steps.
12
+
13
+ ## Process Overview
14
+
15
+ 1. **Auto-Detect Target PRD** - Intelligently determine which PRD to start implementing
16
+ 2. **Validate PRD Readiness** - Ensure the PRD is ready for implementation
17
+ 3. **Set Up Implementation Context** - Prepare the development environment
18
+ 4. **Identify Starting Point** - Determine the best first implementation task
19
+ 5. **Begin Implementation** - Launch into actual development work
20
+
21
+ ## Step 1: Smart PRD Detection
22
+
23
+ **Auto-detect the target PRD using these context clues (in priority order):**
24
+
25
+ 1. **Git Branch Analysis** - Check current branch name for PRD patterns:
26
+ - `feature/prd-12-*` → PRD 12
27
+ - `prd-13-*` → PRD 13
28
+ - `feature/prd-*` → Extract PRD number
29
+
30
+ 2. **Recent Git Commits** - Look at recent commit messages for PRD references:
31
+ - "feat: PRD 12 setup" → PRD 12
32
+ - "docs: update prd-13 requirements" → PRD 13
33
+
34
+ 3. **Git Status Analysis** - Check modified/staged files for PRD clues:
35
+ - Modified `prds/12-*.md` → PRD 12
36
+ - Changes in PRD-specific directories
37
+
38
+ 4. **Available PRDs Discovery** - List all PRDs in `prds/` directory and identify those ready for implementation
39
+
40
+ 5. **Fallback to User Choice** - Only if context detection fails, ask user to specify
41
+
42
+ **PRD Detection Implementation:**
43
+ ```bash
44
+ # Use these tools to gather context:
45
+ # 1. Check git branch: gitStatus shows current branch
46
+ # 2. Check git status: Look for modified PRD files
47
+ # 3. List PRDs: Use LS or Glob to find prds/*.md files
48
+ # 4. Recent commits: Use Bash 'git log --oneline -n 5' for recent context
49
+ ```
50
+
51
+ **Detection Output:**
52
+ ```markdown
53
+ 🚀 **Starting work on PRD [X]** ([Feature Name])
54
+ - Branch: `feature/prd-[X]-[feature-name]` ✅
55
+ - PRD file: `prds/[X]-[feature-name].md` ✅
56
+ - Current status: Ready for implementation ✅
57
+ ```
58
+
59
+ ## Step 2: PRD Readiness Validation
60
+
61
+ Before starting implementation, validate that the PRD is ready:
62
+
63
+ ### Requirements Validation
64
+ - **Functional Requirements**: Are core requirements clearly defined and complete?
65
+ - **Success Criteria**: Are measurable success criteria established?
66
+ - **Dependencies**: Are all external dependencies identified and available?
67
+ - **Risk Assessment**: Have major risks been identified and mitigation plans created?
68
+
69
+ ### Documentation Analysis
70
+ For documentation-first PRDs:
71
+ - **Specification completeness**: Is the feature fully documented with user workflows?
72
+ - **Integration points**: Are connections with existing features documented?
73
+ - **API/Interface definitions**: Are all interfaces and data structures specified?
74
+ - **Examples and usage**: Are concrete usage examples provided?
75
+
76
+ ### Implementation Readiness Checklist
77
+ ```markdown
78
+ ## PRD Readiness Check
79
+ - [ ] All functional requirements defined ✅
80
+ - [ ] Success criteria measurable ✅
81
+ - [ ] Dependencies available ✅
82
+ - [ ] Documentation complete ✅
83
+ - [ ] Integration points clear ✅
84
+ - [ ] Implementation approach decided ✅
85
+ ```
86
+
87
+ ## Step 3: Implementation Context Setup
88
+
89
+ ### Git Branch Management
90
+ **If not already on a feature branch:**
91
+ ```bash
92
+ # Create feature branch for PRD implementation
93
+ git checkout -b feature/prd-[issue-id]-[feature-name]
94
+ git push -u origin feature/prd-[issue-id]-[feature-name]
95
+ ```
96
+
97
+ ### Development Environment Setup
98
+ - **Dependencies**: Install any new dependencies required by the PRD
99
+ - **Configuration**: Set up any configuration needed for development
100
+ - **Test data**: Prepare test data or mock services
101
+ - **Documentation tools**: Ensure documentation generation tools are available
102
+
103
+ ### Implementation Tracking Setup
104
+ - **Mark PRD as "In Progress"**: Update PRD status section
105
+ - **Create implementation log**: Add initial work log entry with start date
106
+ - **Set up progress tracking**: Identify key milestones for progress updates
107
+
108
+ ## Step 4: Identify Implementation Starting Point
109
+
110
+ ### Critical Path Analysis
111
+ Identify the highest-priority first task by analyzing:
112
+ - **Foundation requirements**: Core capabilities that other features depend on
113
+ - **Blocking dependencies**: Items that prevent other work from starting
114
+ - **Quick wins**: Early deliverables that provide validation or value
115
+ - **Risk mitigation**: High-uncertainty items that should be tackled early
116
+
117
+ ### Implementation Phases
118
+ For complex PRDs, identify logical implementation phases:
119
+ 1. **Phase 1 - Foundation**: Core data structures, interfaces, basic functionality
120
+ 2. **Phase 2 - Integration**: Connect with existing systems, implement workflows
121
+ 3. **Phase 3 - Enhancement**: Advanced features, optimization, polish
122
+ 4. **Phase 4 - Validation**: Testing, documentation updates, deployment
123
+
124
+ ### First Task Recommendation
125
+ Select the single best first task based on:
126
+ - **Dependency analysis**: No blocking dependencies
127
+ - **Value delivery**: Provides meaningful progress toward PRD goals
128
+ - **Learning opportunity**: Generates insights for subsequent work
129
+ - **Validation potential**: Allows early testing of key assumptions
130
+
131
+ ## Step 5: Begin Implementation
132
+
133
+ ### Implementation Kickoff
134
+ Present the implementation plan:
135
+
136
+ ```markdown
137
+ # 🚀 Starting Implementation: [PRD Name]
138
+
139
+ ## Selected First Task: [Task Name]
140
+
141
+ **Why this task first**: [Clear rationale for why this is the optimal starting point]
142
+
143
+ **What you'll build**: [Concrete description of what will be implemented]
144
+
145
+ **Success criteria**: [How you'll know this task is complete]
146
+
147
+ **Estimated effort**: [Time estimate]
148
+
149
+ **Next steps after this**: [What becomes possible once this is done]
150
+
151
+ ## Implementation Approach
152
+ [Brief technical approach and key decisions]
153
+
154
+ ## Ready to Start?
155
+ Type 'yes' to begin implementation, or let me know if you'd prefer to start with a different task.
156
+ ```
157
+
158
+ ### Implementation Launch
159
+ If confirmed, provide:
160
+ - **Detailed task breakdown**: Step-by-step implementation guide
161
+ - **Code structure recommendations**: Files to create/modify
162
+ - **Testing approach**: How to validate the implementation
163
+ - **Progress checkpoints**: When to update the PRD with progress
164
+
165
+ ### Progress Tracking Setup
166
+ - **Update PRD status**: Mark relevant items as "in progress"
167
+ - **Commit initial setup**: Make initial commit with branch and any setup changes
168
+ - **Documentation updates**: Add PRD traceability comments to any docs being implemented
169
+
170
+ ## Success Criteria
171
+
172
+ This command should:
173
+ - ✅ Successfully identify the target PRD for implementation
174
+ - ✅ Validate that the PRD is ready for development work
175
+ - ✅ Set up proper implementation context (branch, environment, tracking)
176
+ - ✅ Identify the optimal first implementation task
177
+ - ✅ Provide clear, actionable next steps for beginning development
178
+ - ✅ Bridge the gap between planning and actual coding work
179
+ - ✅ Ensure proper progress tracking is established from the start
180
+
181
+ ## Notes
182
+
183
+ - This command is designed for PRDs that are ready to move from planning to implementation
184
+ - Use `prd-next` for ongoing implementation guidance on what to work on next
185
+ - Use `prd-update-progress` to track implementation progress against PRD requirements
186
+ - Use `prd-done` when PRD implementation is complete and ready for deployment/closure