Skip to content

Commit facc583

Browse files
committed
feat: dispatch repo fleet actions
1 parent baf181f commit facc583

10 files changed

Lines changed: 922 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8989
- `brigade repos init/list/show/scan/doctor/import-issues` for gitignored local repo-fleet readiness checks, safe setup metadata, fallback guidance detection, and `repo-fleet` work inbox imports.
9090
- `brigade repos sweep plan/run/runs/show/closeout` for explicit repo-fleet evidence refresh sweeps that run configured local read/report commands, write gitignored sweep receipts, track per-repo command status, and surface stale, failed, or unclosed sweeps through repo, center, work, and release health.
9191
- `brigade repos report plan/build/list/show/archive/closeout` and `brigade repos actions plan/build/list/show/start/done/defer/archive` for local repo-fleet operator rollups and reviewed fleet action queues using safe labels, counts, statuses, fingerprints, and receipt labels only.
92+
- `brigade repos actions dispatch plan/apply`, `dispatch --all-reviewed`, `reconcile`, and `context plan/build` for routing reviewed fleet actions into target repo work imports, building action-scoped context packs, and reconciling target repo completion evidence back into the local fleet queue.
9293
- `brigade work sweep closeout <sweep-id|latest>` for reviewable sweep closeout records that block unresolved pending imports, support explicit deferrals, and surface unclosed sweeps through inbox hygiene.
9394
- `brigade work backup init/status/doctor/import-issues` for read-only local backup health summaries and `backup-health` inbox imports.
9495
- Backup health checks for stale snapshots, failed or stale checks, failed or stale prunes, missing summaries, overdue restore rehearsals, and unsafe private summary fields.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ Roadmap and repo-fleet commands:
518518
- `brigade repos sweep plan/run/runs/show/closeout` explicitly refreshes safe local evidence across configured repos, writes one fleet sweep receipt under `.brigade/repos/sweeps/`, can include optional configured read-only health commands, and records only repo ids, safe labels, command labels, status counts, receipt labels, and local log labels.
519519
- `brigade repos report plan/build/list/show/archive/closeout` builds local fleet operator reports under `.brigade/repos/reports/`, using safe repo ids, labels, counts, statuses, and receipt labels only.
520520
- `brigade repos actions plan/build/list/show/start/done/defer/archive` turns reviewed fleet reports into local fleet action queues under `.brigade/repos/actions/` without executing the suggested commands.
521+
- `brigade repos actions dispatch plan/apply`, `dispatch --all-reviewed`, `reconcile`, and `context plan/build` route reviewed fleet actions into target repo work imports, build action-scoped context packs, and reconcile target repo progress back to the fleet action queue without promoting, running, fixing, cloning, or mutating remotes.
521522

522523
Repo fleet and pattern registry output is local and privacy preserving. It records presence, counts, labels, fingerprints, command labels, log labels, and receipt references, but does not copy repo guidance files, private paths, raw logs, scanner output, private config, owner names, exact private repo names, or raw evidence into public artifacts. Fleet sweeps run only explicit foreground local read/report commands, never clone, pull, push, fix, promote, dismiss, or mutate remotes.
523524

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Goal: make Brigade a safe target for local automations that discover useful work
4646
- Check local release readiness before publish operations. Status: implemented with `brigade release plan`, `doctor`, `run`, `runs`, and `show`, collecting work closeout, verification, review, scanner, security, handoff, content-guard, docs, changelog, roadmap, and git-state evidence without pushing, tagging, or mutating remotes.
4747
- Build local release candidate packets before manual publish steps. Status: implemented with `brigade release candidate plan/build/list/show/archive`, local candidate bundles, evidence JSON, release notes drafts, manual-only publish plans, candidate health warnings, and no remote mutation.
4848
- Audit roadmap closure and neutral pattern coverage. Status: started with `brigade roadmap audit`, `brigade roadmap patterns`, stale phase warnings, documented command drift checks, roadmap-audit imports, and source-pattern decision records without public reference names.
49-
- Inspect local repo fleet readiness without copying private repo contents. Status: started with gitignored `.brigade/repos.toml`, `brigade repos init/list/show/scan/doctor/import-issues`, `brigade repos sweep plan/run/runs/show/closeout`, `brigade repos report plan/build/list/show/archive/closeout`, and `brigade repos actions plan/build/list/show/start/done/defer/archive`, using safe metadata summaries, explicit fleet evidence sweeps, local fleet reports, reviewed fleet action queues, AGENTS and fallback guidance detection, repo-fleet imports, and daily-loop health surfacing.
49+
- Inspect local repo fleet readiness without copying private repo contents. Status: started with gitignored `.brigade/repos.toml`, `brigade repos init/list/show/scan/doctor/import-issues`, `brigade repos sweep plan/run/runs/show/closeout`, `brigade repos report plan/build/list/show/archive/closeout`, `brigade repos actions plan/build/list/show/start/done/defer/archive`, `brigade repos actions dispatch`, `brigade repos actions reconcile`, and `brigade repos actions context`, using safe metadata summaries, explicit fleet evidence sweeps, local fleet reports, reviewed fleet action queues, per-repo work import dispatch, action-scoped context packs, AGENTS and fallback guidance detection, repo-fleet imports, and daily-loop health surfacing.
5050
- Close out scanner sweeps after review. Status: started with `brigade work sweep closeout <sweep-id|latest>`, deferred import recording, missing-reference blocking, and inbox hygiene warnings for unclosed sweeps.
5151
- Inspect local operator state from one read-only center view. Status: started with `brigade center status/activity/reviews/templates`, `brigade center report plan/build/list/show/archive/review/compare/closeout`, and `brigade center actions plan/build/list/show/start/done/defer/archive`, aggregating local work, imports, sweeps, reviews, handoffs, tools, learning, context packs, projects, security, and release state into JSON, reviewed action queues, closeouts, and local report bundles without a daemon or server.
5252

docs/context-packs.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ Pack contents include:
3030
Default exclusions include raw chat exports, secret-looking values, private infrastructure values, full local logs, private absolute paths, and raw scanner output.
3131

3232
`brigade context archive` moves a local pack into `.brigade/context/archive/`. It does not delete source files, write harness context files, edit memory, or run tools.
33+
34+
Repo-fleet actions can also build action-scoped context packs:
35+
36+
```bash
37+
brigade repos actions context plan <fleet-action-id>
38+
brigade repos actions context build <fleet-action-id>
39+
```
40+
41+
These packs are written in the target repo under `.brigade/context/packs/`. They include the fleet action id, safe repo label, safe action summary, acceptance criteria, guidance-file presence, local receipt labels, dispatch state, and explicit private-evidence exclusions. They do not copy raw guidance contents, raw logs, raw scanner output, private paths, exact private repo names, owner names, org names, hostnames, or secrets.

docs/operator-center.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ Each action stores:
113113

114114
`brigade repos actions plan/build/list/show/start/done/defer/archive` turns a reviewed or deferred fleet report into a local fleet action queue under `.brigade/repos/actions/`. Fleet actions are metadata records only. They point to the safe repo label, source subsystem, source local id, safe summary, and suggested command, but do not execute the command.
115115

116-
Center status, center reviews, work brief, work doctor, release doctor, and release evidence include fleet sweep, fleet report, and fleet action queue health.
116+
`brigade repos actions dispatch plan/apply`, `dispatch --all-reviewed`, `reconcile`, and `context plan/build` connect those local fleet actions to each target repo's existing work import and context pack paths. Dispatch writes only gitignored target repo Brigade state, never promotes the import, never runs work, and never executes suggested commands. Reconciliation reads target repo imports, tasks, closeouts, release receipts, and operator reports, then updates local fleet action metadata.
117+
118+
Center status, center reviews, work brief, work doctor, release doctor, and release evidence include fleet sweep, fleet report, fleet action queue, dispatch, and reconciliation health.
117119

118120
The operator center never invokes scanners, tools, reviewers, handoff ingestion, release publishing, git commands that mutate state, or remote APIs. Only `center report build`, `center report archive`, and `center actions build/start/done/defer/archive` write local gitignored center files.

docs/repo-fleet.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ brigade repos actions start <fleet-action-id>
3030
brigade repos actions done <fleet-action-id>
3131
brigade repos actions defer <fleet-action-id> --reason "not today"
3232
brigade repos actions archive --completed
33+
brigade repos actions dispatch plan <fleet-action-id>
34+
brigade repos actions dispatch apply <fleet-action-id>
35+
brigade repos actions dispatch --all-reviewed
36+
brigade repos actions reconcile [fleet-action-id]
37+
brigade repos actions context plan <fleet-action-id>
38+
brigade repos actions context build <fleet-action-id>
3339
```
3440

3541
Fleet reports are written under:
@@ -69,11 +75,20 @@ Sweep filters include `--repo <repo-id>`, `--all`, `--stale-only`, `--include-di
6975

7076
`brigade repos actions build` requires the source fleet report to be closed out as `reviewed` or `deferred` unless `--allow-unreviewed` is passed. Repeated builds dedupe by repo id, report fingerprint, and source item fingerprint, including archived actions from the same report.
7177

78+
`brigade repos actions dispatch` bridges fleet-level review into the target repo's local work loop. `dispatch plan` previews the task import that would be written. `dispatch apply` writes a `source: repo-fleet` task import into the target repo's existing `.brigade/work/imports/inbox.jsonl`, with acceptance criteria and fleet provenance. `dispatch --all-reviewed` applies the same path to reviewed pending or active actions. `--dry-run` writes nothing.
79+
80+
Dispatch is idempotent by fleet action id and source fingerprint. Repeated dispatch of the same action skips equivalent pending or promoted imports. Dismissed target imports stay dismissed until the source fingerprint changes. When the fingerprint changes, Brigade creates a new target import and marks prior dispatch imports superseded.
81+
82+
`brigade repos actions context plan/build` creates an action-scoped context pack in the target repo under `.brigade/context/packs/`. These packs include safe action summary, acceptance criteria, guidance presence, local receipt labels, and explicit private-evidence exclusions. They do not copy raw guidance contents, raw logs, raw scanner output, private paths, exact private repo names, owner names, org names, hostnames, or secrets.
83+
84+
`brigade repos actions reconcile` reads target repo work imports, promoted tasks, completed tasks, closeouts, release readiness receipts, and operator reports, then updates local fleet action metadata. Reconciliation states include `dispatched`, `in-progress`, `completed`, `dismissed`, `superseded`, `stale`, and `broken-reference`. Completed target tasks mark the fleet action done. Repo fleet health also warns when safe target evidence changes after dispatch. No suggested command is executed.
85+
7286
Privacy boundaries:
7387

7488
- No cloning.
7589
- No remote mutation.
7690
- No automatic action execution.
7791
- No automatic promotion or dismissal.
92+
- No automatic target task promotion, work run, or code fix.
7893
- No exact private repo names, owner names, org names, hostnames, local paths, raw logs, scanner output, private config contents, secrets, or raw evidence in public files.
7994
- Gitignored local config may store local paths and safe labels.

docs/roadmap-completion-plan.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Implementation scope:
135135
- Add `brigade repos sweep plan/run/runs/show/closeout`.
136136
- Add `brigade repos report plan/build/list/show/archive/closeout`.
137137
- Add `brigade repos actions plan/build/list/show/start/done/defer/archive`.
138+
- Add `brigade repos actions dispatch plan/apply`, `dispatch --all-reviewed`, `reconcile`, and `context plan/build`.
138139
- Discover repos under configured roots such as `~/repos`.
139140
- Record safe repo metadata only: repo path label, branch, dirty counts, presence of `AGENTS.md`, `CLAUDE.md`, `ROADMAP.md`, README, CHANGELOG, test hints, handoff inboxes, publish-guard hooks, Brigade config, latest release readiness receipt, latest release candidate, and latest work closeout.
140141
- Record safe per-repo Brigade state for local rollups: latest operator report, action queue health, pending task and import counts, review finding counts, handoff draft counts, security issue counts, scanner sweep status, release readiness, release candidates, work closeouts, and dirty tracked counts.
@@ -150,6 +151,7 @@ Implementation scope:
150151
- missing Brigade bootstrap where opted in
151152
- Import issues into the scanner inbox as `source: repo-fleet`.
152153
- Refresh safe local evidence explicitly through fleet sweeps that run configured read/report commands, write local receipts, and feed reports and action queues without cloning, fixing, promoting, or mutating remotes.
154+
- Route reviewed fleet actions into target repo work imports and reconcile target repo progress back into the fleet queue without automatic promotion, work execution, fixes, cloning, or remote mutation.
153155

154156
Acceptance:
155157

@@ -159,6 +161,7 @@ Acceptance:
159161
- Tests cover repo-fleet imports, dedupe, and dismissed-until-changed behavior.
160162
- Tests cover fleet sweep plan/run/runs/show/closeout text and JSON, filtering, stale-only selection, failed-repo isolation, safe log labels, and daily-loop integration.
161163
- Tests cover fleet report plan/build/list/show/archive and fleet action plan/build/list/show/start/done/defer/archive text and JSON.
164+
- Tests cover fleet action dispatch, idempotency, dismissed-until-changed behavior, changed-fingerprint superseding, action context packs, reconciliation states, and daily-loop integration.
162165
- Tests prove private repo names, owner names, org names, local paths, and raw evidence are not copied into public docs, fixtures, imports, handoffs, release evidence, or committed diffs.
163166

164167
Phase 35 status:
@@ -181,6 +184,13 @@ Phase 41 status:
181184
- Fleet sweeps run explicit local read/report commands in configured repos, write gitignored receipts under `.brigade/repos/sweeps/`, store raw logs locally, and expose safe repo ids, labels, command labels, status counts, log labels, and receipt labels only.
182185
- Fleet reports, center status, center reviews, work brief, work doctor, and release doctor surface stale, failed, or unclosed fleet sweep health.
183186

187+
Phase 42 status:
188+
189+
- Implemented command surface: `brigade repos actions dispatch plan/apply`, `dispatch --all-reviewed`, `reconcile`, and `context plan/build`.
190+
- Reviewed fleet actions can be dispatched into target repo `repo-fleet` work imports with acceptance criteria, source fingerprints, and fleet provenance. Dispatch is idempotent, respects dismissed imports until material change, and supersedes older dispatch imports when the source fingerprint changes.
191+
- Action-scoped context packs are written in the target repo under `.brigade/context/packs/` with safe summaries, guidance presence, receipt labels, dispatch state, and explicit private-evidence exclusions.
192+
- Reconciliation reads target repo imports, tasks, work closeouts, release readiness, and operator reports, then records `dispatched`, `in-progress`, `completed`, `dismissed`, `superseded`, `stale`, or `broken-reference` state on the fleet action.
193+
184194
### 3. Inspiration Pattern Registry
185195

186196
Deliverable: a bounded local record of external workflow patterns Brigade intends to support.

0 commit comments

Comments
 (0)