fix(sdk): pass phaseDir to executor prompt so SUMMARY.md lands in .planning/
The SDK's buildExecutorPrompt told executors to "Create a SUMMARY.md file"
with no directory path, causing them to write it in cwd (project root)
instead of .planning/phases/{phase}/. Thread phaseDir from PhaseRunner
through PromptFactory and into the completion instructions so the executor
gets an explicit path like `.planning/phases/01-auth/01-01-SUMMARY.md`.
Backward compatible — buildExecutorPrompt still accepts a plain string
(agentDef) for existing callers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,9 +59,10 @@ export async function runPlanSession(
|
||||
agentDef?: string,
|
||||
eventStream?: GSDEventStream,
|
||||
streamContext?: EventStreamContext,
|
||||
phaseDir?: string,
|
||||
): Promise<PlanResult> {
|
||||
// Build the executor prompt
|
||||
const executorPrompt = buildExecutorPrompt(plan, agentDef);
|
||||
const executorPrompt = buildExecutorPrompt(plan, { agentDef, phaseDir });
|
||||
|
||||
// Resolve allowed tools — from agent definition or defaults
|
||||
const allowedTools = options?.allowedTools ??
|
||||
|
||||
Reference in New Issue
Block a user