Repository navigation
fix(workforce): a project coordinator hands a named workstream's ask on (FIX-2005) - #3450
Conversation
…on (FIX-2005) A user's hand-off to their own workstream sometimes never reached it: the project coordinator's turn made no dispatch. It read the project first, couldn't tell its user's workstream from another member's (owners are bare user ids), and then said it was someone else's, said "routed" without routing, folded the ask into objectives, or asked what it meant. - readProject, the project coordinator's tool, marks each workstream `yours` when the session's user owns it. - The DevTeam project coordinator's file puts the hand-off rule first: a named workstream's ask goes on with dispatchTask in this turn, however short, with no project read before it; a hand-off is only a dispatch that answered ok; the readProject rule is for questions. The closure goal's b3 failed 7 of 20 runs on main and 0 of 19 with this. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGrSpvKPW4xoKddwpB3doh
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 99d02646-e725-475b-8008-b5f53bf4518d) |
Second look + architecture pass (for the follow-up agent)The change is small and the shape is sound: the fix is mostly prompt, plus one data affordance. Nothing blocking. Items in priority order. 1. The
|
There was a problem hiding this comment.
Summary
This PR splits cleanly into a small API affordance (yours on coordinator readProject) and a large behavioral fix (project-coordinator WORKER.md). After reading the diff and running pnpm --filter @flow-state-dev/workforce test (all 1341 tests pass), I think the core approach is sound: coordinator-only output shape, derived yours from owner === session user, neutral readProject action unchanged. That matches how delegate listDelegates enrichment already works elsewhere.
I do not think the API layer over-engineered the problem. The risk is asymmetry: most of FIX-2005 lives in prompt prose, while the only new automated check pins the yours field—not the titular “name a workstream → dispatchTask this turn without treating it as Q&A” path.
Simpler alternatives considered
| Alternative | Why it’s tempting | Why I’d still lean toward this PR |
|---|---|---|
Prompt-only (reorder/strengthen hand-off rules; lean on listDelegates) |
Smallest diff; hand-off already has a delegate roster | Fails when the model does call readProject for ownership/status—your test comment documents models mis-reading owner ids without a viewer-relative mark |
Fold yours into readProjectAt |
One read helper | Wrong boundary: app/MCP/browser readProject should stay membership-neutral |
Top-level viewerUserId or { mine, others } split |
One field instead of N booleans | Bigger contract churn for consumers; per-row yours is easy for the model next to each workstream |
| 3rd-party “view model” lib | Less hand-rolled mapping | No real win here; Zod .extend is already the local pattern |
What I’d simplify (non-blocking)
- Regression for the PR title behavior — scripted turn with
dispatchTaskonly (noreadProject) when the user names an owned workstream; assert the post lands on the right delegate. Optional follow-up if you want to keep this PR tiny. - Trim duplicate rationale — schema + handler block comments repeat the same “why
yours” story; keep the high-signal one on the schema. - Test hygiene —
expect(read).toBeDefined()before scraping; fix the Bob/Alice mismatch in the test comment. - Doc drift —
project-read.tsheader still implies coordinator and app reads share the same output shape; worth a one-line note that the coordinator tool extends the view.
Verdict
No major architectural concerns. Directory layout stays fine (project-coordinator.ts is already the hub; this doesn’t worsen cross-package imports). I’m not requesting changes before merge—the items above are polish and coverage gaps I’d treat as follow-ups unless you want FIX-2005 fully pinned in this PR.
Sent by Cursor Automation: Review For Best Approach
There was a problem hiding this comment.
Code Snob. A smaller shape exists. Draft POC, does not merge: #3453 (poc/shorter-read-yours @ 29c892ebe).
Fold 29c892ebe onto 49c66ba47. Close the POC unmerged after this PR lands. Do not reset this branch onto the POC.
readLinkedProjectOutputSchema has one caller, and its comment repeats the handler. The test title already says the model sees owners as user ids. Inline the extend on outputSchema and keep the mark on the handler comment. Drop the test comment under the read; it retells the incident, and the title is the intent. In projects.md, the tool reads the linked project and marks each workstream yours: true when the user owns it.
Net −9 (6 insertions, 15 deletions). Same map: workstream.owner === user. Same expect: { checkout: true, billing: false }.
project-coordinator.test.ts 30 passed on 29c892ebe. Inverting the comparison received { checkout: false, billing: true }.
Left as recorded: WORKER.md (the prompt the 19/19 runs used, including the list sentence and the edit-section hand-off), the README section sentence and the catalog row, the changeset, and the harness test. A shared mark helper is more lines in front of the same map. The section and the catalog row are the two readers of the field.
Agent on this PR: fold that subtraction, then close the POC unmerged.
Sent by Cursor Automation: Code Snob
…iew nits (FIX-2005) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGrSpvKPW4xoKddwpB3doh
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 314206f9-74d1-48b1-a485-34b47c1fd80c) |
… line (FIX-2005) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGrSpvKPW4xoKddwpB3doh
|
Code Snob fold, partly taken in 7631248:
I'm closing #3453 without merging it. Generated by Claude Code |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 9f66108c-d472-4a17-a818-30ef49a481c4) |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |


Requested by Jake · project thread
Before: a user who asks their project coordinator to hand more work to one of their own workstreams sometimes gets a reply and nothing else. In the FIX-1797 closure goal, b3 failed 7 of 20 runs on main
e2ee2c18.After: the ask reaches that workstream. b3 passed 19 of 19 runs with this change, and every one of the 38 hand-offs was a single
dispatchTaskcall withpost: true.The coordinator never refused a dispatch. It just didn't make one. Each failing turn began by reading the project, because the ask named a workstream. The read lists owners as bare user ids, so the coordinator couldn't tell its user's workstream from another member's. From there it went one of five ways: it called the workstream someone else's, said "routed" without routing, added the ask to the objectives, asked what the ask meant, or gave up after a
dispatchTaskthat sentgoal/titlewas refused.How
readProject, the project coordinator's tool (projectCoordinatorTools), marks each workstreamyours: true/falsefor the session's user. There's a unit test.WORKER.mdnow puts the hand-off rule first. A named workstream's ask goes on withdispatchTaskin the same turn, however short it is, and the project isn't read first. Only a dispatch that answered ok counts as a hand-off. A refused call is fixed and sent again. An ask to handle work is never folded into the objectives. ThereadProjectrule is narrowed to questions.yoursfield.Evidence (
/mnt/project-files/FIX-2005/measurements.md, with logs)goals/projects/a-shared-project-has-one-owner-per-workstreampasses legs a to c. Its status question still goes toreadProject.pnpm --filter @flow-state-dev/workforce test(1342) and@flow-state-dev/shift-manager testpass.Not in this PR: on both main and this branch, b2 still fails about 1 run in 10. In those runs the lead-fit judge refuses
general-leadfor the goal's unspecified ask, which is FIX-1987's class.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGrSpvKPW4xoKddwpB3doh
Generated by Claude Code
Note
Medium Risk
Changes coordinator tool output and agent instructions that drive dispatch to workstream leads; behavior is covered by new tests but affects production routing for named workstream asks.
Overview
Fixes project coordinators failing to hand work to a user's own workstream when the ask names that workstream (FIX-2005). Owner ids alone did not let the model distinguish the session user's streams from teammates'.
readProject(projectCoordinatorTools) now addsyours: true/falseon each workstream by comparingownerto the session user. Tool description and output schema are updated; a unit test asserts checkout vs billing marks.DevTeam project coordinator
WORKER.mdis restructured: hand-off viadispatchTask(post: true, no extragoal/title) comes first, including same-turn dispatch when the user names a workstream (match delegatetargetfirst;readProjectonly to resolve a title). Status questions stay onreadProject, which documentsyours. Work asks must not become objectives or clarifying questions without dispatch.Docs (
projects.md, workforce README) and a patch changeset describe the new field.Reviewed by Cursor Bugbot for commit 7631248. Configure here.
Resolve the title-to-target gap before merging so named asks reach the right workstream.
Summary
Adds
yoursto the coordinator'sreadProjectoutput and strengthens the rules for handing asks to workstream leads.Reviews (1) · Last reviewed commit: "fix(workforce): a project coordinator ha..." · Reviewed by Greptile