Skip to content

feat(#88): add --chain flag for dependent sequential issues - #110

Merged
admarble merged 2 commits into
mainfrom
feature/88-feat-add-chain-flag-for-dependent-sequential-is
Jan 17, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/88-feat-add-chain-flag-for-dependent-sequential-is

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add --chain flag to sequant run that creates cascading worktrees where each issue branches from the previous issue's completed branch
  • Automatic checkpoint commits after each issue passes QA for recovery purposes
  • Warning shown for chains > 5 issues to discourage overly long chains
  • Documentation updated with chain mode usage and merge strategies

Acceptance Criteria

  • --chain flag implemented in sequant run
  • Chain issues branch from previous issue's branch
  • Chain stops on first failure (via --sequential)
  • Documentation updated with chain workflow
  • Warning shown for chains > 5 issues
  • Checkpoint commits after each issue passes QA

Test plan

  • Build passes (npm run build)
  • All tests pass (npm test - 369 tests)
  • --chain flag appears in CLI help
  • Validation rejects --chain without --sequential
  • Validation rejects --chain with --batch

Usage

# Chain mode: each issue branches from previous
sequant run 1 2 3 --sequential --chain

# Results in:
# origin/main → feature/1-xxx → feature/2-xxx → feature/3-xxx

🤖 Generated with Claude Code

Add --chain flag to `sequant run` that creates cascading worktrees where
each issue branches from the previous issue's completed branch.

Key features:
- Chain mode: `sequant run 1 2 3 --sequential --chain`
- Each issue branches from previous (not origin/main)
- Automatic checkpoint commits after each QA pass
- Warning for chains > 5 issues
- Validation: requires --sequential, incompatible with --batch

Implementation:
- Add ensureWorktreesChain() for chain worktree creation
- Add createCheckpointCommit() for recovery points
- Update ensureWorktree() with optional baseBranch parameter
- Add chain mode to CLI options and documentation

Chain structure:
origin/main → feature/1-xxx → feature/2-xxx → feature/3-xxx

Fixes #88

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add 10 unit tests for chain mode functionality:
  - createCheckpointCommit() behavior tests
  - Chain mode validation tests
  - Chain length warning threshold tests
  - Chain branch naming structure tests
- Export createCheckpointCommit() for testing

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@admarble
admarble merged commit a284172 into main Jan 17, 2026
@admarble
admarble deleted the feature/88-feat-add-chain-flag-for-dependent-sequential-is branch January 17, 2026 18:33
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.

1 participant