feat: load rules from .claude#888
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8de115c673
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }), | ||
| ); | ||
| } | ||
| if (current === (ctx.repoRoot ?? ctx.home)) break; |
There was a problem hiding this comment.
Bound .claude/rules walk-up to home or repo ancestry
When cwd is outside both a git repo and the user’s home (for example /tmp/work with HOME=/home/user), the loop only stops at filesystem root because current === (ctx.repoRoot ?? ctx.home) is never true. That makes rule discovery scan /tmp/.claude/rules and even /.claude/rules, so unrelated ancestor directories can inject project-scoped rules into the session. The walk-up should stop once it leaves the trusted boundary (repo root when present, otherwise only while current is within HOME).
Useful? React with 👍 / 👎.
Adds .claude/rules discovery with OMP rule frontmatter support.\n\nVerification:\n- bunx biome check packages/coding-agent/src/discovery/claude.ts packages/coding-agent/test/discovery/claude-rules.test.ts\n- Targeted test blocked locally: missing pi_natives native addon
Closes #660