Skip to content

Commit 39b5b1f

Browse files
committed
feat: import handoff ingest issues
1 parent ef954d9 commit 39b5b1f

8 files changed

Lines changed: 560 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5555
- `brigade handoff doctor` to compare pending `.claude` and `.codex` memory handoffs against gitignored local source config.
5656
- Repo installs now include `.brigade/handoff-sources.example.json` as the local handoff ingestor source-list contract.
5757
- `brigade handoff doctor` ingestor-log checks for stale latest-run logs, skipped malformed handoffs, warning summaries, and no-reply/no-update masking signals.
58+
- `brigade handoff issues` and `brigade handoff import-issues` to turn handoff ingest warnings into grouped repair guidance and local work imports.
5859
- `docs/import-schema.md` documenting the local import JSONL contract for scanners and wrappers.
5960
- Cybersecurity plugin roadmap covering broad agent-workspace security checks plus Brigade-specific scanner, doctor, import, and multi-harness security checks.
6061
- Built-in `security` station and `brigade security scan` for read-only agent workspace security checks.
@@ -87,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8788
- `brigade work run` now consumes the oldest pending ledger task before falling back to the latest extracted dogfood next step, and marks consumed tasks done after successful runs.
8889
- `brigade work task add --from-next` now reuses an equivalent pending task instead of adding duplicates.
8990
- `brigade work brief` now includes pending local work imports and import counts in both text and JSON output.
91+
- `brigade work brief` now surfaces pending handoff ingest issue counts when the local handoff source config has an ingestor latest-run log.
9092
- The managed gitignore block now treats `.brigade/dogfood.toml`, `.brigade/security.toml`, `.brigade/runs/`, and `.brigade/security/` as local state.
9193
- The managed gitignore block now treats `.brigade/handoff-sources.json` as host-local state.
9294
- Live smoke docs now keep Codex agent execution in a trusted repo cwd while writing temporary roster, artifacts, and handoff output under `/tmp`.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Once installed, `brigade doctor` verifies the wiring and `brigade status` report
9696
For machines that ingest handoffs from multiple repos, copy `.brigade/handoff-sources.example.json` to `.brigade/handoff-sources.json` and list the repo roots and writer inboxes the canonical ingestor scans.
9797
`brigade handoff doctor` reports pending `.claude/memory-handoffs/` and `.codex/memory-handoffs/` files that are not covered by that local source list.
9898
If your ingestor writes a latest-run log, set `ingestor.last_run_log` in that local config so the doctor can warn on stale runs, skipped malformed handoffs, and warning summaries hidden behind no-reply cron output.
99+
Use `brigade handoff issues` to group those warnings with repair guidance, then `brigade handoff import-issues` to route them into the normal local work import inbox.
99100

100101
## Run a brigade
101102

@@ -154,6 +155,8 @@ brigade dogfood
154155
brigade dogfood next
155156
brigade dogfood --target /path/to/repo
156157
brigade handoff doctor
158+
brigade handoff issues
159+
brigade handoff import-issues
157160
brigade work bootstrap
158161
brigade work status
159162
brigade work doctor

ROADMAP.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ Goal: make backup health part of the same daily operator loop as chat, memory, a
5454
- Route stale snapshot, failed check, failed prune, missing mount, and restore-rehearsal overdue signals into `brigade work import` as incidents.
5555
- Keep real hostnames, remote names, mount paths, webhook URLs, channel ids, and backup passwords out of public templates.
5656

57+
## Later Phase: Shared Tool Catalog And Runtime
58+
59+
Goal: make Brigade able to reason about callable tools across agent harnesses without making each harness own separate tool config.
60+
61+
- Build a local tool catalog abstraction with source records, tool counts, search, describe, and call surfaces.
62+
- Support source families such as MCP, OpenAPI, GraphQL, local scripts, and custom adapters through a registry contract.
63+
- Prefer schema-first tool descriptions so agents can discover by intent, inspect arguments, and produce typed calls.
64+
- Add a local daemon option with status, stop, restart, port tracking, and safe local auto-start for commands that need a runtime.
65+
- Track resumable executions for tools that pause for auth, approval, or human confirmation.
66+
- Keep shared auth, secrets, and policy decisions host-local and gitignored, while publishing only safe example configs.
67+
- Expose catalog health through `brigade doctor` and route broken source/auth/policy states into `brigade work import`.
68+
5769
## Later Phase: Cybersecurity Plugin
5870

5971
Goal: ship a Brigade cybersecurity plugin with broad coverage for agent workspaces, then go deeper on Brigade's multi-harness, memory, scanner, and dogfood workflows.
@@ -112,6 +124,7 @@ Goal: prevent durable memory from silently rotting.
112124
- Treat bootstrap truncation as a hard failure. Bootstrap files stay slim, cards hold durable detail, and doctor checks enforce the boundary.
113125
- Add a handoff doctor that compares repo-local writer inboxes such as `.claude/memory-handoffs/` and `.codex/memory-handoffs/` against the canonical ingestor source list, warning when handoffs exist in directories the owner is not scanning. Status: started with `brigade handoff doctor`, `.brigade/handoff-sources.example.json`, and `brigade doctor` / `brigade work doctor` integration.
114126
- Add handoff-ingest observability checks for hidden warning states, including unreachable remote sources, malformed handoffs that are skipped, and runs that emit `NO_REPLY` despite warnings. Status: started with optional `ingestor.last_run_log` checks in `brigade handoff doctor`.
127+
- Turn handoff-ingest warnings into repairable local work. Status: started with `brigade handoff issues`, `brigade handoff import-issues`, repair guidance, and `brigade work brief` issue counts.
115128

116129
## Later Phase: Portable Operator Setup
117130

src/brigade/cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ def _build_parser() -> argparse.ArgumentParser:
115115
p_handoff_doctor.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to inspect.")
116116
p_handoff_doctor.add_argument("--sources", type=Path, default=None, help="Override .brigade/handoff-sources.json.")
117117
p_handoff_doctor.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
118+
p_handoff_issues = handoff_sub.add_parser("issues", help="Group actionable handoff ingest issues.")
119+
p_handoff_issues.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to inspect.")
120+
p_handoff_issues.add_argument("--sources", type=Path, default=None, help="Override .brigade/handoff-sources.json.")
121+
p_handoff_issues.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
122+
p_handoff_issues.add_argument("--limit", type=int, default=20, help="Maximum issue rows to print.")
123+
p_handoff_import_issues = handoff_sub.add_parser("import-issues", help="Import handoff ingest issues into the work inbox.")
124+
p_handoff_import_issues.add_argument("--target", "-t", type=Path, default=Path("."), help="Repo or workspace to update.")
125+
p_handoff_import_issues.add_argument("--sources", type=Path, default=None, help="Override .brigade/handoff-sources.json.")
126+
p_handoff_import_issues.add_argument("--dry-run", action="store_true", help="Report without writing imports.")
127+
p_handoff_import_issues.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
118128

119129
# work
120130
p_work = sub.add_parser("work", help="Inspect and manage a daily Brigade work session.")
@@ -640,6 +650,10 @@ def main(argv=None) -> int:
640650

641651
if args.handoff_command == "doctor":
642652
return handoff_cmd.doctor(target=args.target, sources=args.sources, json_output=args.json)
653+
if args.handoff_command == "issues":
654+
return handoff_cmd.issues(target=args.target, sources=args.sources, json_output=args.json, limit=args.limit)
655+
if args.handoff_command == "import-issues":
656+
return handoff_cmd.import_issues(target=args.target, sources=args.sources, dry_run=args.dry_run, json_output=args.json)
643657
parser.error(f"unknown handoff command: {args.handoff_command}")
644658
return 2
645659
if cmd == "work":

0 commit comments

Comments
 (0)