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
16 KiB
JavaScript
1 line
16 KiB
JavaScript
"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[927],{1184(e,n,i){i.d(n,{R:()=>d,x:()=>t});var s=i(3696);const l={},r=s.createContext(l);function d(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:d(e.components),s.createElement(r.Provider,{value:n},e.children)}},9125(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>d,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"commands/general/ccw-plan","title":"/ccw-plan","description":"Planning coordinator for intelligent workflow selection","source":"@site/docs/commands/general/ccw-plan.mdx","sourceDirName":"commands/general","slug":"/commands/general/ccw-plan","permalink":"/docs/docs/commands/general/ccw-plan","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/commands/general/ccw-plan.mdx","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"title":"/ccw-plan","sidebar_label":"/ccw-plan","sidebar_position":2,"description":"Planning coordinator for intelligent workflow selection"},"sidebar":"docs","previous":{"title":"/ccw","permalink":"/docs/docs/commands/general/ccw"},"next":{"title":"/ccw-test","permalink":"/docs/docs/commands/general/ccw-test"}}');var l=i(2540),r=i(1184);const d={title:"/ccw-plan",sidebar_label:"/ccw-plan",sidebar_position:2,description:"Planning coordinator for intelligent workflow selection"},t="/ccw-plan",c={},o=[{value:"Overview",id:"overview",level:2},{value:"Features",id:"features",level:2},{value:"Usage",id:"usage",level:2},{value:"Planning Modes",id:"planning-modes",level:2},{value:"Lite Modes (Level 2)",id:"lite-modes-level-2",level:3},{value:"Full Modes (Level 3)",id:"full-modes-level-3",level:3},{value:"Special Modes",id:"special-modes",level:3},{value:"With-File Modes (Level 3-4)",id:"with-file-modes-level-3-4",level:3},{value:"Issue Modes",id:"issue-modes",level:3},{value:"Planning Units",id:"planning-units",level:2},{value:"Mode Selection Decision Tree",id:"mode-selection-decision-tree",level:2},{value:"Execution Flow",id:"execution-flow",level:2},{value:"Examples",id:"examples",level:2},{value:"Auto Mode Selection",id:"auto-mode-selection",level:3},{value:"Brainstorm Mode",id:"brainstorm-mode",level:3},{value:"CLI Quick Recommendations",id:"cli-quick-recommendations",level:3},{value:"Replan Existing Session",id:"replan-existing-session",level:3},{value:"Related Commands",id:"related-commands",level:2},{value:"Notes",id:"notes",level:2}];function a(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",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,r.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"ccw-plan",children:"/ccw-plan"})}),"\n",(0,l.jsx)(n.p,{children:"Planning coordinator - analyzes requirements, selects planning strategy, and executes planning workflow in the main process."}),"\n",(0,l.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.code,{children:"/ccw-plan"})," command serves as the planning orchestrator, automatically analyzing task requirements and selecting the appropriate planning workflow based on complexity and constraints."]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Parameters"}),":"]}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--mode <mode>"}),": Planning mode (lite, multi-cli, full, plan-verify, replan, cli, issue, rapid-to-issue, brainstorm-with-file, analyze-with-file)"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"--yes|-y"}),": Skip confirmation prompts"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:'"task description"'}),": Task to plan (required)"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Auto Mode Detection"})," - Keyword-based mode selection"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Planning Units"})," - Commands grouped for complete planning milestones"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Multi-Mode Support"})," - 10+ planning workflows available"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Issue Integration"})," - Bridge to issue workflow"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"With-File Workflows"})," - Multi-CLI collaboration support"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'# Auto-select mode (keyword-based detection)\r\n/ccw-plan "Add user authentication"\r\n\r\n# Standard planning modes\r\n/ccw-plan --mode lite "Add logout endpoint"\r\n/ccw-plan --mode multi-cli "Implement OAuth2"\r\n/ccw-plan --mode full "Design notification system"\r\n/ccw-plan --mode plan-verify "Payment processing"\r\n/ccw-plan --mode replan --session WFS-auth-2025-01-28\r\n\r\n# CLI-assisted planning (quick recommendations)\r\n/ccw-plan --mode cli "Should we use OAuth2 or JWT?"\r\n\r\n# With-File workflows\r\n/ccw-plan --mode brainstorm-with-file "\u7528\u6237\u901a\u77e5\u7cfb\u7edf\u91cd\u65b0\u8bbe\u8ba1"\r\n/ccw-plan --mode analyze-with-file "\u8ba4\u8bc1\u67b6\u6784\u8bbe\u8ba1\u51b3\u7b56"\r\n\r\n# Issue workflow integration\r\n/ccw-plan --mode issue "Handle all pending security issues"\r\n/ccw-plan --mode rapid-to-issue "Plan and create user profile issue"\r\n\r\n# Auto mode (skip confirmations)\r\n/ccw-plan --yes "Quick feature: user profile endpoint"\n'})}),"\n",(0,l.jsx)(n.h2,{id:"planning-modes",children:"Planning Modes"}),"\n",(0,l.jsx)(n.h3,{id:"lite-modes-level-2",children:"Lite Modes (Level 2)"}),"\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:"Mode"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Use Case"})]})}),(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"})}),(0,l.jsx)(n.td,{children:"In-memory planning"}),(0,l.jsx)(n.td,{children:"Clear requirements, single module"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"multi-cli"})}),(0,l.jsx)(n.td,{children:"Multi-CLI collaborative"}),(0,l.jsx)(n.td,{children:"Technology selection, solution comparison"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"full-modes-level-3",children:"Full Modes (Level 3)"}),"\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:"Mode"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Use Case"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"full"})}),(0,l.jsx)(n.td,{children:"5-phase standard planning"}),(0,l.jsx)(n.td,{children:"Complex features, multi-module"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"plan-verify"})}),(0,l.jsx)(n.td,{children:"Planning with quality gate"}),(0,l.jsx)(n.td,{children:"Production features, high quality required"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"special-modes",children:"Special Modes"}),"\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:"Mode"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Use Case"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"cli"})}),(0,l.jsx)(n.td,{children:"Quick CLI recommendations"}),(0,l.jsx)(n.td,{children:"Quick questions, architectural decisions"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"replan"})}),(0,l.jsx)(n.td,{children:"Modify existing plan"}),(0,l.jsx)(n.td,{children:"Plan adjustments, scope changes"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"tdd"})}),(0,l.jsx)(n.td,{children:"Test-driven development planning"}),(0,l.jsx)(n.td,{children:"TDD workflow"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"with-file-modes-level-3-4",children:"With-File Modes (Level 3-4)"}),"\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:"Mode"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Multi-CLI"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"brainstorm-with-file"})}),(0,l.jsx)(n.td,{children:"Multi-perspective ideation"}),(0,l.jsx)(n.td,{children:"Yes"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"analyze-with-file"})}),(0,l.jsx)(n.td,{children:"Collaborative analysis"}),(0,l.jsx)(n.td,{children:"Yes"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"issue-modes",children:"Issue Modes"}),"\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:"Mode"}),(0,l.jsx)(n.th,{children:"Description"}),(0,l.jsx)(n.th,{children:"Use Case"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"issue"})}),(0,l.jsx)(n.td,{children:"Batch issue planning"}),(0,l.jsx)(n.td,{children:"Handle multiple issues"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.code,{children:"rapid-to-issue"})}),(0,l.jsx)(n.td,{children:"Plan + create issue"}),(0,l.jsx)(n.td,{children:"Bridge planning to issue tracking"})]})]})]}),"\n",(0,l.jsx)(n.h2,{id:"planning-units",children:"Planning Units"}),"\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:"Unit Name"}),(0,l.jsx)(n.th,{children:"Commands"}),(0,l.jsx)(n.th,{children:"Purpose"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Quick Planning"})}),(0,l.jsx)(n.td,{children:"lite-plan \u2192 lite-execute"}),(0,l.jsx)(n.td,{children:"Lightweight plan and execution"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Multi-CLI Planning"})}),(0,l.jsx)(n.td,{children:"multi-cli-plan \u2192 lite-execute"}),(0,l.jsx)(n.td,{children:"Multi-perspective analysis"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Verified Planning"})}),(0,l.jsx)(n.td,{children:"plan \u2192 plan-verify \u2192 execute"}),(0,l.jsx)(n.td,{children:"Planning with verification"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"TDD Planning"})}),(0,l.jsx)(n.td,{children:"tdd-plan \u2192 execute"}),(0,l.jsx)(n.td,{children:"Test-driven development"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Issue Planning"})}),(0,l.jsxs)(n.td,{children:["issue",":discover"," \u2192 issue",":plan"," \u2192 issue",":queue"," \u2192 issue",":execute"]}),(0,l.jsx)(n.td,{children:"Issue workflow"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"Brainstorm to Issue"})}),(0,l.jsxs)(n.td,{children:["brainstorm",":auto-parallel"," \u2192 issue",":from-brainstorm"," \u2192 issue",":queue"]}),(0,l.jsx)(n.td,{children:"Exploration to issues"})]})]})]}),"\n",(0,l.jsx)(n.h2,{id:"mode-selection-decision-tree",children:"Mode Selection Decision Tree"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'User calls: /ccw-plan "task description"\r\n \u2193\r\nExplicit --mode specified?\r\n \u251c\u2500 Yes \u2192 Use specified mode\r\n \u2514\u2500 No \u2192 Detect keywords\r\n \u251c\u2500 "brainstorm" \u2192 brainstorm-with-file\r\n \u251c\u2500 "analyze" \u2192 analyze-with-file\r\n \u251c\u2500 "test", "tdd" \u2192 tdd\r\n \u251c\u2500 "issue" \u2192 issue or rapid-to-issue\r\n \u251c\u2500 Complexity high \u2192 full or plan-verify\r\n \u2514\u2500 Default \u2192 lite\n'})}),"\n",(0,l.jsx)(n.h2,{id:"execution-flow",children:"Execution Flow"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"User Input\r\n \u2193\r\nPhase 1: Analyze Requirements\r\n \u251c\u2500 Extract: goal, scope, complexity, constraints\r\n \u2514\u2500 Detect: task type, keywords\r\n \u2193\r\nPhase 2: Select Mode & Build Chain\r\n \u251c\u2500 Detect mode (explicit or auto)\r\n \u251c\u2500 Build command chain based on mode\r\n \u2514\u2500 Show planning strategy\r\n \u2193\r\nPhase 3: User Confirmation (optional)\r\n \u251c\u2500 Show command chain\r\n \u2514\u2500 Allow mode change\r\n \u2193\r\nPhase 4: Execute Planning Chain\r\n \u251c\u2500 Setup TODO tracking (CCWP prefix)\r\n \u251c\u2500 Initialize status file\r\n \u2514\u2500 Execute commands sequentially\r\n \u2193\r\nOutput completion summary\n"})}),"\n",(0,l.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,l.jsx)(n.h3,{id:"auto-mode-selection",children:"Auto Mode Selection"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'# CCW detects keywords and selects mode\r\n/ccw-plan "Implement user authentication with TDD"\r\n\r\n# Output:\r\n# Detecting mode...\r\n# Keywords: "TDD" \u2192 Mode: tdd\r\n# Commands: tdd-plan\r\n# Confirm? (y/n): y\n'})}),"\n",(0,l.jsx)(n.h3,{id:"brainstorm-mode",children:"Brainstorm Mode"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'# Multi-perspective exploration\r\n/ccw-plan --mode brainstorm-with-file "Design notification system"\r\n\r\n# Uses brainstorm workflow with multi-CLI collaboration\n'})}),"\n",(0,l.jsx)(n.h3,{id:"cli-quick-recommendations",children:"CLI Quick Recommendations"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:'# Quick architectural question\r\n/ccw-plan --mode cli "Should we use Redux or Zustand for state?"\r\n\r\n# Uses CLI for quick analysis and recommendations\n'})}),"\n",(0,l.jsx)(n.h3,{id:"replan-existing-session",children:"Replan Existing Session"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"# Modify existing plan\r\n/ccw-plan --mode replan --session WFS-auth-2025-01-28\r\n\r\n# Opens existing plan for modification\n"})}),"\n",(0,l.jsx)(n.h2,{id:"related-commands",children:"Related Commands"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"/ccw"})," - Main workflow coordinator"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"/ccw-test"})," - Test workflow coordinator"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"/ccw-debug"})," - Debug workflow coordinator"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsxs)(n.strong,{children:["/workflow",":plan"]})," - Standard planning workflow"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsxs)(n.strong,{children:["/workflow",":tdd-plan"]})," - TDD planning workflow"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Keyword detection"})," for auto mode selection"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Planning units"})," ensure complete planning milestones"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"TODO tracking"})," with CCWP prefix"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Status file"})," in ",(0,l.jsx)(n.code,{children:".workflow/.ccw-plan/{session}/"})]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Multi-CLI collaboration"})," for with-file modes"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Issue integration"})," for seamless workflow transition"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(a,{...e})}):a(e)}}}]); |