Skip to content

feat(commands): offer maxConcurrency automatically for wide plans - #65

Merged
bacsystem merged 3 commits into
developfrom
feat/expose-max-concurrency-in-commands
Jul 24, 2026
Merged

feat(commands): offer maxConcurrency automatically for wide plans#65
bacsystem merged 3 commits into
developfrom
feat/expose-max-concurrency-in-commands

Conversation

@bacsystem

Copy link
Copy Markdown
Owner

Summary

runDag's optional maxConcurrency cap has existed since v0.6.15 (semaphore applied after dependencies resolve, default unlimited, no deadlock), but neither /cys:run-plan nor /cys:flow ever asked about it or passed it through — using it required bypassing the command entirely and invoking the Workflow tool by hand. This PR wires it into both commands.

Type of change

  • feat — new feature (surfaces an existing engine capability through the commands)

Main changes

  • bin/parse-plan.js / bin/plan-remainder.js: report parallelWidth (via the existing computeParallelWidth, 0.6.18) in their JSON output.
  • /cys:run-plan and /cys:flow: when parallelWidth > 6, mention the plan can run that many tasks at once and ask whether to cap it with maxConcurrency. Narrower plans are never asked. The chosen value now flows through to the Workflow launch args in both commands.
  • Both READMEs updated.
  • Verified npm run build + git diff --exit-code workflows/parallel-plan-executor.js — no change (bin/commands aren't inlined into the workflow).

Version

  • Bump: patch (pre-1.0 feat rule)
  • New version: v0.6.24

Checklist

  • Code reviewed (bugs, conventions, simplifications)
  • CHANGELOG.md updated
  • Version updated in the relevant file(s) (package.json, .claude-plugin/plugin.json, .cursor-plugin/plugin.json, gemini-extension.json)
  • README updated (both English and Spanish)
  • Tests pass (166/166, npm test), TDD (RED confirmed before GREEN for both the CLI output and the command-content assertions)

…s output

maxConcurrency (runDag's optional concurrency cap, since 0.6.15) had no way
to reach the interactive commands: /cys:run-plan and /cys:flow never saw the
plan's inferred parallelism before launching, so they couldn't decide whether
capping was worth offering. computeParallelWidth(graph) already existed
(0.6.18, used only in the workflow's own final summary) — both CLIs now
report it in their JSON so the commands can read it before the run starts.
runDag has supported an optional maxConcurrency cap since 0.6.15, but
neither /cys:run-plan nor /cys:flow ever asked about it or passed it
through — a user had to bypass the command and invoke the Workflow tool
by hand to use it at all.

Both commands now read parallelWidth from the parsed plan's JSON
(previous commit) and, only when it exceeds 6, mention that the plan can
run that many tasks at once and ask whether to cap it with
maxConcurrency. Narrower plans are never asked — a low parallelWidth
never benefits from capping. The chosen value (or its absence) now flows
through to the Workflow launch args in both commands. Documented in both
READMEs.
@bacsystem bacsystem self-assigned this Jul 24, 2026
@bacsystem bacsystem added the enhancement New feature or request label Jul 24, 2026
@bacsystem
bacsystem merged commit d8eac50 into develop Jul 24, 2026
1 check failed
@bacsystem
bacsystem deleted the feat/expose-max-concurrency-in-commands branch July 24, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant