Repository navigation
Open
Labels
Description
Tier: judgment Found: 2026-10-03, feasibility review of running /graph-run through sequant run.
Problem. /graph-run runs a dependency graph one wave at a time: it works out which issues are unblocked (every dependency merged), not merged yet and not already running, launches only those, and waits for the merges before planning the next wave. sequant run has the pieces but not this step, so today the skill does it by hand every wave.
- What
sequant rundoes today.sortByDependencies(src/lib/workflow/batch-executor.ts:400) only puts the issues you pass in dependency order. It drops dependencies outside the set (deps.filter((d) => issueNumbers.includes(d))), never checks whether a dependency has merged, and doesn't hold back dependent issues. With--concurrency≥ 2,executeParallel(run-orchestrator.ts:1759) can start a dependent issue from the base branch before the issue it needs has finished. This is documented (docs/guides/writing-issues.md:37-38), not a bug, but it means passing a whole graph tosequant rungives the wrong result. Blocked byis ignored for ordering.parseDependencieshonorsdepends ononly (feat: lightweight content pre-flight for --chain (AC presence, dependency-order sanity) #762 Open Q Doctor: Add Claude Code CLI check #3, fix: parseDependencies matches prose mentions and silently reorders runs #767). Graphs written by/graph-planuseBlocked by, so they have no edgessequant runwill act on.- Why the frontier fits
sequant run. The merge boundary stays with a person (fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958:sequant runnever merges). Running one wave per invocation fits that: you merge, run again, and the next wave starts. All issues in one frontier already have their dependencies merged, so they can run in parallel safely without new gating code.
Design (one wave per invocation)
sequant run --frontier <issues…> treats the given issues as the graph:
- Read each issue's edges: the existing
depends onmarkers and labels, plusblocked bymarkers. Under--frontierthe flag itself is the opt-in that feat: lightweight content pre-flight for --chain (AC presence, dependency-order sanity) #762 asked for, and it only filters, it never reorders. - A dependency counts as satisfied only when its issue is closed with
stateReason: COMPLETED. Dependencies outside the given set count too. - Frontier = satisfied ∩ open ∩ not in flight (no held per-issue lock and no in-progress phase in
.sequant/state.json) ∩ not awaiting merge (stateready_for_mergeor an open PR for the issue). - Run only the frontier, through the existing parallel path and
--concurrency. - End with a report that sorts every issue in the set into: launched, blocked (naming each open dependency), awaiting merge, in flight, done. It also lists the issues that become unblocked once this wave merges.
AC
- AC-1:
sequant run --frontier <issues…>is a registered option inbin/cli.tsand reaches the orchestrator. Evidence:sequant run --help | grep -- --frontierand arun-flags.test.tscase that parses it - AC-2: With
--frontier, an issue launches only if every dependency it declares (depends onorblocked bymarkers, line-leading, plusdepends-on/Nlabels) is closed as completed, including dependencies outside the given set. Evidence: a gate test with a mockedghshowing a set where one issue's dependency is open, so that issue is held and its sibling launches; mutation-verified by dropping the closed-state check - AC-3: Without
--frontier, behavior doesn't change:sortByDependenciesstill honors onlydepends on, and no issue is filtered out. Evidence: the existingbatch-executor.test.tsdependency tests pass unchanged, plus a new case asserting ablocked bymarker doesn't reorder a run without the flag - AC-4: Issues that are in flight (held lock or in-progress phase) or awaiting merge (
ready_for_mergestate or an open PR) are excluded from the frontier and reported as such. Evidence: a gate test covering each of the three exclusion sources; mutation-verified by removing the open-PR check - AC-5: The end-of-run report lists every issue in the set under exactly one of launched / blocked (with the open dependency numbers) / awaiting merge / in flight / done, and lists the issues that this wave's merges would unblock. Evidence: a snapshot or string test of the report for a 5-issue fixture graph with at least one issue in each bucket
- AC-6:
--frontier --dry-runprints the frontier and the report without creating worktrees or launching phases. Evidence: a test asserting no worktree-manager or phase-executor call under dry-run - AC-7: A dependency cycle within the set is a hard error naming the cycle, before any worktree is created. Evidence: a gate test with a two-issue cycle fixture; mutation-verified by removing the cycle check
- AC-8:
--frontiercombined with--chain,--stackedor--batchis rejected with a message naming the conflict. Evidence: arun-flags.test.tscase per combination - AC-9: A body line containing
Blocked byorDepends onmid-line (for example the metadata form**Epic:** … **Blocked by:** #<n>), which the line-anchored parser skips, produces a warning naming the issue, so an edge the parser can't see doesn't widen the frontier silently. Evidence: a gate test with a metadata-line fixture asserting the warning text; mutation-verified by removing the warning - AC-10:
docs/guides/writing-issues.mdanddocs/reference/run-command.mddocument--frontier: which markers it reads, what "satisfied" means, and that merging remains a human step. Evidence:grep -n -- "--frontier" docs/guides/writing-issues.md docs/reference/run-command.mdmatches in both
Non-Goals
- Merging anything, or advancing to the next wave inside one run (fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958). Dependencies inside one run that stack branches (a branching
--stacked) are a separate feature, to be considered only if this one shows the gap between merge and re-run is what's slowing things down. - Reading
Tier:stamps orMay touchfile scopes. Tiering stays with per-phase--model/run.phases. - Checking QA verdicts or merge consent. These stay in
/graph-runSteps 4–5 on purpose, because checking a verdict inside the process that produced it is circular. - An MCP
sequant_runparameter (follow-up once the CLI shape settles). - Parsing the mid-line metadata form as an edge. Prose false positives are what feat: lightweight content pre-flight for --chain (AC presence, dependency-order sanity) #762/fix: parseDependencies matches prose mentions and silently reorders runs #767 fixed. AC-9 warns instead.
Open questions
- Satisfied = issue closed as completed. Merged PRs have sometimes left their issue open (2026-09-30), which makes the frontier too conservative, never wrong. Should "satisfied" also accept a merged PR whose
closingIssuesReferencesnames the dependency?
May touch
bin/cli.ts,src/commands/run.ts,src/commands/run-flags.ts,src/lib/workflow/run-orchestrator.ts,src/lib/workflow/batch-executor.ts,src/lib/workflow/dependency-markers.ts, tests beside each,docs/guides/writing-issues.md,docs/reference/run-command.md
Activity