Tell the buddy persona which mode it is in - #198
Merged
Merged
Conversation
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>
5 tasks done
Afif-del
approved these changes
Sep 19, 2026
…ting Greet a manager in team mode instead of a new hire
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 free
to 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.
Related issue
#193
Short summary
The backend sends
capabilities_enabledandteam_modeon 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 reachbuild_persona, which assembles a different persona for each.Checks
uv run ruff check .cleanuv run ruff format --check .cleanuv run pyright src/— 0 errorsuv run pytest— 903 passed, 8 skippedsprintstart-backend#230–#233) with a real manager accountAdditional notes
What changes
BuddyAgentRequestgainscapabilities_enabled: bool = Trueandteam_mode: bool = False, both documented in the OpenAPI description because the backend is the reader.run_agent_turnintobuild_persona, and read on every hop._ensure_personareplaces 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_againpins that.search_docsand 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.open_areais explained only when mounted, including that an area's tools arrive on the next step;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_pmraises a question to a manager, and the reader here is one.search_docsstays in both modes. Neither mode is about what the reader may read.Not in this PR
🤖 Generated with Claude Code