Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix: put the rule-root list before statements

forwardxu483a0c07f927
diff --git a/host/src/agent/gear_catalog.rs b/host/src/agent/gear_catalog.rs
index c8c1480f..bb6d87dc 100644
--- a/host/src/agent/gear_catalog.rs
+++ b/host/src/agent/gear_catalog.rs
@@ -176,10 +176,10 @@ fn rule_file(path: &Path, base: &Path) -> Option<Rule> {
/// The rule's identity: the path inside a rules directory, otherwise the path from `base`.
fn rule_key(path: &Path, base: &Path) -> String {
- let rel = path.strip_prefix(base).unwrap_or(path);
- let text = rel.components().map(|c| c.as_os_str().to_string_lossy()).collect::<Vec<_>>().join("/");
const ROOTS: &[&str] =
&[".cursor/rules/", ".claude/rules/", ".codebuddy/rules/", ".gemini/rules/", ".grok/rules/", ".agents/rules/"];
+ let rel = path.strip_prefix(base).unwrap_or(path);
+ let text = rel.components().map(|c| c.as_os_str().to_string_lossy()).collect::<Vec<_>>().join("/");
for root in ROOTS {
if let Some(rest) = text.strip_prefix(root)
&& !rest.is_empty()