From ed341a95b125142a2375723bc7aa6edb8538f824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=82CHES?= Date: Mon, 16 Mar 2026 21:09:17 -0600 Subject: [PATCH] fix: downgrade missing_tasks_dir to warning for completed slices (#772) * fix: downgrade missing_tasks_dir to warning for completed slices (#726) When a worktree is removed and artifacts are rebuilt, tasks/ directories aren't recreated. For completed slices this is cosmetic scaffolding, not a structural error. Downgrade severity from "error" to "warning" so completed milestones can render in /gsd visualize. Also skip the missing_slice_plan warning entirely for completed slices, since a plan file serves no purpose after completion. Co-Authored-By: Claude Opus 4.6 (1M context) * fix: use slice.done instead of non-existent frontmatter.status The SummaryFrontmatter type doesn't have a `status` property. Use `slice.done` from the roadmap parser instead, which is the canonical completion signal already available in scope. Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/doctor.ts | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/resources/extensions/gsd/doctor.ts b/src/resources/extensions/gsd/doctor.ts index c727c671e..c15221d75 100644 --- a/src/resources/extensions/gsd/doctor.ts +++ b/src/resources/extensions/gsd/doctor.ts @@ -1094,11 +1094,13 @@ export async function runGSDDoctor(basePath: string, options?: { fix?: boolean; const tasksDir = resolveTasksDir(basePath, milestoneId, slice.id); if (!tasksDir) { issues.push({ - severity: "error", + severity: slice.done ? "warning" : "error", code: "missing_tasks_dir", scope: "slice", unitId, - message: `Missing tasks directory for ${unitId}`, + message: slice.done + ? `Missing tasks directory for ${unitId} (slice is complete — cosmetic only)` + : `Missing tasks directory for ${unitId}`, file: relSlicePath(basePath, milestoneId, slice.id), fixable: true, }); @@ -1112,15 +1114,17 @@ export async function runGSDDoctor(basePath: string, options?: { fix?: boolean; const planContent = planPath ? await loadFile(planPath) : null; const plan = planContent ? parsePlan(planContent) : null; if (!plan) { - issues.push({ - severity: "warning", - code: "missing_slice_plan", - scope: "slice", - unitId, - message: `Slice ${unitId} has no plan file`, - file: relSliceFile(basePath, milestoneId, slice.id, "PLAN"), - fixable: false, - }); + if (!slice.done) { + issues.push({ + severity: "warning", + code: "missing_slice_plan", + scope: "slice", + unitId, + message: `Slice ${unitId} has no plan file`, + file: relSliceFile(basePath, milestoneId, slice.id, "PLAN"), + fixable: false, + }); + } continue; }