diff --git a/src/headless.ts b/src/headless.ts index 15fd1bbab..b14922271 100644 --- a/src/headless.ts +++ b/src/headless.ts @@ -178,6 +178,11 @@ async function runHeadlessOnce(options: HeadlessOptions, restartCount: number): const startTime = Date.now() const isNewMilestone = options.command === 'new-milestone' + // new-milestone involves codebase investigation + artifact writing — needs more time + if (isNewMilestone && options.timeout === 300_000) { + options.timeout = 600_000 // 10 minutes + } + // Supervised mode cannot share stdin with --context - if (options.supervised && options.context === '-') { process.stderr.write('[headless] Error: --supervised cannot be used with --context - (both require stdin)\n') diff --git a/src/resources/extensions/gsd/prompts/discuss-headless.md b/src/resources/extensions/gsd/prompts/discuss-headless.md index 4a1244704..b6b814064 100644 --- a/src/resources/extensions/gsd/prompts/discuss-headless.md +++ b/src/resources/extensions/gsd/prompts/discuss-headless.md @@ -16,13 +16,15 @@ Summarize your understanding of the specification concretely: - Scope estimate (how many milestones × slices) - Any ambiguities or gaps you notice -### Step 2: Investigate +### Step 2: Investigate (brief) -Scout the codebase to understand what already exists: +Quickly scout the codebase to understand what already exists — spend no more than 5-6 tool calls here: - `ls` the project root and key directories - Search for relevant existing code, patterns, dependencies - Check library docs if needed (`resolve_library` / `get_library_docs`) +Then move on to writing artifacts. Do not explore exhaustively — the research phase will do deeper investigation later. + ### Step 3: Make Decisions For any ambiguities or gaps in the specification: