Skip to content

feat(j5): one adjudication request in the Inbox and the Captain's chat - #760

Merged
bryantderosier merged 16 commits into
j5/746-two-ways-to-get-helpfrom
j5/747-adjudication-request
Nov 3, 2026
Merged

bryantderosier merged 16 commits into
j5/746-two-ways-to-get-helpfrom
j5/747-adjudication-request

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When a Crew hits a decision only I can make, nothing tells me where to look. A Captain that uses its native question tool leaves the question in its own thread, and one that asks through j5_send_message leaves a bare tool-call row I can't answer from. This makes the Captain ask with j5_send_message, so the request reaches my Inbox, and pins that same request above the Captain's composer where I can answer it. Answering in either place closes the one exchange. Closes #747.

This is stacked on #758, so the base is j5/746-two-ways-to-get-help. The mockup I approved is artifacts/design/ui/08-adjudication-request.html (in the J5 artifacts store, linked on the issue).

  • Guidance: the Captain's standing instructions and its Captain notice now say to settle technical disagreements within scope itself, ask me only when product intent or my judgment is needed, ask with j5_send_message and expect_reply instead of the native question tool, state the disagreement, the options and its recommendation, and keep working on what doesn't depend on my answer. The Captain notice's old "ask the user through the inbox" line now names the tool. Members' text is untouched, so they still go through their Captain.
  • The card: AdjudicationDock is pinned above the Captain's composer, in the same slot as the Crew roster gate. It shows the urgency, a three-line excerpt of the ask with "Show full question", and a reply box with an Answer button. With two open asks it shows the oldest in full and a "1 more question" row. It only appears for a thread that commands a live Crew, so asks from other agents keep today's behavior.
  • No server change: the existing inbox list already carries each open ask with its exchange id, body and sender thread, and the existing answer command keys on the exchange id alone. The card filters the list by its own thread and refreshes on the existing inbox feed, so another device updates. One test proves a Captain's ask is answered once from either view, its reply is delivered once, a second answer is refused, and a withdrawn ask leaves both lists.
  • A second answer: the server's refusal for a one-person ask is the agent-facing "Exchange X is not open", not the person-facing "already answered" the issue names, which only exists for asks to everyone. I left the server alone and the card shows "Already answered". A withdrawn ask that I was mid-reply on gets the same wording, because it's the same refusal.
  • Withdrawn: the card and the Inbox item go away. I dropped the muted "withdrawn" suffix on the timeline row from the mockup, because that row is upstream's generic tool-call row and changing it is upstream's product.

Docs: the definition line in inbox.md, the adjudication prose in crews.md, and docs/j5/user/personas.md line 66.

Evidence

At 45bb9703ac, on top of #758, after the stack was rebased onto j5/main. vp run -r typecheck (the CI command) exits 0 here, server src/j5/a2a src/j5/agents src/mcp passes (1292 tests), provider-core passes (205) and web src/j5/a2a passes (100):

  • 29 server tests passed across HumanInboxService, crewGateNotice, spawnIds and EnvelopeFormatter, and 18 provider-core tests for the instruction pins:
    cd apps/server && vp test run src/j5/a2a/HumanInboxService.test.ts src/j5/a2a/crewGateNotice.test.ts
  • 6 logic tests for the dock cover filtering by thread and oldest first, retention after a refusal, the two-asks pick, the excerpt rule, the refusal mapping and the Captain-only gate:
    cd apps/web && vp test run src/j5/a2a/adjudicationDock.logic.test.ts
  • Lint with --report-unused-disable-directives and vp fmt --check exit 0 on every file I touched.

Not verified: no component test for the dock beyond its logic; withdrawing an ask live, a refused second answer live, and answering from the Inbox instead of the card (the first two are unit-tested). I didn't run repo-wide checks.

Merge Danger

Door: two-way. No migration and no stored data. A revert restores the old guidance and removes the card.

Blast Radius: every Captain's standing instructions, and the thread view of every thread that commands a Crew. A Captain will now ask me through the Inbox instead of its native question tool.

Things worth knowing:

  • The card depends on the sidebar's Crew-membership read having answered for the active thread. Until it has, a Captain's ask is Inbox-only.
  • After a refused answer the card stays, with my words and "Already answered", until I clear the text. Otherwise the refresh would remove it before I could see why.
  • On the first live try, "put a decision to me" made the Captain answer inline. "Ask me to choose, and keep going while you wait" produced the Inbox ask.

After merge: nothing.

UI changes

The pinned card is new, so there's no before.

Before After
A Captain's open question to me, pinned above its composer: urgency, a three-line excerpt, Show full question, a reply box and Answer new A Captain's open question to me, pinned above its composer: urgency, a three-line excerpt, Show full question, a reply box and Answer, after

Live testing

Ran on the whole stack at da64b2795c, before the last rebase onto j5/main, in an isolated test home from j5-live-test. Claude Haiku 5.5 for the Captain and members.

  • A Captain asked me with j5_send_message and the card appeared above its composer with the urgency badge, the excerpt, "Show full question", a reply box and Answer. The Inbox bell showed 1.
  • I answered from the card. It cleared, my reply showed as "You · via Inbox", and the Captain acted on it. The ledger shows one delivery of my reply with one attempt, and the exchange is closed.

Not exercised live: withdrawing an ask, a refused second answer, answering from the Inbox, two open asks, and a non-Captain's ask staying Inbox-only. Tests cover them. No mobile.

Upstream impact

apps/web/src/components/ChatView.tsx gets one import and one element, in the existing J5 fragment beside CrewRosterGate, and FORK.md records it in the case that covers CrewRosterGate, with the file-table row updated. It uses the same banner mechanism as the roster gate, so it doesn't change what the composer does. Everything else is under J5-owned paths.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction — new state, so no before; no motion
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md — no upstream behavior changes
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md) — web only (no mobile Crew surface); the Inbox and the card ran live on Claude; withdrawal and the refused second answer are covered by tests
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Claude Sonnet 5.5 through the Claude Code harness in J5 Code.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 3, 2026 12:50am UTC

Request Review

@bryantderosier
bryantderosier added this pull request to stack #753 October 28, 2026 02:19
bryantderosier added a commit that referenced this pull request Oct 28, 2026
@bryantderosier
bryantderosier marked this pull request as ready for review October 28, 2026 02:24
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@github-actions github-actions Bot added size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 28, 2026
@Jacksondr5

Copy link
Copy Markdown
Owner

Panel review: #760

Live (Astra, stack tip): the dock appeared above the Captain's composer, and answering from the Inbox cleared both the dock and the exchange. The Captain received exactly one reply (dock, Inbox answer). Two simultaneous asks couldn't be produced, because the existing one-open-exchange rule blocks the second.

Process: FORK.md. The only record of the ChatView.tsx AdjudicationDock edit is a row at FORK.md:292, inside the unrelated "PR #75–#86: Role library" table. There's no case text, and the file-table row for ChatView.tsx (:825) wasn't updated. Add a sentence to the case that already covers CrewRosterGate in that fragment (around :249), and add that case number to the ChatView.tsx row.

Nit: the Inbox's answer controls use the Operate-scope permissionAtom, but the server requires Owner. A non-owner with Operate sees enabled buttons and gets refused. archiveCrew already has the same pattern (clientActionRpc.ts:140), and so does #762, so this is one shared follow-up.


Review panel for the #750–#762 stack, judged as the code that lands at da64b2795c: Claude Opus 5.5 (lead and three code reviewers), GPT-6.1-Sol (process, docs, CI) and GPT-6-Astra (live test on an isolated server, Haiku 5.5 and GPT-6 Luna turns). Every finding here was agreed by the whole panel. Product questions are with Jackson and are not listed. Posted by Claude Opus 5.5 via J5 Code.

@bryantderosier

Copy link
Copy Markdown
Collaborator Author

Thanks. Where each one landed:

  • FORK.md: added the AdjudicationDock to the case that covers CrewRosterGate in the same fragment, added that case to the ChatView.tsx row in the file table, and removed the misplaced row from the Role library table (667e5f99ca).
  • Operate scope vs Owner: leaving it. It's the same pattern as archiveCrew and the cleanup item in feat(j5): one Inbox approval for worktrees with unfinished work #762, so I'd rather fix them together as one follow-up.

bryantderosier and others added 7 commits October 29, 2026 08:18
…rawn from both

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the Inbox and its thread

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ptions and a recommendation

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd answerable there

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… and user docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
bryantderosier and others added 4 commits November 2, 2026 09:29
…n layer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n layer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing exported

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@bryantderosier
bryantderosier merged commit d46467b into j5/main Nov 3, 2026
35 checks passed
@bryantderosier
bryantderosier deleted the j5/747-adjudication-request branch November 3, 2026 01:30

This branch was successfully deployed

1 active deployment
Preview — 7b020958 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crews: one adjudication request in the Inbox and the Captain's chat

2 participants