mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
refactor: enhance multi-angle exploration context in lite-execute command output
This commit is contained in:
@@ -114,7 +114,12 @@ try {
|
|||||||
recommended_execution: jsonData.meta.recommended_execution,
|
recommended_execution: jsonData.meta.recommended_execution,
|
||||||
complexity: jsonData.meta.complexity
|
complexity: jsonData.meta.complexity
|
||||||
}
|
}
|
||||||
explorationContext = jsonData.context.exploration || null
|
|
||||||
|
// Extract multi-angle explorations
|
||||||
|
explorationsContext = jsonData.context.explorations || null
|
||||||
|
explorationAngles = jsonData.meta.exploration_angles || []
|
||||||
|
explorationFiles = jsonData.context.exploration_files || []
|
||||||
|
|
||||||
clarificationContext = jsonData.context.clarifications || null
|
clarificationContext = jsonData.context.clarifications || null
|
||||||
originalUserInput = jsonData.title
|
originalUserInput = jsonData.title
|
||||||
|
|
||||||
@@ -336,18 +341,36 @@ Outputs: ${result.keyOutputs || 'See git diff'}
|
|||||||
${result.notes ? `Notes: ${result.notes}` : ''}
|
${result.notes ? `Notes: ${result.notes}` : ''}
|
||||||
`).join('\n---\n')}` : ''}
|
`).join('\n---\n')}` : ''}
|
||||||
|
|
||||||
## Code Context
|
## Multi-Angle Code Context
|
||||||
${explorationContext || "No exploration performed"}
|
|
||||||
|
${explorationsContext && Object.keys(explorationsContext).length > 0 ?
|
||||||
|
explorationAngles.map(angle => {
|
||||||
|
const exp = explorationsContext[angle]
|
||||||
|
return `### Exploration Angle: ${angle}
|
||||||
|
|
||||||
|
**Project Structure**: ${exp.project_structure || 'N/A'}
|
||||||
|
**Relevant Files**: ${exp.relevant_files?.join(', ') || 'None'}
|
||||||
|
**Patterns**: ${exp.patterns || 'N/A'}
|
||||||
|
**Dependencies**: ${exp.dependencies || 'N/A'}
|
||||||
|
**Integration Points**: ${exp.integration_points || 'N/A'}
|
||||||
|
**Constraints**: ${exp.constraints || 'N/A'}`
|
||||||
|
}).join('\n\n---\n\n')
|
||||||
|
: "No exploration performed"
|
||||||
|
}
|
||||||
|
|
||||||
${clarificationContext ? `\n## Clarifications\n${JSON.stringify(clarificationContext, null, 2)}` : ''}
|
${clarificationContext ? `\n## Clarifications\n${JSON.stringify(clarificationContext, null, 2)}` : ''}
|
||||||
|
|
||||||
${executionContext?.session?.artifacts ? `\n## Planning Artifacts
|
${executionContext?.session?.artifacts ? `\n## Exploration Artifact Files
|
||||||
Detailed planning context available in:
|
|
||||||
${executionContext.session.artifacts.exploration ? `- Exploration: ${executionContext.session.artifacts.exploration}` : ''}
|
Detailed exploration context available in:
|
||||||
|
${executionContext.session.artifacts.explorations?.map(exp =>
|
||||||
|
`- Angle: ${exp.angle} → ${exp.path}`
|
||||||
|
).join('\n') || ''}
|
||||||
|
${executionContext.session.artifacts.explorations_manifest ? `- Manifest: ${executionContext.session.artifacts.explorations_manifest}` : ''}
|
||||||
- Plan: ${executionContext.session.artifacts.plan}
|
- Plan: ${executionContext.session.artifacts.plan}
|
||||||
- Task: ${executionContext.session.artifacts.task}
|
- Task: ${executionContext.session.artifacts.task}
|
||||||
|
|
||||||
Read these files for detailed architecture, patterns, and constraints.` : ''}
|
Read exploration files for comprehensive context from multiple angles.` : ''}
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
MUST complete ALL ${planObject.tasks.length} tasks listed above in this single execution.
|
MUST complete ALL ${planObject.tasks.length} tasks listed above in this single execution.
|
||||||
@@ -407,24 +430,35 @@ ${result.notes ? `Notes: ${result.notes}` : ''}
|
|||||||
IMPORTANT: Review previous results. Build on completed work. Avoid duplication.
|
IMPORTANT: Review previous results. Build on completed work. Avoid duplication.
|
||||||
` : ''}
|
` : ''}
|
||||||
|
|
||||||
### Code Context from Exploration
|
### Multi-Angle Code Context
|
||||||
${explorationContext ? `
|
|
||||||
Project Structure: ${explorationContext.project_structure || 'Standard structure'}
|
${explorationsContext && Object.keys(explorationsContext).length > 0 ?
|
||||||
Relevant Files: ${explorationContext.relevant_files?.join(', ') || 'TBD'}
|
`Exploration conducted from ${explorationAngles.length} angles:
|
||||||
Current Patterns: ${explorationContext.patterns || 'Follow existing conventions'}
|
|
||||||
Integration Points: ${explorationContext.dependencies || 'None specified'}
|
${explorationAngles.map(angle => {
|
||||||
Constraints: ${explorationContext.constraints || 'None'}
|
const exp = explorationsContext[angle]
|
||||||
` : 'No prior exploration - analyze codebase as needed'}
|
return `Angle: ${angle}
|
||||||
|
- Structure: ${exp.project_structure || 'Standard structure'}
|
||||||
|
- Files: ${exp.relevant_files?.slice(0, 5).join(', ') || 'TBD'}${exp.relevant_files?.length > 5 ? ` (+${exp.relevant_files.length - 5} more)` : ''}
|
||||||
|
- Patterns: ${exp.patterns?.substring(0, 100) || 'Follow existing'}${exp.patterns?.length > 100 ? '...' : ''}
|
||||||
|
- Constraints: ${exp.constraints || 'None'}`
|
||||||
|
}).join('\n\n')}
|
||||||
|
`
|
||||||
|
: 'No prior exploration - analyze codebase as needed'
|
||||||
|
}
|
||||||
|
|
||||||
${clarificationContext ? `\n### User Clarifications\n${Object.entries(clarificationContext).map(([q, a]) => `${q}: ${a}`).join('\n')}` : ''}
|
${clarificationContext ? `\n### User Clarifications\n${Object.entries(clarificationContext).map(([q, a]) => `${q}: ${a}`).join('\n')}` : ''}
|
||||||
|
|
||||||
${executionContext?.session?.artifacts ? `\n### Planning Artifact Files
|
${executionContext?.session?.artifacts ? `\n### Exploration Artifact Files
|
||||||
Detailed planning context available in session folder:
|
Detailed context from multiple exploration angles available in:
|
||||||
${executionContext.session.artifacts.exploration ? `- Exploration: ${executionContext.session.artifacts.exploration}` : ''}
|
${executionContext.session.artifacts.explorations?.map(exp =>
|
||||||
|
`- Angle: ${exp.angle} → ${exp.path}`
|
||||||
|
).join('\n') || ''}
|
||||||
|
${executionContext.session.artifacts.explorations_manifest ? `- Manifest: ${executionContext.session.artifacts.explorations_manifest}` : ''}
|
||||||
- Plan: ${executionContext.session.artifacts.plan}
|
- Plan: ${executionContext.session.artifacts.plan}
|
||||||
- Task: ${executionContext.session.artifacts.task}
|
- Task: ${executionContext.session.artifacts.task}
|
||||||
|
|
||||||
Read these files for complete architecture details, code patterns, and integration constraints.
|
Read exploration files for comprehensive architectural, pattern, and constraint details from multiple angles.
|
||||||
` : ''}
|
` : ''}
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|||||||
Reference in New Issue
Block a user