feat(v5): declared agent routing on the board (wish: cross-agent-delegate) - #2766
Conversation
…ssign/clear state API A1 of cross-agent-delegate W1: additive nullable TEXT columns with EXPECTED_SCHEMA/schemaIsCurrent lockstep and additive backfill (no user_version bump); ROSTER typed constant (claude|codex|pi|hermes|prime) with named rejection errors; declaration-only assignTask/clearTaskAssignment appending assign/clear timeline events.
A2 of cross-agent-delegate W1: CLI verbs over the A1 state API (single timeline event per op — no double-append), pair invariant + roster rejections with exit 1 and named errors, declaration-only at any card status, status renders the assignment, CLAUDE.md Task subcommands table documents the verb/flags and the lane-path-only serialization consequence.
…eeze preserved B of cross-agent-delegate W1: lane-path serializer gains the two declared-routing fields (14-key explicit projection alongside lane/enforcedBlock); laneless --json and mcp genieTask strip them via explicit key-picking projections, keeping the byte-frozen shapes identical to pre-change output; leak lists extended and a byte-identical laneless fixture regression added.
C of cross-agent-delegate W1: insertSnapshotRows carries assigned_agent/assigned_reason (?? null backfill for older snapshots; insertTaskRows extraction keeps cognitive complexity within budget); exportState verified column-blind (no change); roadmap-sync.ts verified hash-based — first sync after upgrade exports (never diverged), second is none. Round-trip + older-snapshot + sync-baseline tests added.
…oups + quality pass
Fresh reviewer re-derived all evidence at ca39117: six success criteria PASS, full gate matches the declared pre-existing failure set exactly, scope confined to wish files + two authorized deviations. MEDIUM doc-contract finding carried into delegate-bridge (W2) as a named prerequisite; two LOW + one INFO recorded.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e51d8fe1eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| assignedAgent: row.assigned_agent, | ||
| assignedReason: row.assigned_reason, |
There was a problem hiding this comment.
Keep assignment fields out of task list JSON
When callers run genie task list --json, handleList directly serializes the TaskRow[] returned by listTasks (src/term-commands/v5-task.ts:274-276), so adding these properties in mapTask exposes assignedAgent and assignedReason on this non-lane JSON surface—even as null on unassigned tasks. This contradicts the declared lane-path-only serialization contract and changes the existing machine-readable payload; project the pre-assignment fields before stringifying this path, as the board and MCP serializers now do.
Useful? React with 👍 / 👎.
Codex PR review (P2, verified): handleList serialized raw TaskRow[], leaking assignedAgent/assignedReason onto a non-lane machine-readable surface — the wish contract is lane-path board --json only. Hoist the frozen projection into task-state.ts next to TaskRow (canonical copy, was local to mcp-tools) and ship task list --json through it; leak regression proven red on the unfixed code.
Summary
Wave 1 of the cross-agent-delegation design: board cards declare which roster agent (
claude|codex|pi|hermes|prime) works a task and why, with NULL meaning the current orchestrating agent. Declaration-only routing substrate the W2delegate-bridgewish consumes.tasks.assigned_agent/assigned_reasoncolumns (nouser_versionbump),EXPECTED_SCHEMA/schemaIsCurrentlockstep, additive backfill on openROSTERallowlist constant + typed rejection errors at every write path;--agentrequires--whytask create --agent/--why, newtask assign <id> [--clear]with in-transaction timeline notes,task statusdisplay, CLAUDE.md docsboard --jsongainsassignedAgent/assignedReason; laneless andgenie_taskMCP shapes stay byte-frozen viaOmit<>-typed projections + byte-identical fixture regressionstask export→import→ three-waytask sync; older keyless snapshots import with null backfillWish:
.genie/wishes/cross-agent-delegate/WISH.md(plan review SHIP → per-group execution reviews SHIP ×5 → independent pre-merge review SHIP, all appended in-document).Validation
bun run check: 3192 pass / 14 fail — all 14 attributed by name to the pre-existing environment set (proven at base by detached-baseline re-run), zero wish-relatedbun run wishes:lintOK (76 files); real-CLI transcripts for create/assign/clear/rejections/board shapes/sync round-trip (reviewer-run)Reviewer notes
task export --writeafter upgrade adds two null keys per card in.genie/roadmap.json(export is column-blind by design)delegate-bridgeW2 as a named prerequisite): imported snapshots store assignment raw — declaration-only per design Decision 2; W2 must validate viarequireRosterAgentat consumption before any shell/prompt use