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-baselinedefaults--baseline-dirto<project-root>/.sdlc/quality-baselines/. When--project-rootpoints at a worktree (the standard/sdlc:task-workStep 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-workStep 7 always pass--baseline-dir <main-repo>/.sdlc/quality-baselinesexplicitly (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.
| Location | Role today |
|---|---|
plugin/skills/task-work/SKILL.md | Step 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.py | The executor whose --baseline-dir default resolves relative to --project-root. When the project root is a worktree, the default points at empty space. |
Proposed
Section titled “Proposed”TBD — receiver to fill before promoting from planning/draft.
Approach
Section titled “Approach”TBD — receiver to fill before promoting from planning/draft.
- TBD
Files to touch
Section titled “Files to touch”TBD — receiver to fill before promoting from planning/draft.
| Location | Kind | Change |
|---|---|---|
plugin/skills/task-work/SKILL.md | modify | TBD — fix Step 7 prose to pass --baseline-dir explicitly, OR document the executor-side resolution change. |
plugin/scripts/run_quality_checks.py | modify | TBD — optionally teach the executor to climb out of worktrees to find the main checkout’s baseline dir. |
Acceptance criteria
Section titled “Acceptance criteria”TBD — receiver to fill before promoting from planning/draft.
- AC-1: TBD
Out of scope
Section titled “Out of scope”- none
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”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.
Dedup search (spawn-from-post-mortem)
Section titled “Dedup search (spawn-from-post-mortem)”Bullet: run_quality_checks.py —diff-against-baseline
- 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
Dedup search (spawn-from-post-mortem)
Section titled “Dedup search (spawn-from-post-mortem)”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
- 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 archiverecords 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
Dedup search (spawn-from-post-mortem)
Section titled “Dedup search (spawn-from-post-mortem)”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
Dedup search (spawn-from-post-mortem)
Section titled “Dedup search (spawn-from-post-mortem)”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