diff --git a/catalog/agent-team/README.md b/catalog/agent-team/README.md index 5490837..c558997 100644 --- a/catalog/agent-team/README.md +++ b/catalog/agent-team/README.md @@ -104,14 +104,25 @@ Then apply the OAuth token tweak to each `.lock.yml` per [`skills/install-workfl 1. Open an issue describing what you want built. 2. Add the single label `agent-team`. 3. Watch the thread. Each role posts its contribution as a comment; the implementer opens a draft PR that closes the issue when merged. -4. Human override at any time: add `state:blocked` to halt, edit a comment to steer the next agent, or manually `gh workflow run` a specific role to retry a stuck stage. Manual dispatches must pass the required `workflow_dispatch` inputs, and the downstream workflow markdown must read them via `${{ github.event.inputs.* }}`. -5. **Retrying a blocked task**: clear `state:blocked`, then re-add `agent-team`. Spec-agent treats it as a fresh dispatch (because the state:* labels are gone and the spec markers are already satisfied — actually: to redo from scratch, also delete the prior spec comment). +4. Human override at any time: add `state:blocked` to halt, edit a comment to steer the next agent, or manually re-dispatch a specific role to retry a stuck stage. Manual dispatches **must** pass all required inputs — the agents fail loudly if inputs are missing rather than inferring from labels. + + ```bash + # Re-dispatch a specific stage manually (use exact field names): + gh workflow run planner-agent -f issue_number= -f iteration= + gh workflow run implementer-agent -f issue_number= -f iteration= + gh workflow run implementer-agent -f issue_number= -f iteration= -f pr_number=

# kickback path + gh workflow run reviewer-agent -f pr_number=

-f issue_number= -f iteration= + ``` + +5. **Retrying a blocked task**: + - *Normal block* (`state:blocked` added by a human or by an agent that hit an ambiguity): clear `state:blocked`, then re-add `agent-team`. Spec-agent treats it as a fresh dispatch. To redo from scratch, also delete the prior spec comment. + - *Missing-inputs block* (agent posted `🛑 agent-team: workflow_dispatch inputs were not propagated`): the automated dispatch chain broke mid-flight. Re-dispatch the affected stage directly via `gh workflow run` with explicit inputs as shown above — do **not** re-add `agent-team`, which would restart from spec. ## Limits and gotchas - **Concurrency**: each workflow uses `concurrency: group: agent-team-issue-${issue_number}` so only one role runs at a time per issue. - **Max iterations**: default 3 (reviewer kickback → implementer). The counter lives on the `iteration` input passed through the dispatch chain, bumped exclusively by the reviewer on kickback. -- **Input propagation**: planner / implementer / reviewer must fail loudly if required `workflow_dispatch` inputs are missing. Do not rely on label search or recent-activity inference as a fallback. +- **Input propagation**: planner / implementer / reviewer fail loudly if required `workflow_dispatch` inputs are missing or unresolved — they post `🛑 agent-team: workflow_dispatch inputs were not propagated` and add `state:blocked`. Recovery: re-dispatch the blocked stage via `gh workflow run` with explicit inputs (see step 4 above). Do **not** re-add `agent-team` — that restarts from spec. - **Non-UI only**: no screenshot capture. Reviewer validates via tests/CI status + reading the diff. - **Cost**: a single task can easily spend 4× the tokens of a monolithic workflow. Set `timeout-minutes` conservatively and monitor the first few runs. - **No auto-merge**: the reviewer approves but never merges. Humans merge. diff --git a/tests/test-invariants.sh b/tests/test-invariants.sh index b81811d..be2ddf2 100755 --- a/tests/test-invariants.sh +++ b/tests/test-invariants.sh @@ -79,7 +79,7 @@ check_required "catalog/agent-team/implementer-agent.md" '${{ github.event.input check_required "catalog/agent-team/reviewer-agent.md" '${{ github.event.inputs.pr_number }}' "reviewer reads workflow_dispatch inputs via documented markdown expression" check_required "catalog/agent-team/implementer-agent.md" "Do **not** infer the missing value from labels" "implementer must fail loud instead of label-search fallback" check_required "catalog/agent-team/implementer-agent.md" 'If this is blank or still the literal `${{ github.event.inputs.pr_number }}`, treat it as not set.' "implementer treats missing optional pr_number as absent instead of a live template token" -check_required "catalog/agent-team/README.md" '${{ github.event.inputs.* }}' "README documents the manual-dispatch input contract" +check_required "catalog/agent-team/README.md" "gh workflow run planner-agent" "README documents manual-dispatch commands with exact field names" echo "" echo "-- Core files exist --"