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
Copy file name to clipboardExpand all lines: catalog/agent-team/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,13 +104,14 @@ Then apply the OAuth token tweak to each `.lock.yml` per [`skills/install-workfl
104
104
1. Open an issue describing what you want built.
105
105
2. Add the single label `agent-team`.
106
106
3. Watch the thread. Each role posts its contribution as a comment; the implementer opens a draft PR that closes the issue when merged.
107
-
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.
107
+
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.* }}`.
108
108
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).
109
109
110
110
## Limits and gotchas
111
111
112
112
-**Concurrency**: each workflow uses `concurrency: group: agent-team-issue-${issue_number}` so only one role runs at a time per issue.
113
113
-**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.
114
+
-**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.
114
115
-**Non-UI only**: no screenshot capture. Reviewer validates via tests/CI status + reading the diff.
115
116
-**Cost**: a single task can easily spend 4× the tokens of a monolithic workflow. Set `timeout-minutes` conservatively and monitor the first few runs.
116
117
-**No auto-merge**: the reviewer approves but never merges. Humans merge.
Copy file name to clipboardExpand all lines: catalog/agent-team/implementer-agent.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,31 +85,40 @@ safe-outputs:
85
85
86
86
You are the **implementer** in a four-role agent-team pipeline. The planner (or the reviewer, on kickback) just dispatched you. Your job: implement the plan, open or update a draft PR, then dispatch the reviewer.
87
87
88
-
Inputs:
89
-
-`inputs.issue_number` — the issue you're implementing against.
90
-
-`inputs.iteration` — attempt number.
91
-
-`inputs.pr_number` — if non-empty, you're being re-invoked after a reviewer kickback and should **push updates to the existing PR branch**, not open a new PR.
- If this is blank or still the literal `${{ github.event.inputs.pr_number }}`, treat it as not set.
93
+
94
+
## Required input contract (do this before anything else)
95
+
96
+
If any required dispatch input is empty, whitespace-only, or still appears as an unresolved literal such as `${{ github.event.inputs.issue_number }}`:
97
+
- Do **not** infer the missing value from labels, recent activity, or search results.
98
+
- If `issue_number` is present, add `state:blocked` to that issue and post: `🛑 agent-team: workflow_dispatch inputs were not propagated. Re-dispatch with valid inputs.`
99
+
- If `issue_number` is missing, use `missing_data` or `report_incomplete` to fail loudly with reason `workflow_dispatch inputs were not propagated`.
100
+
- Stop.
92
101
93
102
## Iteration guard (do this first)
94
103
95
-
If `inputs.iteration` is greater than 3:
96
-
- Add `state:blocked` to issue `inputs.issue_number`.
104
+
If `${{ github.event.inputs.iteration }}` is greater than 3:
105
+
- Add `state:blocked` to issue `${{ github.event.inputs.issue_number }}`.
97
106
- Post one comment on that issue: `🛑 agent-team: max iterations reached at impl stage.`
98
107
- Do **not** dispatch the reviewer.
99
108
- Stop.
100
109
101
110
## Normal path
102
111
103
-
1. Fetch the issue (`gh issue view <inputs.issue_number>`). Extract:
- The most recent `<!-- agent-team:spec --> ... <!-- /agent-team:spec -->` block.
105
114
- The most recent `<!-- agent-team:plan --> ... <!-- /agent-team:plan -->` block.
106
115
- Any `<!-- agent-team:review -->` blocks newer than the plan — **kickback feedback you must address on this pass.**
107
116
108
117
If spec or plan is missing: add `state:blocked`, post `🛑 agent-team: missing spec or plan.` on the issue, stop (do not dispatch).
109
118
110
119
2.**Pick the branch**:
111
-
- If `inputs.pr_number` is empty → create a new branch: `agent-team/issue-<inputs.issue_number>-<short-slug>`.
112
-
- If `inputs.pr_number` is set → check out the existing PR's branch (via `gh pr view <pr_number> --json headRefName`) and push updates to it.
120
+
- If `pr_number` is blank or still the literal `${{ github.event.inputs.pr_number }}`→ create a new branch: `agent-team/issue-${{ github.event.inputs.issue_number }}-<short-slug>`.
121
+
- If `pr_number` is a real PR number → check out the existing PR's branch (via `gh pr view ${{ github.event.inputs.pr_number }} --json headRefName`) and push updates to it.
113
122
114
123
3. Implement **only what the plan says** (plus any kickback requested changes). Do not expand scope.
115
124
-**Trust the plan.** The planner already explored the repo, confirmed file paths exist, and identified the exact edits. Do NOT re-read surrounding files to "understand the codebase" or "check for patterns." Read only the files the plan names under `Files to change`, plus `AGENTS.md` / `CLAUDE.md` / `CONTRIBUTING.md` once for convention reminders.
@@ -122,23 +131,23 @@ If `inputs.iteration` is greater than 3:
122
131
-**New PR** (first impl attempt): use `create-pull-request`.
123
132
- Title: `<short description from spec>` (the workflow adds the `[agent-team] ` prefix).
-`## Summary` — 2–3 sentences on what changed and why.
127
136
-`## Plan reference` — one sentence linking back to the plan comment.
128
137
-`## Test status` — exact commands run and their outcomes (✅ / ❌ / ⚠ skipped with reason).
129
138
- Footer: `🤖 agent-team / implementer`.
130
-
-**Kickback update** (pr_number was set): use `push-to-pull-request-branch` to push the fix commits to the existing PR. Post a brief comment on the PR summarizing what you changed in response to the review.
139
+
-**Kickback update** (a real `pr_number` was provided): use `push-to-pull-request-branch` to push the fix commits to the existing PR. Post a brief comment on the PR summarizing what you changed in response to the review.
131
140
132
141
5. Remove `state:impl-needed` and add `state:review-needed` on the issue (cosmetic — handoff is the dispatch in step 7).
133
142
134
143
6. Capture the PR number:
135
144
- New PR: the PR number comes from the `create-pull-request` safe output. Use it in step 7.
136
-
- Kickback: use `inputs.pr_number`as-is.
145
+
- Kickback: use the resolved `pr_number`from the dispatch input.
137
146
138
147
7.**Dispatch the reviewer-agent workflow** with:
139
148
-`pr_number`: the number from step 6
140
-
-`issue_number`: passed through from your input
141
-
-`iteration`: passed through from your input (do NOT bump)
Copy file name to clipboardExpand all lines: catalog/agent-team/planner-agent.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,21 +61,29 @@ safe-outputs:
61
61
62
62
You are the **planner** in a four-role agent-team pipeline. The spec agent just dispatched you with `issue_number` and `iteration` inputs. Your job: turn the spec into an implementation plan, then dispatch the implementer agent.
63
63
64
-
Inputs:
65
-
-`inputs.issue_number` — the issue to plan against (use `gh issue view <N>` to read).
66
-
-`inputs.iteration` — attempt number (1, 2, 3). Use to detect kickback loops.
## Required input contract (do this before anything else)
69
+
70
+
If any required dispatch input is empty, whitespace-only, or still appears as an unresolved literal such as `${{ github.event.inputs.issue_number }}`:
71
+
- Do **not** infer the missing value from labels, recent activity, or search results.
72
+
- If `issue_number` is present, add `state:blocked` to that issue and post: `🛑 agent-team: workflow_dispatch inputs were not propagated. Re-dispatch with valid inputs.`
73
+
- If `issue_number` is missing, use `missing_data` or `report_incomplete` to fail loudly with reason `workflow_dispatch inputs were not propagated`.
74
+
- Stop.
67
75
68
76
## Iteration guard (do this first)
69
77
70
-
If `inputs.iteration` is greater than 3:
78
+
If `${{ github.event.inputs.iteration }}` is greater than 3:
71
79
- Add `state:blocked` to the issue.
72
80
- Post one comment on the issue: `🛑 agent-team: max iterations reached at plan stage.`
73
81
- Do **not** dispatch the implementer.
74
82
- Stop.
75
83
76
84
## Normal path
77
85
78
-
1. Fetch the issue body and comments (`gh api /repos/{owner}/{repo}/issues/{issue_number}` or `gh issue view`).
86
+
1. Fetch the issue body and comments (`gh api /repos/{owner}/{repo}/issues/${{ github.event.inputs.issue_number }}` or `gh issue view ${{ github.event.inputs.issue_number }}`).
79
87
2. Find the most recent `<!-- agent-team:spec --> ... <!-- /agent-team:spec -->` block. Extract it verbatim. If missing: add `state:blocked`, post `🛑 agent-team: no spec found.` on the issue, stop (do not dispatch).
80
88
3. Read any `<!-- agent-team:review -->` comments newer than the spec — they contain kickback feedback your plan must address.
81
89
4.**Explore the repo** to ground the plan in real file paths. Use `bash` for `git ls-files`, `find`, `grep` — do NOT invent filenames. For each file you mention, confirm it exists.
@@ -89,7 +97,7 @@ If `inputs.iteration` is greater than 3:
89
97
6. Post it as a single comment on the issue, wrapped exactly like this:
Copy file name to clipboardExpand all lines: catalog/agent-team/reviewer-agent.md
+22-14Lines changed: 22 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,22 +77,30 @@ safe-outputs:
77
77
78
78
You are the **reviewer** in a four-role agent-team pipeline. The implementer just dispatched you with `pr_number`, `issue_number`, and `iteration` inputs. Your job: review the PR against the spec and plan, decide approve / kickback / block, then either finish (approve/block) or dispatch the implementer again (kickback) with an incremented iteration.
79
79
80
-
Inputs:
81
-
-`inputs.pr_number` — the PR to review.
82
-
-`inputs.issue_number` — the issue the PR closes (from `Closes #N`).
## Required input contract (do this before anything else)
86
+
87
+
If any required dispatch input is empty, whitespace-only, or still appears as an unresolved literal such as `${{ github.event.inputs.issue_number }}`:
88
+
- Do **not** infer the missing value from labels, recent activity, or search results.
89
+
- If `issue_number` is present, add `state:blocked` to that issue and post: `🛑 agent-team: workflow_dispatch inputs were not propagated. Re-dispatch with valid inputs.`
90
+
- If `issue_number` is missing, use `missing_data` or `report_incomplete` to fail loudly with reason `workflow_dispatch inputs were not propagated`.
91
+
- Stop.
84
92
85
93
## Iteration guard (do this first)
86
94
87
-
If `inputs.iteration` is greater than 3:
88
-
- Add `state:blocked` to issue `inputs.issue_number`.
95
+
If `${{ github.event.inputs.iteration }}` is greater than 3:
96
+
- Add `state:blocked` to issue `${{ github.event.inputs.issue_number }}`.
89
97
- Post one comment on the PR: `🛑 agent-team: max review iterations reached. Human intervention required.`
90
98
- Do **not** dispatch the implementer.
91
99
- Stop.
92
100
93
101
## Review checklist
94
102
95
-
Fetch the PR (`gh pr view <inputs.pr_number>`) and its diff (`gh pr diff <inputs.pr_number>`), plus the issue (`gh issue view <inputs.issue_number>`). Verify, in order:
103
+
Fetch the PR (`gh pr view ${{ github.event.inputs.pr_number }}`) and its diff (`gh pr diff ${{ github.event.inputs.pr_number }}`), plus the issue (`gh issue view ${{ github.event.inputs.issue_number }}`). Verify, in order:
96
104
97
105
1.**Spec alignment**: the PR fulfills every `[ ]` acceptance criterion from the latest `<!-- agent-team:spec -->` block on the issue. Match each criterion to either a code change or an existing behavior, explicitly.
98
106
2.**Plan adherence**: the files changed match (or are a strict subset of) the `Files to change` list in the latest `<!-- agent-team:plan -->` block. Out-of-scope edits are a kickback.
@@ -105,7 +113,7 @@ Fetch the PR (`gh pr view <inputs.pr_number>`) and its diff (`gh pr diff <inputs
105
113
Post a single comment on the **PR**, wrapped exactly like this:
@@ -128,7 +136,7 @@ Then take the **one** action matching the verdict:
128
136
**After the verdict comment, post one additional pipeline-summary comment on the _issue_** (not the PR) so the human has a single jump-off point. Use exactly this shape:
**PR**: #${{ inputs.pr_number }} — draft, awaiting your merge.
142
-
**Iterations**: ${{ inputs.iteration }} (kickback rounds before approval).
149
+
**PR**: #${{ github.event.inputs.pr_number }} — draft, awaiting your merge.
150
+
**Iterations**: ${{ github.event.inputs.iteration }} (kickback rounds before approval).
143
151
144
152
🤖 agent-team / reviewer
145
153
<!-- /agent-team:summary -->
@@ -156,9 +164,9 @@ Then take the **one** action matching the verdict:
156
164
Pick the most recent **successful** run of each stage that precedes yours in time. If a run-id lookup fails for any stage, write `(run link unavailable)` in that row instead of guessing — don't block the pipeline on a cosmetic link.
157
165
158
166
-**Kickback** → Add `state:impl-needed` to the issue (cosmetic breadcrumb). Remove `state:review-needed`. **Dispatch the implementer-agent workflow** with:
159
-
-`issue_number`: from your input
160
-
-`pr_number`: from your input (tells the implementer to push to the existing PR branch, not open a new one)
161
-
-`iteration`: `inputs.iteration`**+ 1** (this is the one place iteration is bumped)
-`pr_number`: `${{ github.event.inputs.pr_number }}` (tells the implementer to push to the existing PR branch, not open a new one)
169
+
-`iteration`: `${{ github.event.inputs.iteration }}`**+ 1** (this is the one place iteration is bumped)
162
170
163
171
-**Block** → Add `state:blocked` to the issue. **Do not dispatch.** Use this only for things a human must decide (architectural choice, ambiguous spec, external blocker).
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"
81
+
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"
82
+
check_required "catalog/agent-team/README.md"'${{ github.event.inputs.* }}'"README documents the manual-dispatch input contract"
0 commit comments