From 576e22c690cb405d185a8b21e5e8f2b5be45e199 Mon Sep 17 00:00:00 2001 From: Roman Sirokov Date: Tue, 1 Dec 2026 22:13:49 +0100 Subject: [PATCH] feat: add Bear agent instructions and actionable follow-ups --- src/agent_instructions.rs | 40 ++++++++++++++++++++++++++++++++++ src/conversation/follow_ups.rs | 20 ----------------- src/main.rs | 8 ++++--- 3 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 src/agent_instructions.rs diff --git a/src/agent_instructions.rs b/src/agent_instructions.rs new file mode 100644 index 0000000..e8fb1ff --- /dev/null +++ b/src/agent_instructions.rs @@ -0,0 +1,40 @@ +const BEAR_INSTRUCTIONS: &str = "You are working in Bear, a desktop app for running coding agents. + +Keep the conversation’s checkout on its current branch unless the task calls for switching or renaming it. Use git show or git diff to inspect other branches. + +Make the final reply self-contained. Include the outcome, what you verified, and any blockers the user needs to know about."; + +const FOLLOW_UP_INSTRUCTIONS: &str = r#"After answering, suggest up to three follow-up actions when the result makes a specific next step useful. Prefer one and put the most useful action first. Ground each suggestion in the current task and known state. + +Suggest committing verified, uncommitted changes or opening a PR when the branch is ready for review and has no open PR. If opening the PR would include the same changes, suggest that action alone. Other useful follow-ups include addressing a specific blocker outside the requested work or choosing a concrete option when progress depends on the user's decision. + +Skip generic advice, speculative or overlapping options, and work already requested or completed. Omit the block when no action fits. + +Append the block at the very end on its own line, without a code fence or any text after it. Each