Skip to content

docs(governance): split CLAUDE.md into common + agent-scoped rules#30

Merged
nayrosk merged 2 commits into
developfrom
docs/governance-refactor
Apr 14, 2026
Merged

docs(governance): split CLAUDE.md into common + agent-scoped rules#30
nayrosk merged 2 commits into
developfrom
docs/governance-refactor

Conversation

@nayrosk

@nayrosk nayrosk commented Apr 14, 2026

Copy link
Copy Markdown
Member

Description

Refactor CLAUDE.md so it only holds rules that apply to every team member
(CTO + all agents) equally. Move agent-specific rules into each owning agent's
definition file under .claude/agents/. Apply caveman compression to all 14
files to reduce token load while preserving every MUST/NEVER rule.

Type of change

  • docs

Changes

CLAUDE.md (now common-only)

Retained sections: Project Overview, Architecture, Configuration Files,
Security, Rule Integrity (Anti-Bypass), Authority and Rule Immutability,
Team Structure (roster + scope matrix + delegation rules + rules for all
agents), Commands, Development Workflow, Before Committing checklist.

Removed (moved into agent files): Core Principles, Preferred Tools, Code
Style, Documentation, Type System, Error Handling, Function Design,
Struct/Enum Design, Testing, Imports/Dependencies, Rust Best Practices,
Memory/Performance, Concurrency, Version Control, Tools, Test Integrity
(Anti-Weakening), Coupling Rule, Git Commit Gates.

Agent files (canonical owners of moved content)

  • rust-developer.md: Core Principle (fully optimized), Type System,
    Function Design, Struct/Enum Design, Rust Best Practices, Memory/Performance,
    Concurrency, Imports, Preferred Crates, Tools, Code Style
  • qa.md: Test Integrity (Anti-Weakening) canonical owner,
    #[test]/mock MUSTs, Code Style for test code
  • sysadmin.md: Version Control rules canonical owner, Git Commit Gates 1-4
  • lead-dev.md: Coupling Rule (Cargo vs CI)
  • devops.md: Coupling Rule (CI side, symmetric)
  • reviewer.md: Prime Directive routes findings to agent-file sources;
    example findings updated to cite agent files instead of removed CLAUDE.md
    sections

Caveman compression

Applied to all 14 governance files. Technical substance preserved: code
blocks, URLs, file paths, MUST/NEVER rules intact. Two @it-consultant audit
passes confirmed zero rule loss.

Testing

  • No code changes (governance documentation only)
  • No secrets in diff
  • @it-consultant audit pass 1: flagged 4 rule losses — all fixed
  • @it-consultant audit pass 2: COMPLIANT, zero rule loss

Breaking changes

None for the codebase. Agents referencing removed CLAUDE.md sections have
been updated in the same commit.

Related

Closes #27

Refactored CLAUDE.md to contain only universal rules (project overview,
architecture, security, rule integrity, authority, team structure, workflow).
Agent-specific content (Rust coding standards, testing anti-weakening, VCS rules,
Git commit gates, preferred crates) moved into each owning agent file.
Caveman compression applied to all 14 files to reduce token load while
preserving every MUST/NEVER rule — audited twice by @it-consultant with zero
rule loss.

Closes #27
@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (14)
  • .claude/agents/archiver.md is excluded by !**/*.md
  • .claude/agents/assistant.md is excluded by !**/*.md
  • .claude/agents/cooker.md is excluded by !**/*.md
  • .claude/agents/devops.md is excluded by !**/*.md
  • .claude/agents/it-consultant.md is excluded by !**/*.md
  • .claude/agents/lead-dev.md is excluded by !**/*.md
  • .claude/agents/product-marketing.md is excluded by !**/*.md
  • .claude/agents/qa.md is excluded by !**/*.md
  • .claude/agents/reviewer.md is excluded by !**/*.md
  • .claude/agents/rust-developer.md is excluded by !**/*.md
  • .claude/agents/software-architect.md is excluded by !**/*.md
  • .claude/agents/sysadmin.md is excluded by !**/*.md
  • .claude/agents/technical-writer.md is excluded by !**/*.md
  • CLAUDE.md is excluded by !**/*.md

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 925194f3-2e90-4f5c-8673-85d15b2e9f7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/governance-refactor

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.

@nayrosk nayrosk self-assigned this Apr 14, 2026
@nayrosk nayrosk merged commit 90f35a4 into develop Apr 14, 2026
13 checks passed
@nayrosk nayrosk deleted the docs/governance-refactor branch April 14, 2026 08:11
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.

1 participant