bullswarm 0.24.0 → 0.25.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
@@ -29,10 +29,12 @@ content. Published as `bullswarm` on npm.
29
29
  stored under `~/.bullswarm/drafts/<name>/` and are runnable by name
30
30
  without an upfront JSON. JSON is still the durable artifact — drafts
31
31
  are JSON documents, just built one mutation at a time.
32
- 8. Goal-driven execution is zero-graph by default: `bullswarm workflow goal`
33
- internalizes the planner contract, chooses the orchestrator and workers,
34
- persists the generated workflow, and can detach so observation never
35
- depends on the initiating agent or CLI process.
32
+ 8. New goal workflows are caller-planned programs in a shared workspace.
33
+ `bullswarm workflow goal --program` executes the graph; `--orchestrator`
34
+ explicitly delegates planning. File territories are advisory scheduling
35
+ hints, and the graph finishes without automatic gap rounds. `verified`
36
+ separately records requirement evidence. `--isolation` opts into strict
37
+ per-worker worktrees. Saved V2 runs preserve their original semantics.
36
38
 
37
39
  ## Development
38
40
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # bullswarm changelog
2
2
 
3
+ ## 0.25.0 — shared programs that finish with the graph
4
+
5
+ - New goal workflows share the target worktree by default. File territories
6
+ guide scheduling; newly created files and edits survive worker failure or
7
+ cancellation. Use `--isolation` for strict per-worker worktrees and exact-file
8
+ ownership. Saved older runs keep their original execution policy.
9
+ - Independent actions run concurrently, and dependents start as soon as their
10
+ own inputs finish. An unrestricted integrator (`build`, empty `ownedFiles`)
11
+ runs alone after its writers and can reconcile shared files.
12
+ - Programs finish when their graph finishes, without automatic gap-planning
13
+ rounds. `completed` describes execution; `verified` separately records
14
+ passing requirement evidence. Negative evidence stays visible, and further
15
+ repairs use explicitly authored programs.
16
+ - Unexpected worker errors become action failures; independent branches keep
17
+ running. Quiet workers retain a kernel heartbeat, dead kernels are identified
18
+ in the TUI, and resume preserves durable successes and published results.
19
+ - Cancellation intent survives concurrent kernel writes. Resume uses a kernel
20
+ lease and tracks delegate process groups; SIGTERM/SIGINT produce a resumable
21
+ interruption, and surviving delegates are drained before replacement work.
22
+ Durable completion receipts recover both successful worker output and partial
23
+ isolated integration without replaying the worker.
24
+ - Failed/interrupted isolated workspaces are retained, conflicting user edits
25
+ block integration, and submodule file trees no longer break manifest capture.
26
+ - Program dashboards show dependency levels instead of keyword-inferred phases,
27
+ including for saved runs. Independent levels can overlap as actions become ready.
28
+ - Plain dependencies no longer need artificial artifact declarations. Evidence
29
+ prompts can inspect product JSON/output formats without being mistaken for
30
+ instructions to replace the kernel's verdict format.
31
+ - The agent skill now presents one short choose → plan → launch → inspect flow,
32
+ with advanced operations in a separate reference. It distinguishes a planning
33
+ contract from a launch and passing evidence from guaranteed correctness.
34
+ - Isolated ownership checks exclude dependency trees at every depth and handle
35
+ literal filenames containing glob metacharacters.
36
+
3
37
  ## 0.24.0 — the calling agent is the Workflow Planner
4
38
 
5
39
  **BREAKING.** `bullswarm workflow goal` now needs a program. Add
package/README.md CHANGED
@@ -260,15 +260,24 @@ work, but the kernel never stops or rejects essential work merely because a
260
260
  target was reached. `--concurrency` still bounds simultaneous dispatches so
261
261
  the scheduler can batch a wider useful program safely.
262
262
 
263
- Bullswarm first runs optional read-only reconnaissance, then invokes one
264
- logical, resumable Workflow Planner conversation. The planner proposes a
265
- complete bounded program of generic actions. Work actions produce artifacts;
266
- evidence actions independently judge named requirements. The kernel rejects
267
- malformed, cyclic, overlapping, or needlessly serialized proposals before
268
- dispatch, runs dependency-ready file-disjoint actions concurrently, and
269
- updates the requirement ledger from schema-valid evidence. Only real
270
- consolidated gaps re-enter the planner. There are no formal reviewer or repair
271
- roles and no automatic semantic repair/reverify loop.
263
+ The caller authors a complete program, or explicitly asks for a dispatched
264
+ planner. The kernel validates the graph, executes it, and returns every action
265
+ result. Independent agents share the target worktree. `ownedFiles` describes
266
+ intended territory and lets the scheduler serialize overlapping writers; it
267
+ does not reject or discard edits. A dependent starts as soon as its own inputs
268
+ finish, without waiting for unrelated siblings. A failed action skips its
269
+ dependents while other branches continue.
270
+
271
+ After a parallel implementation wave, plan one integrator depending on all its
272
+ writers. Give it `lane: "build"` and `ownedFiles: []` to run alone with permission
273
+ to fix any file. Its prompt should read worker outputs, apply cross-territory
274
+ requests, reconcile shared files, and run the repository acceptance commands.
275
+ Analyze actions remain read-only. Evidence actions are optional and report
276
+ independent judgments; negative evidence does not open another planner round.
277
+ The graph ends with `completed` when all actions succeeded, or `partial` when
278
+ some failed or were blocked. `verified` separately records whether all mandatory
279
+ requirements have fresh passing evidence. Read that qualification and the
280
+ actual outputs before claiming acceptance. Further repairs use a new program.
272
281
 
273
282
  Lane and effort are separate decisions for every proposed action. `analyze` is
274
283
  read-only investigation, judgment, or evidence; `build` is contextual product,
@@ -283,7 +292,8 @@ then resolves through the High/Medium/Low routes configured by `bullswarm setup`
283
292
 
284
293
  The planner does not author phases or declare success/failure. The kernel
285
294
  derives stable presentation stages for the TUI and computes the final V2
286
- result. Old autonomous run directories are not migrated or resumed;
295
+ result. Saved V2 runs retain their original execution and workspace policy on
296
+ resume. V1 autonomous run directories are not migrated or resumed;
287
297
  explicitly naming one fails before any paid dispatch. Fixed JSON workflows and
288
298
  drafts remain a separate authored-graph feature with their existing step
289
299
  types.
@@ -343,12 +353,13 @@ hard-stop useful work. `--concurrency` is the actual bound on simultaneous
343
353
  dependency-ready dispatches. There is no default wall-clock timeout: fresh
344
354
  semantic/transport heartbeats allow a useful worker to continue, while silence
345
355
  is inspected rather than blindly killed.
346
- Interactive setup also records a worktree-isolation
347
- preference (`agent-decides`, `off`, or `required`); Bullswarm communicates that
348
- policy to the V2 kernel. Unless explicitly set to `off`, mutating autonomous
349
- actions use isolated worktrees; the kernel checks actual changed paths against
350
- declared ownership before integration. `off` serializes shared-workspace
351
- writers and still enforces the changed-path boundary.
356
+ New goal runs use the shared workspace regardless of the older setup
357
+ worktree-isolation preference. Add `--isolation` to `workflow goal` when you
358
+ explicitly want per-worker worktrees and strict ownership before integration.
359
+ Pass it to `workflow plan contract` and `workflow plan validate` as well so the
360
+ contract describes that run. Shared execution does no manifest scan, copying,
361
+ integration, or rollback. Its final Git inventory is advisory, includes
362
+ pre-existing/concurrent changes, and never prevents completion if unavailable.
352
363
 
353
364
  ## Building a workflow from the shell
354
365
 
@@ -357,9 +368,8 @@ writers and still enforces the changed-path boundary.
357
368
  This is the default. The calling agent (Claude Code, Codex, or any frontier
358
369
  model with the repository in context) is the Workflow Planner, instead of the
359
370
  kernel paying for a dispatched scout and planner that cannot see the
360
- conversation. The kernel keeps everything it owns proposal validation, quota
361
- routing, isolated worktrees and changed-path ownership, independent evidence,
362
- the requirement ledger, completion, and the stable result envelope — while the
371
+ conversation. The kernel handles graph validation, quota routing, scheduling,
372
+ mechanical retries, optional evidence, durable recovery, and the result envelope while the
363
373
  caller supplies the program, exactly the division of labour Claude Code's
364
374
  `Workflow` tool uses between the authoring model and its harness.
365
375
 
@@ -370,24 +380,27 @@ bullswarm workflow plan validate "1. Fix the parser. 2. Update the docs." --cwd
370
380
  # → dry run against that contract; exit 0 valid, exit 2 with the issues; nothing launches
371
381
  bullswarm workflow goal "1. Fix the parser. 2. Update the docs." --cwd . --program plan.json --watch
372
382
  # → validated before launch; executes with zero planner/scout dispatches
373
- bullswarm workflow plan show <shortId> --json # when the run pauses at a gap boundary
383
+ bullswarm workflow plan show <shortId> --json # initial scout or explicit steering pause
374
384
  bullswarm workflow plan submit <shortId> --program plan-2.json --watch
375
- bullswarm workflow plan submit <shortId> --exhausted --reason "<why no bounded action remains>"
376
385
  ```
377
386
 
378
387
  Exit codes are a contract: **0** done or paused durably for you (nothing is
379
388
  running), **1** the run ended without completing, **2** usage or validation
380
389
  error with nothing launched. Every refusal names the commands that come next.
381
390
 
391
+ For foreground execution, exit 0 means the graph ran successfully or paused
392
+ durably; it does not imply independent verification. An independent launch
393
+ also returns 0 before the workers finish. Consume its eventual result.
394
+
382
395
  `--program` accepts the planner response envelope or a bare
383
396
  `bullswarm.workflow.program.v2` document. An invalid program exits 2 with the
384
397
  validator's issues and nothing is launched. When the kernel reaches a planning
385
- boundary it does not guess: it writes `planner-request-turn-N.json` (the same
386
- context a dispatched planner would receive, plus the consolidated gaps and any
387
- queued steering), sets the run to `waiting`, exits, and `watch` prints the
398
+ boundary for an initial plan or queued user steering, it writes
399
+ `planner-request-turn-N.json`, sets the run to `waiting`, exits, and `watch` prints the
388
400
  `plan show` command. A submitted program contains only new actions and is
389
- validated against the exact durable state at that boundary; `--exhausted`
390
- finalizes a partial result with its gaps disclosed. `--scout` without
401
+ validated against the exact durable state at that boundary. Older saved V2
402
+ runs still support their original gap boundaries and `--exhausted` submissions.
403
+ `--scout` without
391
404
  `--program` runs the kernel scout first and pauses at the initial boundary so
392
405
  the caller plans against a real survey; scout units are advisory for a caller
393
406
  planner.
@@ -452,8 +465,12 @@ After a workflow reaches a terminal state, agents should consume
452
465
  `workflow runs result <id> --json` instead of probing `state.json`, task files,
453
466
  or provider-specific output. Autonomous V2 returns the versioned
454
467
  `bullswarm.workflow.result.v2` envelope with kernel-computed status, fresh
455
- requirement evidence, action/artifact records, explicit gaps, usage, and
456
- verification qualification. Fixed authored workflows retain their existing
468
+ requirement evidence, per-action status/failure/output files, explicit gaps,
469
+ usage, and verification qualification. New programs include `executionMode:
470
+ "program"` and a `workspace` report with `changedFiles`, `baselineChangedFiles`,
471
+ and warnings. This is a Git status inventory, not attribution to individual
472
+ workers; files stay in the target directory. A completed program may be
473
+ unverified and contain negative evidence. Fixed authored workflows retain their existing
457
474
  result envelope. `runs show` remains the low-level debugging surface.
458
475
  Goal launch output includes an `instructions` handoff with four named paths:
459
476
  `agentInspect` for a machine-readable snapshot, `watch` for low-noise progress,
@@ -524,12 +541,19 @@ bullswarm workflow action show --json <id> <actionId>
524
541
  bullswarm workflow approval approve --json <id> # then resume the run
525
542
  ```
526
543
 
527
- Cancellation is persisted as `cancelling`, terminates an active child process,
528
- records its termination signal and latency evidence, then commits `cancelled`.
529
- `SIGTERM` and `SIGINT` use the same cooperative child termination path but
530
- commit a distinct resumable `interrupted` state. On every workflow command,
531
- active states with a dead/stale owner are automatically reconciled to
532
- `interrupted` instead of remaining falsely `running`.
544
+ Cancellation stops active delegates and commits `cancelled`. V2 goal workflows
545
+ keep the operator request in a separate durable file so kernel progress cannot
546
+ overwrite it; authored V1 graphs additionally expose a `cancelling` state.
547
+ `SIGTERM` and `SIGINT` stop delegate process groups and commit a resumable
548
+ `interrupted` state. A V2 resume holds an exclusive kernel lease, stops recorded
549
+ surviving delegates from the previous kernel, and finishes post-processing from
550
+ durable successful-attempt receipts instead of dispatching that work again.
551
+
552
+ Watchers identify dead kernels as interrupted; V2 state is reconciled on resume.
553
+ Unfinished attempts may execute again, so external side effects still require
554
+ idempotency. Shared edits are retained. Failed or interrupted isolated trees
555
+ are preserved for inspection; result warnings identify any retained trees.
556
+ Recovery refuses to overwrite conflicting user edits during integration.
533
557
 
534
558
  `workflow steer` is optional operator guidance, not hot-patching. It appends a
535
559
  durable instruction that is delivered only to the next not-yet-started