Repository navigation
Conversation
Add new `sequant state` command with three subcommands: - `init`: Populate state for untracked worktrees - `rebuild`: Recreate state from logs and worktrees - `clean`: Remove entries for deleted worktrees Implementation: - Add discoverUntrackedWorktrees() to detect worktrees with feature/<N>-slug or issue-<N> branch patterns - Auto-fetch issue titles from GitHub via `gh` CLI - Infer current phase from existing run logs - Commands are idempotent (safe to run multiple times) - Clear output showing what was added/removed/updated - JSON output mode for scripting Closes #117 Co-Authored-By: Claude Opus 4.5 <[email protected]>
5 tasks
Document the new `sequant state` command with subcommands: - init: Populate state for untracked worktrees - rebuild: Recreate state from logs + worktrees - clean: Remove orphaned entries Includes usage examples, options reference, common workflows, and troubleshooting guide. Co-Authored-By: Claude Opus 4.5 <[email protected]>
admarble
deleted the
feature/117-add-state-bootstrapping-for-existing-worktrees
branch
January 20, 2026 15:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sequant statecommand withinit,rebuild, andcleansubcommandsfeature/<N>-*orissue-<N>branch patternsChanges
src/commands/state.ts- New CLI command with subcommand routingsrc/lib/workflow/state-utils.ts- AdddiscoverUntrackedWorktrees()functionbin/cli.ts- Register the newstatecommand and subcommandssrc/commands/state.test.ts- Tests for idempotency and output structuresrc/lib/workflow/state-utils.test.ts- Tests for worktree discoveryAcceptance Criteria
sequant state initpopulates state for untracked worktreessequant state rebuildrecreates state from scratchsequant state cleanremoves orphaned entriesTest plan
npm test- all new tests passnpm run build- compiles successfullysequant state init- discovers worktrees correctlysequant state inittwice - idempotent (no changes second time)sequant state clean --dry-run- shows previewsequant state rebuild- requires--forceflagCloses #117
🤖 Generated with Claude Code