fix(rules-injector): respect claude_code config for user rule loading

When claude_code integration is disabled in oh-my-opencode.json, the
rules-injector now skips loading rules from ~/.claude/rules/ to prevent
Claude Code-specific instructions from leaking into non-Claude agents
(e.g., GPT-5.4 Sisyphus), which causes agent hallucination.

Also adds ~/.sisyphus/rules/ and ~/.opencode/rules/ as OpenCode-native
user rule directories that are always searched regardless of config.

Fixes #2920

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tran Quang
2026-03-29 10:13:55 +07:00
parent 9fc56ab544
commit a1a2bb4b07
6 changed files with 52 additions and 18 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
export { findProjectRoot } from "./project-root-finder";
export { calculateDistance } from "./rule-distance";
export { findRuleFiles } from "./rule-file-finder";
export { findRuleFiles, type FindRuleFilesOptions } from "./rule-file-finder";