"use strict";(globalThis.webpackChunkccw_docs=globalThis.webpackChunkccw_docs||[]).push([[777],{1184(e,n,r){r.d(n,{R:()=>i,x:()=>o});var t=r(3696);const l={},s=t.createContext(l);function i(e){const n=t.useContext(s);return t.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(l):e.components||l:i(e.components),t.createElement(s.Provider,{value:n},e.children)}},3960(e,n,r){r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"commands/general/flow-create","title":"/flow-create","description":"Generate workflow templates for flow-coordinator","source":"@site/docs/commands/general/flow-create.mdx","sourceDirName":"commands/general","slug":"/commands/general/flow-create","permalink":"/docs/docs/commands/general/flow-create","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/commands/general/flow-create.mdx","tags":[],"version":"current","sidebarPosition":6,"frontMatter":{"title":"/flow-create","sidebar_label":"/flow-create","sidebar_position":6,"description":"Generate workflow templates for flow-coordinator"},"sidebar":"docs","previous":{"title":"/ccw-debug","permalink":"/docs/docs/commands/general/ccw-debug"},"next":{"title":"/codex-coordinator","permalink":"/docs/docs/commands/general/codex-coordinator"}}');var l=r(2540),s=r(1184);const i={title:"/flow-create",sidebar_label:"/flow-create",sidebar_position:6,description:"Generate workflow templates for flow-coordinator"},o="/flow-create",c={},a=[{value:"Overview",id:"overview",level:2},{value:"Features",id:"features",level:2},{value:"Usage",id:"usage",level:2},{value:"Execution Flow",id:"execution-flow",level:2},{value:"Phase 1: Template Design",id:"phase-1-template-design",level:2},{value:"Complexity Levels",id:"complexity-levels",level:3},{value:"Purpose Categories",id:"purpose-categories",level:3},{value:"Phase 2: Step Definition",id:"phase-2-step-definition",level:2},{value:"Command Categories",id:"command-categories",level:3},{value:"Phase 3: Generate JSON",id:"phase-3-generate-json",level:2},{value:"Template Examples",id:"template-examples",level:2},{value:"Bug Fix Template (Level 2)",id:"bug-fix-template-level-2",level:3},{value:"Feature Template (Level 3)",id:"feature-template-level-3",level:3},{value:"Full Workflow Template (Level 4)",id:"full-workflow-template-level-4",level:3},{value:"Execution Mode Types",id:"execution-mode-types",level:2},{value:"Template Output Location",id:"template-output-location",level:2},{value:"Examples",id:"examples",level:2},{value:"Quick Bug Fix Template",id:"quick-bug-fix-template",level:3},{value:"Custom Multi-Stage Workflow",id:"custom-multi-stage-workflow",level:3},{value:"Related Commands",id:"related-commands",level:2},{value:"Notes",id:"notes",level:2}];function d(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"flow-create",children:"/flow-create"})}),"\n",(0,l.jsx)(n.p,{children:"Flow template generator - create workflow templates for meta-skill/flow-coordinator with interactive step definition."}),"\n",(0,l.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,l.jsxs)(n.p,{children:["The ",(0,l.jsx)(n.code,{children:"/flow-create"})," command generates workflow templates that can be used by the flow-coordinator skill for executing predefined command chains."]}),"\n",(0,l.jsxs)(n.p,{children:[(0,l.jsx)(n.strong,{children:"Usage"}),": ",(0,l.jsx)(n.code,{children:"/flow-create [template-name] [--output <path>]"})]}),"\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:"Interactive Design"})," - Guided template creation process"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Complexity Levels"})," - 4 levels from rapid to full workflows"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Step Definition"})," - Define workflow steps with commands and parameters"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Command Selection"})," - Choose from available CCW commands"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Template Validation"})," - Ensures template structure correctness"]}),"\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:"# Create template with default name\r\n/flow-create\r\n\r\n# Create specific template\r\n/flow-create bugfix-v2\r\n\r\n# Create with custom output\r\n/flow-create my-workflow --output ~/.claude/skills/my-skill/templates/\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 \u2192 Phase 1: Template Design \u2192 Phase 2: Step Definition \u2192 Phase 3: Generate JSON\r\n \u2193 \u2193 \u2193\r\n Name + Description Define workflow steps Write template file\n"})}),"\n",(0,l.jsx)(n.h2,{id:"phase-1-template-design",children:"Phase 1: Template Design"}),"\n",(0,l.jsx)(n.p,{children:"Gather basic template information:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Template Name"})," - Identifier for the template"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Purpose"})," - What the template accomplishes"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Complexity Level"})," - 1-4 (Rapid to Full)"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"complexity-levels",children:"Complexity 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:"Level"}),(0,l.jsx)(n.th,{children:"Name"}),(0,l.jsx)(n.th,{children:"Steps"}),(0,l.jsx)(n.th,{children:"Description"})]})}),(0,l.jsxs)(n.tbody,{children:[(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"1"})}),(0,l.jsx)(n.td,{children:"Rapid"}),(0,l.jsx)(n.td,{children:"1-2"}),(0,l.jsx)(n.td,{children:"Ultra-lightweight (lite-lite-lite)"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"2"})}),(0,l.jsx)(n.td,{children:"Lightweight"}),(0,l.jsx)(n.td,{children:"2-4"}),(0,l.jsx)(n.td,{children:"Quick implementation"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"3"})}),(0,l.jsx)(n.td,{children:"Standard"}),(0,l.jsx)(n.td,{children:"4-6"}),(0,l.jsx)(n.td,{children:"With verification and testing"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"4"})}),(0,l.jsx)(n.td,{children:"Full"}),(0,l.jsx)(n.td,{children:"6+"}),(0,l.jsx)(n.td,{children:"Brainstorm + full workflow"})]})]})]}),"\n",(0,l.jsx)(n.h3,{id:"purpose-categories",children:"Purpose Categories"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Bug Fix"})," - Fix bugs and issues"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Feature"})," - Implement new features"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Generation"})," - Generate code or content"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Analysis"})," - Analyze code or architecture"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Transformation"})," - Transform or refactor code"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Orchestration"})," - Complex multi-step workflows"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"phase-2-step-definition",children:"Phase 2: Step Definition"}),"\n",(0,l.jsx)(n.p,{children:"Define workflow steps with:"}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Command Selection"})," - Choose from available CCW commands"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Execution Unit"})," - Group related steps"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Execution Mode"})," - mainprocess or async"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Context Hint"})," - Description of step purpose"]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"command-categories",children:"Command Categories"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Planning"})," - plan, lite-plan, multi-cli-plan, tdd-plan"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Execution"})," - execute, lite-execute, lite-lite-lite"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Testing"})," - test-fix-gen, test-cycle-execute, tdd-verify"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Review"})," - review-session-cycle, review-module-cycle"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Debug"})," - debug-with-file, lite-fix"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Brainstorm"})," - brainstorm",":auto-parallel",", brainstorm-with-file"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Issue"})," - issue",":discover",", issue",":plan",", issue",":queue",", issue",":execute"]}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"phase-3-generate-json",children:"Phase 3: Generate JSON"}),"\n",(0,l.jsx)(n.p,{children:"Creates template file with structure:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\r\n "name": "template-name",\r\n "description": "Template description",\r\n "level": 2,\r\n "steps": [\r\n {\r\n "cmd": "/workflow:command",\r\n "args": "\\"{{goal}}\\"",\r\n "unit": "unit-name",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Description of what this step does"\r\n }\r\n ]\r\n}\n'})}),"\n",(0,l.jsx)(n.h2,{id:"template-examples",children:"Template Examples"}),"\n",(0,l.jsx)(n.h3,{id:"bug-fix-template-level-2",children:"Bug Fix Template (Level 2)"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\r\n "name": "hotfix-simple",\r\n "description": "Quick bug fix workflow",\r\n "level": 2,\r\n "steps": [\r\n {\r\n "cmd": "/workflow:lite-fix",\r\n "args": "\\"{{goal}}\\"",\r\n "unit": "bug-fix",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Diagnose and fix the bug"\r\n },\r\n {\r\n "cmd": "/workflow:lite-execute",\r\n "args": "--in-memory",\r\n "unit": "bug-fix",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "async"\r\n },\r\n "contextHint": "Apply the fix"\r\n }\r\n ]\r\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"feature-template-level-3",children:"Feature Template (Level 3)"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\r\n "name": "feature-standard",\r\n "description": "Standard feature implementation with verification",\r\n "level": 3,\r\n "steps": [\r\n {\r\n "cmd": "/workflow:plan",\r\n "args": "\\"{{goal}}\\"",\r\n "unit": "verified-planning",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Create detailed implementation plan"\r\n },\r\n {\r\n "cmd": "/workflow:plan-verify",\r\n "args": "",\r\n "unit": "verified-planning",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Verify plan completeness and quality"\r\n },\r\n {\r\n "cmd": "/workflow:execute",\r\n "args": "--resume-session=\\"{{session}}\\"",\r\n "unit": "verified-planning",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Execute the implementation plan"\r\n }\r\n ]\r\n}\n'})}),"\n",(0,l.jsx)(n.h3,{id:"full-workflow-template-level-4",children:"Full Workflow Template (Level 4)"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-json",children:'{\r\n "name": "full",\r\n "description": "Comprehensive workflow with brainstorm and verification",\r\n "level": 4,\r\n "steps": [\r\n {\r\n "cmd": "/workflow:brainstorm:auto-parallel",\r\n "args": "\\"{{goal}}\\"",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Multi-perspective exploration of requirements"\r\n },\r\n {\r\n "cmd": "/workflow:plan",\r\n "unit": "verified-planning-execution",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Create detailed implementation plan"\r\n },\r\n {\r\n "cmd": "/workflow:plan-verify",\r\n "unit": "verified-planning-execution",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Verify plan completeness"\r\n },\r\n {\r\n "cmd": "/workflow:execute",\r\n "unit": "verified-planning-execution",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Execute implementation"\r\n },\r\n {\r\n "cmd": "/workflow:test-fix-gen",\r\n "unit": "test-validation",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Generate tests"\r\n },\r\n {\r\n "cmd": "/workflow:test-cycle-execute",\r\n "unit": "test-validation",\r\n "execution": {\r\n "type": "slash-command",\r\n "mode": "mainprocess"\r\n },\r\n "contextHint": "Execute test-fix cycle"\r\n }\r\n ]\r\n}\n'})}),"\n",(0,l.jsx)(n.h2,{id:"execution-mode-types",children:"Execution Mode Types"}),"\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.strong,{children:"mainprocess"})}),(0,l.jsx)(n.td,{children:"Execute in main process"}),(0,l.jsx)(n.td,{children:"Sequential execution, state sharing"})]}),(0,l.jsxs)(n.tr,{children:[(0,l.jsx)(n.td,{children:(0,l.jsx)(n.strong,{children:"async"})}),(0,l.jsx)(n.td,{children:"Execute asynchronously"}),(0,l.jsx)(n.td,{children:"Parallel execution, independent steps"})]})]})]}),"\n",(0,l.jsx)(n.h2,{id:"template-output-location",children:"Template Output Location"}),"\n",(0,l.jsxs)(n.p,{children:["Default: ",(0,l.jsx)(n.code,{children:"~/.claude/skills/flow-coordinator/templates/{name}.json"})]}),"\n",(0,l.jsxs)(n.p,{children:["Custom: Use ",(0,l.jsx)(n.code,{children:"--output"})," to specify alternative location"]}),"\n",(0,l.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,l.jsx)(n.h3,{id:"quick-bug-fix-template",children:"Quick Bug Fix Template"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"/flow-create hotfix-simple\r\n\r\n# Interactive prompts:\r\n# Purpose: Bug Fix\r\n# Level: 2 (Lightweight)\r\n# Steps: Use Suggested\r\n# Output: ~/.claude/skills/flow-coordinator/templates/hotfix-simple.json\n"})}),"\n",(0,l.jsx)(n.h3,{id:"custom-multi-stage-workflow",children:"Custom Multi-Stage Workflow"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"/flow-create complex-feature --output ~/.claude/skills/my-project/templates/\r\n\r\n# Interactive prompts:\r\n# Name: complex-feature\r\n# Purpose: Feature\r\n# Level: 4 (Full)\r\n# Steps: Custom definition\r\n# Output: ~/.claude/skills/my-project/templates/complex-feature.json\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:"/flow-coordinator"})," - Execute workflow templates"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"/ccw-coordinator"})," - Generic command orchestration"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsxs)(n.strong,{children:["Skill",":flow-coordinator"]})," - Flow coordinator skill"]}),"\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:"Interactive design"})," process with guided prompts"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Complexity levels"})," determine workflow depth"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Execution units"})," group related steps"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Template validation"})," ensures correctness"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Custom output"})," supported via ",(0,l.jsx)(n.code,{children:"--output"})," parameter"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.strong,{children:"Existing templates"})," can be used as examples"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(d,{...e})}):d(e)}}}]);