Add ward agent <name> work <issue>: issue-seeded container shortcut #123

Closed
opened 2026-06-18 00:18:09 +00:00 by coilysiren · 1 comment
Owner

ward agent <name> work <issue> - issue-seeded container shortcut

The short verb over ward container up for the daily case: take a Forgejo issue and put an agent on it end to end, in one line instead of container up <repo> --mode <m> --branch <b> plus a hand-written prompt.

Shape

ward agent claude work coilyco-flight-deck/ward#98
ward agent claude work https://forgejo.coilysiren.me/coilyco-flight-deck/ward/issues/98
ward agent codex  work <ref> --print   # resolve + show the plan, run nothing

<name> is the agent/mode (claude|codex|qwen, the --mode context ladder). work:

  1. parses the ref (owner/repo#N or a Forgejo issue URL), then fetches the issue so a bad ref / untrusted owner fails before any container spins;
  2. trust-gates on the primary-org set (the container runs under bypassPermissions, same gate as ward dispatch); non-open issue warns but proceeds;
  3. derives issue-<N> as the branch (override --branch);
  4. launches an interactive ward container against a fresh clone, seeded with a "read the issue, then carry it to merge" prompt that rides as the in-container agent's argv.

Carries the container up launch flags (--aws, --detach, --tag/--image, --ward-source, --no-pull). --print renders the resolved issue + seeded prompt + docker plan, injecting no token and running no docker.

Why ward, not ward-kdl

The logic (issue fetch -> compose prompt -> docker run) is real Go orchestration over container; it can't be a kdl exec-grant, so it lands in the ward binary next to container. ward-kdl consolidation (#93) folds them anyway.

Done

cmd/ward/agent.go (+ tests), threaded AgentArgs through upPlan/dockerCreateArgv, docs/agent.md, FEATURES entry.

## `ward agent <name> work <issue>` - issue-seeded container shortcut The short verb over `ward container up` for the daily case: take a Forgejo issue and put an agent on it end to end, in one line instead of `container up <repo> --mode <m> --branch <b>` plus a hand-written prompt. ### Shape ``` ward agent claude work coilyco-flight-deck/ward#98 ward agent claude work https://forgejo.coilysiren.me/coilyco-flight-deck/ward/issues/98 ward agent codex work <ref> --print # resolve + show the plan, run nothing ``` `<name>` is the agent/mode (`claude|codex|qwen`, the `--mode` context ladder). `work`: 1. parses the ref (owner/repo#N or a Forgejo issue URL), then fetches the issue so a bad ref / untrusted owner fails before any container spins; 2. trust-gates on the primary-org set (the container runs under `bypassPermissions`, same gate as `ward dispatch`); non-open issue warns but proceeds; 3. derives `issue-<N>` as the branch (override `--branch`); 4. launches an interactive `ward container` against a fresh clone, seeded with a "read the issue, then carry it to merge" prompt that rides as the in-container agent's argv. Carries the `container up` launch flags (`--aws`, `--detach`, `--tag`/`--image`, `--ward-source`, `--no-pull`). `--print` renders the resolved issue + seeded prompt + docker plan, injecting no token and running no docker. ### Why ward, not ward-kdl The logic (issue fetch -> compose prompt -> docker run) is real Go orchestration over `container`; it can't be a kdl exec-grant, so it lands in the `ward` binary next to `container`. ward-kdl consolidation (#93) folds them anyway. ### Done `cmd/ward/agent.go` (+ tests), threaded `AgentArgs` through `upPlan`/`dockerCreateArgv`, docs/agent.md, FEATURES entry.
Author
Owner

Landed in c3d619f on main. Ships with tests, docs/agent.md, and a FEATURES entry. Parser-unification follow-up: #124.

Landed in c3d619f on main. Ships with tests, docs/agent.md, and a FEATURES entry. Parser-unification follow-up: #124.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#123
No description provided.