Skip to content

feat: load rules from .claude#888

Open
Straffern wants to merge 1 commit intocan1357:mainfrom
Straffern:claude-rules
Open

feat: load rules from .claude#888
Straffern wants to merge 1 commit intocan1357:mainfrom
Straffern:claude-rules

Conversation

@Straffern
Copy link
Copy Markdown

@Straffern Straffern commented Apr 30, 2026

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Straffern Straffern marked this pull request as draft May 1, 2026 07:41
@Straffern Straffern marked this pull request as ready for review May 1, 2026 07:41
@Straffern Straffern marked this pull request as draft May 1, 2026 07:41
@Straffern Straffern marked this pull request as ready for review May 1, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude provider ignores .claude/rules/

1 participant