Skip to content

feat(#304): add stale branch detection to pre-flight checks - #350

Merged
admarble merged 2 commits into
mainfrom
feature/304-qa-skill-add-stale-worktree-detection-to-pre-fligh
Mar 12, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/304-qa-skill-add-stale-worktree-detection-to-pre-fligh

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add stale branch detection to /qa, /exec, and /test skill pre-flight checks
  • Block QA/test phases when feature branch is significantly behind main (configurable threshold)
  • /exec warns but doesn't block (allows implementation to start)
  • Add staleBranchThreshold setting (default: 5 commits)

Changes

File Change
src/lib/settings.ts Add staleBranchThreshold to RunSettings
.claude/skills/qa/SKILL.md Add "Stale Branch Detection" section that blocks if >threshold
.claude/skills/exec/SKILL.md Add section 0a with warning only (no blocking)
.claude/skills/test/SKILL.md Add "Pre-flight: Stale Branch Detection" section that blocks
CHANGELOG.md Document the new feature

AC Coverage

AC Description Status
AC-1 QA pre-flight checks how far behind main the feature branch is ✅ MET
AC-2 If behind > 0, emit a warning with the count ✅ MET
AC-3 If behind > N (threshold), block QA with STALE_BRANCH ✅ MET
AC-4 Same check added to /exec and /test pre-flight ✅ MET
AC-5 Document the check in each skill's pre-flight section ✅ MET

Test Plan

  • npm run build passes
  • Pre-existing lint warnings (not related to these changes)
  • Tests pass (1 pre-existing timeout flake in unrelated test)

Closes #304

🤖 Generated with Claude Code

- Add staleBranchThreshold setting (default: 5 commits)
- QA skill: block when branch is >threshold behind main
- exec skill: warn only (don't block implementation start)
- test skill: block when branch is >threshold behind main
- All skills skip check when SEQUANT_ORCHESTRATOR is set

Prevents wasted QA cycles on stale code that won't cleanly merge.

Entire-Checkpoint: ad3387241194
Copies the stale branch detection sections added to .claude/skills/
into templates/skills/ and skills/ so that sequant init does not
overwrite the feature with stale templates.
@admarble
admarble merged commit a66ae97 into main Mar 12, 2026
4 of 9 checks passed
@admarble
admarble deleted the feature/304-qa-skill-add-stale-worktree-detection-to-pre-fligh branch March 12, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QA skill: add stale worktree detection to pre-flight check

1 participant