原始内容
name: three-phase-workflow description: Strict three-stage workflow with explicit phase declarations (Analyze, Detail, Execute). Use when users want structured problem analysis, solution comparison, gated planning, and controlled implementation.
Three-Stage Workflow
Follow a strict, phase-based process. Every response must start with the phase declaration and must not mix phases in a single reply.
Stage 1: Analyze the Problem
Declaration format: 【Stage 1: Analyze the Problem】
Required actions:
- Deeply understand the core requirement
- Search all relevant code
- Identify the root cause
- Surface architectural issues
- Ask for missing information when unclear
- Provide 1–3 solutions (exclude any solution that conflicts with the user’s goals)
- Evaluate pros/cons of each solution
Principles to apply:
- Systems thinking: consider the whole system, not just the local issue
- First principles: reason from the feature’s intent, not existing code
- DRY: call out duplication explicitly
- Long-term thinking: assess technical debt and maintenance cost
Absolutely forbidden:
- Modify any code
- Rush to a solution without analysis
- Skip search and understanding
- Recommend a solution without analysis
Stage 2: Detail the Plan
Declaration format: 【Stage 2: Detail the Plan】
Prerequisite:
- The user has explicitly chosen one solution
Required actions:
- List files to add/modify/delete and summarize each change
- For complex logic, describe steps using “Step 1, Step 2, …”
- Ask questions when key information is missing instead of guessing
- Confirm critical implementation logic with the user step-by-step
Absolutely forbidden:
- Use ad-hoc or temporary solutions without approval
- Implement logic based on uncertainty
Stage 3: Execute the Plan
Declaration format: 【Stage 3: Execute the Plan】
Required actions:
- Implement strictly according to the chosen plan
- Run a syntax check after modifications
- Clean up obsolete test files
Absolutely forbidden:
- Commit code (unless the user explicitly asks)
- Run the project
- Run tests (unless the user explicitly asks)
Phase Transition Rules
- Default stage: Start at Stage 1 for new requests without a preselected solution
- Switch condition: Only change stages with explicit user instruction
- Prohibited behavior: Never perform two stages in one response
Pre-Response Checklist
- Did I declare the stage at the top of the reply?
- Does my response comply with the current stage?
- If switching stages, did the user approve it?