A standardized workflow for modifying existing features, ensuring changes are well-founded, controlled, and incremental.
Understand First, Then Modify — Before any feature change, understand the relevant code to ensure the change direction is correct.
Choose Workflow by Scenario — Simple issues get simplified workflow, complex issues get full workflow. No unnecessary overhead.
Check Docs When Needed — Only check latest documentation when dealing with complex technical details or specific API usage. Simple changes don't need this.
Conservative Optimization — Optimize without changing existing flows and core logic. Avoid high-risk large-scale refactoring.
Confirm Before Execute — Complex changes require user confirmation before development begins.
After receiving a user request, first determine which scenario it falls into, then choose the corresponding workflow:
ScenarioCharacteristicsWorkflowSimple IssueChange color, text, spacing, config valuesSimplified: Read code → Change directlyBug FixFix errors, exceptions, unexpected behaviorMust analyze cause. Simple bugs use simplified workflow, complex bugs use full workflowComplex IssueNew features, logic optimization, multi-file changes, architecture involvedFull 5-step workflowRefactoringCore flow changes, large-scale code adjustmentsFull 5-step workflow
text
1. Read relevant code (only the part to change)
2. Make the change
3. Inform user it's done
User: Change the login button color to blue
AI:
Bug fixes must first locate the cause. Don't change code based on guessing.
Characteristics: Cause is clear, small change scope, doesn't affect other features
text
1. Analyze current state: locate bug cause
2. Fix directly
3. Inform user it's done
Characteristics: Cause unclear, involves multiple modules, may affect other features, requires architecture changes
text
Follow the full 5-step workflow
Simple BugComplex BugClear error message, can locate directlyCause unclear, needs investigationSmall change scope, 1-2 placesInvolves multiple files/modulesDoesn't affect other featuresMay cause chain reactionsDoesn't involve core logicNeeds to change core flow
After receiving a feature change request, don't start coding directly. First do the following:
Output Format:
text
## Project Overview
- Project type: xxx
- Core modules: xxx, xxx, xxx
- Data flow: xxx → xxx → xxx
## Related Modules
- Module A: responsible for xxx
- Module B: responsible for xxx
- Dependencies: A → B → C
After understanding the project, analyze the current state of the change target:
Output Format:
text
## Current State Analysis
### Current Implementation
[Describe current implementation]
### Strengths
- xxx
- xxx
### Bottlenecks/Weaknesses
- xxx: [specific description]
- xxx: [specific description]
Based on analysis, propose optimization plan. Key constraint: don't change existing flow
Output Format:
text
## Optimization Plan
### Overview
[Briefly describe optimization approach]
### Optimization Points
1. xxx: [specific change, expected effect]
2. xxx: [specific change, expected effect]
### What Not to Change
- xxx: [why to keep]
### Risk Assessment
- Change scope: [large/medium/small]
- Affected modules: xxx, xxx
- Note: xxx
Break down the optimization plan into specific steps, list the plan and ask user for confirmation:
Output Format:
text
## Development Plan
### Step List
1. [ ] Step 1: xxx
2. [ ] Step 2: xxx
3. [ ] Step 3: xxx
### Confirmation Questions
- Does the above plan meet your expectations?
- Any steps need adjustment or addition?
- Can I start execution?
Wait for user response. Don't start development on your own.
After user confirms:
During development:
Refactoring must follow the full workflow because of high risk and large impact scope.
Characteristics of refactoring:
Not all changes need documentation check. Only check in these cases:
mcp__context7__resolve-library-id + mcp__context7__query-docs)
ScenarioWorkflowSimple IssueRead code → Change directlySimple BugAnalyze cause → Fix directlyComplex BugFull 5 stepsComplex IssueFull 5 stepsRefactoringFull 5 steps
StepActionOutput1Understand globallyProject overview2Analyze current stateStrengths/bottlenecks/weaknesses3Propose planOptimization points/what not to change4List plan and askStep list + confirmation questions5Execute after confirmationDevelop step by step
Conditional: Check documentation (for complex technical issues)
Remember: Determine scenario first, then choose workflow. Handle simple issues simply, plan complex issues carefully.