Loading...
Loading...
State-machine driven orchestrator for structured software development. Invoke when user wants to develop features, fix bugs, or refactor code. Triggers: 'build a feature', 'fix this bug', 'implement', 'develop', 'refactor'.
npx skill4agent add learnwy/skills requirement-workflowfeaturebugfixrefactorimplementdevelopbuildget-status.sh| Level | Name | Use Case | Est. Time |
|---|---|---|---|
| L1 | Quick | Bug fixes, config changes, minor tweaks | < 1h |
| L2 | Standard | Regular feature development, API changes | 1-8h |
| L3 | Full | Complex features, cross-module, security-sensitive | > 8h |
📖 See Level Selection Guide for detailed criteria
./scripts/init-workflow.sh -r <project_root> -n <name> -t <type> [-l <level>]-r, --root-n, --name-t, --typefeaturebugfixrefactorhotfix-l, --levelL1L2L3.trae/workflow/{date}_{seq}_{type}_{name}/.trae/active_workflow| Level | Flow | Reference |
|---|---|---|
| L1 | PLANNING → IMPLEMENTING → TESTING | L1 Workflow |
| L2 | ANALYZING → PLANNING → DESIGNING → IMPLEMENTING → TESTING → DELIVERING | L2 Workflow |
| L3 | Extended analysis → Architecture review → Security audit → Implementation → Testing → Approval | L3 Workflow |
./scripts/get-status.sh -r <project_root> # Check status
./scripts/advance-stage.sh -r <project_root> # Advance to next stage
./scripts/generate-report.sh -r <project_root> # Generate report📍 [STAGE_NAME] Starting
🎯 Objectives:
- {objective_1}
- {objective_2}
📋 Tasks:
1. {task_1}
2. {task_2}
📄 Expected Outputs:
- {output_file_1}
- {output_file_2}✅ [STAGE_NAME] Completed
📊 Summary:
- Tasks completed: {N}/{M}
- Duration: {duration}
📄 Outputs:
- {file_1}: {brief_description}
- {file_2}: {brief_description}
➡️ Next Stage: {NEXT_STAGE}
Prerequisites: {what_next_stage_needs}| Stage | Input (Prerequisites) | Output (Must Produce) |
|---|---|---|
| ANALYZING | User requirement | |
| PLANNING | | |
| DESIGNING | | |
| IMPLEMENTING | | Code files, |
| TESTING | Code files | |
| DELIVERING | | |
INIT → PLANNING → IMPLEMENTING → TESTING → DONEINIT → ANALYZING → PLANNING → DESIGNING → IMPLEMENTING → TESTING → DELIVERING → DONEINIT → ANALYZING(ext) → PLANNING(ext) → DESIGNING(ext) → IMPLEMENTING → TESTING → DELIVERING → DONE.trae/
├── active_workflow # Path to current active workflow
└── workflow/
└── {date}_{seq}_{type}_{name}/
├── workflow.yaml # Workflow state
├── spec.md # Requirements (L2, L3)
├── design.md # Technical design (L2, L3)
├── tasks.md # Task breakdown
├── checklist.md # Test checklist
├── logs/
│ └── impl.md # Implementation log
└── artifacts/
└── report.md # Final report| Script | Purpose | Required Args |
|---|---|---|
| Initialize workflow | |
| Check status | |
| Advance stage | |
| Inject skill | |
| Generate report | |
User: The login button doesn't respond when clicked
AI: This is a clear bug. Using L1 Quick workflow.
📊 Analysis:
- Type: bugfix
- Level: L1 (Quick)
- Impact: 1 file
Initializing workflow...
✅ Workflow: 20240115_001_bugfix_fix-login-button
[PLANNING] Analyzing and planning fix
- Found: onClick handler has typo
[IMPLEMENTING] Executing fix
- Fixed: handleLgoin → handleLogin
[TESTING] Verifying
- ✅ TypeScript: passed
- ✅ ESLint: passed
- ✅ Tests: passed
[DONE] Workflow complete
- Duration: ~5 minutes
- Files changed: 1User: I need a user avatar upload feature
AI: Standard feature development. Using L2 Standard workflow.
📊 Analysis:
- Type: feature
- Level: L2 (Standard)
- Modules: User, Storage
Initializing workflow...
✅ Workflow: 20240115_002_feature_user-avatar-upload
[ANALYZING] Requirements clarification
- Max size: 2MB
- Formats: jpg, png
- Crop: circular preview
[PLANNING] Task breakdown
- 6 tasks identified
- Est. time: 4h
[DESIGNING] Technical design
- API: POST /api/users/avatar
- Storage: S3 /avatars/{userId}/{timestamp}.{ext}
[IMPLEMENTING] Coding
- ✅ All 6 tasks completed
[TESTING] Verification
- ✅ Tests: 12/12 passed
- ✅ Coverage: 75%
[DELIVERING] Report generation
- Report saved to artifacts/report.md
[DONE] Workflow complete
- Duration: 3h 45mUser: We need to integrate OAuth 2.0 for Google/GitHub login
AI: Security-sensitive feature. Using L3 Full workflow.
📊 Analysis:
- Type: feature
- Level: L3 (Full)
- Security: High
- Requires: Threat modeling, security review
Initializing workflow...
✅ Workflow: 20240115_003_feature_oauth-integration
[ANALYZING - Extended]
Threat modeling (STRIDE):
- Spoofing: High risk → Validate OAuth state
- Token leakage: High risk → HttpOnly cookies
[PLANNING - Extended]
- Timeline: ~5 days
- Rollback strategy: Feature flag
[DESIGNING - Extended]
Security design:
- State: encrypted random + timestamp
- Token: encrypted storage
- Scope: minimal permissions
🔒 Approvals required:
- [ ] Security team
- [ ] Tech Lead
User: Both approved
[IMPLEMENTING] Coding with security scanning
[TESTING - Extended] Security testing passed
[DELIVERING - Extended] Compliance sign-off complete
[DONE] Workflow complete
- Duration: 5 days
- Security review: Passed