bullswarm 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -20,37 +20,31 @@ content. Published as `bullswarm` on npm.
20
20
  5. Workflow dispatches must honor the same guarantees as single runs:
21
21
  `BULLSWARM_DEPTH` is propagated, burst-gated pools are excluded, and
22
22
  auth verdicts quarantine the pool + append to the shared decision log
23
- (R6/R7/R8 in `src/workflow/runtime.js`).
24
- 6. Adversarial verification is a first-class primitive: a `verify` step
25
- reads a prior outFile and demands a JSON `{ok, concerns, summary}`
26
- verdict before downstream steps can trust the work (R-skeptic).
27
- 7. Workflows can be built incrementally from the shell
28
- (`bullswarm workflow draft create/phase/step/set/...`). Drafts are
29
- stored under `~/.bullswarm/drafts/<name>/` and are runnable by name
30
- without an upfront JSON. JSON is still the durable artifact — drafts
31
- are JSON documents, just built one mutation at a time.
32
- 8. New goal workflows are caller-planned programs in a shared workspace.
23
+ (R6/R7/R8 in `src/workflow/v2-dispatch.js`).
24
+ 6. Adversarial verification is a first-class primitive: an action naming
25
+ requirements in `evidenceFor` is dispatched under an evidence contract and
26
+ judges them from the durable artifact, so a requirement is only verified by
27
+ work someone else inspected (R-skeptic).
28
+ 7. New goal workflows are caller-planned programs in a shared workspace.
33
29
  `bullswarm workflow goal --program` executes the graph; `--orchestrator`
34
30
  explicitly delegates planning. File territories are advisory scheduling
35
31
  hints, and the graph finishes without automatic gap rounds. `verified`
36
32
  separately records requirement evidence. `--isolation` opts into strict
37
33
  per-worker worktrees. Saved V2 runs preserve their original semantics.
34
+ 8. Historical authored-graph runs remain visible as read-only `legacy` rows.
35
+ Their executor was removed in 0.27.0; driving commands fail closed before
36
+ dispatch and historical run directories remain untouched.
38
37
 
39
38
  ## Development
40
39
 
41
40
  ```bash
42
41
  npm test # full suite, no network needed (meters read from cache)
43
42
  node bin/bullswarm.js doctor --json # readiness report
44
- node bin/bullswarm.js workflow list # discover workflows
43
+ node bin/bullswarm.js workflow goal "Fix the failing tests" --program plan.json
45
44
  node bin/bullswarm.js workflow runs # ongoing workflow instances
46
45
  node bin/bullswarm.js workflow runs --all # including historical
47
- node bin/bullswarm.js workflow validate <file> # dry-run
48
- BULLSWARM_HOME=/tmp/bs node bin/bullswarm.js workflow run <file> # sandboxed run
49
- # Build a workflow from the shell:
50
- bullswarm workflow draft create my-audit
51
- bullswarm workflow draft phase add my-audit discover
52
- bullswarm workflow draft step add my-audit discover list-files --type run --prompt 'List files'
53
- bullswarm workflow draft run my-audit
46
+ # Validate a caller-authored program before launch:
47
+ bullswarm workflow plan validate "Fix the failing tests" --program plan.json
54
48
  # Operate on a run by shortId (6 chars) or full runId (`wf-...`):
55
49
  bullswarm workflow runs show <shortId>
56
50
  bullswarm workflow runs delete <shortId> --yes
package/CHANGELOG.md CHANGED
@@ -1,5 +1,94 @@
1
1
  # bullswarm changelog
2
2
 
3
+ ## 0.27.0 — one workflow engine
4
+
5
+ - Fixed: a worker that floods its stdout could kill the kernel. Every chunk of a
6
+ worker's stdout and stderr was appended to one string; a command-code worker
7
+ whose transcript outgrew Node's maximum string length threw
8
+ `RangeError: Invalid string length` inside the stream handler, the kernel died
9
+ as an uncaught exception, and every worker it supervised died with it (seen
10
+ twice on the same action in one day; the trace is in
11
+ `~/.bullswarm/goals/<runId>/stderr.log`). Streams are now captured through a
12
+ bounded buffer that keeps the first and last 16 MiB of each stream, counts what
13
+ it dropped (`captureTruncated` on the attempt observation), and any exception
14
+ raised while reading a worker now fails that attempt instead of the kernel.
15
+ Fatal-signature matching already looked only at the last 4,000 characters, so
16
+ quota and auth detection are unchanged.
17
+
18
+ - There is now one workflow engine. The authored-graph verbs `workflow run`,
19
+ `validate`, `list`, `draft`, `inspect` and `approval` are gone — each falls to
20
+ the workflow-level unknown-verb message, exits 2 and spawns nothing — and with
21
+ them the eleven V1 modules they drove: `runtime.js` (1,902 lines),
22
+ `runner.js` (1,304), `draft-cli.js` (434), `validate.js` (366),
23
+ `decision.js` (357), `tui.js` (297), `draft.js` (268), `result.js` (239),
24
+ `template.js` (146), `schema.js` (81) and `semaphore.js` (56). The V1 panel
25
+ model, timeline and orchestrator-detail twins came out of `dashboard.js`
26
+ (−965), the V1 branches out of `cli.js` (−291), `runs-cli.js` (−141),
27
+ `short-id.js` (−127) and `watch-cli.js` (−132). `src/workflow/*.js` goes from
28
+ 16,941 lines to 10,257. Also deleted: the five saved definitions
29
+ `workflows/adaptive-code-review.json`, `agent-model-comparison.json`,
30
+ `connector-audit.json`, `smoke-two-step.json` and `verify-and-cap.json`
31
+ (257 lines) together with the `workflows/` entry in package.json `files`;
32
+ `scripts/sanity-multi-claude.mjs` (131), which only exercised `runWorkflow`;
33
+ and two more tools that could only reach deleted modules —
34
+ `bin/check-output-schema.js` (30, the V1 `outputSchema` worker preflight) and
35
+ `scripts/planner-contract-probe.mjs` (175, a probe for the V1 `decide`
36
+ planner). `workflow capabilities` now reports `engines.authoredGraphs` as
37
+ `{ retired: '0.27.0', command: null }` instead of advertising a verb that
38
+ exits 2. `bullswarm workflow --help` describes one engine.
39
+
40
+ - `newRunId` moved from `runner.js` into `src/workflow/short-id.js`, same
41
+ behaviour, exported; `v2-runtime.js` imports it from there.
42
+
43
+ - Removed the last V1 remnants that no gate caught because they named no
44
+ deleted symbol: the dead authored-graph planner prompt in
45
+ `src/workflow/goal.js` (`AUTONOMOUS_ORCHESTRATOR_PROMPT`,
46
+ `PLANNER_RULES_SECTION`, `PLANNER_EXAMPLES_SECTION` — 36 lines whose only
47
+ consumer was the deleted `runtime.js`, and which still taught `type`,
48
+ `stepTemplate`, `itemsFrom`, `outputSchema`, `covers` and `completion.when`
49
+ to a planner the V2 validator would reject), and the permanently-zero
50
+ `fanout: { total, ok, failed }` counter that `dashboard.js` still put on every
51
+ row and rendered behind an unreachable branch. `outputSchema`, `itemsFrom` and
52
+ `stepTemplate` now appear nowhere in `src/`. The `skill/references/operations.md`
53
+ "Adversarial verification" section described the removed `{ok, concerns,
54
+ summary}` verify verdict; it now documents the `bullswarm.workflow.evidence.v2`
55
+ envelope the kernel actually enforces. `AGENTS.md` doctrine item 5 pointed at
56
+ the deleted `runtime.js` and now points at `v2-dispatch.js`.
57
+
58
+ - Historical authored-graph runs stay readable, read-only, and nothing tries to
59
+ drive them. A run directory whose `state.json` lacks
60
+ `schemaVersion: 'bullswarm.workflow.state.v2'` is a legacy run: `workflow runs`
61
+ (with `--all` and `--json`) lists it as one row — short id, run id, name or
62
+ goal, status, age — marked `legacy`, reading only those five fields and never
63
+ throwing on a missing one, and the workflow home lists the same row. Every
64
+ driving command — `runs show`, `runs result`, `watch`, `cancel`, `resume`,
65
+ `steer`, `action show`, `tui <runId>` — prints exactly one line, `legacy
66
+ authored-graph run <shortId>: its executor was removed in 0.27.0; files remain
67
+ under <dir>`, and exits 2 before touching anything — including on the older
68
+ directories that hold only a `workflow.json` and never had a `state.json` at
69
+ all; the workflow home shows
70
+ that same line in its detail pane. `events <runId>` still replays the durable
71
+ JSONL and `runs delete <id> --yes` still removes the directory. Historical
72
+ directories are never modified. The stale-owner reconciliation that used to
73
+ run before every dispatch is gone with the V1 liveness model it served.
74
+
75
+ - Tests: 818 -> 661. Six V1-only files were deleted
76
+ (`workflow-adaptive`, `workflow-gaps`, `workflow-draft`, `workflow-schema`,
77
+ `workflow-validate`, `workflow-run` — 151 tests); `workflow-runs`,
78
+ `workflow-watch`, `assignments`, `workflow-interruption`, `workflow-steering`
79
+ and `workflow-goal` were rewritten onto the V2 kernel keeping every assertion
80
+ about shared behaviour; `workflow-dashboard` went from 48 cases to 35 — 21
81
+ V1-only cases removed and 2 added with the rewrite, then 6 re-added against V2
82
+ fixtures for the rendering behaviours the removal had dropped (blocked-action
83
+ naming, one segment header per phase or dependency level, the mid-segment
84
+ continuation header, parallel levels grouped in declared order, the narrow
85
+ layout, and auto-follow); and a new `workflow-legacy-runs` (11 tests) proves
86
+ the legacy contract against a synthetic legacy `state.json`.
87
+ `tests/manual-dynamic-real.mjs` (330 lines), a
88
+ manual real-provider matrix for authored `run`/`decide` graphs, went with the
89
+ executor; it was never part of the suite count. No test dispatches a real
90
+ provider.
91
+
3
92
  ## 0.26.0 — two entry points, kinds and rungs
4
93
 
5
94
  - There are now exactly two ways to start work, and `bullswarm delegate` is
package/README.md CHANGED
@@ -30,8 +30,8 @@ without initializing state or executing the command:
30
30
 
31
31
  ```bash
32
32
  bullswarm --help
33
- bullswarm workflow run --help
34
- bullswarm workflow draft step add --help
33
+ bullswarm workflow goal --help
34
+ bullswarm workflow runs show --help
35
35
  ```
36
36
 
37
37
  `workflow goal` launches a durable background runner, prints operating commands,
@@ -112,19 +112,11 @@ bullswarm health # re-judge saved outputs; catch gate failures
112
112
  | `pools` | Show each pool's meter state, pace position, 5-hour utilization (`5h=<n>%`, flagged `NEAR-5H-LIMIT` at or above 75%), quarantine status |
113
113
  | `strategy` | Interactive provider/model control center with live high/medium/low route previews and an agent-facing JSON API |
114
114
  | `doctor` | Machine-readable readiness report; self-heals on first call |
115
- | `workflow` | Start an autonomous goal, or run / validate / draft / inspect explicit workflows and their live instances. |
115
+ | `workflow` | Plan, execute, observe, and operate one autonomous workflow engine and its live instances. |
116
116
  | `runs` | Short alias for `workflow runs`, including list, show, result, delete, and cleanup operations. |
117
117
  | `version` / `--version` | Print the installed Bullswarm version. |
118
118
  | `release` | Run the guarded local version-bump, commit, and tag workflow used before CI publishes to npm. |
119
119
 
120
- Discover and validate workflow definitions without executing them:
121
-
122
- ```bash
123
- bullswarm workflow list
124
- bullswarm workflow list --json
125
- bullswarm workflow validate workflows/my-workflow.json
126
- ```
127
-
128
120
  `workflow goal --request <path>` and `--run-id <id>` are internal detached-runner
129
121
  resume plumbing. Normal callers should provide a goal or use `--resume <shortId|runId>`.
130
122
 
@@ -141,7 +133,7 @@ bullswarm strategy routes --json # compact effective choices
141
133
  bullswarm strategy set-provider codex off --yes
142
134
  bullswarm strategy set-model opencode2 kaihk/gpt-5.6-luna \
143
135
  --tiers high,medium,low --yes
144
- bullswarm strategy configure --file strategy.json --yes # atomic agent-authored policy
136
+ bullswarm strategy configure --file strategy.json --yes # atomic agent-created policy
145
137
  bullswarm strategy reset-tier low --yes # restore one tier to automatic
146
138
  bullswarm strategy set-reasoning --tier high --level xhigh --yes
147
139
  bullswarm strategy set-reasoning --tier high --level high --pool codex --yes
@@ -202,8 +194,8 @@ any routing change. Press `Y` to apply them or `N` to retain the current policy.
202
194
  The analysis selects at most one default model for each provider and effort
203
195
  tier. It uses OpenRouter's agentic, coding, and intelligence indices as quality
204
196
  signals and API-equivalent pricing as the budget signal. A repository-owned
205
- GitHub Actions job (`.github/workflows/refresh-benchmarks.yml`) refreshes two
206
- public assets on the rolling `benchmark-data-latest` GitHub Release:
197
+ benchmark refresh job refreshes two public assets on the rolling
198
+ `benchmark-data-latest` GitHub Release:
207
199
  `openrouter-benchmarks.json` from the authenticated OpenRouter APIs, and
208
200
  `epoch-benchmarks.json` from Epoch AI's CC BY 4.0 benchmark export, which is
209
201
  what `strategy rungs` reads for per-model-per-reasoning-level evidence.
@@ -321,7 +313,7 @@ phase/step/attempt tree.
321
313
 
322
314
  ## One-command autonomous goals
323
315
 
324
- For normal multi-step work, give Bullswarm the goal and the program you authored
316
+ For normal multi-step work, give Bullswarm the goal and the program you author
325
317
  for it—not a JSON graph of phases:
326
318
 
327
319
  ```bash
@@ -433,9 +425,7 @@ The planner does not author phases or declare success/failure. The kernel
433
425
  derives stable presentation stages for the TUI and computes the final V2
434
426
  result. Saved V2 runs retain their original execution and workspace policy on
435
427
  resume. V1 autonomous run directories are not migrated or resumed;
436
- explicitly naming one fails before any paid dispatch. Fixed JSON workflows and
437
- drafts remain a separate authored-graph feature with their existing step
438
- types.
428
+ explicitly naming one fails before any paid dispatch.
439
429
 
440
430
  The detached response includes a short ID and exact observation commands:
441
431
 
@@ -570,33 +560,6 @@ runs still support their original gap boundaries and `--exhausted` submissions.
570
560
  the caller plans against a real survey; scout units are advisory for a caller
571
561
  planner.
572
562
 
573
- Use an explicit draft when the graph itself is a durable contract and should
574
- not be planner-defined. `bullswarm workflow draft ...` lets you assemble it one
575
- mutation at a time. No upfront JSON required. Drafts persist under
576
- `~/.bullswarm/drafts/<name>/` and become first-class workflows
577
- (discoverable, runnable by name) the moment they exist.
578
-
579
- ```bash
580
- bullswarm workflow draft create audit-code \
581
- --description "Audit the source code" --input targetDir=.
582
- bullswarm workflow draft phase add audit-code discover
583
- bullswarm workflow draft phase add audit-code review
584
- bullswarm workflow draft step add audit-code discover list-files \
585
- --type run --lane chore --prompt "List every .js file in src/" \
586
- --add-dir '{{inputs.targetDir}}'
587
- bullswarm workflow draft step add audit-code review per-file \
588
- --type fanout --items-from 'outputs.list-files.outFile' \
589
- --lane analyze --concurrency 2 \
590
- --step-template '{"lane":"analyze","addDir":"{{inputs.targetDir}}","prompt":"Review {{item}}"}'
591
- bullswarm workflow draft show audit-code # inspect the JSON
592
- bullswarm workflow draft run audit-code # execute it
593
- bullswarm workflow draft export audit-code workflows/audit-code.json # promote to file
594
- ```
595
-
596
- `step add` re-validates after every mutation; partial drafts (zero
597
- phases, etc.) are treated as building, not invalid. `set` and
598
- `step set` patch fields in place. `delete` requires `--yes`.
599
-
600
563
  ## Operating on workflow runs
601
564
 
602
565
  Every run gets a 6-character shortId (Crockford-style alphabet,
@@ -615,11 +578,13 @@ bullswarm workflow runs show <shortId> # state + report + summary
615
578
  bullswarm workflow runs result <shortId> --json # stable result for the calling agent
616
579
  bullswarm runs show <shortId> # top-level shorthand
617
580
  bullswarm workflow runs delete <shortId> --yes # remove the run dir
618
-
619
- # Resume by shortId — runs the same logic as the full runId
620
- bullswarm workflow run audit-code --resume <shortId>
621
581
  ```
622
582
 
583
+ Legacy authored-graph runs are listed as read-only rows marked `legacy`. Every
584
+ driving command prints `legacy authored-graph run <shortId>: its executor was
585
+ removed in 0.27.0; files remain under <dir>` and exits 2; historical directories
586
+ are untouched.
587
+
623
588
  Run-history time filters always compare when the workflow was initiated
624
589
  (`startedAt`), never when it finished. `--since` is inclusive and `--until` is
625
590
  exclusive; `--started-after`/`--from` and `--started-before`/`--to` are aliases.
@@ -635,8 +600,7 @@ usage, and verification qualification. New programs include `executionMode:
635
600
  "program"` and a `workspace` report with `changedFiles`, `baselineChangedFiles`,
636
601
  and warnings. This is a Git status inventory, not attribution to individual
637
602
  workers; files stay in the target directory. A completed program may be
638
- unverified and contain negative evidence. Fixed authored workflows retain their existing
639
- result envelope. `runs show` remains the low-level debugging surface.
603
+ unverified and contain negative evidence. `runs show` remains the low-level debugging surface.
640
604
  Goal launch output includes an `instructions` handoff with four named paths:
641
605
  `agentInspect` for a machine-readable snapshot, `watch` for low-noise progress,
642
606
  `humanTui` for the interactive browser, and `result` for the terminal delivery.
@@ -661,10 +625,9 @@ periodic heartbeat is off unless you pass `--heartbeat <seconds>`;
661
625
  `--stall-after <seconds>` (default 300) reports a running agent that has
662
626
  gone silent. Pass `--classic` to force the older heartbeat-based watcher
663
627
  instead (the transition-on-change snapshot stream plus a periodic
664
- heartbeat, every 60 seconds unless `--heartbeat <seconds>` is given)
665
- legacy (non-V2) runs already behave this way and `--classic` is a no-op for
666
- them; `--classic` cannot combine with `--next`, which exists only for event
667
- mode. `--next` prints no attach line and
628
+ heartbeat, every 60 seconds unless `--heartbeat <seconds>` is given).
629
+ `--classic` applies only to V2 runs and cannot combine with `--next`, which
630
+ exists only for event mode. `--next` prints no attach line and
668
631
  exits after the first notable event so a background terminal can wake the
669
632
  caller; relaunch until the outcome line reports a pause or a terminal
670
633
  status (exit 0 while the run continues or delivered, 1 when it ended
@@ -684,9 +647,9 @@ prints). `--jsonl` emits one JSON object per notable event with a stable
684
647
  `interrupted`, and with `--verbose` `action.started`, `attempt.retrying`,
685
648
  `steering.delivered`); in that mode the relaunch line is not printed and
686
649
  every object instead carries the `sequence` it was emitted at, which is the
687
- value to pass as `--after`. `--once` still prints one current snapshot. Legacy
688
- (non-V2) runs keep the compact transition-plus-heartbeat stream unchanged,
689
- the same stream `--classic` opts a V2 run into.
650
+ value to pass as `--after`. `--once` still prints one current snapshot. A legacy
651
+ (pre-0.27.0 authored-graph) run cannot be watched at all: the watcher prints
652
+ the legacy line and exits 2 before it polls anything.
690
653
 
691
654
  ```bash
692
655
  bullswarm workflow watch <shortId>
@@ -736,16 +699,14 @@ bullswarm workflow tui --json --all # ongoing + historical runs
736
699
  bullswarm workflow tui --json <shortId> # inspect one run
737
700
  bullswarm workflow tui --json --cancel <id> # request cooperative stop
738
701
  bullswarm workflow capabilities --json # pools, lanes, models, meters, limits
739
- bullswarm workflow inspect <file-or-name> # workflow shape and semantics
740
702
  bullswarm workflow events --json <id> --after 20
741
703
  bullswarm workflow steer <id> --message "Prefer focused tests before another full suite"
742
704
  bullswarm workflow action show --json <id> <actionId>
743
- bullswarm workflow approval approve --json <id> # then resume the run
744
705
  ```
745
706
 
746
707
  Cancellation stops active delegates and commits `cancelled`. V2 goal workflows
747
708
  keep the operator request in a separate durable file so kernel progress cannot
748
- overwrite it; authored V1 graphs additionally expose a `cancelling` state.
709
+ overwrite it.
749
710
  `SIGTERM` and `SIGINT` stop delegate process groups and commit a resumable
750
711
  `interrupted` state. A V2 resume holds an exclusive kernel lease, stops recorded
751
712
  surviving delegates from the previous kernel, and finishes post-processing from
@@ -817,71 +778,6 @@ runtime value and uses its matching connector rate metadata for the attempt's
817
778
  cost estimate. Unknown or provider-hidden model identity remains explicitly
818
779
  unknown.
819
780
 
820
- ### Authored adaptive graphs
821
-
822
- This is part of the separately authored fixed-graph engine, not the autonomous
823
- V2 `workflow goal` path. A graph may add an explicit `decide` step, advisory
824
- resource targets, and structural expansion limits:
825
-
826
- ```json
827
- {
828
- "mode": "adaptive",
829
- "settings": {
830
- "maxAgents": 12,
831
- "maxExpansionRounds": 3,
832
- "maxActions": 20,
833
- "maxItemsPerExpansion": 8,
834
- "maxWorkflowSeconds": 1800
835
- },
836
- "phases": [{
837
- "name": "review",
838
- "steps": [
839
- { "id": "initial", "type": "run", "prompt": "Inspect the code." },
840
- {
841
- "id": "planner",
842
- "type": "decide",
843
- "requiresCapabilities": ["workflow-planning", "strong-analysis"],
844
- "prompt": "Judge sufficiency and propose only bounded missing work."
845
- }
846
- ]
847
- }]
848
- }
849
- ```
850
-
851
- For an authored adaptive graph, `maxAgents`, `maxWorkflowSeconds`, and
852
- `maxExpansionRounds` are advisory inputs to its decide step. Approaching them
853
- strongly biases that step toward
854
- consolidating existing artifacts and returning the best useful outcome;
855
- crossing them is recorded but never stops a worker, skips verification, or
856
- fails a run. `maxActions` and `maxItemsPerExpansion` remain hard structural
857
- safeguards. Reaching one returns a qualified outcome when useful work exists,
858
- rather than discarding the run as a blanket failure. Delegates have no
859
- implicit wall-clock timeout; set a step's `timeoutSec` (or direct-run
860
- `--timeout`) only when an operator explicitly wants a hard termination timer.
861
-
862
- Within this authored-graph engine, `complete` remains strictly verified. A
863
- decide-step `stop` still
864
- delivers a completed outcome when a useful delivery exists: unresolved
865
- verification concerns and the stopping reason ride along as `outcome.concerns`
866
- and `outcome.reason`, attributes of that completed outcome rather than a
867
- separate terminal status. `stop` produces `blocked` only when no useful
868
- delivery exists. `workflow runs result` treats the completed outcome as ready
869
- while reporting `verified:false`. The status value `completed_with_concerns`
870
- still appears on some runs — including legacy ones recorded before this
871
- framing — and every consumer reads it exactly like `completed`: a delivered
872
- result with concerns to review, never a failure.
873
-
874
- The planner returns versioned JSON. It may propose `needs_more_work` with
875
- bounded `run`, inline-`fanout`, or `verify` actions. The deterministic runtime
876
- validates IDs, dependencies, operation types, capabilities, and budgets before
877
- appending anything. It executes ready actions, observes their durable results,
878
- and calls the planner again. `events.jsonl`, `state.json`, the TUI, and JSON
879
- inspection expose the same plan, actions, attempts, decisions, budgets, and
880
- artifacts. See `workflows/adaptive-code-review.json` for a complete example.
881
- Planner actions cannot set `pool`, `model`, `addDir`, or `taskFile`. If those need to be
882
- fixed by the initiator, declare them under the `decide` step's `actionDefaults`;
883
- otherwise eligible capable pools are ranked by live quota surplus.
884
-
885
781
  ## The verdict
886
782
 
887
783
  ```json
@@ -1,6 +1,10 @@
1
1
  # bullswarm Dynamic Workflows — Design
2
2
 
3
- **Status:** implemented; historical design rationale retained · **Created:** 2026-08-21
3
+ **Status:** historical. The authored-graph engine this document describes —
4
+ `workflow run`, `workflow validate`, `workflow draft`, the `bullswarm.workflow.v1`
5
+ document, its `decide` step and the `check-output-schema` preflight — was removed in
6
+ 0.27.0. The program-based V2 goal engine is the only workflow engine; see README.md.
7
+ Kept for design rationale only · **Created:** 2026-08-21
4
8
 
5
9
  ## Problem
6
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bullswarm",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Route work across coding-agent CLI subscriptions — paced by live quota meters, verified by content, never trusting exit codes.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,7 +14,6 @@
14
14
  "bin/",
15
15
  "src/",
16
16
  "connectors/",
17
- "workflows/",
18
17
  "skill/",
19
18
  "mcp/",
20
19
  "fixtures/",
package/skill/SKILL.md CHANGED
@@ -151,4 +151,4 @@ always inspect the returned status.
151
151
 
152
152
  Read [operations.md](references/operations.md) only when you need **steering,
153
153
  cancellation, resume, scouting, a dispatched planner, explicit isolation,
154
- routing diagnosis, or fixed drafts**. Ordinary work needs only the flow above.
154
+ routing diagnosis**. Ordinary work needs only the flow above.
@@ -76,10 +76,12 @@ Resume keeps the run's durable planner mode, routing pins, and settings;
76
76
  `--program`, `--orchestrator`, `--scout`, and `--suggested-plan` are rejected
77
77
  there (use `workflow plan submit` for a caller program). Autonomous resume is
78
78
  V2-only. An old autonomous run ID fails before dispatch; there is no migration
79
- or fallback executor. Fixed authored workflows and drafts remain a separate
80
- product surface. `bullswarm workflow goal --resume <shortId>` and
79
+ or fallback executor. `bullswarm workflow goal --resume <shortId>` and
81
80
  `bullswarm workflow tui --cancel <shortId>` remain as aliases.
82
81
 
82
+ Legacy authored-graph runs are listed as read-only rows marked `legacy`; driving
83
+ commands fail closed with their short ID and retained run directory.
84
+
83
85
  ## Program actions: `kind`, `defaults`, and advisories
84
86
 
85
87
  An action's `kind` names what the work IS and derives its `lane` and `effort`,
@@ -168,16 +170,18 @@ must list exact files in `ownedFiles`; undeclared files can fail the action and
168
170
  are not integrated. An unrestricted writer with `ownedFiles: []` is invalid.
169
171
  Existing runs preserve their saved mode on resume.
170
172
 
171
- ## Fixed graphs, fan-out, and adversarial verification
172
-
173
- Use `workflow draft` only when exact phases and dependencies are user-authored
174
- requirements. Drafts support `run`, `fanout`, and `verify` steps. A verify must
175
- return JSON `{ok, concerns, summary}` and is successful only when it parses and
176
- `ok` is true.
173
+ ## Adversarial verification
177
174
 
178
- For data-driven fan-out, make discovery return a JSON array or a schema-backed
179
- object, then use `itemsFrom`. Put `outputSchema` only on worker output that a
180
- later action consumes structurally; ordinary prose should not have a schema.
175
+ An action that names requirement IDs in `evidenceFor` is dispatched under the
176
+ kernel-owned evidence contract and writes a
177
+ `bullswarm.workflow.evidence.v2` envelope `requirements: { <id>: { status,
178
+ evidence, concerns } }` — to the durable path the task file names. It judges the
179
+ artifact its dependency produced, so give it `dependsOn` and no `ownedFiles`;
180
+ the kernel validates the envelope after dispatch and a schema-invalid one gets
181
+ one bounded correction. Do not ask a worker to return a `{ok, concerns,
182
+ summary}` verdict or any other hand-rolled JSON shape: the program validator
183
+ rejects response-format directives, and that older verdict shape is refused
184
+ outright. `kind: 'adversarial-acceptance'` routes such an action to analyze/high.
181
185
 
182
186
  ## Routing and model policy
183
187
 
@@ -215,6 +219,8 @@ bullswarm workflow runs show <id> --json # routing reason + candidates
215
219
  `remainingMinutes`. An empty list with work apparently running means the
216
220
  dispatching process never registered it; a stale-looking entry is pruned on
217
221
  the next read once its process is gone.
222
+ - Legacy authored-graph rows are read-only. Every driving command fails closed
223
+ with the executor-removed message and leaves the historical run directory untouched.
218
224
  - `bullswarm pools` carries `inflight=<n>` next to each pool's `5h=<n>%`
219
225
  reading; `--json` adds the full `inflight` block (`count`, elapsed
220
226
  `minutes`, `remainingMinutes`, `unknownExpected`, `records[]`) and each