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
27 KiB
JavaScript
1 line
27 KiB
JavaScript
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[57],{1184(e,n,s){s.d(n,{R:()=>t,x:()=>c});var i=s(3696);const l={},r=i.createContext(l);function t(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(r.Provider,{value:n},e.children)}},7259(e,n,s){s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"workflows/level-2-rapid","title":"Level 2 - Rapid Workflows","description":"Lightweight planning and bug diagnosis workflows for single-module features","source":"@site/docs/workflows/level-2-rapid.mdx","sourceDirName":"workflows","slug":"/workflows/level-2-rapid","permalink":"/docs/docs/workflows/level-2-rapid","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/workflows/level-2-rapid.mdx","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"title":"Level 2 - Rapid Workflows","description":"Lightweight planning and bug diagnosis workflows for single-module features","sidebar_position":3},"sidebar":"docs","previous":{"title":"Level 1: Ultra Lightweight","permalink":"/docs/docs/workflows/level-1-ultra-lightweight"},"next":{"title":"Level 3: Standard","permalink":"/docs/docs/workflows/level-3-standard"}}');var l=s(2540),r=s(1184),t=s(1540);const c={title:"Level 2 - Rapid Workflows",description:"Lightweight planning and bug diagnosis workflows for single-module features",sidebar_position:3},d="Level 2: Rapid Workflows",o={},a=[{value:"Overview",id:"overview",level:2},{value:"Included Workflows",id:"included-workflows",level:2},{value:"Common Characteristics",id:"common-characteristics",level:3},{value:"Workflow 1: lite-plan -> lite-execute",id:"workflow-1-lite-plan---lite-execute",level:2},{value:"Command",id:"command",level:3},{value:"Flow Diagram",id:"flow-diagram",level:3},{value:"Process Phases",id:"process-phases",level:3},{value:"Artifacts",id:"artifacts",level:3},{value:"Use Case",id:"use-case",level:3},{value:"Workflow 2: lite-fix",id:"workflow-2-lite-fix",level:2},{value:"Command",id:"command-1",level:3},{value:"Flow Diagram",id:"flow-diagram-1",level:3},{value:"Process Phases",id:"process-phases-1",level:3},{value:"Artifacts",id:"artifacts-1",level:3},{value:"Severity Levels",id:"severity-levels",level:3},{value:"Hotfix Mode",id:"hotfix-mode",level:3},{value:"Use Cases",id:"use-cases",level:3},{value:"Workflow 3: multi-cli-plan -> lite-execute",id:"workflow-3-multi-cli-plan---lite-execute",level:2},{value:"Command",id:"command-2",level:3},{value:"Flow Diagram",id:"flow-diagram-2",level:3},{value:"Process Phases",id:"process-phases-2",level:3},{value:"Artifacts",id:"artifacts-2",level:3},{value:"vs lite-plan Comparison",id:"vs-lite-plan-comparison",level:3},{value:"Use Cases",id:"use-cases-1",level:3},{value:"Level 2 Comparison Table",id:"level-2-comparison-table",level:2},{value:"Execution: lite-execute",id:"execution-lite-execute",level:2},{value:"Execution Flow",id:"execution-flow",level:3},{value:"Features",id:"features",level:3},{value:"Related Workflows",id:"related-workflows",level:2}];function x(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"level-2-rapid-workflows",children:"Level 2: Rapid Workflows"})}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Complexity"}),": Low-Medium | ",(0,l.jsx)(n.strong,{children:"Artifacts"}),": Memory/Lightweight files | ",(0,l.jsx)(n.strong,{children:"State"}),": Session-scoped"]}),"\n",(0,l.jsx)(n.p,{children:"Level 2 workflows provide lightweight planning or single analysis with fast iteration. They're designed for tasks with relatively clear requirements that don't need full session persistence."}),"\n",(0,l.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,l.jsx)(t.A,{chart:"\n flowchart TD\n Start([User Input]) --\x3e Select{Select Workflow}\n\n Select --\x3e|Clear<br/>requirements| LP[lite-plan]\n Select --\x3e|Bug fix| LF[lite-fix]\n Select --\x3e|Multi-CLI<br/>needed| MCP[multi-cli-plan]\n\n LP --\x3e LE[lite-execute]\n LF --\x3e LE\n MCP --\x3e LE\n\n LE --\x3e Test{Tests?}\n Test --\x3e|Yes| TFG[test-fix-gen]\n Test --\x3e|No| Done([Complete])\n TFG --\x3e TCE[test-cycle-execute]\n TCE --\x3e Done\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef workflow fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef execute fill:#c5e1a5,stroke:#388e3c\n\n class Start,Done startend,Select,Test decision,LP,LF,MCP workflow,LE execute,TFG,TCE execute\n"}),"\n",(0,l.jsx)(n.h2,{id:"included-workflows",children:"Included Workflows"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Workflow"}),(0,l.jsx)(n.th,{children:"Purpose"}),(0,l.jsx)(n.th,{children:"Artifacts"}),(0,l.jsx)(n.th,{children:"Execution"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"lite-plan"})}),(0,l.jsx)(n.td,{children:"Clear requirement development"}),(0,l.jsx)(n.td,{children:"memory://plan"}),(0,l.jsxs)(n.td,{children:["-> ",(0,l.jsx)(n.code,{children:"lite-execute"})]})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"lite-fix"})}),(0,l.jsx)(n.td,{children:"Bug diagnosis and fix"}),(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:".workflow/.lite-fix/"})}),(0,l.jsxs)(n.td,{children:["-> ",(0,l.jsx)(n.code,{children:"lite-execute"})]})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"multi-cli-plan"})}),(0,l.jsx)(n.td,{children:"Multi-perspective tasks"}),(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:".workflow/.multi-cli-plan/"})}),(0,l.jsxs)(n.td,{children:["-> ",(0,l.jsx)(n.code,{children:"lite-execute"})]})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"common-characteristics",children:"Common Characteristics"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Property"}),(0,l.jsx)(n.th,{children:"Value"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Complexity"})}),(0,l.jsx)(n.td,{children:"Low-Medium"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"State"})}),(0,l.jsx)(n.td,{children:"Session-scoped / Lightweight persistence"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Execution"})}),(0,l.jsxs)(n.td,{children:["Unified via ",(0,l.jsx)(n.code,{children:"lite-execute"})]})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Use Case"})}),(0,l.jsx)(n.td,{children:"Relatively clear requirements"})]})]})]}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"workflow-1-lite-plan---lite-execute",children:"Workflow 1: lite-plan -> lite-execute"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"In-memory planning + Direct execution"})}),"\n",(0,l.jsx)(n.h3,{id:"command",children:"Command"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/workflow:lite-plan "Add user authentication API"\n/workflow:lite-execute\n'})}),"\n",(0,l.jsx)(n.h3,{id:"flow-diagram",children:"Flow Diagram"}),"\n",(0,l.jsx)(t.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Code Exploration]\n B --\x3e C{Code<br/>Exploration?}\n C --\x3e|Yes| D[cli-explore-agent<br/>Multi-angle analysis]\n C --\x3e|No| E[Skip exploration]\n\n D --\x3e F[Phase 2: Complexity Assessment]\n E --\x3e F\n\n F --\x3e G{Complexity}\n G --\x3e|Low| H[Direct Claude<br/>Planning]\n G --\x3e|Medium| H\n G --\x3e|High| I[cli-lite-planning<br/>-agent]\n\n H --\x3e J[Phase 3: Planning]\n I --\x3e J\n\n J --\x3e K[Phase 4: Confirmation]\n K --\x3e L{Confirm?}\n L --\x3e|Modify| M[Adjust plan]\n M --\x3e K\n L --\x3e|Allow| N[Phase 5: Execute]\n L --\x3e|Cancel| O([Abort])\n\n N --\x3e P[Build executionContext]\n P --\x3e Q[/workflow:lite-execute]\n Q --\x3e R([Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef agent fill:#ffecb3,stroke:#ffa000\n\n class A,R,O startend,B,D,E,J,M,P,Q action,C,G,L decision,F,H,I agent\n"}),"\n",(0,l.jsx)(n.h3,{id:"process-phases",children:"Process Phases"}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Phase 1: Code Exploration"})," (Optional)"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'# If -e flag specified\n/workflow:lite-plan -e "Add user authentication API"\n'})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Multi-angle code analysis via cli-explore-agent"}),"\n",(0,l.jsx)(n.li,{children:"Identifies patterns, dependencies, integration points"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 2: Complexity Assessment"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Low: Direct planning without agent"}),"\n",(0,l.jsx)(n.li,{children:"Medium/High: Use cli-lite-planning-agent"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 3: Planning"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Load plan schema: ",(0,l.jsx)(n.code,{children:"~/.claude/workflows/cli-templates/schemas/plan-json-schema.json"})]}),"\n",(0,l.jsx)(n.li,{children:"Generate plan.json following schema"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 4: Confirmation & Selection"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Display plan summary (tasks, complexity, estimated time)"}),"\n",(0,l.jsxs)(n.li,{children:["Ask user selections:","\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Confirm: Allow / Modify / Cancel"}),"\n",(0,l.jsx)(n.li,{children:"Execution: Agent / Codex / Auto"}),"\n",(0,l.jsx)(n.li,{children:"Review: Gemini / Agent / Skip"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 5: Execute"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Build executionContext (plan + explorations + clarifications + selections)"}),"\n",(0,l.jsxs)(n.li,{children:["Execute via ",(0,l.jsx)(n.code,{children:"/workflow:lite-execute --in-memory"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"artifacts",children:"Artifacts"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"In-memory"}),": ",(0,l.jsx)(n.code,{children:"memory://plan"})," (not persisted)"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Optional"}),": ",(0,l.jsx)(n.code,{children:".workflow/.lite-exploration/"})," (if code exploration used)"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"use-case",children:"Use Case"}),"\n",(0,l.jsx)(n.p,{children:"Clear single-module features"}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/workflow:lite-plan "Add email validation to user registration form"\n/workflow:lite-execute\n'})}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"workflow-2-lite-fix",children:"Workflow 2: lite-fix"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Intelligent diagnosis + Fix (5 phases)"})}),"\n",(0,l.jsx)(n.h3,{id:"command-1",children:"Command"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/workflow:lite-fix "Login timeout after 30 seconds"\n/workflow:lite-execute --in-memory --mode bugfix\n\n# Emergency hotfix mode\n/workflow:lite-fix --hotfix "Production database connection failing"\n'})}),"\n",(0,l.jsx)(n.h3,{id:"flow-diagram-1",children:"Flow Diagram"}),"\n",(0,l.jsx)(t.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Bug Analysis<br/>& Diagnosis]\n B --\x3e C[Severity Pre-assessment<br/>Low/Medium/High/Critical]\n C --\x3e D[Parallel cli-explore<br/>-agent Diagnosis<br/>1-4 angles]\n\n D --\x3e E[Phase 2: Clarification]\n E --\x3e F{More info<br/>needed?}\n F --\x3e|Yes| G[AskUserQuestion<br/>Aggregate clarifications]\n F --\x3e|No| H[Phase 3: Fix Planning]\n G --\x3e H\n\n H --\x3e I{Severity}\n I --\x3e|Low/Medium| J[Direct Claude<br/>Planning]\n I --\x3e|High/Critical| K[cli-lite-planning<br/>-agent]\n\n J --\x3e L[Phase 4: Confirmation]\n K --\x3e L\n\n L --\x3e M[User confirms<br/>execution method]\n M --\x3e N[Phase 5: Execute]\n N --\x3e O[/workflow:lite-execute<br/>--in-memory --mode bugfix/]\n O --\x3e P([Complete])\n\n Q[Hotfix Mode] --\x3e R[Skip diagnosis<br/>Minimal planning]\n R --\x3e N\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef agent fill:#ffecb3,stroke:#ffa000\n classDef hotfix fill:#ffccbc,stroke:#bf360c\n\n class A,P startend,B,E,G,H,L,M,N,O action,F,I decision,C,D,J,K agent,Q,R hotfix\n"}),"\n",(0,l.jsx)(n.h3,{id:"process-phases-1",children:"Process Phases"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 1: Bug Analysis & Diagnosis"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Intelligent severity pre-assessment (Low/Medium/High/Critical)"}),"\n",(0,l.jsx)(n.li,{children:"Parallel cli-explore-agent diagnosis (1-4 angles)"}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Phase 2: Clarification"})," (Optional)"]}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Aggregate clarification needs"}),"\n",(0,l.jsx)(n.li,{children:"AskUserQuestion for missing info"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 3: Fix Planning"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Low/Medium severity -> Direct Claude planning"}),"\n",(0,l.jsx)(n.li,{children:"High/Critical severity -> cli-lite-planning-agent"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 4: Confirmation & Selection"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Display fix-plan summary"}),"\n",(0,l.jsx)(n.li,{children:"User confirms execution method"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 5: Execute"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:["Execute via ",(0,l.jsx)(n.code,{children:"/workflow:lite-execute --in-memory --mode bugfix"})]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"artifacts-1",children:"Artifacts"}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Location"}),": ",(0,l.jsx)(n.code,{children:".workflow/.lite-fix/{bug-slug}-{YYYY-MM-DD}/"})]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:".workflow/.lite-fix/\n\u2514\u2500\u2500 login-timeout-fix-2025-02-03/\n \u251c\u2500\u2500 diagnosis-root-cause.json\n \u251c\u2500\u2500 diagnosis-impact.json\n \u251c\u2500\u2500 diagnosis-code-flow.json\n \u251c\u2500\u2500 diagnosis-similar.json\n \u251c\u2500\u2500 diagnoses-manifest.json\n \u251c\u2500\u2500 fix-plan.json\n \u2514\u2500\u2500 README.md\n"})}),"\n",(0,l.jsx)(n.h3,{id:"severity-levels",children:"Severity Levels"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Severity"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Planning Method"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Low"})}),(0,l.jsx)(n.td,{children:"Simple fix, clear root cause"}),(0,l.jsx)(n.td,{children:"Direct Claude (optional rationale)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Medium"})}),(0,l.jsx)(n.td,{children:"Moderate complexity, some investigation"}),(0,l.jsx)(n.td,{children:"Direct Claude (with rationale)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"High"})}),(0,l.jsx)(n.td,{children:"Complex, multiple components affected"}),(0,l.jsx)(n.td,{children:"cli-lite-planning-agent (full schema)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Critical"})}),(0,l.jsx)(n.td,{children:"Production incident, urgent"}),(0,l.jsx)(n.td,{children:"cli-lite-planning-agent + hotfix mode"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"hotfix-mode",children:"Hotfix Mode"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/workflow:lite-fix --hotfix "Production API returning 500 errors"\n'})}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Characteristics"}),":"]}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Skip most diagnosis phases"}),"\n",(0,l.jsx)(n.li,{children:"Minimal planning (direct execution)"}),"\n",(0,l.jsx)(n.li,{children:"Auto-generate follow-up tasks for complete fix + post-mortem"}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"use-cases",children:"Use Cases"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Bug diagnosis"}),"\n",(0,l.jsx)(n.li,{children:"Production emergencies"}),"\n",(0,l.jsx)(n.li,{children:"Root cause analysis"}),"\n"]}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"workflow-3-multi-cli-plan---lite-execute",children:"Workflow 3: multi-cli-plan -> lite-execute"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Multi-CLI collaborative analysis + Consensus convergence"})}),"\n",(0,l.jsx)(n.h3,{id:"command-2",children:"Command"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'/workflow:multi-cli-plan "Compare Redis vs Memcached for caching"\n/workflow:lite-execute\n'})}),"\n",(0,l.jsx)(n.h3,{id:"flow-diagram-2",children:"Flow Diagram"}),"\n",(0,l.jsx)(t.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Phase 1: Context Gathering]\n B --\x3e C[ACE semantic search<br/>Build context package]\n\n C --\x3e D[Phase 2: Multi-CLI Discussion<br/>Iterative]\n D --\x3e E[cli-discuss-agent]\n E --\x3e F[Gemini + Codex + Claude]\n\n F --\x3e G{Converged?}\n G --\x3e|No| H[Cross-verification<br/>Synthesize solutions]\n H --\x3e D\n G --\x3e|Yes| I[Phase 3: Present Options]\n\n I --\x3e J[Display solutions<br/>with trade-offs]\n\n J --\x3e K[Phase 4: User Decision]\n K --\x3e L[User selects solution]\n\n L --\x3e M[Phase 5: Plan Generation]\n M --\x3e N[cli-lite-planning<br/>-agent]\n N --\x3e O[-> lite-execute]\n\n O --\x3e P([Complete])\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n classDef agent fill:#ffecb3,stroke:#ffa000\n\n class A,P startend,B,C,E,H,J,L,M,O action,G,K decision,F,N agent\n"}),"\n",(0,l.jsx)(n.h3,{id:"process-phases-2",children:"Process Phases"}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 1: Context Gathering"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"ACE semantic search"}),"\n",(0,l.jsx)(n.li,{children:"Build context package"}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Phase 2: Multi-CLI Discussion"})," (Iterative)"]}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"cli-discuss-agent executes Gemini + Codex + Claude"}),"\n",(0,l.jsx)(n.li,{children:"Cross-verification, synthesize solutions"}),"\n",(0,l.jsx)(n.li,{children:"Loop until convergence or max rounds"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 3: Present Options"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Display solutions with trade-offs"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 4: User Decision"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"User selects solution"}),"\n"]}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"Phase 5: Plan Generation"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"cli-lite-planning-agent generates plan"}),"\n",(0,l.jsx)(n.li,{children:"-> lite-execute"}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"artifacts-2",children:"Artifacts"}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Location"}),": ",(0,l.jsx)(n.code,{children:".workflow/.multi-cli-plan/{MCP-task-slug-date}/"})]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:".workflow/.multi-cli-plan/\n\u2514\u2500\u2500 redis-vs-memcached-2025-02-03/\n \u251c\u2500\u2500 context-package.json\n \u251c\u2500\u2500 rounds/\n \u2502 \u251c\u2500\u2500 round-1/\n \u2502 \u2502 \u251c\u2500\u2500 gemini-analysis.md\n \u2502 \u2502 \u251c\u2500\u2500 codex-analysis.md\n \u2502 \u2502 \u251c\u2500\u2500 claude-analysis.md\n \u2502 \u2502 \u2514\u2500\u2500 synthesis.json\n \u2502 \u251c\u2500\u2500 round-2/\n \u2502 \u2514\u2500\u2500 ...\n \u251c\u2500\u2500 selected-solution.json\n \u251c\u2500\u2500 IMPL_PLAN.md\n \u2514\u2500\u2500 plan.json\n"})}),"\n",(0,l.jsx)(n.h3,{id:"vs-lite-plan-comparison",children:"vs lite-plan Comparison"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Aspect"}),(0,l.jsx)(n.th,{children:"multi-cli-plan"}),(0,l.jsx)(n.th,{children:"lite-plan"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Context"})}),(0,l.jsx)(n.td,{children:"ACE semantic search"}),(0,l.jsx)(n.td,{children:"Manual file patterns"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Analysis"})}),(0,l.jsx)(n.td,{children:"Multi-CLI cross-verification"}),(0,l.jsx)(n.td,{children:"Single planning"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Iteration"})}),(0,l.jsx)(n.td,{children:"Multiple rounds until convergence"}),(0,l.jsx)(n.td,{children:"Single round"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Confidence"})}),(0,l.jsx)(n.td,{children:"High (consensus-driven)"}),(0,l.jsx)(n.td,{children:"Medium (single perspective)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Time"})}),(0,l.jsx)(n.td,{children:"Longer (multi-round)"}),(0,l.jsx)(n.td,{children:"Faster"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"use-cases-1",children:"Use Cases"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Multi-perspective analysis"}),"\n",(0,l.jsx)(n.li,{children:"Technology selection"}),"\n",(0,l.jsx)(n.li,{children:"Solution comparison"}),"\n",(0,l.jsx)(n.li,{children:"Architecture decisions"}),"\n"]}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h2,{id:"level-2-comparison-table",children:"Level 2 Comparison Table"}),"\n",(0,l.jsxs)(n.table,{children:[(0,l.jsx)(n.thead,{children:(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.th,{children:"Aspect"}),(0,l.jsx)(n.th,{children:"lite-plan"}),(0,l.jsx)(n.th,{children:"lite-fix"}),(0,l.jsx)(n.th,{children:"multi-cli-plan"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Purpose"})}),(0,l.jsx)(n.td,{children:"Clear requirements"}),(0,l.jsx)(n.td,{children:"Bug diagnosis"}),(0,l.jsx)(n.td,{children:"Multi-perspective"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Planning"})}),(0,l.jsx)(n.td,{children:"In-memory"}),(0,l.jsx)(n.td,{children:"Severity-based"}),(0,l.jsx)(n.td,{children:"Consensus-driven"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Artifacts"})}),(0,l.jsx)(n.td,{children:"memory://plan"}),(0,l.jsx)(n.td,{children:".lite-fix/"}),(0,l.jsx)(n.td,{children:".multi-cli-plan/"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Code Exploration"})}),(0,l.jsx)(n.td,{children:"Optional (-e flag)"}),(0,l.jsx)(n.td,{children:"Built-in diagnosis"}),(0,l.jsx)(n.td,{children:"ACE search"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Multi-CLI"})}),(0,l.jsx)(n.td,{children:"No"}),(0,l.jsx)(n.td,{children:"No"}),(0,l.jsx)(n.td,{children:"Yes (Gemini/Codex/Claude)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Best For"})}),(0,l.jsx)(n.td,{children:"Single-module features"}),(0,l.jsx)(n.td,{children:"Bug fixes"}),(0,l.jsx)(n.td,{children:"Technology decisions"})]})]})]}),"\n",(0,l.jsx)(n.h2,{id:"execution-lite-execute",children:"Execution: lite-execute"}),"\n",(0,l.jsxs)(n.p,{children:["All Level 2 workflows execute via ",(0,l.jsx)(n.code,{children:"lite-execute"}),":"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"/workflow:lite-execute --in-memory\n"})}),"\n",(0,l.jsx)(n.h3,{id:"execution-flow",children:"Execution Flow"}),"\n",(0,l.jsx)(t.A,{chart:"\n flowchart TD\n A([Start]) --\x3e B[Initialize tracking<br/>previousExecutionResults]\n B --\x3e C[Task grouping<br/>& batch creation]\n\n C --\x3e D[Extract explicit<br/>depends_on]\n D --\x3e E[Group: independent<br/>tasks -> parallel batch]\n E --\x3e F[Group: dependent<br/>tasks -> sequential phases]\n\n F --\x3e G[Create TodoWrite<br/>list for batches]\n G --\x3e H[Launch execution]\n\n H --\x3e I[Phase 1: All independent<br/>tasks - Single batch]\n I --\x3e J[Phase 2+: Dependent tasks<br/>by dependency order]\n\n J --\x3e K[Track progress<br/>TodoWrite updates]\n K --\x3e L{Code review?}\n L --\x3e|Yes| M[Review process]\n L --\x3e|No| N([Complete])\n M --\x3e N\n\n classDef startend fill:#c8e6c9,stroke:#388e3c\n classDef action fill:#e3f2fd,stroke:#1976d2\n classDef decision fill:#fff9c4,stroke:#f57c00\n\n class A,N startend,B,D,E,F,G,I,J,K,M action,C,L decision\n"}),"\n",(0,l.jsx)(n.h3,{id:"features",children:"Features"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Parallel execution"})," for independent tasks"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Sequential phases"})," for dependent tasks"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Progress tracking"})," via TodoWrite"]}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.strong,{children:"Optional code review"})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"related-workflows",children:"Related Workflows"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.a,{href:"/docs/docs/workflows/level-1-ultra-lightweight",children:"Level 1: Ultra-Lightweight"})," - Simpler workflow"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.a,{href:"/docs/docs/workflows/level-3-standard",children:"Level 3: Standard"})," - Full session management"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.a,{href:"/docs/docs/workflows/level-4-brainstorm",children:"Level 4: Brainstorm"})," - Multi-role exploration"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.a,{href:"/docs/docs/workflows/faq",children:"FAQ"})," - Common questions"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(x,{...e})}):x(e)}}}]); |