T-F1WJ-quality-run-resolves-superproject-baseline
Status: closed/superseded · Impact: high · Complexity: small
sdlc quality run --diff-against-baseline mis-resolves --baseline-dir
when invoked from inside a git worktree: it points at the worktree’s own
.sdlc/ rather than the superproject (main checkout) .sdlc/quality-baselines/
where the baseline was actually written. The gate fails baseline not found
even though a valid baseline exists, forcing the operator to pass
--baseline-dir explicitly. This task closes that gap so the documented
/sdlc:task-work Step 7 quality run invocation works as-is from a worktree.
From
T-CCLI-catalog-cliin https://github.com/sksizer/markdown-contract: Whensdlc quality run --diff-against-baselineis invoked from inside a git worktree, it resolves--baseline-diragainst the worktree’s own.sdlc/, but the baseline is written by task-work Step 3a under the main checkout’s.sdlc/quality-baselines/, so the gate fails ‘baseline not found’ until--baseline-dir <main-repo>/.sdlc/quality-baselinesis passed explicitly. Fix: task-work Step 7’s documentedquality runinvocation (or the verb’s baseline-dir resolution) should resolve the superproject’s.sdlc/quality-baselines/when run from a worktree.
TBD — receiver to fill before promoting from planning/draft.
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.
Files to touch
Section titled “Files to touch”TBD — receiver to fill before promoting from planning/draft.
Acceptance criteria
Section titled “Acceptance criteria”TBD — receiver to fill before promoting from planning/draft.
Out of scope
Section titled “Out of scope”- none
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”Spawned by /sdlc:spawn-task-pr on 2026-06-30 UTC from T-CCLI-catalog-cli in
https://github.com/sksizer/markdown-contract.
Dedup search (spawn-from-post-mortem)
Section titled “Dedup search (spawn-from-post-mortem)”Bullet: Step 3a captured the quality baseline into the main repo’s .sdlc/quality-baselines/ but
Step 7’s gate defaulted to the worktree’s .sdlc/ and errored baseline not found — task-work Step
7 should pass --baseline-dir <main-repo>/.sdlc/quality-baselines by default since .sdlc/ is
per-worktree and the baseline is captured in the superproject. Keywords searched: quality-baselines,
baseline-dir, per-worktree, superproject, defaulted, task-work, main-repo, baseline Excluded:
T-NLKF-converge-obsidian-bases Top candidates (score / status / headline):
- 352 / closed/obsoleted / T-44OO-plugin-scripts-self-discover-project-root — Plugin scripts self-discover project root from cwd
- 160 / closed/done / T-TWZD-normalize-baseline-diff-nondeterministic-output — run_quality_checks —diff-against-baseline masks ephemeral tmpdir paths and transient SHAs before line-diffing
- 135 / closed/superseded / T-5X6Y-task-work-step7-explicit-baseline-dir — task-work Step 7 must pass —baseline-dir explicitly to defeat silent fallback in worktree
- 82 / closed/done / T-BQRU-quality-normalize-ports-pids-timings — normalizeFinding masks ephemeral ports, PIDs, and timing tokens before baseline-diff
- 79 / closed/done / T-H69K-run-quality-checks-isolates-pre-existing-drift — run_quality_checks.py
only fails on drift the current branch introduced
Decision: LINKED-EXISTING T-F1WJ-quality-run-resolves-superproject-baseline Rationale: Overrode the
script’s SPAWNED. All of the script’s top-5 candidates are closed/* (T-44OO obsoleted, T-TWZD done,
T-5X6Y superseded), so the script returned SPAWNED; the open planning/draft task T-F1WJ — which fell
below the top-5 due to differing vocabulary — is a verbatim match:
sdlc quality run --diff-against-baselinemis-resolves —baseline-dir to the worktree’s own empty.sdlc/instead of the superproject’s.sdlc/quality-baselines/, failingbaseline not found. Linked to T-F1WJ to avoid a 4th duplicate in the baseline-dir cluster. Linked from the post-mortem of T-NLKF-converge-obsidian-bases on 2026-07-19.