workflow-orchestrator
npx skills add https://github.com/nguyenthienthanh/aura-frog --skill workflow-orchestrator
Agent 安装分布
Skill 文档
Aura Frog Workflow Orchestrator
Priority: CRITICAL – Use for complex feature implementations Version: 1.0.0
When to Use
USE for:
- New features
- Complex implementations
- Tasks > 2 hours
- Multi-file changes
- Tasks requiring TDD workflow
DON’T use for:
- Bug fixes â use
bugfix-quick - Quick refactors â direct edit
- Config changes â direct edit
- Simple questions â just answer
Pre-Execution Checklist
- agent-detector â Select lead agent (MANDATORY)
- project-context-loader â Load conventions (MANDATORY)
- Show agent banner at start of response
- Verify task complexity – if simple, suggest lighter approach
Token Budget Per Phase
CRITICAL: Stay within budget to avoid context explosion.
token_budget[9]{phase,max_tokens,format}:
1,500,TOON summary only - NO prose
2,1500,Technical design in TOON + minimal prose
3,800,Component list in TOON
4,600,Test cases in TOON table
5a,1000,Test code only - no explanations
5b,2000,Implementation code - minimal comments
5c,500,Refactor summary in TOON
6,800,Review findings in TOON table
7-9,300 each,Status only
Phase 1 HARD CAP: 500 tokens. Use /workflow:phase1-lite format.
9-Phase Workflow
| Phase | Name | Lead Agent | Deliverable | Gate |
|---|---|---|---|---|
| 1 | Understand ð¯ | pm-operations-orchestrator | Requirements (TOON, â¤500 tokens) | â¡ Auto |
| 2 | Design ðï¸ | Dev agent | Technical design | â Approval |
| 3 | UI Breakdown ð¨ | ui-designer | Component breakdown | â¡ Auto |
| 4 | Plan Tests 𧪠| qa-automation | Test strategy | ⡠Auto |
| 5a | Write Tests ð´ | qa-automation + Dev | Failing tests (TDD RED) | â¡ Auto |
| 5b | Build ð¢ | Dev agent | Implementation (TDD GREEN) | â Approval |
| 5c | Polish â»ï¸ | Dev agent | Refactored code (TDD REFACTOR) | â¡ Auto |
| 6 | Review ð | security-expert | Quality review report | â¡ Auto* |
| 7 | Verify â | qa-automation | All tests pass, coverage â¥80% | â¡ Auto |
| 8 | Document ð | pm-operations-orchestrator | Documentation | â¡ Auto |
| 9 | Share ð | slack-operations | Team notification | â¡ Auto |
Gate Legend:
- â Approval = Must wait for user approval before continuing
- â¡ Auto = Auto-continue after showing deliverables
- â¡ Auto* = Auto-continue unless issues found (stops if critical issues)
Phase Transition Rules
Valid Transitions
Phase 1 (Understand) â Phase 2 (Design)
Mode: â¡ AUTO-CONTINUE
Shows: Requirements summary, then continues
Phase 2 (Design) â Phase 3 (UI)
Mode: â APPROVAL REQUIRED
Blocker: No technical design approved
Phase 3 (UI) â Phase 4 (Plan Tests)
Mode: â¡ AUTO-CONTINUE
Skip if: No UI component in task
Phase 4 (Plan Tests) â Phase 5a (Write Tests)
Mode: â¡ AUTO-CONTINUE
Shows: Test strategy, then continues
Phase 5a (RED) â Phase 5b (GREEN)
Mode: â¡ AUTO-CONTINUE (if tests fail as expected)
Blocker: Tests pass (they should fail!) â STOP
Phase 5b (GREEN) â Phase 5c (REFACTOR)
Mode: â APPROVAL REQUIRED
Blocker: Tests still failing
Phase 5c (REFACTOR) â Phase 6 (Review)
Mode: â¡ AUTO-CONTINUE (if tests still pass)
Blocker: Tests broken by refactor â STOP
Phase 6 (Review) â Phase 7 (Verify)
Mode: â¡ AUTO-CONTINUE (unless critical issues)
Blocker: Critical security issues â STOP for approval
Phase 7 (Verify) â Phase 8 (Document)
Mode: â¡ AUTO-CONTINUE (if tests pass)
Blocker: Tests fail or coverage <80% â STOP
Phase 8 (Document) â Phase 9 (Share)
Mode: â¡ AUTO-CONTINUE
Auto-executes Phase 9
Summary: Only 2 Approval Gates
| Gate | Phase | Why |
|---|---|---|
| 1st | Phase 2 (Design) | Architecture decisions are hard to change later |
| 2nd | Phase 5b (GREEN) | Main implementation – review before refactor |
All other phases auto-continue unless a blocker is hit.
Invalid Transitions (BLOCKED)
- â Skip from Phase 1 to Phase 5 (no design)
- â Phase 5b without 5a (no TDD)
- â Phase 7 with failing tests
- â Any phase skip without explicit user request
Approval Gates (Only 2)
Approval is only required at Phase 2 (Design) and Phase 5b (Implementation).
Gate Format
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
ðï¸ Phase [N]: [Name] - Approval Needed
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
## [Friendly Summary] â¨
[Deliverables list]
---
ð **Progress:** ââââââââââââââââ [X]% ([N]/8 phases)
âï¸ **After approval:**
â Phases [N+1] to [X] will AUTO-CONTINUE
â Next approval gate: Phase [Y]
---
**Options:**
- `approve` / `yes` â Continue (auto-runs until next gate)
- `reject: <reason>` â Brainstorm & re-do
- `modify: <changes>` â Adjust deliverables
- `stop` â Cancel workflow
â¡ After approval, I'll AUTO-CONTINUE through multiple phases!
See: rules/workflow-navigation.md for full navigation format.
Auto-Continue Phases (No Approval Needed)
These phases show deliverables but continue automatically:
| Phase | Shows | Then |
|---|---|---|
| 1. Understand | Requirements summary | â Continues to Phase 2 |
| 3. UI Breakdown | Component breakdown | â Continues to Phase 4 |
| 4. Test Plan | Test strategy | â Continues to Phase 5a |
| 5a. TDD RED | Failing tests | â Continues to Phase 5b (if tests fail) |
| 5c. TDD REFACTOR | Cleaned code | â Continues to Phase 6 (if tests pass) |
| 6. Review | Review report | â Continues to Phase 7 (unless critical issues) |
| 7. Verify | Test results | â Continues to Phase 8 (if pass) |
| 8. Document | Documentation | â Continues to Phase 9 |
Auto-Stop Conditions:
- Phase 5a: Tests pass (should fail) â STOP
- Phase 5c/6/7: Tests fail â STOP
- Phase 6: Critical security issues â STOP
- Phase 7: Coverage < 80% â STOP
Valid Responses
| Response | Action |
|---|---|
approve / yes |
Continue to next phase immediately |
reject: <reason> |
Brainstorm first, then restart phase |
modify: <changes> |
Light brainstorm, then adjust deliverables |
stop / cancel |
End workflow, save state |
Feedback Handling (IMPORTANT)
Default behavior: Brainstorm feedback before implementing.
- Analyze user’s suggestion
- Consider alternatives
- Present options with pros/cons
- Then implement agreed approach
Force mode: Skip brainstorming when user says:
- “must do: …” â Implement directly
- “just do: …” â Skip discussion
- “work like that” â No alternatives
See: rules/feedback-brainstorming.md
AUTO-CONTINUE Behavior
Streamlined workflow with only 2 approval gates:
Flow Overview
START â Phase 1 (auto) â Phase 2 â APPROVAL
â Phase 3-5a (auto) â Phase 5b â APPROVAL
â Phase 5c-9 (auto) â DONE
Example Flow
User: "workflow:start Add JWT authentication"
â Phase 1: Understand (shows summary, auto-continues)
â Phase 2: Design
â APPROVAL GATE - waits for user
User: "approve"
â Phase 3: UI Breakdown (auto-continues)
â Phase 4: Test Plan (auto-continues)
â Phase 5a: TDD RED - write failing tests (auto-continues if tests fail)
â Phase 5b: TDD GREEN - implementation
â APPROVAL GATE - waits for user
User: "approve"
â Phase 5c: Refactor (auto-continues if tests pass)
â Phase 6: Review (auto-continues unless critical issues)
â Phase 7: Verify (auto-continues if tests pass)
â Phase 8: Document (auto-continues)
â Phase 9: Share (auto-executes)
â DONE â
Auto-Stop Triggers:
- Tests fail when they shouldn’t (or pass when they should fail)
- Critical security issues in review
- Coverage below 80%
- Token limit reached
Token Awareness:
- At 75% (150K tokens): Warn user
- At 85% (170K tokens): Suggest
workflow:handoff - At 90% (180K tokens): Force handoff
Critical Rules
TDD (NON-NEGOTIABLE)
Phase 5a (RED):
â
Write tests FIRST
â
Run tests â MUST FAIL
â If tests pass â STOP, tests aren't testing new code
Phase 5b (GREEN):
â
Write minimal code to pass tests
â
Run tests â MUST PASS
â If tests fail â Fix code, not tests
Phase 5c (REFACTOR):
â
Clean up code
â
Run tests â MUST STILL PASS
â If tests fail â Revert refactor
KISS Principle
- â Simple over complex
- â Standard patterns over custom
- â Solve today’s problem, not tomorrow’s
- â No premature abstraction
- â No over-engineering
- â No excessive configuration
Cross-Review
| Phase | Creator | Reviewers |
|---|---|---|
| 1 (Understand) | PM | Dev + QA + UI |
| 2 (Design) | Dev | Secondary Dev + QA |
| 4 (Plan Tests) | QA | Dev |
| 6 (Review) | Security | All |
Phase Skip Rules
Automatic Skips
- Phase 3 (UI): Skip if task has no UI components
- Phase 9 (Share): Skip if no Slack integration configured
User-Requested Skips
User can request skip with reason:
User: "skip phase 3, this is backend only"
â Log skip reason
â Proceed to Phase 4
Files to Load (ON-DEMAND ONLY)
TOKEN OPTIMIZATION: Do NOT pre-load all files. Load only when entering that phase.
Phase Guides (Load ONE at a time)
phase_files[9]{phase,file,load_when}:
1,docs/phases/phase-1-understand.md,Entering Phase 1
2,docs/phases/phase-2-design.md,Entering Phase 2
3,docs/phases/phase-3-ui.md,Entering Phase 3 (skip if no UI)
4,docs/phases/phase-4-test-planning.md,Entering Phase 4
5,docs/phases/phase-5-implementation.md,Entering Phase 5a/5b/5c
6,docs/phases/phase-6-review.md,Entering Phase 6
7,docs/phases/phase-7-verification.md,Entering Phase 7
8,docs/phases/phase-8-documentation.md,Entering Phase 8
9,docs/phases/phase-9-notification.md,Entering Phase 9
Project Context (Load ONCE at workflow start)
.claude/project-contexts/[project]/project-config.yaml
Skip: conventions.md and rules.md unless explicitly needed.
Rules (Load only if referenced)
rules[4]{rule,load_when}:
tdd-workflow.md,Phase 5 only
kiss-principle.md,Never (principle is inline above)
feedback-brainstorming.md,Only on reject/modify response
workflow-navigation.md,Only if navigation unclear
State Management
Save State
workflow:handoff
â Saves to .claude/logs/workflows/[workflow-id]/
â Contains: current phase, deliverables, context
Resume State
workflow:resume <workflow-id>
â Loads saved state
â Continues from last phase
â Re-shows approval gate if pending
Workflow Status
workflow:status
â Shows: current phase, completed phases, pending tasks
Example Workflow Execution
User: "workflow:start Add user authentication with JWT"
âââ AUTO-CONTINUE BLOCK 1 âââ
Phase 1: Understand ð¯ [AUTO]
âââ Analyze requirements
âââ Define success criteria
âââ Identify risks
âââ Shows summary, continues automatically...
Phase 2: Design ðï¸
âââ Design JWT architecture
âââ Define API endpoints
âââ Plan database schema
âââ â APPROVAL GATE (1 of 2)
User: "approve"
âââ AUTO-CONTINUE BLOCK 2 âââ
Phase 3: UI Breakdown ð¨ [AUTO]
âââ Design login/register screens
âââ Extract design tokens
âââ Continues automatically...
Phase 4: Test Plan 𧪠[AUTO]
âââ Define test strategy
âââ List test cases
âââ Continues automatically...
Phase 5a: Write Tests ð´ [AUTO]
âââ Write failing tests (TDD RED)
âââ Run tests â verify they FAIL
âââ Continues automatically (if tests fail as expected)...
Phase 5b: Build ð¢
âââ Implement code (TDD GREEN)
âââ Run tests â verify they PASS
âââ â APPROVAL GATE (2 of 2)
User: "approve"
âââ AUTO-CONTINUE BLOCK 3 âââ
Phase 5c: Polish â»ï¸ [AUTO]
âââ Refactor code
âââ Run tests â still pass
âââ Continues automatically...
Phase 6: Review ð [AUTO]
âââ Security review
âââ Code quality check
âââ Continues automatically (unless critical issues)...
Phase 7: Verify â
[AUTO]
âââ Run all tests
âââ Check coverage â¥80%
âââ Continues automatically...
Phase 8: Document ð [AUTO]
âââ Update documentation
âââ Generate ADRs if needed
âââ Continues automatically...
Phase 9: Share ð [AUTO]
âââ Send Slack notification
âââ Workflow complete â
TOTAL APPROVALS NEEDED: 2
Remember:
- Follow phases in order
- Only 2 approval gates: Phase 2 (Design) and Phase 5b (Implementation)
- Auto-continue through other phases unless blocker hit
- TDD is mandatory (RED â GREEN â REFACTOR)
- Save state at token limit
- ALWAYS show what’s next after each phase (see
rules/workflow-navigation.md)