Skip to content

Add quality loop and batch execution to sequant run CLI #21

Closed

Description

@admarble

Problem

The sequant run CLI command is missing key features that existed in the old execute-issues.ts script. Users who want automated fix iterations must use /fullsolve skill directly instead of the CLI.

Current State

sequant run supports:

  • --phases <list> - phases to run (default: spec,exec,qa)
  • --sequential - run issues sequentially
  • --dry-run - preview mode
  • --verbose - verbose output
  • --timeout <seconds> - timeout per phase

Missing features:

1. Quality Loop (--quality-loop)

Auto-retry failed phases with fix iterations:

sequant run 12 --quality-loop
sequant run 12 --quality-loop --max-iterations 3

Behavior:

  • After /exec, if tests fail → run /loop to fix → retry (up to N iterations)
  • After /qa, if issues found → run /loop to fix → retry
  • Exit when all phases pass or max iterations reached

2. Batch Execution (--batch)

Run groups of issues sequentially while issues within a batch run in parallel:

sequant run --batch "12 13" --batch "14 15"

Use case: Issue 14 depends on 12+13 being merged first.

3. Smart Tests Integration (--smart-tests / --no-smart-tests)

Auto-run related tests after file edits during /exec:

sequant run 12 --smart-tests        # Enable (could be default)
sequant run 12 --no-smart-tests     # Disable for speed

4. Auto-detect UI Issues

Automatically add /test phase if issue has ui, frontend, or admin labels:

sequant run 12  # Auto-detects labels and adjusts phases

5. Testgen Integration (--testgen)

Run /testgen after /spec to generate test stubs before implementation:

sequant run 12 --testgen
sequant run 12 --quality-loop  # Could auto-include testgen

Proposed CLI Interface

# Basic
sequant run 12

# With quality loop (auto-fix iterations)
sequant run 12 --quality-loop
sequant run 12 -q  # Short form

# Batch execution
sequant run --batch "12 13" --batch "14"

# Full options
sequant run 12 \
  --quality-loop \
  --max-iterations 3 \
  --phases spec,exec,test,qa \
  --testgen \
  --smart-tests \
  --verbose

# Speed mode (no smart tests, no quality loop)
sequant run 12 13 14 --no-smart-tests

Implementation Notes

  1. Quality loop logic already exists in /fullsolve and /loop skills - extract and reuse
  2. Smart tests need hook integration (pre/post tool hooks)
  3. Label detection can use gh issue view --json labels
  4. Consider environment variable support for CI:
    • SEQUANT_QUALITY_LOOP=true
    • SEQUANT_MAX_ITERATIONS=3

Related

Priority

Medium - Users can use /fullsolve for now, but CLI parity is important for CI/automation use cases.

Activity

  1. admarble commented on Jan 8, 2026

    @admarble
    ContributorAuthor

    Merged into #19 - the Agent SDK rewrite will include these features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions