Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions catalog/agent-team/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<N> -f iteration=<K>
gh workflow run implementer-agent -f issue_number=<N> -f iteration=<K>
gh workflow run implementer-agent -f issue_number=<N> -f iteration=<K> -f pr_number=<P> # kickback path
gh workflow run reviewer-agent -f pr_number=<P> -f issue_number=<N> -f iteration=<K>
```

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.
Expand Down
2 changes: 1 addition & 1 deletion tests/test-invariants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 --"
Expand Down