Skip to content

T-5X6Y-task-work-step7-explicit-baseline-dir

Status: closed/superseded · Impact: medium · Complexity: small

/sdlc:task-work Step 7’s run_quality_checks.py --diff-against-baseline invocation silently degrades to a no-op gate when run from a worktree. The runner defaults --baseline-dir to <project-root>/.sdlc/quality-baselines/, but in a Step-7 invocation <project-root> is the worktree path, whose own .sdlc/ is empty and gitignored. The baseline was actually captured by Step 3a into the main checkout’s .sdlc/quality-baselines/, so the worktree-side lookup misses, falls back to “baseline not found, ignoring”, and exits 0 without comparing anything. Every Rust-flavoured task on consumer projects silently loses the drift gate this way.

Cross-repo follow-up from 2026-05-24-apifn-derive-default-for-test-ergonomics in git@github.com:sksizer/rust-ontogen.git. Classification: Upstream-plugin.

run_quality_checks.py --diff-against-baseline defaults --baseline-dir to <project-root>/.sdlc/quality-baselines/. When --project-root points at a worktree (the standard /sdlc:task-work Step 7 invocation), the worktree’s own .sdlc/ is empty (gitignored, fresh checkout) and the gate falls back to its “baseline not found, ignoring” branch silently — exit 0 with no actual diff gating. The fix: have /sdlc:task-work Step 7 always pass --baseline-dir <main-repo>/.sdlc/quality-baselines explicitly (since Step 3a writes there), OR teach the executor’s default to climb out of worktrees toward the main checkout. The current SKILL.md Step 7 prose doesn’t pass --baseline-dir, so every Rust-flavoured task on this repo silently degrades the gate.

2026-05-24-apifn-derive-default-for-test-ergonomics post-mortem

TBD — receiver to fill before promoting from planning/draft.

LocationRole today
plugin/skills/task-work/SKILL.mdStep 7 invokes run_quality_checks.py --diff-against-baseline "$ORIGIN_MAIN_SHA" without passing --baseline-dir, so the executor uses its <project-root>/.sdlc/quality-baselines/ default — which is the worktree’s empty .sdlc/.
plugin/scripts/run_quality_checks.pyThe executor whose --baseline-dir default resolves relative to --project-root. When the project root is a worktree, the default points at empty space.

TBD — receiver to fill before promoting from planning/draft.

TBD — receiver to fill before promoting from planning/draft.

  1. TBD

TBD — receiver to fill before promoting from planning/draft.

LocationKindChange
plugin/skills/task-work/SKILL.mdmodifyTBD — fix Step 7 prose to pass --baseline-dir explicitly, OR document the executor-side resolution change.
plugin/scripts/run_quality_checks.pymodifyTBD — optionally teach the executor to climb out of worktrees to find the main checkout’s baseline dir.

TBD — receiver to fill before promoting from planning/draft.

  • AC-1: TBD
  • none
  • none

Spawned by /sdlc:cross-repo-task-pr on 2026-05-25 UTC from 2026-05-24-apifn-derive-default-for-test-ergonomics in git@github.com:sksizer/rust-ontogen.git.

Bullet: run_quality_checks.py —diff-against-baseline looks for the baseline in the WORKTREE’s .sdlc/quality-baselines/.json, but quality_baseline.py capture (run in Step 3a from the main repo) writes to the MAIN REPO’s .sdlc/quality-baselines/.json. The worktree and main share .git but NOT runtime state directories. Either (a) the executor should fall back to /../.sdlc/quality-baselines/ when the worktree-local file is missing, or (b) quality_baseline.py capture should also write a copy into all known worktree paths, or (c) the baseline directory should be symlinked. The Step-3a-vs-Step-7 path mismatch is a real protocol friction. Keywords searched: diff-against-baseline, run_quality_checks, quality-baselines, step-3a-vs-step-7, quality_baseline, git-common-dir, worktree-local, directories Excluded: 2026-05-26-archive-records-closing-timestamp-for-post-mortem-detector Top candidates (score / status / headline):

  • 36 / closed/done / 2026-05-21-run-quality-checks-isolates-pre-existing-drift — run_quality_checks.py only fails on drift the current branch introduced
  • 13 / planning/draft / 2026-05-25-task-work-step7-explicit-baseline-dir — task-work Step 7 must pass —baseline-dir explicitly to defeat silent fallback in worktree
  • 12 / planning/draft / 2026-05-24-run-quality-checks-logs-cwd-and-forwards-project-root — run_quality_checks.py logs cwd at start and forwards —project-root to capable verbs
  • 8 / planning/draft / 2026-05-23-dogfood-baseline-smoke-test — Dogfood smoke-test script for new quality-check verbs before declaring done
  • 6 / planning/draft / 2026-05-22-gitignore-plugin-pycache — Suppress plugin/pycache from grep-based ACs (gitignore or PYTHONDONTWRITEBYTECODE) Decision: LINKED-EXISTING 2026-05-25-task-work-step7-explicit-baseline-dir Rationale: Override script’s SPAWNED → LINKED-EXISTING. Rank-#2 candidate is a near-verbatim restatement of this bullet — same gap (Step 3a writes baseline to main repo’s .sdlc/, Step 7 reads from worktree’s .sdlc/), same proposed fix space. Linking instead of spawning prevents triple-coverage of the same protocol friction. Originating task: 2026-05-26-archive-records-closing-timestamp-for-post-mortem-detector

Bullet: run_quality_checks.py —diff-against-baseline exhibits the same pattern from a different angle: baseline lives under main’s .sdlc/quality-baselines/, executor looks under the worktree’s. Workaround: pass —baseline-dir /.sdlc/quality-baselines explicitly. Already filed as 2026-05-25-task-work-step7-explicit-baseline-dir. Keywords searched: task-work-step7-explicit-baseline-dir, diff-against-baseline, run_quality_checks, quality-baselines, baseline-dir, workaround, explicitly, different Excluded: 2026-05-27-task-work-writes-pr-url-to-prs-at-open Top candidates (score / status / headline):

  • 42 / planning/draft / 2026-05-25-task-work-step7-explicit-baseline-dir — task-work Step 7 must pass —baseline-dir explicitly to defeat silent fallback in worktree
  • 36 / closed/done / 2026-05-21-run-quality-checks-isolates-pre-existing-drift — run_quality_checks.py only fails on drift the current branch introduced
  • 12 / planning/draft / 2026-05-24-run-quality-checks-logs-cwd-and-forwards-project-root — run_quality_checks.py logs cwd at start and forwards —project-root to capable verbs
  • 12 / closed/done / 2026-05-26-archive-records-closing-timestamp-for-post-mortem-detector — sdlc lease task archive records a closing timestamp into the archive ref
  • 8 / closed/done / 2026-05-19-task-work-uses-per-project-quality-checks — Make /sdlc:task-work quality-check commands per-project configurable Decision: LINKED-EXISTING 2026-05-25-task-work-step7-explicit-baseline-dir Originating task: 2026-05-27-task-work-writes-pr-url-to-prs-at-open

Bullet: The quality_baseline.py —baseline-dir path mismatch from the worktree (already tracked in T-5X6Y-task-work-step7-explicit-baseline-dir) bit again — passed —baseline-dir explicitly to the sub-agent so it could re-run the gate. Same workaround, same friction. Keywords searched: task-work-step7-explicit-baseline-dir, quality_baseline, baseline-dir, explicitly, workaround, sub-agent, mismatch, worktree Excluded: 2026-05-27-task-close-out-verifies-prs-against-merged-pr Top candidates (score / status / headline):

  • 57 / planning/draft / 2026-05-25-task-work-step7-explicit-baseline-dir — task-work Step 7 must pass —baseline-dir explicitly to defeat silent fallback in worktree
  • 38 / closed/done / 2026-05-22-move-plugin-runtime-state-to-sdlc-dir — Migrate sdlc plugin runtime state from .claude/ to .sdlc/
  • 36 / closed/done / 2026-05-20-orchestrator-categorized-in-flight-limits — Replace orchestrator parallelism cap with categorized in-flight limits configurable in sdlc.yaml
  • 36 / planning/draft / 2026-05-22-task-work-uses-worktree-skill-md — task-work loads SKILL.md from the worktree, not ${CLAUDE_PLUGIN_ROOT}
  • 32 / planning/draft / 2026-05-23-subagent-invariant-preflight-lint — Run skill-prose invariant linter inline during sub-agent edits to catch forbidden-phrase violations pre-flight Decision: LINKED-EXISTING 2026-05-25-task-work-step7-explicit-baseline-dir Originating task: 2026-05-27-task-close-out-verifies-prs-against-merged-pr

Bullet: —baseline-dir explicit override still needed for the quality gate (worktree’s .sdlc/quality-baselines/ doesn’t exist). Separate task: T-5X6Y-task-work-step7-explicit-baseline-dir. Keywords searched: task-work-step7-explicit-baseline-dir, quality-baselines, baseline-dir, explicit, override, worktree, separate, quality Excluded: 2026-05-27-drop-lease-filesystem-cache Top candidates (score / status / headline):

  • 102 / planning/draft / 2026-05-25-task-work-step7-explicit-baseline-dir — task-work Step 7 must pass —baseline-dir explicitly to defeat silent fallback in worktree
  • 47 / closed/done / 2026-05-19-task-work-uses-per-project-quality-checks — Make /sdlc:task-work quality-check commands per-project configurable
  • 47 / closed/done / 2026-05-21-run-quality-checks-isolates-pre-existing-drift — run_quality_checks.py only fails on drift the current branch introduced
  • 42 / planning/draft / 2026-05-22-task-work-uses-worktree-skill-md — task-work loads SKILL.md from the worktree, not ${CLAUDE_PLUGIN_ROOT}
  • 34 / closed/done / 2026-05-22-move-plugin-runtime-state-to-sdlc-dir — Migrate sdlc plugin runtime state from .claude/ to .sdlc/ Decision: LINKED-EXISTING 2026-05-25-task-work-step7-explicit-baseline-dir Originating task: 2026-05-27-drop-lease-filesystem-cache

← Back to Tasks