fix: make inline /command references actionable instead of dismissive - #121
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR updates inline slash-command handling so mid-message ChangesInline slash commands become actionable
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
A slash command mentioned mid-message (e.g. "your /goal today is to /plan and build the page") does not auto-run, and the agent was leading its reply by reporting the commands as failed and telling the user to resend them — while separately doubting whether EnterPlanMode was even a callable tool. Strengthen the per-turn inline-command reminder and the standing system-prompt guidance to act on the intent each reference expresses: call the real EnterPlanMode tool for /plan (named explicitly as an available tool, not just prose), pursue the described objective for /goal, load /skill:<name> via ReadSkill, and apply equivalent guidance for other commands. Mention invoking the literal slash command only when genuinely needed. This is the agent-mediated fix for inline commands; mechanical message-splitting was rejected because it mis-attributes args and discards the real task.
0e9c2d9 to
b7d6143
Compare
Problem
When a user references a slash command mid-message — e.g. "ok your
/goaltoday is to/planand complete execute this [task]" — the command does not auto-run (a slash command only executes as its own message starting with/). Two real exported sessions showed the failure mode:/goal …as its own message") before doing the work, which reads as a refusal.EnterPlanModewas even a callable tool ("it's included as text rather than a callable function, which is confusing") — it is a real registered tool (tools/plan/enter.py), only filtered out when already in plan mode.Why not mechanically execute the inline commands
A parser-based "split the message and run each command" approach was prototyped and rejected: parsing that real prompt attributes
/goalargs = "today is to" and/planargs = "[the entire task]", so it sets a nonsense goal and discards the actual task as throwaway args. No syntactic rule separates natural-language "/goal … /plan" from genuine command intent — only meaning does. So this fix is agent-mediated.Change
Strengthen the per-turn inline-command reminder (
soul/dynamic_injections/inline_commands.py) and the standing guidance (agents/default/system.md) to act on the intent each reference expresses rather than report failure:/plan→ call the realEnterPlanModetool (named explicitly as an available tool, not just prose)/goal→ pursue the described objective until verifiably done/skill:<name>→ load it viaReadSkilland apply itTests
tests/core/test_inline_command_provider.py— newtest_reminder_is_actionable_not_dismissiveasserts the reminder namesEnterPlanMode, pursues the/goalobjective, and does not instruct the agent to report the commands as "did not run". Existing phrase pins (NOT execute,ReadSkill, thecommands inline: …list) still hold.agents/default/system.mdheading pin (**Inline/commandreferences.**) preserved;test_default_agent.pygreen.make check-pythinker-codegreen.Follow-up to #120 (which covered the brew tap-trust, antenna blink, and export redaction fixes).
Summary by CodeRabbit
Bug Fixes
/plan,/goal,/skill:<name>) embedded mid-sentence are now properly executed instead of being treated as non-actionable text.Documentation
Tests