Skip to content

feat(#197): Interactive stack selection and multi-stack support - #214

Merged
admarble merged 3 commits into
mainfrom
feature/197-feat-interactive-stack-selection-and-multi-stack-s
Jan 31, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/197-feat-interactive-stack-selection-and-multi-stack-s

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • AC-1, AC-2, AC-3: Interactive mode with --interactive flag (verification - already implemented)
  • AC-4: Multi-stack detection via detectAllStacks() function
  • AC-5: Combined stack notes via getMultiStackNotes() for multi-stack projects

Changes

New Functions (src/lib/stacks.ts)

  • detectStackInDirectory(path) - Detect stack in a specific directory
  • detectAllStacks() - Find all stacks in root and immediate subdirectories
  • getMultiStackNotes(primary, additional) - Combine notes from multiple stacks

Stack Config Persistence (src/lib/stack-config.ts)

  • New module for managing .sequant/stack.json
  • loadStackConfig() / saveStackConfig() - Persist user's stack choices
  • getPrimaryStack() / getAllConfiguredStacks() - Query helpers

Interactive UI (src/commands/init.ts)

  • Checkbox selection when multiple stacks detected
  • Primary stack selection prompt
  • Displays detected stacks with directory locations

Template Processing (src/lib/templates.ts)

  • Extended CopyTemplatesOptions with additionalStacks
  • Uses getMultiStackNotes() for multi-stack projects

Test Plan

  • Run npm test - 143 tests pass for changed files
  • Run npm run build - Compiles successfully
  • Manual test: Run /setup in a monorepo to verify multi-stack detection
  • Manual test: Verify checkbox selection works for multiple stacks
  • Manual test: Verify .sequant/stack.json is created with correct content

Closes #197

🤖 Generated with Claude Code

Add multi-stack detection and selection features to /setup command:

- AC-1, AC-2, AC-3: Interactive mode with --interactive flag (already existed)
- AC-4: Multi-stack detection via detectAllStacks() function
  - Traverses root and immediate subdirectories (1 level deep)
  - Returns array of detected stacks with paths
  - Skips node_modules, .git, vendor, etc.
- AC-5: Combined stack notes via getMultiStackNotes()
  - Combines notes from primary and additional stacks
  - Marks primary stack with "(Primary)" label
  - Separates sections with markdown dividers

New features:
- Checkbox selection UI when multiple stacks detected
- Primary stack selection prompt
- Stack config persistence in .sequant/stack.json
- Combined stack notes in constitution template

Co-Authored-By: Claude Opus 4.5 <[email protected]>
admarble and others added 2 commits January 31, 2026 11:34
- Add changelog entry for interactive stack selection feature
- Document --interactive flag and multi-stack support in installation.md
- Add 7 new tests for multi-stack selection UI flow
- Add error handling tests for validation and failure scenarios

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@admarble
admarble merged commit ee16b29 into main Jan 31, 2026
6 checks passed
@admarble
admarble deleted the feature/197-feat-interactive-stack-selection-and-multi-stack-s branch January 31, 2026 17:58
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.

feat: Interactive stack selection and multi-stack support in /setup

1 participant