You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #191 (epic). Phase 1 landed declarative custom agents + bbox agents list|inspect|doctor in #200. This issue adds the remaining Phase 2 CLI for authoring a custom agent without hand-editing YAML.
Scope
bbox agents add NAME --image IMAGE --command CMD [--env PATTERN ...] [--memory 4g] [--cpus 4] [--egress-profile standard] [--mcp] [--mcp-authz-profile safe-tools] — appends a validated custom agent to the global config file (~/.config/broodbox/config.yaml), then runs the existing ValidateCustomAgent checks and prints the result. Refuses to overwrite a built-in or an existing custom agent unless --force.
bbox agents init [NAME] — writes a commented starter agents: stanza (or a standalone manifest, see #(Phase 4)) the user can fill in. Should reuse the documentation already in internal/infra/config/writer.go's default template.
Notes / constraints
Pure mapping (config.AgentFromOverride) and validation (config.ValidateCustomAgent) already exist from Add declarative bring-your-own agent support (#191 Phase 1) #200 — reuse them; the new code is just CLI + a config-file mutation in internal/infra/config.
Writing config is I/O → lives in internal/infra/config + cmd/bbox; keep the domain pure.
Must preserve existing comments/formatting on rewrite as much as practical (or document that it normalizes).
Custom agents remain global-only; agents add must never target a workspace .broodbox.yaml.
One small acceptance-criteria suggestion from the agent-observability side: make agents add/init emit or preserve a config mutation receipt distinct from doctor pass/fail.
Since this command takes user input and writes global config, the receipt would be useful if it captured:
validator/schema version used for ValidateCustomAgent
writer behavior: comments preserved, normalized, or intentionally dropped
explicit non-effects: no workspace .broodbox.yaml mutation, no secret values read/written, no credential path widening
Then bbox agents doctor aider --json can be the re-checkable predicate: parse config, map to domain agent, validate, resolve required env names as present/missing, and produce evidence refs that are safe to paste into an issue.
The main risk in this class of CLI is not just a bad YAML write. It is later debugging where "this agent was added safely" becomes a self-report. A small JSON stdout receipt or local receipt file gives users something they can attach without leaking credentials.
Delivered in #210 (commit e9b531a), which added bbox agents add, bbox agents init, JSON mutation receipts, and comment-preserving config writes. All acceptance criteria are met:
Custom agents are registered as runnable commands via registerCustomAgents (cmd/bbox/main.go:1300), so bbox <name> works for any agent added to global config. The issue didn't auto-close on merge because PR #210 referenced #201 without a closing keyword (closes/fixes/resolves). Closing now.
Activity
HarperZ9 commentedon Jun 27, 2026
One small acceptance-criteria suggestion from the agent-observability side: make
agents add/initemit or preserve a config mutation receipt distinct fromdoctorpass/fail.Since this command takes user input and writes global config, the receipt would be useful if it captured:
ValidateCustomAgent.broodbox.yamlmutation, no secret values read/written, no credential path wideningThen
bbox agents doctor aider --jsoncan be the re-checkable predicate: parse config, map to domain agent, validate, resolve required env names as present/missing, and produce evidence refs that are safe to paste into an issue.The main risk in this class of CLI is not just a bad YAML write. It is later debugging where "this agent was added safely" becomes a self-report. A small JSON stdout receipt or local receipt file gives users something they can attach without leaking credentials.
I am building similar receipt shapes in Project Telos for agent handoffs, so this issue jumped out. Context if useful: https://harperz9.github.io/field-guide.html
JAORMX commentedon Jun 28, 2026
Thanks for bringing this up, it's quite useful @HarperZ9 !
Add bbox agents add/init scaffolding (#201)
Add bbox agents add/init scaffolding (#201) (#210)
JAORMX commentedon Jul 3, 2026
Delivered in #210 (commit
e9b531a), which addedbbox agents add,bbox agents init, JSON mutation receipts, and comment-preserving config writes. All acceptance criteria are met:Custom agents are registered as runnable commands via
registerCustomAgents(cmd/bbox/main.go:1300), sobbox <name>works for any agent added to global config. The issue didn't auto-close on merge because PR #210 referenced#201without a closing keyword (closes/fixes/resolves). Closing now.