Skip to content

fix(j5): personas stop owing a handoff file - #914

Merged
bryantderosier merged 3 commits into
j5/mainfrom
j5/776-personas-no-handoff
Nov 6, 2026
Merged

bryantderosier merged 3 commits into
j5/mainfrom
j5/776-personas-no-handoff

Conversation

@bryantderosier

Copy link
Copy Markdown
Collaborator

Summary

Every persona run was told to write a handoff file, and at least five of the 11 team personas also say "don't create a file", so runs got contradictory instructions and an extra reminder turn when the file never showed up. Personas shouldn't own deliverables: the brief or Playbook step says what to produce, the persona says how to work. Closes #776.

- persona run  -> artifact section in instructions -> observer checks file -> reminder turn -> "pending"/"missing" chip
+ persona run  -> instructions + platform note only
- Crew seat    -> <seat_obligation> in first turn; finish notice carries handoff lines + digest
+ Crew seat    -> no file owed; finish notice carries how the run ended + the seat's <seat_reply>
  • New runs: no artifact instructions, no observer, no reminder turn, no <seat_obligation> on Crew seats. The queue was in memory, so anything queued at the upgrade just goes away; a reminder that was already sent stays as a normal message.
  • Finish notice: how the run ended and the seat's reply (its last finished message of that run, cut at 4,000 characters with a line saying so). The client parser drops the handoff parsing, so old notices render as a plain "finished".
  • Old threads keep what they recorded. The table, getAgentHandoffs RPC and chips stay, read-only. I deleted the delete-reconcile step (nothing recomputes the state) and the refresh subscription, so chips fetch once.
  • Old YAML with outputArtifact, inputArtifacts or artifacts still loads. The three fields stay in the server schema, because definitionDigest hashes the decoded definition and readSnapshot rejects a snapshot whose digest differs. I checked a pinned digest on old and new code and it matches.
  • outputArtifact is gone from the catalog entry, j5_list_personas and the client persona model. A file a brief or Playbook step asks for still goes through j5_write_artifact and the Artifacts page, untouched.
  • Docs rewritten in personas.md, artifacts.md, the persona contract, crews.md, agent-tools.md, the glossary, the runbook and FORK.md.

Out of scope, per the issue: the YAML shape (#777–#779) and the team definition wording (#780).

Evidence

  • Typecheck is clean in contracts, client-runtime, server, web and mobile.
    vp run check:changed → format, lint, graphql and typecheck pass; tests: 20 files, 303 passed.
  • Notifier: the seat's reply is the last finished assistant message of that run (not another run's, a blank one or a streaming one), including when the draft and final share a timestamp; the notice has no handoff lines; a second run posts its own reply; a long reply is cut without splitting an emoji.
    cd apps/server && vp test run src/j5/a2a/CrewSeatFinishNotifier.test.ts → 8 passed
  • Old YAML with all three fields loads, and its snapshot reads back under the digest it had before this change (b997f65b…, computed on j5/main and on this branch).
    cd apps/server && vp test run src/j5/agents/agentPersonaLibrary.test.ts → 54 passed
  • A persona thread with an id (the case that used to get the section) gets no artifact text, and an old stored written/pending/missing handoff still presents.
    vp test run src/j5/agents/agentPersonaLibrary.test.ts (apps/server), vp test run src/j5/agentPersonas.test.ts (packages/client-runtime)
  • Two reviewers (Opus 5.5 and Sol, both high) went over the diff. I fixed what was real (reply picked by turn-item order, doc passages that still promised a file, the emoji cut, old chip text) and left the rest, either accepted (listed under Merge Danger) or rejected with a reason.

Not verified: no live run with real agents, no browser or mobile pass, and no paid evals (the persona instructions, the Crew first turn and the finish notice all changed text). knip fails in my sandbox: it can't load apps/mobile/metro.config.js (SPDX download got HTTP 403) and flags PASTED_TEXT_ATTACHMENT_THRESHOLD_BYTES in textPaste.ts, which this PR doesn't touch. I haven't checked what an older client that still subscribes to the removed refresh RPC does (just that request failing vs the connection).

Merge Danger

Door: two-way. A revert restores the code. I don't write or migrate any data, and the table stays.

Blast Radius: persona runs, Crew seat first turns, the Captain's finish notices and the persona chip on old threads.

  • An older client that still subscribes to subscribeAgentHandoffRefreshes fails that request until it updates or reloads.
  • A deleted artifact no longer flips an old "written" chip to "missing", so the chip can point at a file that's gone.
  • First boot after the upgrade can send one extra finish notice for a seat whose latest finish was folded into an earlier notice before.

After merge: nothing.

Upstream impact

J5 lines removed from apps/server/src/server.ts (the observer wrapper now wraps only the artifact observer), apps/server/src/ws.ts (the refreshes plumbing) and packages/client-runtime/src/rpc/client.ts (the subscription tag). I updated the matching FORK.md cases. Nothing here changes what upstream's product does.

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 (no UI change; chips only stop appearing for new runs)
  • Live testing: the section above says what ran live and what did not (nothing ran live; see Not verified)
  • 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 (none needed)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md)
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Claude Sonnet 5.5 via Claude Code (J5 Code).

🤖 Generated with Claude Code

bryantderosier and others added 2 commits November 2, 2026 20:57
A persona run no longer gets artifact instructions, an end-of-run file
check or a reminder turn, and a Crew seat's first turn no longer names a
file it owes. The Captain's finish notice reports how the run ended and
carries the seat's reply instead of handoff lines.

Old definitions with artifact fields still load (the fields stay in the
server schema so snapshot digests keep matching), and old threads keep
the handoff status they recorded, read-only.

Closes #776

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Pick a seat's reply by turn-item order so providers that finalize
messages with the same timestamp still report the last one, and never
cut the reply in the middle of a surrogate pair. Reword the old-handoff
chip text and comments that still described the reminder and refresh
signal, and drop the remaining doc passages (Crews, persona contract,
runbook) that promised a declared output file.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@bryantderosier bryantderosier self-assigned this Nov 3, 2026
@vercel

vercel Bot commented Nov 3, 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:20pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 3, 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 vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). labels Nov 3, 2026

@BastiHu BastiHu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as layer 1 of stack pingdotgg#921, which merges as one. Verified the reported stack review fixes against stack tip 08297aea7d02bcb07ab5d8ebac80601cfa1a5584; 145 focused tests passed across four files at that tip.

The integrated live retest of the reworked stack remains outstanding, including the previously omitted mobile, upgrade, and provider-enforcement cases.

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as part of the persona stack (#914 → #920 → #922 → #923), which merges as one, at this layer's head 72fb125c17 (stack tip d11efb049e).

  • Panel review: Claude Opus 5.5 and GPT-6.1-Sol. All findings are fixed and cross-checked.
  • Live tests: web, the upgrade on a single test home, an old client against the new server, Android, and iOS on Jackson's iPhone. The results and screenshots are on #923.
  • Jackson: approved the docs and the UI.
  • Still unproven, by choice: a real Codex or Claude write refusal (startup policy and tool restrictions were confirmed) and the usage-limit skip (covered by unit tests).
  • Not this stack: follow-ups found on the base commit are #929 and #930.

Approved by Claude Opus 5.5 for Jackson.

@bryantderosier
bryantderosier merged commit be11251 into j5/main Nov 6, 2026
35 checks passed
@bryantderosier
bryantderosier deleted the j5/776-personas-no-handoff branch November 6, 2026 12:25

This branch was successfully deployed

1 active deployment
Preview — 72fb125c 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:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personas: runs stop owing a handoff file

3 participants