AI-Assisted Development#
AReaL provides AI-assisted development configurations to help developers work more efficiently. The current configs are written for Claude Code, but you can use other LLM providers that support similar configuration formats.
Getting Started#
Start Claude Code in the AReaL directory:
cd /path/to/AReaL
claude
The AI assistant automatically loads project context from CLAUDE.md and understands
AReaL’s architecture, conventions, and constraints.
Development Workflow#
A typical development session in AReaL follows this flow:
Plan: Describe your task. The
planneragent creates an implementation planImplement: Follow the plan, using skills like
/add-datasetif creating new componentsVerify: The
code-verifieragent runs pre-commit and tests automaticallyReview: Use
simple-code-revieweror manually review your changesSubmit: Run
/create-prto rebase, squash, and create a PR with auto-generated description
Example session:
> I want to add a new reward function for code execution
Claude: [planner agent activates, creates implementation plan]
> /add-reward code_execution
Claude: [guides through creating areal/reward/code_execution.py]
> Can you verify my changes?
Claude: [code-verifier runs pre-commit and tests]
> /create-pr
Claude: [rebases, squashes commits, creates PR]
Agents#
Agents are specialized AI assistants that activate automatically based on context. They provide domain expertise without requiring explicit invocation.
General agents help with common development tasks:
Agent |
Purpose |
|---|---|
|
Creates implementation plans before complex multi-file changes |
|
Runs pre-commit hooks and tests after code changes |
|
Performs quick code quality checks before commits |
Domain expert agents provide deep knowledge in specific areas:
Agent |
Expertise |
|---|---|
|
FSDP2 configuration, memory optimization |
|
MoE training, expert parallelism |
|
Pipeline parallelism, large models |
|
GRPO, PPO, DAPO algorithms |
|
Slurm, Ray, Kubernetes configuration |
When you ask a question like “How do I configure expert parallelism?”, the AI automatically routes to the appropriate expert agent.
Commands#
Commands are automated workflows invoked with / prefix. They handle multi-step
operations that would otherwise require manual execution.
Command |
Purpose |
|---|---|
|
Rebase, squash commits, and create PR |
|
Generate commit message from staged changes |
|
Intelligent code review with risk analysis |
/pr-review is particularly powerful. It uses dynamic templates to analyze PR
changes, detect risk levels (CRITICAL/HIGH/MEDIUM/LOW), and spawn minimal targeted
subagents for review. This approach keeps reviews focused and efficient - only spawning
the specific expertise needed for each change type.
Skills#
Skills provide step-by-step guided workflows for creating new components. They ensure you follow AReaL’s conventions and don’t miss required steps.
Skill |
When to Use |
|---|---|
|
Adding a new dataset loader to |
|
Creating a new RolloutWorkflow implementation |
|
Implementing a new reward function |
|
Adding a new model architecture to the Archon engine |
|
Adding tests for new or existing functionality |
|
Troubleshooting distributed training issues (hang, OOM, NCCL errors) |
Each skill walks through the complete process: file creation, registration, testing, and common pitfalls to avoid.
Configuration Files#
The AI-assisted development system is configured in:
AReaL/
├── CLAUDE.md # Project context and constraints
└── .claude/
├── agents/ # Specialized AI assistants
├── skills/ # Guided workflows
├── commands/ # Automated actions
└── rules/ # Code quality standards
See these files directly for configuration details.
Contributing#
We welcome contributions to both the codebase and AI development configurations:
Code contributions: New features, bug fixes, documentation improvements
AI config contributions: New skills, agents, commands, or improvements to existing ones
See CONTRIBUTING.md for guidelines.