Skip to content

fix(hire): a persona hire carries its own card sentence; identity never invents one (#1649) - #1653

Merged
lilyshen0722 merged 3 commits into
mainfrom
fix/persona-hire-carries-its-sentence
Sep 11, 2026
Merged

lilyshen0722 merged 3 commits into
mainfrom
fix/persona-hire-carries-its-sentence

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Closes #1649.

What

The hire flow sent displayName and the persona key and no description, and agentIdentityService filled the gap with "<name> agent" — so every persona hired through the normal path landed on Your Team with a placeholder, the exact class #1636/#1638 fixed by hand for the fleet's twelve seats.

  • Persona catalog: each persona carries card, its Your Team sentence in the twelve seats' brief (one sentence, under 100 characters, role first, no quotes, ends with a period):
    • Scout — Your first teammate. Answers how things work here, sets up agents, keeps what you decide.
    • Code Reviewer — Reviews pull requests. Findings first, each anchored to the lines that earned it.
    • Recorder — The room's memory. Keeps decisions, corrections and who asked for what.
    • Planner — Sequences the board. What runs in parallel, what blocks what, who is waiting on whom.
  • Hire flow: the three install sites send description: personaCard.card when a persona is hired.
  • Install route: accepts description (trimmed, whitespace collapsed, capped at 160) and passes it to getOrCreateAgentUser.
  • Identity: the three ${resolvedType} agent fallbacks are gone. A seat with no sentence stores '' and the card shows no line — per UX Lead's ruling on the issue: the persona sentence or an empty slot, never a fallback string.

Seats already carrying the placeholder are not rewritten here; that is the one-shot description script's job (#1636) if wanted.

Proof

  • Backend (Node 22): identity stores a supplied description and stores '' (never / agent$/) without one; the install route passes a trimmed, collapsed description through — agentIdentityService.collisionResolver + registry.install-runtime-type 18/18; lint clean.
  • Frontend: a ?persona=scout hire sends displayName: Scout, config.persona: scout and the Scout sentence as description; every persona's card meets the brief — V2AgentBYOHosted, V2AgentBYOMachine, personaCatalogCard, V2YourTeamSignal 22/22; eslint + tsc clean.
  • The UI smoke's KNOWN #1649 check flips to a live assertion after deploy: a fresh persona hire's card carries a sentence.

Gates: @ux-lead (the four sentences — copy is yours to rule) and @sprint-review.

🤖 Generated with Claude Code

https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5

…er invents one

#1649. The hire flow sent displayName and the persona key and no
description, and agentIdentityService fell back to "<name> agent" — so
every persona hired through the normal path landed on Your Team with a
placeholder, the exact class #1636/#1638 fixed by hand for the fleet.

- personaCatalogData: each persona carries `card`, its Your Team sentence
  in the twelve seats' brief — one sentence, under 100 characters, role
  first, no quotes. Pinned by a test.
- V2AgentBYO: the three install sites send `description: personaCard.card`
  when a persona is hired.
- registry/install: accepts `description` (trimmed, collapsed, capped at
  160) and passes it to getOrCreateAgentUser.
- agentIdentityService: the three `${resolvedType} agent` fallbacks are
  gone; a seat with no sentence stores '' and the card shows no line —
  ux-lead's ruling on the issue: the persona sentence or an empty slot,
  never a fallback string.

Seats already carrying the placeholder are not rewritten here; that is
the description script's job (#1636) if wanted.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

UX-GATE: APPROVED @ 35bd2dc — copy and identity only, v2.css 0 lines, the Your Team card markup unchanged, so no walk. The three ' agent' fallbacks are gone (empty string → the card renders without line 3, per the description-line-or-nothing ruling); an authored officialDescription remains an acceptable source. The four persona sentences are ruled in: Scout 89 chars, Code Reviewer 81, Recorder 71, Planner 85 — each under 100, job first, present tense, no quality adjectives, no model names. Live check after deploy: a fresh persona hire lands on Your Team with the sentence as line 3 and never a placeholder.

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gate at 35bd2dc99e0041e88dd40a55d6346ac7b0a9e8a4: passes, nothing blocking. The code does what the ruling says. Five of the lines I mutated are unpinned, so the next editor can revert any of them and stay green.

Baseline: the two backend suites are 18/18 (run twice, Node 22); V2AgentBYOHosted + personaCatalogCard are 6/6. Each mutation is literal and single-line, checked with git diff --numstat = 1+1-.

Pinned (red):

  • drop the description spread into getOrCreateAgentUser (install.ts) → 1 red
  • drop .trim() → 1 red; drop the whitespace collapse → 1 red
  • restore the ${resolvedType} agent fallback on the create branch (agentIdentityService.ts:405) → 1 red
  • drop the description spread on the hosted hire (V2AgentBYO.tsx:307) → 1 red
  • blank the Code Reviewer card sentence → 1 red

Unpinned (green on mutation):

  • .slice(0, 160): removing the cap leaves 18/18, even though the test is named "trimmed and capped". Adding a 200-char input and asserting a length of 160 pins it.
  • the fallback at :436 and at :472 (the refresh branch): restoring ${resolvedType} agent at either leaves 18/18. The test only reaches the create branch. The branch at :472 is the one that runs when an existing principal is repaired, so it is exactly where a placeholder would come back.
  • the description spread on the wrapper hire (:353) and the webhook hire (:406): dropping either leaves 6/6. A persona hire on those runtimes would land with no line, and no test would notice.

One scope note, not a defect. :472 keeps existingMeta.description ahead of the type default, so seats that already hold Scout agent keep it. You said so in the PR, and ux-lead has asked for the description script to be run on them. The script, not this PR, closes #1649 for live seats.

…apper and webhook hire sites

sprint-review on #1653 named five lines that stayed green under mutation:
the 160 cap (the test never sent a long string), the two other identity
fallbacks (upgrade and repair branches were never reached), and the
wrapper and webhook hire spreads (only the hosted hire was driven).
Each now has a test that reddens when it is reverted.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016DspLEe1mFV94dPGCqA1u5

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

UX-GATE: APPROVED @ e76ec29 — carried from 35bd2dc: the delta is four test files (two backend, two frontend), zero source lines, so the ruled sentences, the fallback removal and the Your Team card stand as gated. Live check after deploy unchanged: a fresh persona hire shows its sentence as line 3, never a placeholder.

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Re-gate at e76ec29a0772e51eff284856da863354cfa618a0: passes, all ten pinned.

Since 35bd2dc9 only test files moved (git diff --stat: 4 files, all under __tests__), so the source is byte-identical to what I and ux-lead gated. Baselines: backend 19/19 (Node 22), frontend 14/14 (V2AgentBYOHosted + V2AgentBYOMachine + personaCatalogCard). Each mutation changes one line (git diff --numstat = 1+1-).

The five that were green at 35bd2dc9 are now red:

  • drop .slice(0, 160) → 1 red
  • restore ${resolvedType} agent at the upgrade branch (agentIdentityService.ts:436) → 1 red; at the repair branch (:472) → 1 red
  • drop the description spread on the wrapper hire (V2AgentBYO.tsx:353) → 1 red; on the webhook hire (:406) → 1 red

The five that were already pinned are still red: the identity spread, trim, whitespace collapse, the create-branch fallback (:405), and the hosted hire (:307).

@lilyshen0722
lilyshen0722 merged commit f09b74d into main Sep 11, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every persona hire lands on Your Team with a placeholder description: "<agent-name> agent"

1 participant