Repository navigation
Closed
Labels
cliCLI commands and interfaceenhancementNew feature or requestplannedImplementation plan approvedready-for-reviewReady for code review
Description
Summary
When using --chain mode, if bugs are discovered during QA of issue N, fixes applied to N can make issue N+1's implementation stale or incompatible. Add a --qa-gate option to pause chain execution until QA passes.
Background
During testing of chain mode with sequant run 114 116 --chain --base feature/dashboard:
- Both Explore dashboard visualization options #114 and Add
sequant dashboardCLI command #116 implementations completed successfully - QA for Explore dashboard visualization options #114 revealed SSE bugs requiring fixes
- Fixes were applied to Explore dashboard visualization options #114's branch
- When we went to QA Add
sequant dashboardCLI command #116, its code was based on pre-fix Explore dashboard visualization options #114 and was incompatible - Had to manually close Add
sequant dashboardCLI command #116's PR and use the consolidated branch
This is a fundamental timing issue with parallel-ish workflows: later issues build on potentially buggy earlier implementations.
Proposed Solution
Option A: --qa-gate Flag (Recommended)
sequant run 114 116 --chain --qa-gateBehavior:
- Run spec → exec → qa for issue N
- Wait for QA verdict before starting N+1
- If QA passes: proceed to N+1 (rebased on N's final state)
- If QA fails: pause and notify user, or auto-run
/loopto fix
Pros:
- Simple to understand
- Prevents the stale issue problem entirely
- User opts in when they want safety over speed
Cons:
- Slower than current parallel approach
- May not be needed for simple, independent issues
Option B: /sync-chain Skill
/sync-chain 116Behavior:
- Detect that Add
sequant dashboardCLI command #116's branch is behind Explore dashboard visualization options #114's latest - Rebase Add
sequant dashboardCLI command #116 onto Explore dashboard visualization options #114's HEAD - Re-run build/tests to catch incompatibilities
- Report conflicts or issues
Pros:
- Fixes the problem after it occurs
- Doesn't slow down initial execution
Cons:
- Reactive rather than preventive
- Rebase conflicts may require manual resolution
Option C: QA Chain Awareness
When /qa detects it's reviewing a chained issue:
- Check if previous chain link has unfixed QA findings
- Warn: "Issue Add
sequant dashboardCLI command #116 may be based on stale code from Explore dashboard visualization options #114 (QA findings pending)" - Recommend running
/sync-chainbefore proceeding
Pros:
- No workflow changes required
- Informative without blocking
Cons:
- Warning fatigue
- Doesn't prevent the problem
Recommendation
Implement Option A (--qa-gate) as the primary solution:
- It's preventive rather than reactive
- Simple mental model: "wait for QA before next issue"
- Opt-in preserves current speed for users who don't need it
- Aligns with the principle of "get one thing right before moving on"
Option C (QA awareness) could be added as a complementary feature.
Acceptance Criteria
-
--qa-gateflag added tosequant run - When enabled, chain waits for QA pass before starting next issue
- QA failure pauses the chain with clear messaging
- Documentation updated with flag description and use cases
- State tracking shows "waiting_for_qa_gate" status
Non-Goals
- Automatic conflict resolution (too complex, requires human judgment)
- Forcing
--qa-gateas default (preserve current speed for simple cases)
Technical Notes
- State machine needs new state:
waiting_for_qa_gate - Consider integration with
/loopfor auto-fix on QA failure - May want
--qa-gate=strict(fail on any finding) vs--qa-gate=ac(fail only on AC_NOT_MET)
Related
- Issue Add local-first analytics for workflow insights #132 (local analytics) - could track chain mode success rates
- Chain mode implementation (existing)
- QA skill (
/qa)
Issue created from workflow reflection session
Metadata
Metadata
Assignees
Labels
cliCLI commands and interfaceenhancementNew feature or requestplannedImplementation plan approvedready-for-reviewReady for code review
Activity
admarble commentedon Jan 20, 2026
📋 Spec Review - Plan for #133
Acceptance Criteria Checklist
AC-1:
--qa-gateflag added tosequant run--chain --qa-gateand setsoptions.qaGate = truebin/cli.ts,src/commands/run.ts(RunOptions interface)AC-2: Chain waits for QA pass before starting next issue
--qa-gate, if issue feat: Complete remaining v1.0 features (AC-10, AC-13, AC-14) #1 QA fails, issue docs: Add pre-release checklist #2 does NOT startsrc/commands/run.ts(sequential execution loop, lines 1531-1579)AC-3: QA failure pauses chain with clear messaging
⏸️ QA gate: Issue #1 QA did not pass. Chain paused.src/commands/run.ts(failure handling output)AC-4: Documentation updated
docs/run-command.mdincludes--qa-gatewith examplesdocs/run-command.md,docs/feature-branch-workflow.mdAC-5: State tracking shows
waiting_for_qa_gatestatussequant state statusshowswaiting_for_qa_gatefor gated issuessrc/lib/workflow/state-schema.ts,src/commands/status.tsImplementation Plan
Phase 1: Schema & State Foundation
waiting_for_qa_gatetoIssueStatusSchema(state-schema.ts:51-58)Phase 2: CLI Flag Integration
3. Add
--qa-gateflag to CLI (cli.ts) - requires--chain4. Extend
RunOptionsinterface and settings merge logicPhase 3: Core Gate Logic
5. Modify sequential execution loop - check QA result when gate enabled
6. Update status and display gate-specific messaging on failure
Phase 4: Status Display & Documentation
7. Update
status.tsto displaywaiting_for_qa_gatestate8. Update
docs/run-command.mdanddocs/feature-branch-workflow.mdKey Decisions
--qa-gatewithout--chain?--quality-loop?--qa-gate=strictvariant?Conflict Risk
In-flight: #119 modifies
state-schema.tsandcli.tsAssessment: Low risk - #119 adds skill integration, #133 adds new enum value
Approach: Proceed; changes are additive and unlikely to conflict
Recommended Workflow
Simple CLI enhancement with clear AC, no complex refactoring required.
🤖 Generated by /spec workflow
feat(#133): add --qa-gate option for chain mode
admarble commentedon Jan 20, 2026
🚀 Implementation Complete - /exec Phase
AC Coverage Summary
--qa-gateflag added tosequant run--chain⏸️ QA Gatemessage with recovery guidancerun-command.mdandfeature-branch-workflow.mdwaiting_for_qa_gatestatusKey Files Changed
bin/cli.ts- Added--qa-gateflagsrc/commands/run.ts- Core gate logic, validation, display configsrc/lib/workflow/state-schema.ts- Addedwaiting_for_qa_gatestatussrc/commands/status.ts- Display support for new statusdashboard/server.ts- Dashboard styling for new statusdocs/run-command.md- Comprehensive QA Gate Mode sectiondocs/feature-branch-workflow.md- Example with--qa-gateBuild/Test Results
npm run build- passesnpm test- 437/439 tests pass (2 unrelated pre-existing doctor test failures due to version check)sequant run --help- shows--qa-gateflagPR Status
✅ Created: #136
Self-Evaluation
🤖 Generated by /exec workflow
admarble commentedon Jan 20, 2026
🔍 QA Review - Issue #133
AC Coverage
--qa-gateflag added tosequant runwaiting_for_qa_gatestatusCoverage: 5/5 AC items fully met
Quality Metrics
Code Review Summary
Strengths:
--chain)Issues: None identified
Verdict: ✅ READY_FOR_MERGE
All acceptance criteria met. Implementation is focused, well-documented, and follows project patterns.
🤖 Generated by /qa workflow
admarble commentedon Jan 20, 2026
🔍 QA Review - Issue #133 (Re-validation)
AC Coverage
--qa-gateflag added tosequant runbin/cli.ts, requires--chainrun.ts:1593-1627checks QA phase result⏸️ QA Gatemessage with recovery guidancerun-command.mdwaiting_for_qa_gatestatusCoverage: 5/5 AC items fully met
Quality Metrics
any)Code Review
Strengths:
--chain)Issues: None identified
Suggestions:
Self-Evaluation
Verdict: ✅ READY_FOR_MERGE
All acceptance criteria met. Implementation is focused (+165 lines), well-documented, and follows project patterns. The QA gate logic integrates cleanly with the existing chain mode sequential execution loop.
Documentation
docs/run-command.mdupdated with comprehensive QA Gate Mode sectiondocs/feature-branch-workflow.mdupdated with exampleNext Steps
🤖 Generated by /qa workflow
admarble commentedon Jan 20, 2026
📚 Documentation Complete
The QA Gate feature documentation is already included in the implementation commit.
Documentation Location
File:
docs/run-command.md(inline with existing run command docs)Sections Added:
--qa-gateflag with description--qa-gatewith--quality-loopDocumentation Highlights:
State tracking:
waiting_for_qa_gatestatus visible viasequant status --issuesRecovery guidance:
/loopfor auto-fixStatus
✅ Documentation is complete and included in PR #136
No additional documentation file needed - the feature is properly documented inline with the existing run command documentation, which is the appropriate location for a CLI flag.
📚 Generated by /docs workflow
chore: merge main to resolve conflicts
feat(#133): add --qa-gate option for chain mode (#136)
chore: merge origin/main into feature/dashboard
docs(#133): add CHANGELOG entry and update /solve skill
fix(#795): route the deprecation notice to stderr and pin it under --…
chore(#795): deprecate --qa-gate, an inert no-op flag (#807)
chore(#810): delete two unreachable option fields; mutation-test the …