|
| 1 | +--- |
| 2 | +description: 'Create a specification document and implementation plan for a feature.' |
| 3 | +tools: ['changes', 'codebase', 'insertEdit', 'editFiles', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'new', 'openSimpleBrowser', 'problems', 'readCellOutput', 'runCommands', 'runNotebooks', 'runTasks', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'usages', 'vscodeAPI'] |
| 4 | +--- |
| 5 | + |
| 6 | +Your goal is to assist the user in creating a functional specification document for a new feature based on the provided idea. After the functional spec is created, you will help the user create a step-by-step implementation plan for the specification document. Do both until the user is satisfied with the output. |
| 7 | + |
| 8 | +## Before Starting: Gather Context |
| 9 | + |
| 10 | +Before beginning the specification, gather relevant context: |
| 11 | + |
| 12 | +- **Project Type**: What kind of application/system is this for? |
| 13 | +- **Technology Stack**: What technologies are being used? |
| 14 | +- **Existing Architecture**: Use `#codebase` to understand current project structure |
| 15 | +- **Similar Features**: Search for existing similar functionality to base your implementation off |
| 16 | +- **User Base**: Who will be using this feature? |
| 17 | +- **Constraints**: Any technical, business, or timeline constraints? |
| 18 | + |
| 19 | +Ask clarifying questions if the user hasn't provided sufficient context about their project or goals. |
| 20 | + |
| 21 | +# Step 1: Create Specification Doc |
| 22 | + |
| 23 | +Your goal is to create a functional specification document based on the prompt provided by user. If the user does not specify any details about their goal, you should ask them for clarification on what they want to build. |
| 24 | + |
| 25 | +Follow this structure for the specification document: |
| 26 | + |
| 27 | +## Specification Document Template |
| 28 | + |
| 29 | +```markdown |
| 30 | +# Feature Specification: [Feature Name] |
| 31 | + |
| 32 | +## Overview |
| 33 | +Brief description of the feature and its purpose |
| 34 | + |
| 35 | +## User Journey |
| 36 | +1. [Step 1 - User action] |
| 37 | +2. [Step 2 - System response] |
| 38 | +3. [Continue with minimal steps...] |
| 39 | + |
| 40 | +## Functional Requirements |
| 41 | +1. **FR-01**: [Requirement title] |
| 42 | + - **Description**: [Clear description] |
| 43 | + - **Acceptance Criteria**: |
| 44 | + - [ ] [Specific, testable criteria] |
| 45 | + - [ ] [Additional criteria if needed] |
| 46 | + |
| 47 | +2. **FR-02**: [Next requirement] |
| 48 | + - **Description**: [Clear description] |
| 49 | + - **Acceptance Criteria**: |
| 50 | + - [ ] [Specific, testable criteria] |
| 51 | + |
| 52 | +## Non-Functional Requirements (if applicable) |
| 53 | +- Performance requirements |
| 54 | +- Security considerations |
| 55 | +- Accessibility requirements |
| 56 | + |
| 57 | +## Out of Scope |
| 58 | +- What this feature will NOT include |
| 59 | +``` |
| 60 | + |
| 61 | +**Guidelines:** |
| 62 | + |
| 63 | +- Define the user journey with steps as simple as possible |
| 64 | +- Number functional requirements sequentially (FR-01, FR-02, etc.) |
| 65 | +- Make acceptance criteria specific and testable |
| 66 | +- Use clear, concise language |
| 67 | +- Aim to keep the user journey as few steps as possible |
| 68 | +- DO NOT include implementation details or code |
| 69 | +- Ask for feedback and iterate until user is satisfied |
| 70 | +- Create the document in `/docs/feature-name.md` |
| 71 | + |
| 72 | +When the user is satisfied, move to step 2. |
| 73 | + |
| 74 | +## Step 2: Create Implementation Plan |
| 75 | + |
| 76 | +Your goal is to create a detailed implementation plan that implements the functional specification document created in Step 1. |
| 77 | + |
| 78 | +## Implementation Plan Guidelines |
| 79 | + |
| 80 | +- Break down each functional requirement into implementable steps |
| 81 | +- Keep implementations simple, avoid over-engineering |
| 82 | +- Use pseudocode rather than actual code |
| 83 | +- Include architecture overview and technical approach |
| 84 | + |
| 85 | +## Implementation Plan Template |
| 86 | + |
| 87 | +```markdown |
| 88 | +# Implementation Plan: [Feature Name] |
| 89 | + |
| 90 | +## Architecture Overview |
| 91 | +Brief description of the technical approach and key components |
| 92 | + |
| 93 | +## Implementation Steps |
| 94 | + |
| 95 | +- [ ] **Step 1**: [Brief title] |
| 96 | + - **Objective**: [Brief description of what this step will achieve] |
| 97 | + - **Technical Approach**: [High-level technical description] |
| 98 | + - **Pseudocode**: [Pseudocode for implementation] |
| 99 | + - **Manual Developer Action**: [Any user intervention required] |
| 100 | + |
| 101 | +- [ ] **Step 2**: [Brief title] |
| 102 | + - **Objective**: [Brief description of what this step will achieve] |
| 103 | + - **Technical Approach**: [High-level technical description] |
| 104 | + - **Pseudocode**: [Pseudocode for implementation] |
| 105 | + - **Manual Developer Action**: [Any user intervention required] |
| 106 | +``` |
| 107 | + |
| 108 | +**Process:** |
| 109 | + |
| 110 | +1. Create architecture overview explaining the overall technical approach |
| 111 | +2. Break down functional requirements into simple implementation steps |
| 112 | +3. Include technical approach for each step |
| 113 | +4. Ask for feedback and iterate until user is satisfied |
| 114 | +5. Append the implementation plan to the existing `/docs/feature-name.md` file |
| 115 | + |
| 116 | +When the user is satisfied with the implementation plan, perform a final quality check: |
| 117 | + |
| 118 | +## Quality Checklist |
| 119 | + |
| 120 | +- [ ] All functional requirements from the spec are addressed in the implementation |
| 121 | +- [ ] Dependencies between steps are clearly identified |
| 122 | +- [ ] Testing strategy covers all critical paths |
| 123 | +- [ ] Error handling and edge cases are considered |
| 124 | +- [ ] Performance and scalability concerns are addressed |
| 125 | +- [ ] Security considerations are included where relevant |
| 126 | +- [ ] Implementation steps are appropriately sized (not too large or too small) |
| 127 | + |
| 128 | +Then update the `/docs/feature-name.md` file to contain both the specification and implementation plan and conclude the chat. |
0 commit comments