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
{{ message }}
Repository navigation
Commit 19df94f
Browse filesBrowse the repository at this point in the historyBrowse files
feat(teams): a project manager per team, and a page to manage them
Routing a correction ticket by language is the right first answer and the
wrong second one. When the same defect comes back, language routing hands it
to the agent that just failed at it, carrying a ticket whose only new content
is that it failed again — the loop that made gate failures feel like noise.
A repeat ticket now goes past a project manager before it goes back to work.
This already happened on the reviewer path when the ladder was spent; it now
happens on the tester path too, which is where most gate failures come from.
The manager does the two things the router cannot: pick somebody else, and say
what to do differently — and its direction lands above the evidence, since it
is the only thing in the ticket the last attempt did not already have.
A first ticket is never sent to it: the obvious choice has not been tried yet
and a model call to confirm it is pure latency. The verdict is validated before
it is applied — naming an unregistered agent, or re-picking the agent that just
failed, both fall through to the deterministic route.
Each team can carry its own manager. A run-wide manager answering for a
specific team picks from a roster it has no reason to understand: the agents
who can fix a failing Go handler are not the ones staffing the React half. The
request now names the team and its staff, and lists the team's own people
first — first, not exclusively, because the reason a delivery was rejected may
be that the team lacks the skill the fix needs.
Only agents that answer the triage contract may be nominated. An agent's
decoding grammar comes from its own system prompt, so one that answers a
different contract replies with something the reassignment step cannot read,
after a full model call has been spent.
Also here:
- A Teams page. The rail's Teams tab answers "how are the teams doing right
now"; this answers "are the teams right at all" — a different question, and
a team structure outlives the run that proposed it. It sends only the fields
you touched, and on an ownership collision names which teams collide rather
than refusing bare. Nothing is saved in that case.
- A correction attempt now counts tickets for that defect rather than every
correction on the board, which made a first attempt at a third defect
announce itself as a third.
- Reading a ticket's dedupe key back is trim-safe. The marker carries a
leading newline so it cannot match mid-line, but a stamp landing at the
start of an empty notes field loses it to any caller that trims — after
which dedupe stops seeing the ticket and the board grows a duplicate.
- Triage declines instead of panicking when no executor is wired.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UiLDxnEu1Gf8Q5hWAFhaAd
{ID: RoleTriage, Title: "Project manager (ticket triage)", Description: "Decides who takes a rejected delivery next, and what they need to know that the last attempt did not.", SystemPrompt: PromptTriage, Tools: nil, MaxIter: 2, Temperature: 0.15, MaxTokens: 640, SchemaRole: schema.RoleTriage},
157
159
{ID: "manager", Title: "Engineering manager (squad assembly)", Description: "Splits a query into parallel squads with disjoint ownership and a frozen interface contract.", SystemPrompt: PromptManager, Tools: nil, MaxIter: 3, Temperature: 0.15, MaxTokens: 2048, SchemaRole: schema.RoleSquads},
158
160
{ID: "composer", Title: "Dynamic pipeline composer", Description: "Assembles the right team, tools, and skills into a task-specific pipeline.", SystemPrompt: PromptComposer, Tools: nil, MaxIter: 3, Temperature: 0.2, MaxTokens: 2048, SchemaRole: schema.RoleComposition},
159
161
@@ -181,6 +183,9 @@ const (
181
183
RoleDescriber="describer"
182
184
// RoleEditor is the formatting half of the architect/editor pair.
183
185
RoleEditor="editor"
186
+
// RoleTriage is the run's default project manager: it decides who takes a
187
+
// rejected delivery next. A squad may nominate its own instead.
188
+
RoleTriage="triage"
184
189
)
185
190
186
191
// PublicSpecs strips prompts for API/UI (built-ins only — callers merge customs).
@@ -494,6 +499,7 @@ var lightAgents = map[string]bool{
Copy file name to clipboardExpand all lines: pkg/agents/prompts.go
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,26 @@ Each rule below is a way this fails in production:
213
213
OUTPUT — reply with this JSON object and nothing else:
214
214
{"squads":[{"id":"backend","owns":["cmd/**","internal/**","go.mod"],"acceptance":"go test ./...","charter":"one line","name":"Backend","worker":"go-worker"},{"id":"frontend","owns":["web/**"],"acceptance":"npm --prefix web run build","charter":"one line","name":"Frontend","worker":"react-worker"}],"contract":{"interfaces":[{"id":"GET /api/todos","provider":"backend","consumers":["frontend"],"spec":"200 -> [{id,title,done}]"}],"summary":"how the halves meet"},"integration":{"acceptance":"go test ./... && npm --prefix web run build","notes":["the API serves web/dist at /"]},"summary":"one line"}`
215
215
216
+
constPromptTriage=`Project manager. One delivery was rejected. Decide who takes it next.
217
+
218
+
You get the rejected task, what the reviewer or tester found, every attempt
219
+
already made, and the ROSTER of agents that can actually be dispatched.
220
+
221
+
RULES — each is a way this goes wrong:
222
+
- Pick from the ROSTER, exactly as written. An agent that is not on it cannot be
223
+
dispatched and the task would sit unassigned forever.
224
+
- Never pick the agent that just failed. It has already spent every retry the
225
+
ladder allows; handing it the same work again is the loop you are here to end.
226
+
- Prefer a specialist for the language of the files over a generic one.
227
+
- guidance is what the NEXT agent needs that the last one did not have: the
228
+
specific thing to do differently. "Try again" and "be careful" are not
229
+
guidance. If the attempts show the same fix tried twice, say what to try
230
+
instead.
231
+
- reason is one line explaining the choice, for the human reading the board.
232
+
233
+
OUTPUT — reply with this JSON object and nothing else:
234
+
{"assignee":"go-corrector","reason":"compile error in Go code the worker could not resolve","guidance":"The handler returns a bare slice; encode with json.NewEncoder(w).Encode(todos) and set Content-Type before writing.","priority":"high"}`
0 commit comments