Skip to content

AI-Rulez Documentation

AI-Rulez is a CLI tool for managing AI assistant configurations across multiple tools.

Write your AI instructions once in a single configuration and generate tool-specific outputs for Claude, Cursor, Windsurf, Copilot, Gemini, and others.

Core Concepts

Directory-Based Configuration

Your configuration lives in .ai-rulez/ with organized subdirectories: - rules/: Mandatory constraints and standards - context/: Reference documentation and architecture - skills/: Specialized AI prompts for specific roles - domains/: Team or subsystem-specific content - config.yaml: Main configuration (presets, profiles)

Presets

Presets define how content is formatted and where it's output for different tools. Built-in presets include: - claude → generates CLAUDE.md - cursor → generates .cursor/rules/ - gemini → generates GEMINI.md - copilot → generates .github/copilot-instructions.md - windsurf → generates .windsurf/rules/ - And many others...

Profiles

Profiles let different teams generate customized outputs. Each profile specifies which domains to include:

profiles:
  full: [backend, frontend, qa]
  backend: [backend, qa]
  frontend: [frontend, qa]

Quick Navigation

Getting Started

Using AI-Rulez

Advanced Topics

Typical Workflow

  1. Initialize your project:

    ai-rulez init "my-project" --v3
    

  2. Add content to .ai-rulez/:

  3. Write rules in rules/
  4. Add context in context/
  5. Create skills in skills/

  6. Generate outputs:

    ai-rulez generate
    

  7. Commit the results:

    git add .ai-rulez/ CLAUDE.md .cursor/ GEMINI.md
    git commit -m "docs: update AI assistant guidelines"
    

Key Features

  • Single source of truth for all AI tool configurations
  • Domain scoping to organize rules by team or subsystem
  • Profile-based customization for different contexts
  • Modular structure to reduce merge conflicts
  • Built-in presets for major AI tools
  • Custom presets for any tool and format
  • MCP integration for programmatic access
  • Support for monorepos and multi-team projects

Project Structure

After initialization, your project looks like:

project-root/
├── .ai-rulez/
│   ├── config.yaml           # Main configuration
│   ├── rules/                # Base rules (all profiles)
│   ├── context/              # Reference docs (all profiles)
│   ├── skills/               # AI skills (all profiles)
│   ├── agents/               # Agent prompt files (all profiles)
│   └── domains/              # Team-specific content
│       ├── backend/
│       └── frontend/
├── CLAUDE.md                 # Generated for Claude
├── .cursor/rules/            # Generated for Cursor
├── GEMINI.md                 # Generated for Gemini
└── .github/copilot-instructions.md

Getting Help

  • CLI Help: ai-rulez --help, ai-rulez init --help, etc.
  • Validation: ai-rulez validate to check your configuration
  • Examples: Check the Examples section
  • Issues: Report problems on GitHub

Version

This documentation covers AI-Rulez V3 (directory-based configuration).