mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +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([[849],{1184(e,s,i){i.d(s,{R:()=>d,x:()=>c});var n=i(3696);const r={},t=n.createContext(r);function d(e){const s=n.useContext(t);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),n.createElement(t.Provider,{value:s},e.children)}},8742(e,s,i){i.r(s),i.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>d,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"commands/issue/issue-new","title":"issue:new","description":"Create new issue with automatic categorization","source":"@site/docs/commands/issue/issue-new.md","sourceDirName":"commands/issue","slug":"/commands/issue/issue-new","permalink":"/docs/docs/commands/issue/issue-new","draft":false,"unlisted":false,"editUrl":"https://github.com/ccw/docs/tree/main/docs/commands/issue/issue-new.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"issue:new","sidebar_label":"issue:new","sidebar_position":1,"description":"Create new issue with automatic categorization"},"sidebar":"docs","previous":{"title":"/codex-coordinator","permalink":"/docs/docs/commands/general/codex-coordinator"},"next":{"title":"issue:discover","permalink":"/docs/docs/commands/issue/issue-discover"}}');var r=i(2540),t=i(1184);const d={title:"issue:new",sidebar_label:"issue:new",sidebar_position:1,description:"Create new issue with automatic categorization"},c="issue",l={},o=[{value:"Description",id:"description",level:2},{value:"Key Features",id:"key-features",level:3},{value:"Usage",id:"usage",level:2},{value:"Arguments",id:"arguments",level:3},{value:"Examples",id:"examples",level:2},{value:"Create from GitHub URL",id:"create-from-github-url",level:3},{value:"Create with Structured Text",id:"create-with-structured-text",level:3},{value:"Create with Clarification",id:"create-with-clarification",level:3},{value:"Create with GitHub Publishing",id:"create-with-github-publishing",level:3},{value:"Issue Lifecycle Flow",id:"issue-lifecycle-flow",level:2},{value:"Issue Fields",id:"issue-fields",level:2},{value:"Core Fields",id:"core-fields",level:3},{value:"Optional Fields",id:"optional-fields",level:3},{value:"Feedback Schema",id:"feedback-schema",level:3},{value:"Clarity Detection",id:"clarity-detection",level:2},{value:"Scoring Rules",id:"scoring-rules",level:3},{value:"Structured Text Patterns",id:"structured-text-patterns",level:3},{value:"GitHub Publishing Workflow",id:"github-publishing-workflow",level:2},{value:"Related Commands",id:"related-commands",level:2},{value:"CLI Endpoints",id:"cli-endpoints",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",mermaid:"mermaid",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsxs)(s.h1,{id:"issue",children:["issue",":new"]})}),"\n",(0,r.jsx)(s.p,{children:"Create structured issues from GitHub URLs, text descriptions, or brainstorm sessions with automatic categorization and priority detection."}),"\n",(0,r.jsx)(s.h2,{id:"description",children:"Description"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"issue:new"})," command creates structured issues from multiple input sources with intelligent clarity detection. It asks clarifying questions only when needed and supports both local and GitHub-synced issues."]}),"\n",(0,r.jsx)(s.h3,{id:"key-features",children:"Key Features"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Multi-source input"}),": GitHub URLs, text descriptions, structured input"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Clarity detection"}),": Asks questions only for vague inputs"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"GitHub integration"}),": Optional publishing to GitHub with bidirectional sync"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Smart categorization"}),": Automatic tag and priority detection"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"ACE integration"}),": Lightweight codebase context for affected components"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'# Clear inputs - direct creation (no questions)\r\n/issue:new https://github.com/owner/repo/issues/123\r\n/issue:new "Login fails with special chars. Expected: success. Actual: 500"\r\n\r\n# Vague input - will ask 1 clarifying question\r\n/issue:new "something wrong with auth"\r\n\r\n# With priority override\r\n/issue:new "Database connection times out" --priority 2\r\n\r\n# Auto mode - skip confirmations\r\n/issue:new "Fix navigation bug" -y\n'})}),"\n",(0,r.jsx)(s.h3,{id:"arguments",children:"Arguments"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Argument"}),(0,r.jsx)(s.th,{children:"Required"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"input"})}),(0,r.jsx)(s.td,{children:"Yes"}),(0,r.jsx)(s.td,{children:"GitHub URL, issue description, or structured text"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"-y, --yes"})}),(0,r.jsx)(s.td,{children:"No"}),(0,r.jsx)(s.td,{children:"Skip confirmation questions"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"--priority <1-5>"})}),(0,r.jsx)(s.td,{children:"No"}),(0,r.jsx)(s.td,{children:"Override priority (1=critical, 5=low)"})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(s.h3,{id:"create-from-github-url",children:"Create from GitHub URL"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:"/issue:new https://github.com/owner/repo/issues/42\r\n# Output: Fetches issue details via gh CLI, creates immediately\n"})}),"\n",(0,r.jsx)(s.h3,{id:"create-with-structured-text",children:"Create with Structured Text"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'/issue:new "Login fails with special chars. Expected: success. Actual: 500 error"\r\n# Output: Parses structure, creates issue with extracted fields\n'})}),"\n",(0,r.jsx)(s.h3,{id:"create-with-clarification",children:"Create with Clarification"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'/issue:new "auth broken"\r\n# System asks: "Please describe the issue in more detail:"\r\n# User provides: "Users cannot log in when password contains quotes"\r\n# Issue created with enriched context\n'})}),"\n",(0,r.jsx)(s.h3,{id:"create-with-github-publishing",children:"Create with GitHub Publishing"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'/issue:new "Memory leak in WebSocket handler"\r\n# System asks: "Would you like to publish to GitHub?"\r\n# User selects: "Yes, publish to GitHub"\r\n# Output:\r\n# Local issue: ISS-20251229-001\r\n# GitHub issue: https://github.com/org/repo/issues/123\r\n# Both linked bidirectionally\n'})}),"\n",(0,r.jsx)(s.h2,{id:"issue-lifecycle-flow",children:"Issue Lifecycle Flow"}),"\n",(0,r.jsx)(s.mermaid,{value:"graph LR\r\n A[Input Source] --\x3e B{Clarity Score}\r\n B --\x3e|Score 3: GitHub| C[Fetch via gh CLI]\r\n B --\x3e|Score 2: Structured| D[Parse Text]\r\n B --\x3e|Score 0-1: Vague| E[Ask 1 Question]\r\n C --\x3e F[Create Issue]\r\n D --\x3e F\r\n E --\x3e F\r\n F --\x3e G{Publish to GitHub?}\r\n G --\x3e|Yes| H[Create + Link GitHub]\r\n G --\x3e|No| I[Local Only]\r\n H --\x3e J[issue:plan]\r\n I --\x3e J"}),"\n",(0,r.jsx)(s.h2,{id:"issue-fields",children:"Issue Fields"}),"\n",(0,r.jsx)(s.h3,{id:"core-fields",children:"Core Fields"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Field"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsxs)(s.td,{children:["Issue ID (",(0,r.jsx)(s.code,{children:"GH-123"})," or ",(0,r.jsx)(s.code,{children:"ISS-YYYYMMDD-NNN"}),")"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"title"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Issue title (max 60 chars)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"status"})}),(0,r.jsx)(s.td,{children:"enum"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"registered"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"priority"})}),(0,r.jsx)(s.td,{children:"number"}),(0,r.jsx)(s.td,{children:"1 (critical) to 5 (low)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"context"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Problem description (single source of truth)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"source"})}),(0,r.jsx)(s.td,{children:"enum"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"github"})})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"optional-fields",children:"Optional Fields"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Field"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"source_url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Original source URL"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"labels"})}),(0,r.jsx)(s.td,{children:"string[]"}),(0,r.jsx)(s.td,{children:"Category tags"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"expected_behavior"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Expected system behavior"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"actual_behavior"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Actual problematic behavior"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"affected_components"})}),(0,r.jsx)(s.td,{children:"string[]"}),(0,r.jsx)(s.td,{children:"Related files/modules (via ACE)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"github_url"})}),(0,r.jsx)(s.td,{children:"string"}),(0,r.jsx)(s.td,{children:"Linked GitHub issue URL"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"github_number"})}),(0,r.jsx)(s.td,{children:"number"}),(0,r.jsx)(s.td,{children:"GitHub issue number"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"feedback"})}),(0,r.jsx)(s.td,{children:"object[]"}),(0,r.jsx)(s.td,{children:"Failure history and clarifications"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"feedback-schema",children:"Feedback Schema"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-typescript",children:"interface Feedback {\r\n type: 'failure' | 'clarification' | 'rejection';\r\n stage: 'new' | 'plan' | 'execute';\r\n content: string;\r\n created_at: string;\r\n}\n"})}),"\n",(0,r.jsx)(s.h2,{id:"clarity-detection",children:"Clarity Detection"}),"\n",(0,r.jsx)(s.h3,{id:"scoring-rules",children:"Scoring Rules"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Score"}),(0,r.jsx)(s.th,{children:"Criteria"}),(0,r.jsx)(s.th,{children:"Behavior"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.strong,{children:"3"})}),(0,r.jsx)(s.td,{children:"GitHub URL"}),(0,r.jsx)(s.td,{children:"Fetch directly, no questions"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.strong,{children:"2"})}),(0,r.jsx)(s.td,{children:'Structured text (has "expected:", "actual:", etc.)'}),(0,r.jsx)(s.td,{children:"Parse structure, may use ACE for components"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.strong,{children:"1"})}),(0,r.jsx)(s.td,{children:"Long text (>50 chars)"}),(0,r.jsx)(s.td,{children:"Quick ACE hint if components missing"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.strong,{children:"0"})}),(0,r.jsx)(s.td,{children:"Vague/short text"}),(0,r.jsx)(s.td,{children:"Ask 1 clarifying question"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"structured-text-patterns",children:"Structured Text Patterns"}),"\n",(0,r.jsx)(s.p,{children:"The command recognizes these keywords for automatic parsing:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"expected:"})," / ",(0,r.jsx)(s.code,{children:"Expected:"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"actual:"})," / ",(0,r.jsx)(s.code,{children:"Actual:"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"affects:"})," / ",(0,r.jsx)(s.code,{children:"Affects:"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.code,{children:"steps:"})," / ",(0,r.jsx)(s.code,{children:"Steps:"})]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"github-publishing-workflow",children:"GitHub Publishing Workflow"}),"\n",(0,r.jsx)(s.mermaid,{value:'sequenceDiagram\r\n participant User\r\n participant Command\r\n participant CLI\r\n participant GitHub\r\n\r\n User->>Command: /issue:new "description"\r\n Command->>CLI: ccw issue create (local)\r\n CLI--\x3e>Command: ISS-YYYYMMDD-NNN\r\n Command->>User: Publish to GitHub?\r\n User->>Command: Yes\r\n Command->>GitHub: gh issue create\r\n GitHub--\x3e>Command: https://github.com/.../123\r\n Command->>CLI: ccw issue update --github-url --github-number\r\n CLI--\x3e>Command: Issue updated\r\n Command--\x3e>User: Local + GitHub linked'}),"\n",(0,r.jsx)(s.h2,{id:"related-commands",children:"Related Commands"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-plan",children:["issue",":plan"]})})," - Generate solution for issue"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-queue",children:["issue",":queue"]})})," - Form execution queue"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-discover",children:["issue",":discover"]})})," - Discover issues from codebase"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-from-brainstorm",children:["issue",":from-brainstorm"]})})," - Convert brainstorm to issue"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-convert-to-plan",children:["issue",":convert-to-plan"]})})," - Convert plans to issues"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsxs)(s.a,{href:"/docs/docs/commands/issue/issue-execute",children:["issue",":execute"]})})," - Execute issue queue"]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"cli-endpoints",children:"CLI Endpoints"}),"\n",(0,r.jsx)(s.p,{children:"The command uses these CLI endpoints:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-bash",children:'# Create issue\r\necho \'{"title":"...","context":"...","priority":3}\' | ccw issue create\r\n\r\n# Update with GitHub binding\r\nccw issue update <id> --github-url "<url>" --github-number <num>\r\n\r\n# View issue\r\nccw issue status <id> --json\n'})})]})}function a(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); |