Skip to content

Audit, Generate, Optimize, and Ship CLAUDE.md files. Layer 2 of the Claude Code OS.

License

Notifications You must be signed in to change notification settings

vjvishy/ccos-rules-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

CCOS Rules Engine

Part of the Claude Code OS (CCOS) — a composable skill suite for AI-native engineering teams.

The Rules Engine manages the full lifecycle of your CLAUDE.md files: audit, generate, optimize, and ship to your team.

Why?

Your CLAUDE.md is the highest-leverage file in your Claude Code workflow. It determines whether Claude nails tasks on the first try or burns tokens guessing. Yet most developers either:

  • Skip it entirely (relying on /init and never touching it again)
  • Let it grow into 500+ lines of bloat that confuses more than it helps

The Rules Engine fixes this with a structured, repeatable process.

Quick Start

Install

Copy the SKILL.md file into your Claude Code skills directory:

# Option 1: Project-level (recommended for teams)
mkdir -p .claude/skills
cp SKILL.md .claude/skills/rules-engine.md

# Option 2: Global (for personal use across all projects)
mkdir -p ~/.claude/skills
cp SKILL.md ~/.claude/skills/rules-engine.md

Use

# Score your current CLAUDE.md
/rules:audit

# Create one from scratch
/rules:generate

# Trim and sharpen an existing one
/rules:optimize

# Prep for team commit (strip personal paths, secrets)
/rules:ship

# Auto-detect what's needed
/rules:quick

The Quality Rubric

Every audit scores your CLAUDE.md on 7 dimensions:

Dimension Weight What Good Looks Like
Structure 20% Top-to-bottom priority; clear sections
Conciseness 15% Under 300 lines; no filler
Architecture 15% Tech stack, file structure, patterns
Validation 20% Build, test, lint commands (highest ROI)
Domain Context 15% Project-specific patterns and DSLs
Anti-patterns 10% "Never do X" rules for known failures
Examples 5% Code snippets showing correct patterns

Part of CCOS

The Rules Engine is Layer 2 of the Claude Code OS:

Layer 4: Orchestration    → Multi-instance juggling, parallel dev
Layer 3: Memory           → Second brain, context persistence
Layer 2: Rules Engine     → CLAUDE.md lifecycle (you are here)
Layer 1: Execution        → GSD (get-shit-done)

Each layer is independent but composable. Use what you need.

Composability with GSD

  • Before a GSD cycle → /rules:audit ensures good context
  • After repeated AI mistakes → /rules:optimize adds anti-patterns
  • Shipping to team → /rules:ship alongside your PR

The Golden Rule

If Claude would make the same mistake even WITH this rule, the rule is too vague. If Claude would never make this mistake WITHOUT this rule, the rule is wasted tokens.

Contributing

This is an early-stage project. Issues and PRs welcome. Key areas:

  • Additional quality rubric dimensions
  • Framework-specific rule templates (Next.js, Swift, Rust, etc.)
  • Integration patterns with other CCOS layers

License

MIT

Credits

Inspired by the workflows described in 50 Claude Code Tips and built on top of the GSD skill.

About

Audit, Generate, Optimize, and Ship CLAUDE.md files. Layer 2 of the Claude Code OS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published