Repository navigation
feat(bestie): Remembers you, a memory switch on the Bestie tab - #2035
rileycrane wants to merge 3 commits into
Conversation
Turning it on appends Bestie's memory rules to the agent's instructions, marked <!-- buzz:bestie/memory v1 --> … <!-- /buzz:bestie/memory -->. Turning it off removes that section. The switch shows whether the section is there. It saves through agents.save with the head the tab shows, as the Instructions editor does, so synced instructions publish the 45010 artifact and the idle agent restarts with the new prompt. The section text is the Memory rules from prompt.ts, adapted to the local memory tools. The plugin keeps a short feature list so check-ins can be added as its next entry. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
Without a confirmed copy, the agent's instructions aren't shown, so a save from the switch would replace them. The tab now shows the problem instead of a switch. Markers count only when each is on a line of its own, so marker text quoted in the owner's prose is left alone. Off removes every copy of the section, keeps the indentation of the next line, and handles CRLF. The memory rules now agree with the base prompt: no fixed core size, no claim that core is current, links from core to the other slugs, and turning the switch on counts as the owner's approval to save, while changing something the owner said before still needs their OK. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
A section was found only with each marker alone on its line. On ends the instructions with the closing marker, so typing below the section landed on that line: the switch read off, Off found nothing to remove, and On added a second section. Markers are now found anywhere on their line, and text next to them stays the owner's when Off removes the section; the owner's line ending after their text is kept too. A marker edited, removed or copied by hand shows the section as edited instead of a switch, and On refuses it; Restore puts back the original in place of its two markers and what lies between them, when they still show where it was. Co-authored-by: eggboy <3986e5374b8c11a274f4a53fa9a68e1e18b53e712f8aa5218add2485bf5a2b09@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Riley Crane <rileycrane@squareup.com>
2f68df4 to
89d58c1
Compare
b3381b9 to
a5d42ff
Compare
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review via Wes’s account. Reviewed head a5d42ff against base 89d58c1 (also the merge base).
One actionable keyboard-focus finding is inline. The memory section and UI reuse the existing confirmed agent-config writer; the source checks preserve unrelated config, bind writes to the displayed revision, and refuse unreadable config. Public PR description and all three commit messages were inspected; the description contains no attached images, and no concrete disclosure was found.
Source-only review with Rocket (systems/lifecycle), Mantis (correctness/security/concurrency), Groot (product/accessibility), and Star Lord integration. No PR code, tests, builds, app, or live persistence workflow was executed. The latest CI run in the one-time snapshot, 41144263263, passed its required check; Windows native validation and the browser flake-selection matrix job were skipped. An earlier run in the snapshot was cancelled with a failed aggregate. Native keyboard/screen-reader behavior, rendered themes/sizing, and incremental test cost remain unverified. This COMMENT is not approval or merge authorization.
| <Button | ||
| variant="outline" | ||
| disabled={saving} | ||
| onClick={() => void run(() => saveInstructions(restored))} |
There was a problem hiding this comment.
🤖 [P2] Preserve keyboard focus when Restore replaces its control
When an owner repairs an edited memory section with the keyboard, the confirmed instructions change this branch from "edited" to "on". That unmounts Restore and mounts the switch at lines 273–279, but neither this component nor its agent-tab hosts transfer focus to that replacement. The existing ProfilePanel focus effect runs only on mount/tab-host changes, and AgentDetails' setup focus fallback runs only on mount, so neither handles this save. The user loses the focused action at the end of recovery. This conflicts with the focus-preservation rules in src/shared/design-system/DESIGN.md (States, feedback, and motion / Loading without flicker).
Keep focus through the pending operation and hand it to the resulting switch once the confirmed config is rendered, only if the user has not moved elsewhere. The shared Button's loading state can preserve pending focus/busy semantics. Extend the Restore test through the confirmed-config rerender and check success and failure/retry focus. This is source inference; the exact browser focus destination and assistive-technology announcement were not exercised.
The Bestie tab gets Remembers you: a switch that adds memory rules to the agent's instructions, and removes them when turned off.
Why it works this way: the memory rules are a marked, versioned section of the agent's own instructions, so the owner can read and edit them, and later features can add sections the same way.
What changes
<!-- buzz:bestie/memory v1 -->…<!-- /buzz:bestie/memory -->to the instructions. Off removes it. No memory is deleted: core memory is still in every prompt, and the Memory tab still clears memory.features.tsholds the feature list. Memory is its first entry; check-ins (feat(bestie): hourly check-ins from your Bestie #2037) add one more.Design decisions
agents.save; the next turn uses them. Rejected: a hidden section the host adds to every prompt.Try it (
just dev, with a local agent that is your Bestie)Stack: each PR is based on the one before it: #2034 Bestie tab → #2035 Remembers you (this PR) → #2036 private channels → #2037 check-ins → #2039 Former Bestie → #2041 Remove as Bestie → #2047 Choose your bestie. #2040 (recent notes in Claude Code prompts) is separate and based on main.
Overlap: #1716 also changes
features/agents/service.tsandtabs.tsx. Whichever lands second will rebase onto the other.🤖 Generated with Claude Code
buzz-review-completed