Feature Discovery and Planning
Overview
This skill guides systematic feature discovery and planning to ensure requirements are well-understood before implementation begins. It's specifically designed for planning game features in the TripleDerby horse racing simulation.
When to Use
- Planning a new game feature or capability
- Analyzing feature requirements and scope
- Breaking down complex features into implementable tasks
- Conducting feasibility studies for new mechanics
- Designing game systems (race mechanics, betting, training, etc.)
- Scope planning for development iterations
Instructions
Phase 1: Discovery
- Gather Context: Ask clarifying questions about feature goals, user experience, and game design intent
- Identify Requirements: Document what the feature must do (functional requirements)
- Explore Constraints: Understand technical, gameplay, and performance constraints
- Map Use Cases: Identify player interactions and game scenarios
- Review Codebase: Examine existing patterns and systems that may be affected or leveraged
Phase 2: Technical Analysis
- Evaluate Feasibility: Assess technical viability within the current architecture
- Identify Dependencies: Map relationships to existing systems (Race, Horse, Betting, etc.)
- Review Data Model: Consider database schema changes needed
- Assess Integration Points: Identify where new code connects to existing systems
- Consider Performance: Evaluate impact on race simulation, UI responsiveness, etc.
- Security & Validation: Identify data validation and security requirements
Phase 3: Planning
- Break Down Tasks: Decompose the feature into concrete, implementable tasks
- Sequence Work: Identify logical implementation phases and dependencies
- Estimate Complexity: Note particularly complex or risky areas
- Create Task List: Use TodoWrite to create a structured task breakdown
- Define Milestones: Identify testable checkpoints and deliverables
Phase 4: Documentation
- Write Specification: Create clear feature requirements document
- Document Assumptions: Record decisions and assumptions made during planning
- Define Success Criteria: Establish how to validate the feature works correctly
- Create Implementation Plan: Write step-by-step implementation approach
- Reference Templates: Use PLANNING_TEMPLATE.md and DISCOVERY_CHECKLIST.md
Examples
Example 1: New Game System
User: "I want to add a horse training system where players can improve their horses' stats over time"
Claude will:
- Ask about training mechanics (time-based? resource-based? mini-games?)
- Explore stat progression (linear? diminishing returns? caps?)
- Review existing Horse entity and stats structure
- Identify UI requirements for training interface
- Plan database schema changes for tracking training progress
- Break down into tasks: data model, service layer, UI, validation
- Create implementation roadmap with phases
Example 2: Race Feature Enhancement
User: "Design a weather system that affects race outcomes"
Claude will:
- Clarify weather types and their effects on racing
- Review RaceService and race simulation logic
- Identify where weather modifiers integrate into calculations
- Plan random weather generation vs player-controlled scenarios
- Consider UI for displaying weather conditions
- Document edge cases (weather changes mid-race?)
- Create phased implementation plan
Example 3: Requirements Analysis
User: "Help me plan a multiplayer betting feature where players can bet on each other's races"
Claude will:
- Ask about betting rules, stake limits, payout calculations
- Explore multiplayer architecture requirements
- Review existing betting system (if any)
- Identify security concerns (preventing cheating, validation)
- Plan real-time updates and notifications
- Break into phases: single-player betting, then multiplayer integration
- Create comprehensive task breakdown
Best Practices
Discovery Phase
- Ask open-ended questions to understand the "why" behind features
- Reference similar features in the existing codebase
- Consider player experience and game balance
- Document edge cases and unusual scenarios
Analysis Phase
- Read relevant existing code before proposing changes
- Identify patterns used elsewhere in the codebase (services, entities, repositories)
- Consider both happy path and error scenarios
- Think about testability
Planning Phase
- Break features into vertical slices when possible (end-to-end functionality)
- Sequence tasks to deliver testable increments
- Flag high-risk or complex areas that need extra attention
- Create detailed but flexible plans
Documentation Phase
- Write specifications that developers can implement from
- Include code examples or pseudocode for complex logic
- Reference existing patterns to follow
- Document open questions and areas needing future decisions
Output Format
After conducting discovery and planning, create a feature specification document in /docs/features/ that includes:
- Feature Summary: One-paragraph overview
- Requirements: Functional and non-functional requirements
- Technical Approach: Architecture and integration points
- Implementation Plan: Phased task breakdown
- Success Criteria: How to validate correctness
- Open Questions: Items needing further clarification
Use the PLANNING_TEMPLATE.md as a starting point for documentation.
Output Location: All feature specification documents should be saved to /docs/features/[feature-name].md
Integration with Existing Systems
When planning features for TripleDerby, consider integration with:
- Core Entities: Horse, Race, RaceRun, RaceRunHorse, Player, etc.
- Services: RaceService, simulation logic, game flow
- Data Layer: Entity Framework, repositories, ModelBuilderExtensions
- UI: Game interface, player controls, visual feedback
- Game Balance: Stats, probabilities, progression systems
Notes
- This skill uses Read, Grep, and Glob tools to explore the codebase during discovery
- Creates task lists using TodoWrite for structured planning
- May use AskUserQuestion to clarify ambiguous requirements
- Produces markdown documentation for feature specifications
- Focuses on practical, implementable plans rather than theoretical designs
CRITICAL GIT WORKFLOW RULES
NEVER commit or push code without EXPLICIT user approval.
When implementing features:
- Discovery Phase: Research, design, document - NO git commands
- Implementation Phase: Write code, run tests - NO git commits
- WAIT for user approval: User must explicitly say "commit this" or "push this"
- ONLY THEN: Create commits and push to remote
Examples of what NOT to do:
- ❌ "Let me commit Phase 1" (without asking first)
- ❌ Automatically committing after tests pass
- ❌ Assuming user wants code committed
Correct workflow:
- ✅ Implement feature
- ✅ Run tests to verify
- ✅ Report results to user
- ✅ ASK: "Would you like me to commit these changes?"
- ✅ WAIT for explicit approval
- ✅ ONLY THEN run git commands
COMMIT AND PR MESSAGE RULES
NEVER include Claude Code attribution or self-reference in commits or PRs.
When creating commits or pull requests:
- ❌ NEVER add "🤖 Generated with [Claude Code]" footer
- ❌ NEVER add "Co-Authored-By: Claude Sonnet" tag
- ❌ NEVER mention Claude, AI, or automated generation
- ✅ Write commit messages as if written by the developer
- ✅ Focus on what changed and why
- ✅ Use professional, technical language only
Examples:
BAD - DO NOT DO THIS:
Feature implementation complete
This adds the new commentary system.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
GOOD - DO THIS:
Feature implementation complete
This adds the new commentary system with event detection
and natural language variation.
1---2name: feature-discovery-23description: Conduct feature discovery and planning for new game features. Use when designing new features, planning implementations, analyzing requirements, breaking down complex features into tasks, or conducting feasibility studies for the TripleDerby racing game.4---5
6# Feature Discovery and Planning
7
8## Overview
9This skill guides systematic feature discovery and planning to ensure requirements are well-understood before implementation begins. It's specifically designed for planning game features in the TripleDerby horse racing simulation.
10
11## When to Use
12- Planning a new game feature or capability
13- Analyzing feature requirements and scope
14- Breaking down complex features into implementable tasks
15- Conducting feasibility studies for new mechanics
16- Designing game systems (race mechanics, betting, training, etc.)
17- Scope planning for development iterations
18
19## Instructions
20
21### Phase 1: Discovery
221. **Gather Context**: Ask clarifying questions about feature goals, user experience, and game design intent
232. **Identify Requirements**: Document what the feature must do (functional requirements)
243. **Explore Constraints**: Understand technical, gameplay, and performance constraints
254. **Map Use Cases**: Identify player interactions and game scenarios
265. **Review Codebase**: Examine existing patterns and systems that may be affected or leveraged
27
28### Phase 2: Technical Analysis
291. **Evaluate Feasibility**: Assess technical viability within the current architecture
302. **Identify Dependencies**: Map relationships to existing systems (Race, Horse, Betting, etc.)
313. **Review Data Model**: Consider database schema changes needed
324. **Assess Integration Points**: Identify where new code connects to existing systems
335. **Consider Performance**: Evaluate impact on race simulation, UI responsiveness, etc.
346. **Security & Validation**: Identify data validation and security requirements
35
36### Phase 3: Planning
371. **Break Down Tasks**: Decompose the feature into concrete, implementable tasks
382. **Sequence Work**: Identify logical implementation phases and dependencies
393. **Estimate Complexity**: Note particularly complex or risky areas
404. **Create Task List**: Use TodoWrite to create a structured task breakdown
415. **Define Milestones**: Identify testable checkpoints and deliverables
42
43### Phase 4: Documentation
441. **Write Specification**: Create clear feature requirements document
452. **Document Assumptions**: Record decisions and assumptions made during planning
463. **Define Success Criteria**: Establish how to validate the feature works correctly
474. **Create Implementation Plan**: Write step-by-step implementation approach
485. **Reference Templates**: Use PLANNING_TEMPLATE.md and DISCOVERY_CHECKLIST.md
49
50## Examples
51
52### Example 1: New Game System
53**User**: "I want to add a horse training system where players can improve their horses' stats over time"
54
55**Claude will**:
56- Ask about training mechanics (time-based? resource-based? mini-games?)
57- Explore stat progression (linear? diminishing returns? caps?)
58- Review existing Horse entity and stats structure
59- Identify UI requirements for training interface
60- Plan database schema changes for tracking training progress
61- Break down into tasks: data model, service layer, UI, validation
62- Create implementation roadmap with phases
63
64### Example 2: Race Feature Enhancement
65**User**: "Design a weather system that affects race outcomes"
66
67**Claude will**:
68- Clarify weather types and their effects on racing
69- Review RaceService and race simulation logic
70- Identify where weather modifiers integrate into calculations
71- Plan random weather generation vs player-controlled scenarios
72- Consider UI for displaying weather conditions
73- Document edge cases (weather changes mid-race?)
74- Create phased implementation plan
75
76### Example 3: Requirements Analysis
77**User**: "Help me plan a multiplayer betting feature where players can bet on each other's races"
78
79**Claude will**:
80- Ask about betting rules, stake limits, payout calculations
81- Explore multiplayer architecture requirements
82- Review existing betting system (if any)
83- Identify security concerns (preventing cheating, validation)
84- Plan real-time updates and notifications
85- Break into phases: single-player betting, then multiplayer integration
86- Create comprehensive task breakdown
87
88## Best Practices
89
90### Discovery Phase
91- Ask open-ended questions to understand the "why" behind features
92- Reference similar features in the existing codebase
93- Consider player experience and game balance
94- Document edge cases and unusual scenarios
95
96### Analysis Phase
97- Read relevant existing code before proposing changes
98- Identify patterns used elsewhere in the codebase (services, entities, repositories)
99- Consider both happy path and error scenarios
100- Think about testability
101
102### Planning Phase
103- Break features into vertical slices when possible (end-to-end functionality)
104- Sequence tasks to deliver testable increments
105- Flag high-risk or complex areas that need extra attention
106- Create detailed but flexible plans
107
108### Documentation Phase
109- Write specifications that developers can implement from
110- Include code examples or pseudocode for complex logic
111- Reference existing patterns to follow
112- Document open questions and areas needing future decisions
113
114## Output Format
115
116After conducting discovery and planning, create a feature specification document in `/docs/features/` that includes:
117
1181. **Feature Summary**: One-paragraph overview
1192. **Requirements**: Functional and non-functional requirements
1203. **Technical Approach**: Architecture and integration points
1214. **Implementation Plan**: Phased task breakdown
1225. **Success Criteria**: How to validate correctness
1236. **Open Questions**: Items needing further clarification
124
125Use the PLANNING_TEMPLATE.md as a starting point for documentation.
126
127**Output Location**: All feature specification documents should be saved to `/docs/features/[feature-name].md`
128
129## Integration with Existing Systems
130
131When planning features for TripleDerby, consider integration with:
132- **Core Entities**: Horse, Race, RaceRun, RaceRunHorse, Player, etc.
133- **Services**: RaceService, simulation logic, game flow
134- **Data Layer**: Entity Framework, repositories, ModelBuilderExtensions
135- **UI**: Game interface, player controls, visual feedback
136- **Game Balance**: Stats, probabilities, progression systems
137
138## Notes
139
140- This skill uses Read, Grep, and Glob tools to explore the codebase during discovery
141- Creates task lists using TodoWrite for structured planning
142- May use AskUserQuestion to clarify ambiguous requirements
143- Produces markdown documentation for feature specifications
144- Focuses on practical, implementable plans rather than theoretical designs
145
146## CRITICAL GIT WORKFLOW RULES
147
148**NEVER commit or push code without EXPLICIT user approval.**
149
150When implementing features:
1511. **Discovery Phase**: Research, design, document - NO git commands
1522. **Implementation Phase**: Write code, run tests - NO git commits
1533. **WAIT for user approval**: User must explicitly say "commit this" or "push this"
1544. **ONLY THEN**: Create commits and push to remote
155
156**Examples of what NOT to do:**
157- ❌ "Let me commit Phase 1" (without asking first)
158- ❌ Automatically committing after tests pass
159- ❌ Assuming user wants code committed
160
161**Correct workflow:**
162- ✅ Implement feature
163- ✅ Run tests to verify
164- ✅ Report results to user
165- ✅ ASK: "Would you like me to commit these changes?"
166- ✅ WAIT for explicit approval
167- ✅ ONLY THEN run git commands
168
169## COMMIT AND PR MESSAGE RULES
170
171**NEVER include Claude Code attribution or self-reference in commits or PRs.**
172
173When creating commits or pull requests:
174- ❌ NEVER add "🤖 Generated with [Claude Code]" footer
175- ❌ NEVER add "Co-Authored-By: Claude Sonnet" tag
176- ❌ NEVER mention Claude, AI, or automated generation
177- ✅ Write commit messages as if written by the developer
178- ✅ Focus on what changed and why
179- ✅ Use professional, technical language only
180
181**Examples:**
182
183**BAD - DO NOT DO THIS:**
184```
185Feature implementation complete
186
187This adds the new commentary system.
188
189🤖 Generated with [Claude Code](https://claude.com/claude-code)
190Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
191```
192
193**GOOD - DO THIS:**
194```
195Feature implementation complete
196
197This adds the new commentary system with event detection
198and natural language variation.
199```