fix(lite-plan): handle empty exploration context when prior analysis exists

When analyze-with-file artifacts are passed to lite-plan, exploration is
skipped (hasPriorAnalysis=true) leaving manifest.explorations empty. The
agent prompt's exploration section rendered as blank, causing the planning
agent to lack context and fail to produce task JSON. Add conditional to
output a fallback hint directing the agent to use the Prior Analysis block
in the task description as primary planning context.
This commit is contained in:
catlog22
2026-03-02 00:04:32 +08:00
parent deea92581b
commit 0939510e0d
2 changed files with 6 additions and 4 deletions

View File

@@ -529,15 +529,17 @@ ${task_description}
## Multi-Angle Exploration Context ## Multi-Angle Exploration Context
${manifest.explorations.map(exp => `### Exploration: ${exp.angle} (${exp.file}) ${manifest.explorations.length > 0
? manifest.explorations.map(exp => `### Exploration: ${exp.angle} (${exp.file})
Path: ${exp.path} Path: ${exp.path}
Read this file for detailed ${exp.angle} analysis.`).join('\n\n')} Read this file for detailed ${exp.angle} analysis.`).join('\n\n') + `
Total explorations: ${manifest.exploration_count} Total explorations: ${manifest.exploration_count}
Angles covered: ${manifest.explorations.map(e => e.angle).join(', ')} Angles covered: ${manifest.explorations.map(e => e.angle).join(', ')}
Manifest: ${sessionFolder}/explorations-manifest.json Manifest: ${sessionFolder}/explorations-manifest.json`
: `No exploration files. Task Description above contains "## Prior Analysis" with analysis summary, key files, and findings — use it as primary planning context.`}
## User Clarifications ## User Clarifications
${JSON.stringify(clarificationContext) || "None"} ${JSON.stringify(clarificationContext) || "None"}

View File

@@ -1,6 +1,6 @@
{ {
"name": "claude-code-workflow", "name": "claude-code-workflow",
"version": "7.1.0", "version": "7.1.1",
"description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution", "description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
"type": "module", "type": "module",
"main": "ccw/dist/index.js", "main": "ccw/dist/index.js",