Comprehensive AI-powered development governance and configuration for polyglot Rust-based projects with multi-language bindings. This shared module provides AI agents, development rules, skills, and profiles to accelerate polyglot development workflows across Rust, Python, TypeScript, Ruby, PHP, Java, Go, C#, Elixir, and WebAssembly.
AI-Rulez is a reusable configuration module designed for projects that need consistent, AI-assisted development practices across multiple languages. It defines:
- AI Agents - Specialized roles for architecture, core development, language binding engineering, documentation, and QA
- Development Rules - Language-specific standards, patterns, and quality gates
- Skills - Reusable AI capabilities for code generation, testing, documentation, and domain-specific tasks
- Profiles - Pre-configured model routing and preset combinations for different development scenarios
- Domains - Logical groupings of agents, rules, and skills by functional area
This is a shared module meant to be included in other projects via git includes, not a standalone application.
Add this repository as an include in your project's .claude.yaml or claude.yaml configuration:
# claude.yaml (or .claude.yaml)
include:
- path: https://github.com/kreuzberg-dev/ai-rulez.git
type: github
version: main # or specific tag/commit# claude.yaml (or .claude.yaml)
include:
- path: git@github.com:kreuzberg-dev/ai-rulez.git
type: github
version: main # or specific tag/commitClone the repository as a subdirectory in your project:
git clone https://github.com/kreuzberg-dev/ai-rulez.git .ai-rulezThen reference it in your configuration:
# claude.yaml
include:
- path: ./.ai-rulez
type: localconfig.yaml- Master configuration file with module metadata, presets, model routing, quality gates, and profilesmcp.yaml- Model Context Protocol (MCP) server configurations for GitHub, filesystem, cargo registry, and web search integrations
Specialized role definitions for different tasks. Each agent is a markdown file describing responsibilities, expertise, and guiding principles.
Key agents:
polyglot-architect.md- System design and multi-language architecture (uses Sonnet)rust-core-engineer.md- Rust core library development (uses Haiku)python-bindings-engineer.md,typescript-bindings-engineer.md, etc. - Language-specific binding development (use Haiku)code-reviewer.md- Multi-language code review (uses Haiku)docs-writer.md- User guide and documentation authoring (uses Haiku)api-doc-writer.md- API reference documentation (uses Haiku)tutorial-writer.md- Language-parity tutorial creation (uses Haiku)test-automation-engineer.md- End-to-end test generation (uses Haiku)
Language-specific standards, patterns, and quality requirements. Organized by language and functional domain.
Examples:
rust-2024-edition-core-conversion-engine/- Rust 2024 Edition standards for core developmentpython-310-pyo3-binding-wrappers/- Python 3.10+ with PyO3 FFI binding standardstypescript-5x-napi-rs-bindings-cli/- TypeScript 5.x with NAPI-RS binding standardspolyglot-build-system-distribution/- Cross-language build and distribution patternscode-quality/- General code quality standards
Reusable context files describing project structure, architecture patterns, and domain knowledge for AI consumption.
Reusable AI capabilities and specialized tasks. Skills are modular, composable units that can be invoked by agents.
Examples:
- Code generation templates
- Documentation generation patterns
- Testing strategies
- Build and deployment automation
- Architecture decision recording (ADR) generation
Pre-configured combinations of agents, rules, skills, and model routing for specific development scenarios.
Available profiles:
full-polyglot.yaml- Complete tooling for all languages with full feature parity. Uses Claude Opus/Sonnet for architecture and Haiku for implementation.rust-first.yaml- Optimized for primary Rust development with focus on core library.python-focused.yaml- Tailored for Python-primary projects with Python and Rust support.typescript-focused.yaml- Tailored for TypeScript-primary projects with TypeScript and Rust support.web-framework.yaml- Web framework development profile with frontend and backend optimization.conversion-library.yaml- For data conversion and serialization library projects.extraction-library.yaml- For document and data extraction library projects.
Logical groupings of agents, rules, and skills by functional area.
Available domains:
rust-core- Rust core library developmentlanguage-bindings- Multi-language FFI binding developmentffi-bindings- FFI (Foreign Function Interface) specific patterns and toolsquality-verification- Testing, QA, and verification strategiesdocumentation- Documentation generation and content authoringbuild-distribution- Build systems, packaging, and distributiondevops-infrastructure- CI/CD, infrastructure, and deployment automationorganizational- Project organization, versioning, and release management
The default configuration routes different task types to optimal models:
| Task Type | Model | Roles | Rationale |
|---|---|---|---|
| Architecture | Claude Sonnet 4.5 | polyglot-architect, release-coordinator | Complex polyglot system design |
| Implementation | Claude Haiku 4.5 | binding-engineer-*, rust-core-engineer | Fast, accurate code generation |
| Code Review | Claude Haiku 4.5 | code-reviewer, quality-assurance | Efficient review and validation |
| Documentation | Claude Haiku 4.5 | documentation-engineer, example-generator | Clear, concise documentation |
Claude:
claude-opus-4-5- Complex reasoning for primary architectureclaude-sonnet-4-5- Architecture and system design decisionsclaude-haiku-4-5- Fast implementation and code generation
Gemini:
gemini-2.0-flash- Supplementary implementation tasks
OpenAI Codex:
code-davinci-003- Legacy code completion and generation
All projects using this module must meet these quality standards:
- Rust Coverage Minimum: 95% code coverage
- Binding Coverage Minimum: 80% code coverage (language-specific constraints)
- Test Types: Unit, integration, documentation, and end-to-end tests
- Language Parity: All supported languages must have feature parity
- Documentation: All public APIs must be documented
This module uses a monorepo versioning strategy:
- Source of Truth:
Cargo.toml - Sync Targets: pyproject.toml, package.json, Gemfile, composer.json, pom.xml, go.mod, .csproj, mix.exs
Version changes in Cargo.toml automatically propagate to all language-specific package manifests.
Select a profile based on your project's primary language and scope:
Use full-polyglot profile:
# config.yaml in your project
extends:
- path: .ai-rulez
profile: full-polyglotThis activates all domains and agents for comprehensive polyglot development.
Use rust-first profile:
extends:
- path: .ai-rulez
profile: rust-firstFocuses on Rust core development with Sonnet for architecture decisions.
Use lightweight profile:
extends:
- path: .ai-rulez
profile: lightweightUses Haiku for all tasks, optimizing for speed and cost. Supports Rust, Python, and TypeScript.
Projects using this module can extend it with custom configurations:
Define project-specific agents in .ai-rulez/custom-agents.yaml:
agents:
my-custom-agent:
name: "My Custom Agent"
description: "Project-specific AI role"
model: "claude-haiku-4-5"Add project-specific rules in .ai-rulez/custom-rules.yaml:
rules:
my-project-specific-rule:
description: "Custom development standard"Create .ai-rulez/custom-skills/ directory for project-specific AI capabilities.
Define tailored profiles in .ai-rulez/project-profiles.yaml:
profiles:
my-project-profile:
presets: [claude]
languages: [rust, python]
agents:
- rust-core-engineer
- python-bindings-engineer- Include this module in your project configuration
- Select the
full-polyglotprofile - Use the
polyglot-architectagent for initial architecture decisions - Invoke language-specific binding engineers for each language target
Use the code-reviewer agent with the full-polyglot profile to review code in any supported language. The agent applies language-specific rules and quality standards.
Use the docs-writer or api-doc-writer agents to generate user guides and API documentation respectively. The configuration ensures documentation covers all supported languages with code examples.
Use the tutorial-writer agent to generate tutorials that cover all supported languages. The agent ensures equivalent examples and explanations across languages.
Use the release-versioning-coordinator agent to:
- Update version in Cargo.toml (source of truth)
- Automatically sync versions to all language-specific manifests
- Generate release notes covering all language bindings
- Coordinate release across all platforms
This module is configured with Model Context Protocol (MCP) servers for enhanced capabilities:
Enable PR reviews, issue tracking, and release management through the code-reviewer agent.
Setup:
export GITHUB_TOKEN=your_github_tokenProvide AI agents with code reading and analysis capabilities for architecture exploration and binding verification.
Enable dependency auditing and security scanning for Rust dependencies.
Support for researching FFI patterns, language binding best practices, and Rust ecosystem standards.
CUSTOMIZATION.md- Detailed guide for customizing agents, rules, skills, and profilesPROFILES.md- In-depth profile documentation with examples and use cases
Required:
- Rust (core library)
Optional (with full feature parity):
- Python 3.10+
- TypeScript 5.x
- Ruby 3.2+
- PHP 8.2+
- Java 17+
- Go 1.21+
- C# (.NET 8+)
- Elixir 1.14+
- WebAssembly
- Config Version: 3.0
- Module Version: 1.0.0
- Scope: polyglot-rust
- Type: shared
The configuration files use JSON schemas for IDE validation:
- Config schema:
https://raw.githubusercontent.com/Goldziher/ai-rulez/main/schema/ai-rules-v3.schema.json - MCP schema:
https://raw.githubusercontent.com/Goldziher/ai-rulez/main/schema/ai-rules-v3-mcp.schema.json
Ensure all supported languages have equivalent APIs and behavior. Use the polyglot-architect agent to design FFI boundaries that work well across all target languages.
All core functionality lives in Rust. Language bindings are thin wrappers that expose language-idiomatic APIs. New features are implemented in Rust first, then exposed through bindings.
Before releases, verify:
- Rust code meets 95% coverage
- Binding code meets 80% coverage
- All test types pass (unit, integration, doc, e2e)
- All public APIs are documented
- All supported languages have feature parity
Use Sonnet for complex architecture decisions and Haiku for implementation. This balance optimizes for quality and cost.
When updating versions:
- Update
Cargo.toml(source of truth) - Verify all sync targets are updated
- Use the
release-versioning-coordinatoragent to coordinate releases across languages
To extend or customize AI-Rulez for your project:
- Review
CUSTOMIZATION.mdfor detailed guidance - Create custom agents, rules, and skills in
.ai-rulez/custom-*directories - Define project-specific profiles in
.ai-rulez/project-profiles.yaml - Test with your AI tooling to ensure proper integration
See the LICENSE file in this repository for licensing information.
- CUSTOMIZATION.md - Detailed customization guide
- PROFILES.md - Complete profile documentation
- config.yaml - Master configuration reference
- mcp.yaml - MCP server configuration
For questions or issues with AI-Rulez, please refer to the documentation files or create an issue in the repository.
Built for Kreuzberg polyglot projects. Use this module to bring consistent AI-assisted development practices to your multi-language codebase.