From bce6fa7a91ba983a34feb72ee19dbb07746f22d9 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Mon, 29 Dec 2025 19:28:03 +0800 Subject: [PATCH] refactor(issue/new): simplify clarification to open-ended prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove prescriptive options (Bug fix/New feature/Improvement) that may interfere with natural issue description. Now: single open-ended prompt for user to describe freely. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude/commands/issue/new.md | 51 +++++++++++++++-------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/.claude/commands/issue/new.md b/.claude/commands/issue/new.md index 37790e45..f831f217 100644 --- a/.claude/commands/issue/new.md +++ b/.claude/commands/issue/new.md @@ -138,36 +138,29 @@ if (clarityScore >= 1 && clarityScore <= 2 && !issueData.affected_components?.le ### Phase 4: Conditional Clarification (Only if Unclear) ```javascript -// ONLY ask questions if clarity is low -if (clarityScore < 2) { - if (!issueData.title || issueData.title.length < 10 || - !issueData.context || issueData.context.length < 20) { +// ONLY ask questions if clarity is low - simple open-ended prompt +if (clarityScore < 2 && (!issueData.context || issueData.context.length < 20)) { + const answer = AskUserQuestion({ + questions: [{ + question: 'Please describe the issue in more detail:', + header: 'Clarify', + multiSelect: false, + options: [ + { label: 'Provide details', description: 'Describe what, where, and expected behavior' } + ] + }] + }); - const answer = AskUserQuestion({ - questions: [{ - question: `Input unclear. What is the issue about?`, - header: 'Clarify', - multiSelect: false, - options: [ - { label: 'Bug fix', description: 'Something is broken' }, - { label: 'New feature', description: 'Add new functionality' }, - { label: 'Improvement', description: 'Enhance existing feature' }, - { label: 'Other', description: 'Provide more details' } - ] - }] - }); - - // Save clarification as feedback - if (answer.customText) { - issueData.context = answer.customText; - issueData.title = answer.customText.split('.')[0].substring(0, 60); - issueData.feedback = [{ - type: 'clarification', - stage: 'new', - content: answer.customText, - created_at: new Date().toISOString() - }]; - } + // Use custom text input (via "Other") + if (answer.customText) { + issueData.context = answer.customText; + issueData.title = answer.customText.split(/[.\n]/)[0].substring(0, 60); + issueData.feedback = [{ + type: 'clarification', + stage: 'new', + content: answer.customText, + created_at: new Date().toISOString() + }]; } } ```