Skip to content

Tell the buddy persona which mode it is in - #198

Merged
LinseCed merged 3 commits into
devfrom
feature/193-buddy-mode-persona
Sep 21, 2026
Merged

LinseCed merged 3 commits into
devfrom
feature/193-buddy-mode-persona

Conversation

@LinseCed

Copy link
Copy Markdown
Collaborator

Related issue

#193

Short summary

The backend sends capabilities_enabled and team_mode on every buddy agent hop and this service read neither. With capabilities off the persona still described a mentor who can act, so the refusal that followed read as a bug; with team mode it greeted a project's manager as a new hire. Both flags now reach build_persona, which assembles a different persona for each.

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

  • BuddyAgentRequest gains capabilities_enabled: bool = True and team_mode: bool = False, both documented in the OpenAPI description because the backend is the reader.
  • Threaded through the route and run_agent_turn into build_persona, and read on every hop. _ensure_persona replaces the system message a resume carries and keeps only its summary, so a hop that lost a flag would rebuild the default persona mid-turn. test_a_resume_that_lost_team_mode_is_the_default_mentor_again pins that.
  • Capabilities off: says it has search_docs and nothing else, answers from the project's material, and offers nothing — no escalation, no claim, no assessment. Grounding and the test/fixture caveat stay: they are safety rules, not capabilities.
  • Team mode is its own persona:
    • the reader is the manager of one project, never greeted as a hire and never told what they should work on;
    • situations are stated as facts about the situation — work waiting on a review is the reviewer's move — never as a judgment of the person, and the team is never ranked;
    • open_area is explained only when mounted, including that an area's tools arrive on the next step;
    • a standing rule that a change is only ever offered for the manager to confirm elsewhere.

Decisions worth arguing with

The proposal rule is about the model, not about a named tool. Which actions are mounted changes hop by hop as areas open, so a clause gated on them would be missing on the hop before the first open_area — the hop where a model is most likely to announce it has done something. Worded as a rule it stays true when nothing is mounted and still names no tool that is not there.

Hire clauses are dropped by mode, not only by mounting. Their tools are never mounted in team mode today, so gating alone would be enough today. It stops being enough the moment the backend mounts one of them, and "let's settle where you're starting from" in front of somebody's manager is not a failure worth leaving available.

No escalation offer in team mode. flag_to_pm raises a question to a manager, and the reader here is one.

search_docs stays in both modes. Neither mode is about what the reader may read.

Not in this PR

🤖 Generated with Claude Code

LinseCed and others added 2 commits September 18, 2026 16:31
The backend sends `capabilities_enabled` and `team_mode` on every agent hop
and the service read neither, so a hire who turned capabilities off met a
mentor still offering to act, and a manager met the new-hire mentor.

Both flags now reach `build_persona`. Capabilities off states that it is
answering from the project's material and offers nothing it cannot do. Team
mode is its own persona: the reader is a project's manager, situations are
facts rather than judgments of the person, areas open before their tools
exist, and a change is only ever offered for the manager to confirm. The
hire's arrival, claim and assessment clauses are dropped by mode as well as
by mounting, so a future backend cannot put them in front of a manager.

Read on every hop rather than only the first: the persona is rebuilt each
time, so a resume that lost a flag would finish the turn in the other mode.

Closes #193

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>
…ting

Greet a manager in team mode instead of a new hire
@LinseCed
LinseCed merged commit 57883f0 into dev Sep 21, 2026
4 checks passed
@LinseCed
LinseCed deleted the feature/193-buddy-mode-persona 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