feat: Add recommended selection to clarification questions

- Add recommended field to explore-json-schema.json clarification_needs
- Update lite-plan/lite-fix/context-gather agent prompts
- Display ★ marker and (Recommended) label in AskUserQuestion options

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-29 18:25:32 +08:00
parent 1e2240dbe9
commit d654419423
4 changed files with 25 additions and 14 deletions

View File

@@ -216,7 +216,7 @@ Execute **${angle}** diagnosis for bug root cause analysis. Analyze codebase fro
- fix_hints: Suggested fix approaches from ${angle} viewpoint
- dependencies: Dependencies relevant to ${angle} diagnosis
- constraints: ${angle}-specific limitations affecting fix
- clarification_needs: ${angle}-related ambiguities (with options array)
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
- _metadata.diagnosis_angle: "${angle}"
- _metadata.diagnosis_index: ${index + 1}
@@ -228,7 +228,7 @@ Execute **${angle}** diagnosis for bug root cause analysis. Analyze codebase fro
- [ ] Fix hints are actionable (specific code changes, not generic advice)
- [ ] Reproduction steps are verifiable
- [ ] JSON output follows schema exactly
- [ ] clarification_needs includes options array
- [ ] clarification_needs includes options + recommended
## Output
Write: ${sessionFolder}/diagnosis-${angle}.json
@@ -333,10 +333,13 @@ if (uniqueClarifications.length > 0) {
question: `[${need.source_angle}] ${need.question}\n\nContext: ${need.context}`,
header: need.source_angle,
multiSelect: false,
options: need.options.map(opt => ({
label: opt,
description: `Use ${opt} approach`
}))
options: need.options.map((opt, index) => {
const isRecommended = need.recommended === index
return {
label: isRecommended ? `${opt}` : opt,
description: isRecommended ? `Use ${opt} approach (Recommended)` : `Use ${opt} approach`
}
})
}))
})
}

View File

@@ -206,7 +206,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
- dependencies: Dependencies relevant to ${angle}
- integration_points: Where to integrate from ${angle} viewpoint (include file:line locations)
- constraints: ${angle}-specific limitations/conventions
- clarification_needs: ${angle}-related ambiguities (with options array)
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
- _metadata.exploration_angle: "${angle}"
## Success Criteria
@@ -217,7 +217,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
- [ ] Integration points include file:line locations
- [ ] Constraints are project-specific to ${angle}
- [ ] JSON output follows schema exactly
- [ ] clarification_needs includes options array
- [ ] clarification_needs includes options + recommended
## Output
Write: ${sessionFolder}/exploration-${angle}.json
@@ -322,10 +322,13 @@ if (uniqueClarifications.length > 0) {
question: `[${need.source_angle}] ${need.question}\n\nContext: ${need.context}`,
header: need.source_angle,
multiSelect: false,
options: need.options.map(opt => ({
label: opt,
description: `Use ${opt} approach`
}))
options: need.options.map((opt, index) => {
const isRecommended = need.recommended === index
return {
label: isRecommended ? `${opt}` : opt,
description: isRecommended ? `Use ${opt} approach (Recommended)` : `Use ${opt} approach`
}
})
}))
})
}

View File

@@ -171,7 +171,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
- dependencies: Dependencies relevant to ${angle}
- integration_points: Where to integrate from ${angle} viewpoint (include file:line locations)
- constraints: ${angle}-specific limitations/conventions
- clarification_needs: ${angle}-related ambiguities (with options array)
- clarification_needs: ${angle}-related ambiguities (options array + recommended index)
- _metadata.exploration_angle: "${angle}"
## Success Criteria
@@ -182,7 +182,7 @@ Execute **${angle}** exploration for task planning context. Analyze codebase fro
- [ ] Integration points include file:line locations
- [ ] Constraints are project-specific to ${angle}
- [ ] JSON output follows schema exactly
- [ ] clarification_needs includes options array
- [ ] clarification_needs includes options + recommended
## Output
Write: ${sessionFolder}/exploration-${angle}.json

View File

@@ -70,6 +70,11 @@
"type": "array",
"items": {"type": "string"},
"description": "Available options for user to choose from (2-4 options)"
},
"recommended": {
"type": "integer",
"minimum": 0,
"description": "Zero-based index of recommended option in the options array. Based on codebase patterns and best practices analysis."
}
}
},