Skip to content

chore: add shared Claude rules via native .claude/rules/ path#22473

Draft
AztecBot wants to merge 6 commits intonextfrom
claudebox/f18c94945cd45704-3
Draft

chore: add shared Claude rules via native .claude/rules/ path#22473
AztecBot wants to merge 6 commits intonextfrom
claudebox/f18c94945cd45704-3

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

@AztecBot AztecBot commented Apr 10, 2026

Summary

Adds cross-cutting Claude Code guidance that applies to all components in the monorepo, using the native .claude/rules/ directory that Claude Code auto-loads.

Changes

  • .claude/rules/ — 5 rule files (attribution, common-mistakes, git-workflow, monorepo, red-green-testing) that Claude Code loads automatically from the project root for all subdirectories
  • Root CLAUDE.md — minimal, just identifies the project (no manual "read rules" instruction needed)
  • No redundant blocks — subdirectory CLAUDE.md files are untouched beyond removing the previously-added "Aztec Rules" blocks, since root rules propagate automatically

Why .claude/rules/ instead of .claude/aztec-rules/

Claude Code natively auto-loads all .md files from .claude/rules/ at the project root. This means:

  • No explicit "read these files" instruction needed in CLAUDE.md
  • Rules apply to all subdirectories automatically (same as yarn-project/.claude/rules/ already does)
  • No redundant copy-paste blocks needed in every subdirectory's CLAUDE.md

Test plan

  • Verify claude from repo root sees the rules (check with "what rules do you have?")
  • Verify claude from barretenberg/cpp/ also sees root rules
  • Verify yarn-project/.claude/rules/ still works independently

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 10, 2026
@AztecBot AztecBot force-pushed the claudebox/f18c94945cd45704-3 branch from 1225120 to aa283be Compare April 10, 2026 17:51
@AztecBot AztecBot force-pushed the claudebox/f18c94945cd45704-3 branch from fc1876c to d92d6f6 Compare April 10, 2026 18:05
- Move .claude/aztec-rules/ → .claude/rules/ (auto-loaded by Claude Code)
- Remove redundant "Aztec Rules" blocks from 9 subdirectory CLAUDE.md files
  (root CLAUDE.md propagates to all subdirs automatically)
- Remove root CLAUDE.md "read aztec-rules" instruction (unnecessary with native path)
- Drop session-analysis.md (assumes local Claude Code, not suitable as universal rule)
- Fix common-mistakes.md: specify `cargo fmt` for Rust, fix trailing whitespace
@AztecBot AztecBot changed the title chore: add root CLAUDE.md and .claude/aztec-rules for cross-cutting Claude guidance chore: add shared Claude rules via native .claude/rules/ path Apr 10, 2026
ClaudeBox sessions also have access to local session JSONL files,
so this rule is useful across both local and containerized environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant