Skip to content

Greet a manager in team mode instead of a new hire - #199

Merged
LinseCed merged 1 commit into
feature/193-buddy-mode-personafrom
feature/194-team-greeting
Sep 21, 2026
Merged

LinseCed merged 1 commit into
feature/193-buddy-mode-personafrom
feature/194-team-greeting

Conversation

@LinseCed

Copy link
Copy Markdown
Collaborator

Related issue

#194. Stacked on #198: the base is feature/193-buddy-mode-persona, so this diff is only the greeting. Retarget to dev once #198 is merged.

Short summary

The open endpoint knew one reader. A manager opening the buddy in team mode was welcomed back to their own onboarding and told their team's stalls as though they were theirs, because STATE is the team's attention list while the prompt describes it as the reader's own work in flight. team_mode on the open request picks a team system prompt and a team fallback greeting.

Checks

  • uv run ruff check . clean
  • uv run ruff format --check . clean
  • uv run pyright src/ — 0 errors
  • uv run pytest — 903 passed, 8 skipped
  • Verified against the running backend (sprintstart-backend#230–#233) with a real manager account

Additional notes

What changes

  • BuddyOpenRequest gains team_mode: bool = False, documented in the OpenAPI description, and state's description now says what it holds in team mode.
  • stream_session(..., team_mode=False) picks the system prompt and the fallback; nothing else in it branches.
  • _TEAM_STREAM_SYSTEM: the reader manages one project and is not being onboarded; STATE is the team's attention list and is about other people; greet briefly and say the one thing most worth their attention, grounded only in STATE and MEMORY; a person's situation is a fact about that situation, never a judgment of them; the suggested step is a question a manager would ask about their team, never about their own work.
  • _TEAM_FALLBACK_GREETING replaces the hire's welcome when the model is unavailable or writes nothing.

Decisions worth arguing with

The two-part marker format is identical, deliberately. The marker, the held-back partial-marker suffix and the done payload are subtle enough once. A team greeting with its own shape would be a second parser to keep in step with this one, so team mode swaps only the prompt and the fallback, and the tests assert the split-marker and done-equals-tokens behaviour again in team mode.

The fallback is per mode because it is the one greeting guaranteed to be read whole. When the model is down there is nothing else on the page, which is the worst place for "welcome back to your onboarding" to be the only sentence a manager sees.

The hire prompt is untouched. Byte-for-byte, with a test that the default path still says "greeting a new hire" and never mentions a manager.

Live behaviour

Opening team mode against the backend, before and after:

  • before — "Hi Hana, welcome aboard! I'm your onboarding mentor… I see you've got a pull request that's been sitting idle for 44 days" (addressing the manager by the name of the first person on the attention list)
  • after — "Hey there — good to see you. First off, keep an eye on Hana Newjoin: a pull request has been waiting over six weeks for a response, and that's where attention is most overdue.", suggested step "Who's blocked right now?"

🤖 Generated with Claude Code

The open endpoint knew one reader. A manager opening team mode was welcomed
back to their own onboarding and told their team's stalls as if they were
theirs, because STATE is the team's attention list and the prompt describes
it as the reader's own work in flight.

`team_mode` on the open request picks a team system prompt and a team
fallback greeting. It says who is reading, that STATE is about other people,
that a situation is a fact rather than a judgment of the person, and that the
suggested step is a question a manager would ask about their team.

The two-part marker format is deliberately identical, so the marker, the
held-back suffix and the done payload stay one code path: a second format
here would be a second parser to keep in step with this one. The hire prompt
and its fallback are unchanged.

Closes #194

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@LinseCed
LinseCed merged commit 1aa8e69 into feature/193-buddy-mode-persona Sep 21, 2026
@LinseCed
LinseCed deleted the feature/194-team-greeting branch September 21, 2026 12:10
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.

2 participants