mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
refactor(issue/new): simplify clarification to open-ended prompt
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 <noreply@anthropic.com>
This commit is contained in:
@@ -138,36 +138,29 @@ if (clarityScore >= 1 && clarityScore <= 2 && !issueData.affected_components?.le
|
|||||||
### Phase 4: Conditional Clarification (Only if Unclear)
|
### Phase 4: Conditional Clarification (Only if Unclear)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// ONLY ask questions if clarity is low
|
// ONLY ask questions if clarity is low - simple open-ended prompt
|
||||||
if (clarityScore < 2) {
|
if (clarityScore < 2 && (!issueData.context || issueData.context.length < 20)) {
|
||||||
if (!issueData.title || issueData.title.length < 10 ||
|
const answer = AskUserQuestion({
|
||||||
!issueData.context || issueData.context.length < 20) {
|
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({
|
// Use custom text input (via "Other")
|
||||||
questions: [{
|
if (answer.customText) {
|
||||||
question: `Input unclear. What is the issue about?`,
|
issueData.context = answer.customText;
|
||||||
header: 'Clarify',
|
issueData.title = answer.customText.split(/[.\n]/)[0].substring(0, 60);
|
||||||
multiSelect: false,
|
issueData.feedback = [{
|
||||||
options: [
|
type: 'clarification',
|
||||||
{ label: 'Bug fix', description: 'Something is broken' },
|
stage: 'new',
|
||||||
{ label: 'New feature', description: 'Add new functionality' },
|
content: answer.customText,
|
||||||
{ label: 'Improvement', description: 'Enhance existing feature' },
|
created_at: new Date().toISOString()
|
||||||
{ 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()
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user