Complete Workflow Guide
This guide covers the full Sequant workflow, including post-QA patterns used by experienced users.
Workflow Overview
Section titled “Workflow Overview”┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐│ /spec │───▶│ /exec │───▶│ /test │───▶│ /qa │───▶│ /docs │───▶│ Merge │└─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │ │ │ │ │ ▼ ▼ ▼ ▼ ▼ ▼ Plan Build Verify (UI) Review Document Ship │ ▼ Gap Analysis (see below)Phase 1: Spec
Section titled “Phase 1: Spec”/spec 123What happens:
- Reads issue description and comments
- Analyzes codebase for patterns
- Drafts acceptance criteria (ACs)
- Creates implementation plan
- Posts plan as issue comment
Output: GitHub issue comment with AC checklist and implementation plan.
When to skip: Simple bug fixes, typos, documentation-only changes.
Phase 2: Exec
Section titled “Phase 2: Exec”/exec 123What happens:
- Creates isolated git worktree (
feature/123-issue-title) - Implements changes per the spec
- Runs tests after changes
- Creates commits with progress
- Creates PR
Output: Feature branch with implementation, open PR.
Phase 3: Test/Verify (Optional)
Section titled “Phase 3: Test/Verify (Optional)”/test 123 # Browser-based UI testing (requires Chrome DevTools MCP)/verify 123 # CLI/script execution verificationWhen to use:
/testfor UI changes/verifyfor CLI tools, scripts, commands
Phase 4: QA
Section titled “Phase 4: QA”/qa 123What happens:
- Reviews code against all ACs (including derived ACs from spec)
- Checks type safety, security, scope
- Verifies CI status
- Generates detailed report
Verdicts:
| Verdict | Meaning | Action |
|---|---|---|
READY_FOR_MERGE | All ACs met, high quality | Merge |
AC_MET_BUT_NOT_A_PLUS | ACs met, minor improvements suggested | Can merge |
NEEDS_VERIFICATION | Waiting on CI or external check | Wait, re-run |
AC_NOT_MET | ACs not fully met | Fix issues |
If QA finds issues, run /loop 123 to auto-fix (up to 3 iterations).
Phase 5: Gap Analysis
Section titled “Phase 5: Gap Analysis”This is the key step most users miss.
After QA passes, ask: “Any other gaps?”
This catches:
- Cross-platform compatibility issues
- Design concerns for future maintainability
- Edge cases not covered by ACs
- Documentation completeness
Gap Handling
Section titled “Gap Handling”| Gap Type | Action |
|---|---|
| Quick fix (< 5 min) | Fix inline, commit, push |
| Design consideration | Create follow-up issue |
| Out of scope | Create separate issue |
| Acceptable debt | Document and proceed |
Example Gap Analysis
Section titled “Example Gap Analysis”User: any other gaps?
Claude: Looking critically...
1. **Cross-platform sed compatibility** (minor) - The extraction pattern works on GNU sed but not macOS BSD sed - Resolution: Fixed - replaced with portable `grep -oE`
2. **Hardcoded dimension names** (medium) - Maintenance burden if new dimensions are added - Resolution: Created issue #227 for future improvementPhase 6: Docs
Section titled “Phase 6: Docs”/docs 123What happens:
- Checks if CHANGELOG needs updating
- Updates relevant documentation files
- Ensures user-facing changes are documented
Files typically updated:
CHANGELOG.md- For user-visible changesdocs/internal/what-weve-built.md- For feature trackingREADME.md- If public API changes- Feature-specific docs in
docs/
When to skip: Internal refactors, test-only changes.
Phase 7: Merge
Section titled “Phase 7: Merge”gh pr merge --squashFor multi-issue batches, run merge checks first, then merge:
sequant merge --check # Verify cross-issue integration/merger 123 124 125 # Merge all issuessequant merge --check catches merge conflicts, template mirroring gaps, and file overlaps at zero AI cost. See Merge Command Reference.
Phase 8: Smoke Test
Section titled “Phase 8: Smoke Test”After merge, verify the feature works on main:
git checkout main && git pullnpm run build # Verify buildnpm test # Verify tests# Manual verification of the specific featureSmoke Test Checklist
Section titled “Smoke Test Checklist”- Build passes on main
- Tests pass on main
- Feature works as expected
- No regressions in related areas
Complete Example Session
Section titled “Complete Example Session”/fullsolve 223 # Run complete pipeline
# After fullsolve completes.../qa 223 # Second QA pass
User: any other gaps?Claude: [identifies 2 gaps]
User: fill all gaps or create new issues if too complexClaude: [fixes minor gap, creates issue for complex one]
User: do you need to update docs?/docs 223 # Update CHANGELOG, what-weve-built
User: merge then smoketestClaude: [merges PR, runs smoke tests]Choosing Your Workflow
Section titled “Choosing Your Workflow”Use /fullsolve when:
Section titled “Use /fullsolve when:”- Standard features or bug fixes
- ACs are clear from the issue
- You want minimal intervention
Use step-by-step when:
Section titled “Use step-by-step when:”- Complex features needing human review at each phase
- Unclear requirements needing iteration
- Learning the workflow
Use sequant run when:
Section titled “Use sequant run when:”- Batch processing multiple issues
- Headless/CI execution
- Parallel processing
npx sequant run 1 2 3 # Multiple issues in parallelnpx sequant run 123 --quality-loop # Auto-fix until QA passesCommon Patterns
Section titled “Common Patterns”Pattern: Simple Bug Fix
Section titled “Pattern: Simple Bug Fix”/exec 123 # Skip spec for simple fixes/qa 123gh pr merge --squashPattern: UI Feature
Section titled “Pattern: UI Feature”/spec 123/exec 123/test 123 # Browser-based verification/qa 123/docs 123gh pr merge --squashPattern: Multi-Issue Integration
Section titled “Pattern: Multi-Issue Integration”/fullsolve 123/fullsolve 124/fullsolve 125sequant merge --check # Verify cross-issue integration/merger 123 124 125 # Merge all issuesPattern: Quality Iteration
Section titled “Pattern: Quality Iteration”/spec 123/exec 123/qa 123 # Returns AC_NOT_MET/loop 123 # Auto-fix/qa 123 # Re-verifyBe Thorough with Gap Analysis
Section titled “Be Thorough with Gap Analysis”The “any other gaps?” step catches issues that automated QA misses:
- Platform-specific behavior
- Maintainability concerns
- Documentation completeness
Create Issues for Complex Gaps
Section titled “Create Issues for Complex Gaps”Don’t try to fix everything inline. If a gap needs design consideration:
User: fill gaps or create new issues if too complexClaude: Created issue #227 for [complex gap description]Always Smoke Test
Section titled “Always Smoke Test”Even with passing CI, verify the feature works on main after merge. This catches integration issues.
Track Derived ACs
Section titled “Track Derived ACs”Spec generates “derived ACs” from quality planning. These flow through exec and qa:
Original ACs: AC-1 through AC-5 (from issue)Derived ACs: AC-6, AC-7 (from spec quality planning)Both are tracked equally in QA verdicts.
Troubleshooting
Section titled “Troubleshooting”QA keeps finding issues
Section titled “QA keeps finding issues”Run /loop 123 for automatic fixes, or manually address based on QA feedback.
CI is pending
Section titled “CI is pending”Wait for CI, then re-run /qa 123. The verdict will update based on CI status.
Build fails but it’s not my fault
Section titled “Build fails but it’s not my fault”QA verifies if build failure is a regression or pre-existing on main. Pre-existing failures don’t block merge.
Worktree is in bad state
Section titled “Worktree is in bad state”# Remove and recreategit worktree remove ../worktrees/feature/123-*/exec 123 # Creates fresh worktreeNext Steps
Section titled “Next Steps”- Quality Gates - What QA checks for
- Git Workflows - Worktree management
- Customization - Configure Sequant behavior