mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: enforce synchronous exploration execution and update planning steps
This commit is contained in:
@@ -152,11 +152,16 @@ Launching ${selectedAngles.length} parallel explorations...
|
|||||||
|
|
||||||
**Launch Parallel Explorations** - Orchestrator assigns angle to each agent:
|
**Launch Parallel Explorations** - Orchestrator assigns angle to each agent:
|
||||||
|
|
||||||
|
**⚠️ CRITICAL - NO BACKGROUND EXECUTION**:
|
||||||
|
- **MUST NOT use `run_in_background: true`** - exploration results are REQUIRED before planning
|
||||||
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Launch agents with pre-assigned angles
|
// Launch agents with pre-assigned angles
|
||||||
const explorationTasks = selectedAngles.map((angle, index) =>
|
const explorationTasks = selectedAngles.map((angle, index) =>
|
||||||
Task(
|
Task(
|
||||||
subagent_type="cli-explore-agent",
|
subagent_type="cli-explore-agent",
|
||||||
|
run_in_background=false, // ⚠️ MANDATORY: Must wait for results
|
||||||
description=`Explore: ${angle}`,
|
description=`Explore: ${angle}`,
|
||||||
prompt=`
|
prompt=`
|
||||||
## Task Objective
|
## Task Objective
|
||||||
@@ -356,7 +361,15 @@ if (dedupedClarifications.length > 0) {
|
|||||||
// Step 1: Read schema
|
// Step 1: Read schema
|
||||||
const schema = Bash(`cat ~/.claude/workflows/cli-templates/schemas/plan-json-schema.json`)
|
const schema = Bash(`cat ~/.claude/workflows/cli-templates/schemas/plan-json-schema.json`)
|
||||||
|
|
||||||
// Step 2: Generate plan following schema (Claude directly, no agent)
|
// Step 2: ⚠️ MANDATORY - Read and review ALL exploration files
|
||||||
|
const manifest = JSON.parse(Read(`${sessionFolder}/explorations-manifest.json`))
|
||||||
|
manifest.explorations.forEach(exp => {
|
||||||
|
const explorationData = Read(exp.path)
|
||||||
|
console.log(`\n### Exploration: ${exp.angle}\n${explorationData}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Step 3: Generate plan following schema (Claude directly, no agent)
|
||||||
|
// ⚠️ Plan MUST incorporate insights from exploration files read in Step 2
|
||||||
const plan = {
|
const plan = {
|
||||||
summary: "...",
|
summary: "...",
|
||||||
approach: "...",
|
approach: "...",
|
||||||
@@ -367,10 +380,10 @@ const plan = {
|
|||||||
_metadata: { timestamp: getUtc8ISOString(), source: "direct-planning", planning_mode: "direct" }
|
_metadata: { timestamp: getUtc8ISOString(), source: "direct-planning", planning_mode: "direct" }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 3: Write plan to session folder
|
// Step 4: Write plan to session folder
|
||||||
Write(`${sessionFolder}/plan.json`, JSON.stringify(plan, null, 2))
|
Write(`${sessionFolder}/plan.json`, JSON.stringify(plan, null, 2))
|
||||||
|
|
||||||
// Step 4: MUST continue to Phase 4 (Confirmation) - DO NOT execute code here
|
// Step 5: MUST continue to Phase 4 (Confirmation) - DO NOT execute code here
|
||||||
```
|
```
|
||||||
|
|
||||||
**Medium/High Complexity** - Invoke cli-lite-planning-agent:
|
**Medium/High Complexity** - Invoke cli-lite-planning-agent:
|
||||||
|
|||||||
Reference in New Issue
Block a user