π CESC AI WORKFLOW v3 (PHASE + FINALIZE MODE)
AI Agent must create real folders and files for each command, with structured phases, execution traceability, and finalization support.
β οΈ CORE PRINCIPLES
- MUST create real files in project
- MUST create folder if not exist
- MUST NOT only return text
- If cannot create file β return FULL file content ready to paste
π DIRECTORY STRUCTURE
/docs
βββ requirements/
βββ brainstorm/
βββ plan/
βββ execution/
βββ review/
βββ refactor/
βββ testing/
βββ docs/
βββ final/
π FILE NAMING (MANDATORY)
Format:
YYYY-MM-DD_HHmm_[feature]_[type].md
Rules:
- Always include timestamp
- Feature = kebab-case (auth-system, payment-flow)
-
Auto detect from:
- "Feature: xxx"
- or infer from context
π§ GLOBAL DOCUMENT HEADER (NEW)
Every file MUST include:
Status: DRAFT | IN_PROGRESS | FINAL
Version: v1
Feature: <feature-name>
Updated: YYYY-MM-DD HH:mm
π§© PHASE + STEP STRUCTURE (MANDATORY IN /plan)
## Phase 1: <name>
### Step 1.1: <step name>
- Description
- Output
- Dependencies
### Step 1.2: <step name>
...
Rules:
- Phase = milestone (setup, core, optimizeβ¦)
- Step = atomic, implementable immediately
-
Each step MUST define:
- Output (file/code/module)
- Clear scope (small enough)
π FINALIZE MODE (NEW)
Command:
/[command] end
Example:
/plan end
FINALIZE RULES
- MUST create new file:
YYYY-MM-DD_HHmm_[feature]_[command]-final.md
- MUST update:
Status: FINAL
-
MUST:
- Remove ambiguity
- Remove duplicated logic
- Ensure all steps executable
MUST include:
## β
Final Checklist
- [x] All steps actionable
- [x] No missing dependency
- [x] Clear execution order
π TRACEABILITY (MANDATORY)
All docs must link together.
Example:
Plan:
Step 2.1 β execution-step-2.md
Execution:
Source Plan:
- Phase 2 - Step 2.1
Testing:
Covering:
- execution-step-2.md
π§ COMMANDS
/brainstorm
Folder:
/docs/brainstorm/
File:
YYYY-MM-DD_HHmm_[feature]_brainstorm.md
Content:
- Problem
-
Scope
- In scope
- Out of scope
Ambiguities
Unknowns (Need clarification)
Assumptions
Solutions
Tech stack
/plan
Folder:
/docs/plan/
File:
YYYY-MM-DD_HHmm_[feature]_plan-v{n}.md
Content:
- Phase + Step breakdown
-
Execution Strategy
- Parallel / Sequential
- Estimated complexity
Dependencies
Risks
Additional:
## Phase Summary
| Phase | Goal | Risk |
Versioning:
- v1 β v2 β v3...
- Iterate until user says: "Plan is clean"
/execute
Folder:
/docs/execution/
File:
YYYY-MM-DD_HHmm_[feature]_execution-step-{n}.md
Rules:
- Only implement selected step
Support:
/execute step=1,2
Content:
-
Source Plan:
- Phase X - Step Y
Code
Short explanation
/review
Folder:
/docs/review/
File:
YYYY-MM-DD_HHmm_[feature]_review.md
Content:
- Critical issues
- Major issues
- Minor issues
- Suggestions
Additional:
## Coverage Check
- Missing cases?
- Missing edge cases?
Verdict:
- LGTM
- NEED FIX
/refactor
Folder:
/docs/refactor/
File:
YYYY-MM-DD_HHmm_[feature]_refactor.md
Content:
- Improved code
- Changes made
- Reasoning
Additional:
## Impact Analysis
- Performance
- Readability
- Maintainability
π§ͺ TESTING
/testcase
Folder:
/docs/testing/
File:
YYYY-MM-DD_HHmm_[feature]_testcases.md
Content:
- Test scenarios
- Input / Expected Output
- Edge cases
- Priority
Additional:
## Test Pyramid
- Unit
- Integration
- E2E
/test
Folder:
/docs/testing/
File:
YYYY-MM-DD_HHmm_[feature]_test-results.md
Content:
- Unit tests (Jest / PyTestβ¦)
- Passed / Failed
- Error logs
- Coverage estimate
/report
Folder:
/docs/final/
File:
YYYY-MM-DD_HHmm_[feature]_final-report.md
Content:
- Requirement summary
- Implementation mapping
- Code quality
- Test results
- Risks
- Deployment readiness
Additional:
## Traceability
| Requirement | Plan Step | Code | Test |
π DOCUMENTATION
/docs init
Folder:
/docs/docs/
MUST create:
- project-overview.md
- tech-stack.md
- architecture.md
- coding-conventions.md
- api-contract.md
/docs update
- MUST update documentation based on latest implementation
/docs explain
File:
/docs/docs/YYYY-MM-DD_HHmm_{module}_explain.md
π WORKFLOWS
Small Task
/brainstorm
β /plan
β /execute
β /review
Medium Task
/brainstorm
β /plan
β /execute
β /review
β /refactor
Large Feature
/brainstorm
β /plan (iterate until clean)
β /docs init
β /execute (step-by-step)
β /review
β /refactor
β /testcase
β /test
β /docs update
β /report
β‘ FLAGS
/execute step=1,2
/testcase level=unit
/testcase level=e2e
/review strict=true
/test strict=true
𧬠VERSIONING RULES
| Command | Version Rule |
|---|---|
| /plan | v1 β v2 β v3 |
| /review | overwrite |
| /refactor | overwrite |
| /final | new file |
π OPTIONAL COMMANDS (ADVANCED)
/sync
-
Validate consistency across:
- plan
- execution
- test
-
Detect:
- Missing step
- Missing test
- Dead logic
/status
Generate system state:
Feature: <feature-name>
Plan: vX (DRAFT/FINAL)
Execution: Step X done
Testing: XX%
Risk: Low/Medium/High
/retro
Post-mortem:
## What went well
## What went wrong
## Lessons learned
π― FINAL GOAL
Transform AI into:
- Architect
- Developer
- Reviewer
- QA Engineer
- Tech Lead
- Documentation Writer
π‘ HARD RULE
Every step MUST produce:
- Code OR
- File OR
- Measurable output
Top comments (0)