mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-04 01:40:45 +08:00
- Implemented CliCommandNode component for executing CLI tools with AI models. - Implemented PromptNode component for constructing AI prompts with context. - Added styling for mode and tool badges in both components. - Enhanced user experience with command and argument previews, execution status, and error handling. test: add comprehensive tests for ask_question tool - Created direct test for ask_question tool execution. - Developed end-to-end tests to validate ask_question tool integration with WebSocket and A2UI surfaces. - Implemented simple and integrated WebSocket tests to ensure proper message handling and surface reception. - Added tool registration test to verify ask_question tool is correctly registered. chore: add WebSocket listener and simulation tests - Added WebSocket listener for A2UI surfaces to facilitate testing. - Implemented frontend simulation test to validate complete flow from backend to frontend. - Created various test scripts to ensure robust testing of ask_question tool functionality.
1 line
25 KiB
JavaScript
1 line
25 KiB
JavaScript
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[368],{1184(e,n,t){t.d(n,{R:()=>r,x:()=>o});var i=t(3696);const s={},l=i.createContext(s);function r(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(l.Provider,{value:n},e.children)}},2807(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"workflows/level-5-intelligent","title":"Level 5 - Intelligent Workflows","description":"Automated command orchestration with intelligent analysis and recommendation","source":"@site/docs/workflows/level-5-intelligent.mdx","sourceDirName":"workflows","slug":"/workflows/level-5-intelligent","permalink":"/docs/docs/workflows/level-5-intelligent","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/workflows/level-5-intelligent.mdx","tags":[],"version":"current","sidebarPosition":6,"frontMatter":{"title":"Level 5 - Intelligent Workflows","description":"Automated command orchestration with intelligent analysis and recommendation","sidebar_position":6},"sidebar":"docs","previous":{"title":"Level 4: Brainstorm","permalink":"/docs/docs/workflows/level-4-brainstorm"},"next":{"title":"FAQ","permalink":"/docs/docs/faq"}}');var s=t(2540),l=t(1184),r=t(1540);const o={title:"Level 5 - Intelligent Workflows",description:"Automated command orchestration with intelligent analysis and recommendation",sidebar_position:6},c="Level 5: Intelligent Workflows",a={},d=[{value:"Overview",id:"overview",level:2},{value:"Included Workflow: ccw-coordinator",id:"included-workflow-ccw-coordinator",level:2},{value:"Command",id:"command",level:3},{value:"Core Concept: Minimum Execution Units",id:"core-concept-minimum-execution-units",level:3},{value:"Minimum Execution Units",id:"minimum-execution-units",level:3},{value:"Planning + Execution Units",id:"planning--execution-units",level:4},{value:"Testing Units",id:"testing-units",level:4},{value:"Review Units",id:"review-units",level:4},{value:"3-Phase Workflow",id:"3-phase-workflow",level:3},{value:"Phase 1: Analyze Requirements",id:"phase-1-analyze-requirements",level:4},{value:"Phase 2: Discover Commands & Recommend Chain",id:"phase-2-discover-commands--recommend-chain",level:4},{value:"Phase 3: Execute Sequential Command Chain",id:"phase-3-execute-sequential-command-chain",level:4},{value:"State File Structure",id:"state-file-structure",level:3},{value:"Complete Lifecycle Decision Flowchart",id:"complete-lifecycle-decision-flowchart",level:3},{value:"Use Cases",id:"use-cases",level:3},{value:"When to Use",id:"when-to-use",level:3},{value:"When NOT to Use",id:"when-not-to-use",level:3},{value:"Relationship with Other Levels",id:"relationship-with-other-levels",level:3},{value:"Related Workflows",id:"related-workflows",level:2},{value:"Command Reference",id:"command-reference",level:2}];function x(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"level-5-intelligent-workflows",children:"Level 5: Intelligent Workflows"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Complexity"}),": All levels | ",(0,s.jsx)(n.strong,{children:"Artifacts"}),": Full state persistence | ",(0,s.jsx)(n.strong,{children:"Automation"}),": Complete"]}),"\n",(0,s.jsx)(n.p,{children:"Level 5 workflows provide the most intelligent automation - automated command chain orchestration with sequential execution and state persistence. They auto-analyze requirements, recommend optimal command chains, and execute end-to-end."}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsx)(r.A,{chart:"\n flowchart TD\n Start([User Input]) --\x3e Analyze[Phase 1: Analyze<br/>Requirements]\n Analyze --\x3e Recommend[Phase 2: Discover Commands<br/>& Recommend Chain]\n Recommend --\x3e Confirm[User Confirmation<br/>Optional]\n Confirm --\x3e Execute[Phase 3: Execute Sequential<br/>Command Chain]\n\n Execute --\x3e State[State Persistence<br/>state.json]\n State --\x3e Check{Complete?}\n Check --\x3e|No| Execute\n Check --\x3e|Yes| Complete([Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef phase fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef state fill:#ffecb3,stroke:#ffa000\n\n class Start,Complete startend,Confirm,Check decision,Analyze,Recommend,Execute phase,State state\n"}),"\n",(0,s.jsx)(n.h2,{id:"included-workflow-ccw-coordinator",children:"Included Workflow: ccw-coordinator"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Auto-analyze & recommend command chains with sequential execution"})}),"\n",(0,s.jsx)(n.h3,{id:"command",children:"Command"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'/ccw-coordinator "Implement user authentication with OAuth2"\n# Or simply\n/ccw "Add user authentication"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"core-concept-minimum-execution-units",children:"Core Concept: Minimum Execution Units"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Definition"}),": A set of commands that must execute together as an atomic group to achieve a meaningful workflow milestone."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Why This Matters"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Prevents Incomplete States"}),": Avoid stopping after task generation without execution"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"User Experience"}),": User gets complete results, not intermediate artifacts requiring manual follow-up"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Workflow Integrity"}),": Maintains logical coherence of multi-step operations"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"minimum-execution-units",children:"Minimum Execution Units"}),"\n",(0,s.jsx)(n.h4,{id:"planning--execution-units",children:"Planning + Execution Units"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit Name"}),(0,s.jsx)(n.th,{children:"Commands"}),(0,s.jsx)(n.th,{children:"Purpose"}),(0,s.jsx)(n.th,{children:"Output"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Quick Implementation"})}),(0,s.jsx)(n.td,{children:"lite-plan -> lite-execute"}),(0,s.jsx)(n.td,{children:"Lightweight plan and immediate execution"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Multi-CLI Planning"})}),(0,s.jsx)(n.td,{children:"multi-cli-plan -> lite-execute"}),(0,s.jsx)(n.td,{children:"Multi-perspective analysis and execution"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Bug Fix"})}),(0,s.jsx)(n.td,{children:"lite-fix -> lite-execute"}),(0,s.jsx)(n.td,{children:"Quick bug diagnosis and fix execution"}),(0,s.jsx)(n.td,{children:"Fixed code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Full Planning + Execution"})}),(0,s.jsx)(n.td,{children:"plan -> execute"}),(0,s.jsx)(n.td,{children:"Detailed planning and execution"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Verified Planning + Execution"})}),(0,s.jsx)(n.td,{children:"plan -> plan-verify -> execute"}),(0,s.jsx)(n.td,{children:"Planning with verification and execution"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Replanning + Execution"})}),(0,s.jsx)(n.td,{children:"replan -> execute"}),(0,s.jsx)(n.td,{children:"Update plan and execute changes"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"TDD Planning + Execution"})}),(0,s.jsx)(n.td,{children:"tdd-plan -> execute"}),(0,s.jsx)(n.td,{children:"Test-driven development planning and execution"}),(0,s.jsx)(n.td,{children:"Working code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Test Generation + Execution"})}),(0,s.jsx)(n.td,{children:"test-gen -> execute"}),(0,s.jsx)(n.td,{children:"Generate test suite and execute"}),(0,s.jsx)(n.td,{children:"Generated tests"})]})]})]}),"\n",(0,s.jsx)(n.h4,{id:"testing-units",children:"Testing Units"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit Name"}),(0,s.jsx)(n.th,{children:"Commands"}),(0,s.jsx)(n.th,{children:"Purpose"}),(0,s.jsx)(n.th,{children:"Output"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Test Validation"})}),(0,s.jsx)(n.td,{children:"test-fix-gen -> test-cycle-execute"}),(0,s.jsx)(n.td,{children:"Generate test tasks and execute test-fix cycle"}),(0,s.jsx)(n.td,{children:"Tests passed"})]})})]}),"\n",(0,s.jsx)(n.h4,{id:"review-units",children:"Review Units"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Unit Name"}),(0,s.jsx)(n.th,{children:"Commands"}),(0,s.jsx)(n.th,{children:"Purpose"}),(0,s.jsx)(n.th,{children:"Output"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Code Review (Session)"})}),(0,s.jsx)(n.td,{children:"review-session-cycle -> review-fix"}),(0,s.jsx)(n.td,{children:"Complete review cycle and apply fixes"}),(0,s.jsx)(n.td,{children:"Fixed code"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Code Review (Module)"})}),(0,s.jsx)(n.td,{children:"review-module-cycle -> review-fix"}),(0,s.jsx)(n.td,{children:"Module review cycle and apply fixes"}),(0,s.jsx)(n.td,{children:"Fixed code"})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"3-phase-workflow",children:"3-Phase Workflow"}),"\n",(0,s.jsx)(r.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Analyze Requirements]\n\n B --\x3e C[Parse task description]\n C --\x3e D[Extract: goal, scope, constraints,<br/>complexity, task type]\n\n D --\x3e E[Phase 2: Discover Commands<br/>& Recommend Chain]\n\n E --\x3e F[Dynamic command chain<br/>assembly]\n F --\x3e G[Port-based matching]\n\n G --\x3e H{User Confirmation}\n H --\x3e|Confirm| I[Phase 3: Execute Sequential<br/>Command Chain]\n H --\x3e|Adjust| J[Modify chain]\n H --\x3e|Cancel| K([Abort])\n J --\x3e H\n\n I --\x3e L[Initialize state]\n L --\x3e M[For each command]\n M --\x3e N[Assemble prompt]\n N --\x3e O[Launch CLI in background]\n O --\x3e P[Save checkpoint]\n P --\x3e Q{Complete?}\n Q --\x3e|No| M\n Q --\x3e|Yes| R([Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef phase fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef execute fill:#c5e1a5,stroke:#388e3c\n\n class A,K,R startend,H,Q decision,B,E,I phase,C,D,F,G,J,L,M,N,O,P execute\n"}),"\n",(0,s.jsx)(n.h4,{id:"phase-1-analyze-requirements",children:"Phase 1: Analyze Requirements"}),"\n",(0,s.jsx)(n.p,{children:"Parse task description to extract: goal, scope, constraints, complexity, and task type."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:"function analyzeRequirements(taskDescription) {\n return {\n goal: extractMainGoal(taskDescription), // e.g., \"Implement user registration\"\n scope: extractScope(taskDescription), // e.g., [\"auth\", \"user_management\"]\n constraints: extractConstraints(taskDescription), // e.g., [\"no breaking changes\"]\n complexity: determineComplexity(taskDescription), // 'simple' | 'medium' | 'complex'\n task_type: detectTaskType(taskDescription) // See task type patterns below\n };\n}\n\n// Task Type Detection Patterns\nfunction detectTaskType(text) {\n // Priority order (first match wins)\n if (/fix|bug|error|crash|fail|debug|diagnose/.test(text)) return 'bugfix';\n if (/tdd|test-driven|test first/.test(text)) return 'tdd';\n if (/test fail|fix test|failing test/.test(text)) return 'test-fix';\n if (/generate test|add test/.test(text)) return 'test-gen';\n if (/review/.test(text)) return 'review';\n if (/explore|brainstorm/.test(text)) return 'brainstorm';\n if (/multi-perspective|comparison/.test(text)) return 'multi-cli';\n return 'feature'; // Default\n}\n\n// Complexity Assessment\nfunction determineComplexity(text) {\n let score = 0;\n if (/refactor|migrate|architect|system/.test(text)) score += 2;\n if (/multiple|across|all|entire/.test(text)) score += 2;\n if (/integrate|api|database/.test(text)) score += 1;\n if (/security|performance|scale/.test(text)) score += 1;\n return score >= 4 ? 'complex' : score >= 2 ? 'medium' : 'simple';\n}\n"})}),"\n",(0,s.jsx)(n.h4,{id:"phase-2-discover-commands--recommend-chain",children:"Phase 2: Discover Commands & Recommend Chain"}),"\n",(0,s.jsx)(n.p,{children:"Dynamic command chain assembly using port-based matching."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Display to user"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Recommended Command Chain:\n\nPipeline (visual):\nRequirement -> lite-plan -> Plan -> lite-execute -> Code -> test-cycle-execute -> Tests Passed\n\nCommands:\n1. /workflow:lite-plan\n2. /workflow:lite-execute\n3. /workflow:test-cycle-execute\n\nProceed? [Confirm / Show Details / Adjust / Cancel]\n"})}),"\n",(0,s.jsx)(n.h4,{id:"phase-3-execute-sequential-command-chain",children:"Phase 3: Execute Sequential Command Chain"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:"async function executeCommandChain(chain, analysis) {\n const sessionId = `ccw-coord-${Date.now()}`;\n const stateDir = `.workflow/.ccw-coordinator/${sessionId}`;\n\n // Initialize state\n const state = {\n session_id: sessionId,\n status: 'running',\n created_at: new Date().toISOString(),\n analysis: analysis,\n command_chain: chain.map((cmd, idx) => ({ ...cmd, index: idx, status: 'pending' })),\n execution_results: [],\n prompts_used: []\n };\n\n // Save initial state\n Write(`${stateDir}/state.json`, JSON.stringify(state, null, 2));\n\n for (let i = 0; i < chain.length; i++) {\n const cmd = chain[i];\n\n // Assemble prompt\n let prompt = formatCommand(cmd, state.execution_results, analysis);\n prompt += `\\n\\nTask: ${analysis.goal}`;\n if (state.execution_results.length > 0) {\n prompt += '\\n\\nPrevious results:\\n';\n state.execution_results.forEach(r => {\n if (r.session_id) {\n prompt += `- ${r.command}: ${r.session_id}\\n`;\n }\n });\n }\n\n // Launch CLI in background\n const taskId = Bash(\n `ccw cli -p \"${escapePrompt(prompt)}\" --tool claude --mode write`,\n { run_in_background: true }\n ).task_id;\n\n // Save checkpoint\n state.execution_results.push({\n index: i,\n command: cmd.command,\n status: 'in-progress',\n task_id: taskId,\n session_id: null,\n artifacts: [],\n timestamp: new Date().toISOString()\n });\n\n // Stop here - wait for hook callback\n Write(`${stateDir}/state.json`, JSON.stringify(state, null, 2));\n break;\n }\n\n state.status = 'waiting';\n Write(`${stateDir}/state.json`, JSON.stringify(state, null, 2));\n return state;\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"state-file-structure",children:"State File Structure"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Location"}),": ",(0,s.jsx)(n.code,{children:".workflow/.ccw-coordinator/{session_id}/state.json"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "session_id": "ccw-coord-20250203-143025",\n "status": "running|waiting|completed|failed",\n "created_at": "2025-02-03T14:30:25Z",\n "updated_at": "2025-02-03T14:35:45Z",\n "analysis": {\n "goal": "Implement user registration",\n "scope": ["authentication", "user_management"],\n "constraints": ["no breaking changes"],\n "complexity": "medium",\n "task_type": "feature"\n },\n "command_chain": [\n {\n "index": 0,\n "command": "/workflow:plan",\n "name": "plan",\n "status": "completed"\n },\n {\n "index": 1,\n "command": "/workflow:execute",\n "name": "execute",\n "status": "running"\n }\n ],\n "execution_results": [\n {\n "index": 0,\n "command": "/workflow:plan",\n "status": "completed",\n "task_id": "task-001",\n "session_id": "WFS-plan-20250203",\n "artifacts": ["IMPL_PLAN.md"],\n "timestamp": "2025-02-03T14:30:25Z",\n "completed_at": "2025-02-03T14:30:45Z"\n }\n ]\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"complete-lifecycle-decision-flowchart",children:"Complete Lifecycle Decision Flowchart"}),"\n",(0,s.jsx)(r.A,{chart:'\n flowchart TD\n Start([Start New Task]) --\x3e Q0{Is this a bug fix?}\n\n Q0 --\x3e|Yes| BugFix["Bug Fix Process"]\n Q0 --\x3e|No| Q1{Do you know what to do?}\n\n BugFix --\x3e BugSeverity{Understand root cause?}\n BugSeverity --\x3e|Clear| LiteFix["/workflow:lite-fix<br/>Standard fix"]\n BugSeverity --\x3e|Production incident| HotFix["/workflow:lite-fix --hotfix<br/>Emergency hotfix"]\n BugSeverity --\x3e|Unclear| BugDiag["/workflow:lite-fix<br/>Auto-diagnose root cause"]\n\n BugDiag --\x3e LiteFix\n LiteFix --\x3e BugComplete["Bug fixed"]\n HotFix --\x3e FollowUp["Auto-generate follow-up tasks<br/>Complete fix + post-mortem"]\n FollowUp --\x3e BugComplete\n BugComplete --\x3e End(["Task Complete"])\n\n Q1 --\x3e|No| Ideation["Exploration Phase<br/>Clarify requirements"]\n Q1 --\x3e|Yes| Q2{Do you know how to do it?}\n\n Ideation --\x3e BrainIdea["/workflow:brainstorm:auto-parallel<br/>Explore product direction"]\n BrainIdea --\x3e Q2\n\n Q2 --\x3e|No| Design["Design Exploration<br/>Explore architecture"]\n Q2 --\x3e|Yes| Q3{Need planning?}\n\n Design --\x3e BrainDesign["/workflow:brainstorm:auto-parallel<br/>Explore technical solutions"]\n BrainDesign --\x3e Q3\n\n Q3 --\x3e|Quick and simple| LitePlan["Lightweight Planning<br/>/workflow:lite-plan"]\n Q3 --\x3e|Complex and complete| FullPlan["Standard Planning<br/>/workflow:plan"]\n\n LitePlan --\x3e Q4{Need code exploration?}\n Q4 --\x3e|Yes| LitePlanE["/workflow:lite-plan -e"]\n Q4 --\x3e|No| LitePlanNormal["/workflow:lite-plan"]\n\n LitePlanE --\x3e LiteConfirm["Three-dimensional confirmation:<br/>1. Task approval<br/>2. Execution method<br/>3. Code review"]\n LitePlanNormal --\x3e LiteConfirm\n\n LiteConfirm --\x3e Q5{Select execution method}\n Q5 --\x3e|Agent| LiteAgent["/workflow:lite-execute<br/>Use @code-developer"]\n Q5 --\x3e|CLI tool| LiteCLI["CLI Execution<br/>Gemini/Qwen/Codex"]\n Q5 --\x3e|Plan only| UserImpl["User manual implementation"]\n\n FullPlan --\x3e PlanVerify{Verify plan quality?}\n PlanVerify --\x3e|Yes| Verify["/workflow:plan-verify"]\n PlanVerify --\x3e|No| Execute\n Verify --\x3e Q6{Verification passed?}\n Q6 --\x3e|No| FixPlan["Fix plan issues"]\n Q6 --\x3e|Yes| Execute\n FixPlan --\x3e Execute\n\n Execute["Execution Phase<br/>/workflow:execute"]\n LiteAgent --\x3e TestDecision\n LiteCLI --\x3e TestDecision\n UserImpl --\x3e TestDecision\n Execute --\x3e TestDecision\n\n TestDecision{Need tests?}\n TestDecision --\x3e|TDD mode| TDD["/workflow:tdd-plan<br/>Test-driven development"]\n TestDecision --\x3e|Post-test| TestGen["/workflow:test-gen<br/>Generate tests"]\n TestDecision --\x3e|Tests exist| TestCycle["/workflow:test-cycle-execute<br/>Test-fix cycle"]\n TestDecision --\x3e|Not needed| Review\n\n TDD --\x3e TDDExecute["/workflow:execute<br/>Red-Green-Refactor"]\n TDDExecute --\x3e TDDVerify["/workflow:tdd-verify<br/>Verify TDD compliance"]\n TDDVerify --\x3e Review\n\n TestGen --\x3e TestExecute["/workflow:execute<br/>Execute test tasks"]\n TestExecute --\x3e TestResult{Tests passed?}\n TestResult --\x3e|No| TestCycle\n TestResult --\x3e|Yes| Review\n\n TestCycle --\x3e TestPass{Pass rate >= 95%?}\n TestPass --\x3e|No, continue fixing| TestCycle\n TestPass --\x3e|Yes| Review\n\n Review["Review Phase"]\n Review --\x3e Q7{Need specialized review?}\n Q7 --\x3e|Security| SecurityReview["/workflow:review<br/>--type security"]\n Q7 --\x3e|Architecture| ArchReview["/workflow:review<br/>--type architecture"]\n Q7 --\x3e|Quality| QualityReview["/workflow:review<br/>--type quality"]\n Q7 --\x3e|General| GeneralReview["/workflow:review<br/>General review"]\n Q7 --\x3e|Not needed| Complete\n\n SecurityReview --\x3e Complete\n ArchReview --\x3e Complete\n QualityReview --\x3e Complete\n GeneralReview --\x3e Complete\n\n Complete["Completion Phase<br/>/workflow:session:complete"]\n Complete --\x3e End\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef bugfix fill:#ffccbc,stroke:#bf360c\n classDef ideation fill:#fff9c4,stroke:#ffa000\n classDef planning fill:#e3f2fd,stroke:#1976d2\n classDef execute fill:#c5e1a5,stroke:#388e3c\n classDef review fill:#d1c4e9,stroke:#512da8\n\n class Start,End startend,BugFix,LiteFix,HotFix,BugDiag,BugComplete bugfix,Ideation,BrainIdea,BrainDesign ideation,LitePlan,LitePlanE,LitePlanNormal,LiteConfirm,FullPlan,PlanVerify,Verify,FixPlan planning,Execute,LiteAgent,LiteCLI,UserImpl,TDD,TDDExecute,TDDVerify,TestGen,TestExecute,TestCycle execute,Review,SecurityReview,ArchReview,QualityReview,GeneralReview,Complete review\n'}),"\n",(0,s.jsx)(n.h3,{id:"use-cases",children:"Use Cases"}),"\n",(0,s.jsx)(n.h3,{id:"when-to-use",children:"When to Use"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Complex multi-step workflows"}),"\n",(0,s.jsx)(n.li,{children:"Uncertain which commands to use"}),"\n",(0,s.jsx)(n.li,{children:"Desire end-to-end automation"}),"\n",(0,s.jsx)(n.li,{children:"Need full state tracking and resumability"}),"\n",(0,s.jsx)(n.li,{children:"Team collaboration with unified execution flow"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"when-not-to-use",children:"When NOT to Use"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Simple single-command tasks (use Level 1-4 directly)"}),"\n",(0,s.jsx)(n.li,{children:"Already know exact commands needed (use Level 1-4 directly)"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"relationship-with-other-levels",children:"Relationship with Other Levels"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Level"}),(0,s.jsx)(n.th,{children:"Manual Degree"}),(0,s.jsx)(n.th,{children:"CCW Coordinator Role"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Level 1-4"}),(0,s.jsx)(n.td,{children:"Manual command selection"}),(0,s.jsx)(n.td,{children:"Auto-combine these commands"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Level 5"}),(0,s.jsx)(n.td,{children:"Auto command selection"}),(0,s.jsx)(n.td,{children:"Intelligent orchestrator"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"CCW Coordinator uses Level 1-4 internally"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Analyzes task -> Auto-selects appropriate Level"}),"\n",(0,s.jsx)(n.li,{children:"Assembles command chain -> Includes Level 1-4 commands"}),"\n",(0,s.jsx)(n.li,{children:"Executes sequentially -> Follows Minimum Execution Units"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"related-workflows",children:"Related Workflows"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/docs/workflows/level-1-ultra-lightweight",children:"Level 1: Ultra-Lightweight"})," - Rapid execution"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/docs/workflows/level-2-rapid",children:"Level 2: Rapid"})," - Lightweight planning"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/docs/workflows/level-3-standard",children:"Level 3: Standard"})," - Complete planning"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/docs/workflows/level-4-brainstorm",children:"Level 4: Brainstorm"})," - Multi-role exploration"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/docs/docs/workflows/faq",children:"FAQ"})," - Common questions"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"command-reference",children:"Command Reference"}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"/docs/docs/commands/general/ccw",children:"Commands Documentation"})," for:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"/ccw-coordinator"})," - Intelligent workflow orchestrator"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"/ccw"})," - Main workflow orchestrator"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}}}]); |