Ship a built-in generic review persona and a launch focus note - #923
Merged
selfcontained merged 1 commit intoAug 10, 2026
Merged
Conversation
Persona review previously required repo setup: a repo with no
.dispatch/personas/ directory got a disabled Review button and
dispatch_launch_persona had nothing to resolve.
Dispatch now ships one persona of its own — "General Code Review"
(slug code-review), a repo-agnostic generalist. It is appended to
every listing after the repo's own personas, so it works with zero
config and stays pickable next to configured personas as the "just
review this generally" option. A .dispatch/personas/code-review.md
file replaces it, keeping the slug agents and the UI already know.
The Launch Review dialog also takes an optional free-text focus note
("focus on the auth changes"), which rides through to the briefing
each selected reviewer receives. The note lands inside a single-line
prompt typed into the parent's tmux session, so it is collapsed to
one line, stripped of quote characters and DISPATCH markers, and
capped at 2000 characters on both sides of the wire.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
selfcontained
deleted the
agt_2906f4b405be/build-generic-default-review-persona
branch
August 10, 2026 14:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Persona review required repo setup before it did anything. A repo with no
.dispatch/personas/directory got a disabled Review button ("No persona files in this workspace"), anddispatch_launch_personahad no slug to resolve. There was also no way for the author to say what they wanted looked at when launching a review — the parent agent wrote the entire briefing from its own read of the work.What changed
1. A built-in generic reviewer. Dispatch now ships one persona of its own: General Code Review (slug
code-review), a repo-agnostic generalist covering correctness, fit with local patterns, clarity, change safety, and tests.It is appended to every listing after the repo's own personas, so it does two things at once:
A
.dispatch/personas/code-review.mdfile replaces it entirely, which is how a project specializes the generic reviewer without changing the slug agents and the UI already know. Precedence is worktree → repo → built-in.2. An optional focus note on launch. The Launch Review dialog takes free text ("focus on the auth changes in session.ts"), which Dispatch folds into the context briefing every selected reviewer receives.
The note applies to all selected personas rather than only the generic one — a field that appears and disappears based on selection would be odd UX, and it is the same plumbing either way.
Security
The note is author-typed free text that ends up inside a double-quoted span of a single-line prompt typed into the parent's tmux session. A newline would submit the prompt early and a bare quote would let the note read as instructions to the parent, so
sanitizeLaunchReviewNotecollapses whitespace to one line, folds quote characters to', escapes--- DISPATCH:markers, and caps at 2000 characters. The route rejects non-strings and over-length notes before that; the textarea caps at the same length.Files
apps/server/src/personas/built-in.tsapps/server/src/personas/loader.tsloadPersonasFromRootsappends built-ins (HTTP list path)apps/server/src/shared/mcp/persona-interaction-tools.tsresolvePersonaListappends built-in summaries;list_personas/dispatch_launch_personadescriptions mention the built-inapps/server/src/server/mcp-review-handlers.tslaunchPersonafalls back to the built-in after both root lookups missapps/server/src/reviews/injection-prompts.tssanitizeLaunchReviewNote+ note sentence inbuildLaunchReviewPromptapps/server/src/routes/personas.tsnotevalidation and pass-throughapps/web/src/components/app/persona-launcher.tsxapps/web/src/components/app/docs-sections/personas.tsxBodies are never exposed through list endpoints —
BUILT_IN_PERSONA_SUMMARIESis a separate{slug, name, description}projection, asserted by a test.Verification
pnpm run check— cleanpnpm run test— 3336 unit tests pass. Two existing files (persona-list-merge,persona-interaction-tools) asserted exact listing output and needed updating for the appended built-in; new coverage added for override precedence, the summary projection, note sanitization (including a hostile note with newlines and a forged DISPATCH marker), and route validation.pnpm run test:e2e— 178 passpnpm run finalize:web— buildsLive Playwright validation: on a demo agent whose cwd is not a real repo, the Review button is now enabled and the dialog offers the built-in as its only persona. Filling the note and launching sent
{"personas":["code-review"],"agentType":"claude","model":null,"note":"focus on the auth changes in session.ts — I'm unsure about the token refresh path"}. The API also returns the built-in appended last in this repo (7 entries) and alone in a bare git repo.🤖 Generated with Claude Code