From 776a8800d8df9c9f3ef7cdade5e95dc44fe1be89 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Tue, 17 Mar 2026 09:48:53 -0400 Subject: [PATCH] fix: include STATE.md, KNOWLEDGE.md, OVERRIDES.md in worktree artifact copy (#809) (#830) Worktree initialization only copied DECISIONS.md, REQUIREMENTS.md, PROJECT.md, and QUEUE.md. The missing STATE.md caused the pre-dispatch health check in doctor-proactive.ts to block dispatch with 'STATE.md missing'. Add STATE.md, KNOWLEDGE.md, and OVERRIDES.md to the copy list so worktrees start with complete planning state. --- src/resources/extensions/gsd/auto-worktree.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resources/extensions/gsd/auto-worktree.ts b/src/resources/extensions/gsd/auto-worktree.ts index e3232f5a7..c7081335e 100644 --- a/src/resources/extensions/gsd/auto-worktree.ts +++ b/src/resources/extensions/gsd/auto-worktree.ts @@ -312,7 +312,8 @@ export function createAutoWorktree(basePath: string, milestoneId: string): strin /** * Copy .gsd/ planning artifacts from source repo to a new worktree. - * Copies milestones/, DECISIONS.md, REQUIREMENTS.md, PROJECT.md, QUEUE.md. + * Copies milestones/, DECISIONS.md, REQUIREMENTS.md, PROJECT.md, QUEUE.md, + * STATE.md, KNOWLEDGE.md, and OVERRIDES.md. * Skips runtime files (auto.lock, metrics.json, etc.) and the worktrees/ dir. * Best-effort — failures are non-fatal since auto-mode can recreate artifacts. */ @@ -330,7 +331,7 @@ function copyPlanningArtifacts(srcBase: string, wtPath: string): void { } // Copy top-level planning files - for (const file of ["DECISIONS.md", "REQUIREMENTS.md", "PROJECT.md", "QUEUE.md"]) { + for (const file of ["DECISIONS.md", "REQUIREMENTS.md", "PROJECT.md", "QUEUE.md", "STATE.md", "KNOWLEDGE.md", "OVERRIDES.md"]) { const src = join(srcGsd, file); if (existsSync(src)) { try {