Skip to content

Enable Claude#1667

Open
mirooon wants to merge 7 commits intomainfrom
enable-cursor
Open

Enable Claude#1667
mirooon wants to merge 7 commits intomainfrom
enable-cursor

Conversation

@mirooon
Copy link
Copy Markdown
Contributor

@mirooon mirooon commented Mar 22, 2026

Which Linear task belongs to this PR?

Why did I implement it this way?

This PR makes the repository fully usable by both Cursor and Claude Code (Claude CLI) without any content duplication. All AI configuration — rules, commands/skills, hooks, and project context — lives in a single neutral location and is symlinked into each tool's expected directory structure.


Problem

Before this PR, the repo had:

  • Cursor rules in .cursor/rules/*.mdc — Cursor-only, not visible to Claude Code
  • A monolithic .cursorrules with 109 lines that duplicated rule content, referenced non-existent conventions.md files, and listed deprecated ethers helpers that conflicted with existing rule 200
  • An empty .claude/rules/ directory and no CLAUDE.md
  • No way for Claude Code to load any project-specific behavioral rules
  • Any rule update required manual sync across tools

Solution: .agents/ as the Single Source of Truth

A new .agents/ directory holds all AI configuration. Tool-specific directories become pure symlink bridges — zero real content lives there.

.agents/
  rules/*.mdc       ← 24 rule files  (real content lives here)
  commands/*.md     ← 6 command files (real content lives here)
  hooks/*.sh        ← 2 post-edit hook scripts
  context.md        ← shared project orientation (28 lines)

How Symlinks Work Here

A symlink is a filesystem pointer — a file that contains only a path to another file. When any program reads a symlink, the OS transparently redirects it to the target. There is zero content duplication: one physical file, multiple visible names.

.cursor/rules/102-facets.mdc  →  ../../.agents/rules/102-facets.mdc
.claude/rules/102-facets.md   →  ../../.agents/rules/102-facets.mdc

Both entries point to the same inode. Editing the file from either side edits the source. git tracks symlinks as 1-byte pointer objects — the real content is committed once under .agents/.

Extension Mapping (the key gotcha)

Cursor only recognises rule files with the .mdc extension. Claude Code only recognises .md. A directory-level symlink can't solve this — the files would have the wrong extension for one of the tools.

The solution: individual file symlinks with extension remapping.

# Cursor sees .mdc  →  points to .mdc source
ln -sf "../../.agents/rules/102-facets.mdc"  ".cursor/rules/102-facets.mdc"

# Claude sees .md   →  still points to the same .mdc source
ln -sf "../../.agents/rules/102-facets.mdc"  ".claude/rules/102-facets.md"

The .md symlink resolves to a .mdc file. Both tools read the same bytes.


Hybrid Frontmatter

Each rule file uses a dual-header understood by both tools. Unknown keys are silently ignored by each parser.

# Scoped rule (activates only for matching files)
---
name: Diamond facets
description: Facet-only requirements and validations
globs:               # Cursor: file matching
  - 'src/Facets/**/*.sol'
paths:               # Claude Code: file matching
  - 'src/Facets/**/*.sol'
---

# Global rule (always loaded)
---
name: Global guardrails
globs:
  - '**/*'
alwaysApply: true    # Cursor: force-load regardless of file
                     # Claude Code: omit paths: entirely = always loaded
---

Negation patterns (!src/**/*.s.sol) are supported in globs: but not in paths: — positive globs only in the paths: block.


Commands → Skills Bridge

Cursor commands (.md files that become /command-name suggestions) and Claude Code skills (directory + SKILL.md) are different structures for the same content.

.agents/commands/analyze-tx.md         ← source
  ↑
  .cursor/commands/analyze-tx.md       → ../../.agents/commands/analyze-tx.md
  .claude/skills/analyze-tx/SKILL.md   → ../../../.agents/commands/analyze-tx.md

Claude Code requires each skill to live in its own named subdirectory as SKILL.md. The symlink provides the expected path without duplicating content.


Post-Edit Hooks (Claude Code)

Two hook scripts in .agents/hooks/ wire the existing linting/formatting toolchain into the Claude Code edit loop:

Hook Trigger Action
post-edit-format.sh PostToolUse: Write / Edit / MultiEdit Runs bunx prettier --write on .sol / .ts / .js — silent, always succeeds
post-edit-validate.sh PostToolUse: Write / Edit Runs bunx solhint (.sol in src//script/), bunx tsc-files --noEmit (.ts), or bash -n (.sh) — prints errors to stdout so Claude sees them and self-corrects in the same turn

Configured in .claude/settings.json under the hooks key. No new permissions were needed — bunx *, bun *, and bash -n * were already in the allow list.


Shared Project Context

.cursorrules was replaced with a symlink to .agents/context.md. The original 109-line .cursorrules was mostly redundant with existing alwaysApply: true rules and contained two broken references (conventions.md, docs/conventions_digest/ — neither exists) and one conflict (listed deprecated ethers helpers that rule 200 explicitly forbids).

.agents/context.md (28 lines) contains only what the rules don't cover: project identity, the .agents/ structure explanation, and the common commands table.

CLAUDE.md (repo root) is the Claude Code entry point. It @-imports context.md and documents the hooks. It does not re-import any rules — Claude Code loads global rules automatically (files with no paths: key are always active).

Cursor developer:
  .cursorrules (→ context.md)              always loaded
  alwaysApply: true rules (000–003, 099)   always loaded
  glob-matched rules                       per file edited

Claude Code developer:
  CLAUDE.md (→ context.md)                 always loaded
  rules with no paths: key                 always loaded
  rules with paths: key                    per file edited

Both developers get identical behavioral rules. The only difference is the delivery mechanism.


Files Changed

Category Change
.agents/rules/*.mdc 24 rule files created (moved from .cursor/rules/)
.agents/commands/*.md 6 command files created (moved from .cursor/commands/)
.agents/hooks/*.sh 2 new hook scripts
.agents/context.md New 28-line shared orientation
.agents/rules/README.md Moved from .cursor/rules/README.md
.cursor/rules/*.mdc All 25 entries converted to symlinks
.cursor/commands/*.md All 6 entries converted to symlinks
.claude/rules/*.md 24 new symlinks (extension-mapped from .mdc)
.claude/skills/*/SKILL.md 6 new symlinks
.claude/settings.json Added hooks section + Bash(ls *) permission
CLAUDE.md New file — Claude Code entry point
.cursorrules Replaced with symlink to .agents/context.md
Rule frontmatter All 24 rules updated with hybrid globs: + paths: headers
add-new-rule.md command Updated to document the .agents/ workflow
Stale path refs Fixed across all .agents/ files (.cursor/rules/.agents/rules/ etc.)

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

@lifi-action-bot lifi-action-bot marked this pull request as draft March 22, 2026 19:42
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 75cff06b-60a6-481d-86ab-4fa5334b91d1

📥 Commits

Reviewing files that changed from the base of the PR and between db3e53d and 6f540eb.

📒 Files selected for processing (6)
  • .agents/hooks/post-edit-validate.sh
  • .agents/rules/004-config-structure.mdc
  • .agents/rules/500-github-actions.mdc
  • .agents/rules/501-audits.mdc
  • .agents/rules/502-whitelist-branching.mdc
  • .claude/settings.json
✅ Files skipped from review due to trivial changes (2)
  • .agents/rules/004-config-structure.mdc
  • .agents/rules/501-audits.mdc
🚧 Files skipped from review as they are similar to previous changes (4)
  • .agents/hooks/post-edit-validate.sh
  • .claude/settings.json
  • .agents/rules/502-whitelist-branching.mdc
  • .agents/rules/500-github-actions.mdc

Walkthrough

Adds a comprehensive set of repository agent rules, command specifications, pointer alias files for Cursor/Claude, post-edit hooks, and Claude settings to standardize coding, testing, deployment, and agent workflows across the repo.

Changes

Cohort / File(s) Summary
Core agent rules & docs
.agents/rules/000-global-standards.mdc, .agents/rules/001-project-structure.mdc, .agents/rules/002-architecture.mdc, .agents/rules/003-context-monitor.mdc, .agents/rules/004-config-structure.mdc, .agents/rules/099-finish.mdc, .agents/rules/README.md
Add repository-wide agent rule documents and README (frontmatter, globs, alwaysApply, context monitoring, rollout/rollover behavior).
Solidity rules & facets
.agents/rules/100-solidity-basics.mdc, .agents/rules/101-solidity-contracts.mdc, .agents/rules/102-facets.mdc, .agents/rules/103-solidity-interfaces.mdc, .agents/rules/104-receiver-contracts.mdc, .agents/rules/106-gas.mdc, .agents/rules/107-solidity-scripts.mdc
Add Solidity/style/naming/NatSpec/event/storage/facet/periphery/receiver and gas/script conventions for production code and deploy scripts.
Security, testing & patterns
.agents/rules/105-security.mdc, .agents/rules/400-solidity-tests.mdc, .agents/rules/401-testing-patterns.mdc, .agents/rules/402-typescript-tests.mdc
Add security baseline and test discipline rules for Solidity and TypeScript tests (layout, expectations, mocking, required runs).
TypeScript, Safe, Bash rules
.agents/rules/200-typescript.mdc, .agents/rules/201-safe-decode-scripts.mdc, .agents/rules/300-bash.mdc
Add TypeScript toolchain/typing/API conventions, Safe timelock decode formatting rules, and Bash scripting standards.
CI / audits / branching / tx analysis
.agents/rules/500-github-actions.mdc, .agents/rules/501-audits.mdc, .agents/rules/502-whitelist-branching.mdc, .agents/rules/600-transaction-analysis.mdc
Add workflow/audit management specs, whitelist-branching policy, and transaction-analysis activation gate.
Agent commands
.agents/commands/add-audit.md, .agents/commands/add-network.md, .agents/commands/add-new-rule.md, .agents/commands/analyze-tx.md, .agents/commands/deprecate-network.md, .agents/commands/review-bounty-report.md
Introduce new command/skill specifications and end-to-end workflows for repository agent commands.
Cursor / Claude pointer files
.cursor/rules/*.mdc, .claude/rules/*.md, .cursor/commands/*.md, .claude/skills/*/SKILL.md
Add many one-line pointer alias files that reference canonical .agents/* rule and command sources for Cursor and Claude consumers.
Hooks & tooling
.agents/hooks/post-edit-format.sh, .agents/hooks/post-edit-validate.sh, .agents/context.md, .claude/settings.json, CLAUDE.md
Add post-edit formatting and validation hooks, agent context doc, and Claude permissions/settings to run hooks and permit/deny specific commands.
Misc / gitignore
.gitignore, .cursorrules
Update .gitignore to track rule files / related entries and add cursorrules marker file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Enable Claude' directly corresponds to the main objective: making the repository usable by Claude Code alongside Cursor through centralized AI configuration.
Description check ✅ Passed The description comprehensively covers the problem, solution, implementation details, and impact. It includes all template sections (Linear task, implementation reasoning, and checklists) with substantive content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enable-cursor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

mirooon added 3 commits March 22, 2026 20:46
- Removed .cursorrules from .gitignore.
- Updated references in add-audit.md and add-new-rule.md to point to the correct .agents directory.
- Adjusted transaction analysis mode documentation to reflect the new command path.
- Deleted outdated README.md for cursor rules as part of the consolidation effort.
@mirooon mirooon marked this pull request as ready for review March 22, 2026 20:34
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (7)
.agents/hooks/post-edit-validate.sh (1)

17-23: Case statement should match on $REL for consistency.

The case statement matches against $FILE (which could be absolute), but the inner condition checks $REL (repo-relative). If $FILE is an absolute path like /home/user/repo/src/Foo.sol, the *.sol pattern matches, but if $FILE were passed as a relative path from a different working directory, behavior could differ.

For consistency with the $REL check inside, consider matching on $REL:

Proposed fix
-case "$FILE" in
+case "$REL" in
   *.sol)
     # Only lint Solidity in src/ or script/ — skip lib/, test artifacts, generated files
     if [[ "$REL" == src/* || "$REL" == script/* ]]; then
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/hooks/post-edit-validate.sh around lines 17 - 23, The case statement
currently matches on FILE but the inner guard uses REL, causing inconsistent
behavior for absolute vs repo-relative paths; change the case to operate on REL
(i.e., switch case "$REL" in) so the glob pattern (*.sol) is evaluated against
the same repo-relative variable used in the if condition, keeping the Solidity
lint gating in the block consistent with the REL checks.
.agents/rules/001-project-structure.mdc (1)

1-7: Consider adding paths: for Claude compatibility.

Other rule files in this PR include both globs: (for Cursor) and paths: (for Claude). This file only has globs:. Since alwaysApply: true is set, this may work, but for consistency with the hybrid header pattern mentioned in the PR summary, consider adding:

paths:
  - '**/*'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/rules/001-project-structure.mdc around lines 1 - 7, The rule header
only defines globs: and omits paths:, which other rule files include for Claude
compatibility; update the rule metadata by adding a paths: key with the same
pattern as globs (e.g., '**/*') so both globs: and paths: exist alongside
alwaysApply: true to match the hybrid header pattern used by the other rule
files (look for the keys globs, paths, and alwaysApply in this rule definition).
.agents/rules/300-bash.mdc (1)

75-83: Clarify universalSendRaw behavior for EVM Production.

The routing table shows universalSendRaw as "(not used)" for EVM Production, but line 68 mentions sendOrPropose internally uses universalCast "sendRaw" for EVM staging. Consider clarifying whether EVM Production should show "propose-to-safe.ts" or if this row is intentionally documenting that raw calldata bypasses the Safe proposal flow.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/rules/300-bash.mdc around lines 75 - 83, Update the routing table
and nearby documentation to clarify universalSendRaw behavior for EVM
Production: confirm whether sendOrPropose (which internally calls universalCast
"sendRaw") should route to propose-to-safe.ts in production or intentionally
bypass the Safe flow; if it should route to the Safe, change the EVM Production
cell for universalSendRaw from "(not used)" to "propose-to-safe.ts" and add a
short note near the sendOrPropose/universalCast documentation indicating that
"sendRaw" uses the Safe proposal flow in production; if it intentionally
bypasses the Safe, add an explicit note stating "raw calldata bypasses Safe
proposal flow" and reference the sendOrPropose and universalCast symbols to make
the behavior explicit.
.claude/rules/002-architecture.md (1)

1-1: Consider adding a trailing newline.

POSIX convention recommends that text files end with a newline character. While this doesn't affect functionality in most cases, it's a common best practice for consistency.

📝 Proposed fix to add trailing newline
-../../.agents/rules/002-architecture.mdc
+../../.agents/rules/002-architecture.mdc
+
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/rules/002-architecture.md at line 1, The file
.claude/rules/002-architecture.md should end with a POSIX newline; open the file
and add a single trailing newline character at the end (ensure the final byte is
a '\n') so it matches the referenced ../../.agents/rules/002-architecture.mdc
convention and avoids missing-newline warnings.
.claude/skills/add-network/SKILL.md (1)

1-1: Consider adding a trailing newline.

For consistency with POSIX conventions, add a trailing newline.

📝 Proposed fix
-../../../.agents/commands/add-network.md
+../../../.agents/commands/add-network.md
+
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/add-network/SKILL.md at line 1, The file
.claude/skills/add-network/SKILL.md is missing a POSIX-style trailing newline;
open the SKILL.md file and ensure the file ends with a single newline character
(i.e., insert a newline at EOF) so the file ends with a trailing newline as
expected.
.claude/rules/003-context-monitor.md (1)

1-1: Consider adding a trailing newline.

For consistency with POSIX conventions, text files should end with a newline character.

📝 Proposed fix
-../../.agents/rules/003-context-monitor.mdc
+../../.agents/rules/003-context-monitor.mdc
+
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/rules/003-context-monitor.md at line 1, The file
003-context-monitor.md is missing a trailing newline; open that markdown file
and add a single newline character at the end of the file (ensure the file ends
with "\n") so it conforms to POSIX conventions and editor/CI checks that expect
a final newline.
.agents/rules/099-finish.mdc (1)

12-13: Make Bash checks explicit with concrete commands.

Current wording is a bit ambiguous for Bash validation. Add explicit command guidance (bash -n, optionally shellcheck) to reduce interpretation drift.

Suggested wording update
-- **Testing**: After Solidity changes → `forge test` (or note suites remaining); after TS → lint/tests with Bun; after Bash → check execution flags/sourcing. State explicitly if anything not run.
+- **Testing**: After Solidity changes → `forge test` (or note suites remaining); after TS → lint/tests with Bun; after Bash → run `bash -n <edited .sh files>` (and `shellcheck` if available), plus check execution flags/sourcing. State explicitly if anything not run.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/rules/099-finish.mdc around lines 12 - 13, The "Bash" validation
guidance in the "Testing" / "Linting" section is ambiguous; update the text to
include explicit commands for shell script checks by adding concrete examples
such as recommending "bash -n <file>" for syntax checking and suggesting running
"shellcheck" (optionally with suggested flags) on any Bash scripts you created
or edited, and instruct contributors to state if they didn't run these checks;
reference the existing "Testing" and "Linting" wording to replace the vague Bash
line with these concrete commands and the requirement to report results.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/commands/add-audit.md:
- Line 146: The unlabeled fenced code block (the triple-backtick example block
containing "Extracted Information: ...") needs a language tag to satisfy
markdownlint MD040; update that opening fence from ``` to ```text (or another
appropriate language) so the block becomes labeled (e.g., ```text) while leaving
the block contents and closing ``` unchanged.
- Around line 125-134: Update the "Locate and save PDF file" step to prefer the
pasted/attached PDF bytes as the canonical source: instruct the agent to write
the attachment content directly to "audit/reports/<generated-filename>.pdf"
(instead of running the broad find/cp flow), then verify existence and non-zero
size (ls -lh or equivalent); only if attachment bytes are unavailable, fall back
to the current search heuristic (find ... -name "*.pdf") and prompt the user to
confirm the chosen file before copying. Reference the "Locate and save PDF file"
heading and the existing copy/verify commands so the author replaces the cp
"<source-path>" line with writing the attachment and keeps the verification
step.

In @.agents/context.md:
- Around line 8-13: The fenced code block in .agents/context.md is missing a
language tag (MD040); update the opening fence for the block that contains the
.agents/ listing so it reads as a language-tagged fenced block (for example add
"text" after the triple backticks) to silence the markdownlint warning and
preserve formatting for the block.

In @.agents/rules/004-config-structure.mdc:
- Around line 4-11: The YAML frontmatter in this rule is malformed because the
last entry in the "globs" sequence is concatenated with the "alwaysApply: false"
key; fix it by inserting a newline (and proper indentation) so "alwaysApply:
false" is its own top-level key. Locate the "globs:" block (the quoted pattern
ending with deployRequirements.json) and separate the sequence item and the
"alwaysApply: false" declaration so the "globs" list, the "paths" list, and
"alwaysApply: false" are each valid YAML entries.

In @.agents/rules/105-security.mdc:
- Around line 3-11: The rule description mentions tests but the glob/path
patterns in .agents/rules/105-security.mdc currently omit test files; update the
globs and paths entries to include test/**/*.sol and test/**/*.ts so the rule
covers {src,script,test}/**/*.{sol,ts} (i.e., add 'test/**/*.sol' and
'test/**/*.ts' to both the globs and paths arrays) to ensure test contracts and
scripts are validated by the security baseline.

In @.agents/rules/500-github-actions.mdc:
- Line 8: The YAML has a syntax error where the glob string '.github/**/*.yaml'
is concatenated with the key name alwaysApply; separate them by placing a
newline (or proper YAML separator) so the mapping key alwaysApply is on its own
line and the glob entry is a valid sequence item; update the entry containing
'.github/**/*.yaml' and the alwaysApply key so they are distinct YAML tokens.

In @.agents/rules/501-audits.mdc:
- Line 8: The YAML frontmatter in .agents/rules/501-audits.mdc has the field
`alwaysApply: false` concatenated to the previous glob string causing a syntax
error; edit the frontmatter so the glob pattern line
('.github/workflows/**/*version*.yml') ends with a newline and `alwaysApply:
false` is on its own line under the same frontmatter block, mirroring the fix
used in 502-whitelist-branching.mdc and ensuring proper YAML key/value
separation.

In @.agents/rules/502-whitelist-branching.mdc:
- Line 6: The YAML frontmatter has 'alwaysApply: false' appended to the previous
pattern string; fix the frontmatter in .agents/rules/502-whitelist-branching.mdc
by inserting a newline (line break) between the final glob entry
'config/composerWhitelist.json' and the scalar key alwaysApply so that
alwaysApply is a distinct YAML field (ensure 'config/composerWhitelist.json'
remains quoted and alwaysApply: false is on its own line).

In @.agents/rules/600-transaction-analysis.mdc:
- Around line 1-8: Add a required name field to the YAML frontmatter of this
rule: insert a top-level line like name: "Transaction analysis activation gate"
(matching the description) in the existing frontmatter block so the frontmatter
contains schema, scope, name, description, globs, and alwaysApply; this will
restore conformity with the other .agents/rules/*.mdc files and allow
tooling/IDE integrations to recognize the rule.

In @.claude/settings.json:
- Line 17: Fix the unclosed single quote in the permission pattern string
"Bash(bash -lc 'source script/helperFunctions.sh*)" by adding the missing
closing single quote before the final parenthesis and ensure the parenthesis
balance is correct; update the string so it becomes a properly quoted shell
command invocation (e.g., close the quote after .sh) and verify any wildcard or
glob character usage is intentional in the value.

---

Nitpick comments:
In @.agents/hooks/post-edit-validate.sh:
- Around line 17-23: The case statement currently matches on FILE but the inner
guard uses REL, causing inconsistent behavior for absolute vs repo-relative
paths; change the case to operate on REL (i.e., switch case "$REL" in) so the
glob pattern (*.sol) is evaluated against the same repo-relative variable used
in the if condition, keeping the Solidity lint gating in the block consistent
with the REL checks.

In @.agents/rules/001-project-structure.mdc:
- Around line 1-7: The rule header only defines globs: and omits paths:, which
other rule files include for Claude compatibility; update the rule metadata by
adding a paths: key with the same pattern as globs (e.g., '**/*') so both globs:
and paths: exist alongside alwaysApply: true to match the hybrid header pattern
used by the other rule files (look for the keys globs, paths, and alwaysApply in
this rule definition).

In @.agents/rules/099-finish.mdc:
- Around line 12-13: The "Bash" validation guidance in the "Testing" / "Linting"
section is ambiguous; update the text to include explicit commands for shell
script checks by adding concrete examples such as recommending "bash -n <file>"
for syntax checking and suggesting running "shellcheck" (optionally with
suggested flags) on any Bash scripts you created or edited, and instruct
contributors to state if they didn't run these checks; reference the existing
"Testing" and "Linting" wording to replace the vague Bash line with these
concrete commands and the requirement to report results.

In @.agents/rules/300-bash.mdc:
- Around line 75-83: Update the routing table and nearby documentation to
clarify universalSendRaw behavior for EVM Production: confirm whether
sendOrPropose (which internally calls universalCast "sendRaw") should route to
propose-to-safe.ts in production or intentionally bypass the Safe flow; if it
should route to the Safe, change the EVM Production cell for universalSendRaw
from "(not used)" to "propose-to-safe.ts" and add a short note near the
sendOrPropose/universalCast documentation indicating that "sendRaw" uses the
Safe proposal flow in production; if it intentionally bypasses the Safe, add an
explicit note stating "raw calldata bypasses Safe proposal flow" and reference
the sendOrPropose and universalCast symbols to make the behavior explicit.

In @.claude/rules/002-architecture.md:
- Line 1: The file .claude/rules/002-architecture.md should end with a POSIX
newline; open the file and add a single trailing newline character at the end
(ensure the final byte is a '\n') so it matches the referenced
../../.agents/rules/002-architecture.mdc convention and avoids missing-newline
warnings.

In @.claude/rules/003-context-monitor.md:
- Line 1: The file 003-context-monitor.md is missing a trailing newline; open
that markdown file and add a single newline character at the end of the file
(ensure the file ends with "\n") so it conforms to POSIX conventions and
editor/CI checks that expect a final newline.

In @.claude/skills/add-network/SKILL.md:
- Line 1: The file .claude/skills/add-network/SKILL.md is missing a POSIX-style
trailing newline; open the SKILL.md file and ensure the file ends with a single
newline character (i.e., insert a newline at EOF) so the file ends with a
trailing newline as expected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 693a43bf-e3fb-4097-8e6e-cf842a8d0a89

📥 Commits

Reviewing files that changed from the base of the PR and between e7363dc and db3e53d.

📒 Files selected for processing (130)
  • .agents/commands/add-audit.md
  • .agents/commands/add-network.md
  • .agents/commands/add-new-rule.md
  • .agents/commands/analyze-tx.md
  • .agents/commands/deprecate-network.md
  • .agents/commands/review-bounty-report.md
  • .agents/context.md
  • .agents/hooks/post-edit-format.sh
  • .agents/hooks/post-edit-validate.sh
  • .agents/rules/000-global-standards.mdc
  • .agents/rules/001-project-structure.mdc
  • .agents/rules/002-architecture.mdc
  • .agents/rules/003-context-monitor.mdc
  • .agents/rules/004-config-structure.mdc
  • .agents/rules/099-finish.mdc
  • .agents/rules/100-solidity-basics.mdc
  • .agents/rules/101-solidity-contracts.mdc
  • .agents/rules/102-facets.mdc
  • .agents/rules/103-solidity-interfaces.mdc
  • .agents/rules/104-receiver-contracts.mdc
  • .agents/rules/105-security.mdc
  • .agents/rules/106-gas.mdc
  • .agents/rules/107-solidity-scripts.mdc
  • .agents/rules/200-typescript.mdc
  • .agents/rules/201-safe-decode-scripts.mdc
  • .agents/rules/300-bash.mdc
  • .agents/rules/400-solidity-tests.mdc
  • .agents/rules/401-testing-patterns.mdc
  • .agents/rules/402-typescript-tests.mdc
  • .agents/rules/500-github-actions.mdc
  • .agents/rules/501-audits.mdc
  • .agents/rules/502-whitelist-branching.mdc
  • .agents/rules/600-transaction-analysis.mdc
  • .agents/rules/README.md
  • .claude/rules/000-global-standards.md
  • .claude/rules/001-project-structure.md
  • .claude/rules/002-architecture.md
  • .claude/rules/003-context-monitor.md
  • .claude/rules/004-config-structure.md
  • .claude/rules/099-finish.md
  • .claude/rules/100-solidity-basics.md
  • .claude/rules/101-solidity-contracts.md
  • .claude/rules/102-facets.md
  • .claude/rules/103-solidity-interfaces.md
  • .claude/rules/104-receiver-contracts.md
  • .claude/rules/105-security.md
  • .claude/rules/106-gas.md
  • .claude/rules/107-solidity-scripts.md
  • .claude/rules/200-typescript.md
  • .claude/rules/201-safe-decode-scripts.md
  • .claude/rules/300-bash.md
  • .claude/rules/400-solidity-tests.md
  • .claude/rules/401-testing-patterns.md
  • .claude/rules/402-typescript-tests.md
  • .claude/rules/500-github-actions.md
  • .claude/rules/501-audits.md
  • .claude/rules/502-whitelist-branching.md
  • .claude/rules/600-transaction-analysis.md
  • .claude/settings.json
  • .claude/skills/add-audit/SKILL.md
  • .claude/skills/add-network/SKILL.md
  • .claude/skills/add-new-rule/SKILL.md
  • .claude/skills/analyze-tx/SKILL.md
  • .claude/skills/deprecate-network/SKILL.md
  • .claude/skills/review-bounty-report/SKILL.md
  • .cursor/commands/add-audit.md
  • .cursor/commands/add-audit.md
  • .cursor/commands/add-network.md
  • .cursor/commands/add-network.md
  • .cursor/commands/add-new-rule.md
  • .cursor/commands/add-new-rule.md
  • .cursor/commands/analyze-tx.md
  • .cursor/commands/analyze-tx.md
  • .cursor/commands/deprecate-network.md
  • .cursor/commands/deprecate-network.md
  • .cursor/commands/review-bounty-report.md
  • .cursor/commands/review-bounty-report.md
  • .cursor/rules/000-global-standards.mdc
  • .cursor/rules/000-global-standards.mdc
  • .cursor/rules/001-project-structure.mdc
  • .cursor/rules/001-project-structure.mdc
  • .cursor/rules/002-architecture.mdc
  • .cursor/rules/002-architecture.mdc
  • .cursor/rules/003-context-monitor.mdc
  • .cursor/rules/003-context-monitor.mdc
  • .cursor/rules/004-config-structure.mdc
  • .cursor/rules/004-config-structure.mdc
  • .cursor/rules/099-finish.mdc
  • .cursor/rules/099-finish.mdc
  • .cursor/rules/100-solidity-basics.mdc
  • .cursor/rules/100-solidity-basics.mdc
  • .cursor/rules/101-solidity-contracts.mdc
  • .cursor/rules/101-solidity-contracts.mdc
  • .cursor/rules/102-facets.mdc
  • .cursor/rules/102-facets.mdc
  • .cursor/rules/103-solidity-interfaces.mdc
  • .cursor/rules/103-solidity-interfaces.mdc
  • .cursor/rules/104-receiver-contracts.mdc
  • .cursor/rules/104-receiver-contracts.mdc
  • .cursor/rules/105-security.mdc
  • .cursor/rules/105-security.mdc
  • .cursor/rules/106-gas.mdc
  • .cursor/rules/106-gas.mdc
  • .cursor/rules/107-solidity-scripts.mdc
  • .cursor/rules/107-solidity-scripts.mdc
  • .cursor/rules/200-typescript.mdc
  • .cursor/rules/200-typescript.mdc
  • .cursor/rules/201-safe-decode-scripts.mdc
  • .cursor/rules/201-safe-decode-scripts.mdc
  • .cursor/rules/300-bash.mdc
  • .cursor/rules/300-bash.mdc
  • .cursor/rules/400-solidity-tests.mdc
  • .cursor/rules/400-solidity-tests.mdc
  • .cursor/rules/401-testing-patterns.mdc
  • .cursor/rules/401-testing-patterns.mdc
  • .cursor/rules/402-typescript-tests.mdc
  • .cursor/rules/402-typescript-tests.mdc
  • .cursor/rules/500-github-actions.mdc
  • .cursor/rules/500-github-actions.mdc
  • .cursor/rules/501-audits.mdc
  • .cursor/rules/501-audits.mdc
  • .cursor/rules/502-whitelist-branching.mdc
  • .cursor/rules/502-whitelist-branching.mdc
  • .cursor/rules/600-transaction-analysis.mdc
  • .cursor/rules/600-transaction-analysis.mdc
  • .cursor/rules/README.md
  • .cursor/rules/README.md
  • .cursorrules
  • .gitignore
  • CLAUDE.md
💤 Files with no reviewable changes (1)
  • .gitignore

@gvladika
Copy link
Copy Markdown
Contributor

gvladika commented Apr 1, 2026

I'm not sure that Claude will load rules from .claude/rules/, as that's not a official concept. As far as I understand, Claude Code only auto-loads specific files:

  • CLAUDE.md (root, ~/.claude/, or nested in directories)
  • .claude/settings.json
  • .claude/skills/*/SKILL.md

Some options for rules content is to be included as:

  • directory-based CLAUDE.md files (e.g., src/CLAUDE.md, script/CLAUDE.md)
  • a single CLAUDE.md via build script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants