First off, thank you for considering contributing to ROMA-01! It's people like you that make ROMA-01 such a great tool.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guidelines
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to lukema95@github.com.
Before creating bug reports, please check the existing issues to avoid duplicates.
How to Submit a Good Bug Report:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, config files)
- Describe the behavior you observed and what you expected
- Include logs if applicable
- Specify your environment:
- OS: [e.g., macOS 14.0, Ubuntu 22.04]
- Python version: [e.g., 3.12.0]
- Node.js version: [e.g., 18.17.0]
- AI-01 version: [e.g., 1.1.0]
Template:
**Bug Description:**
A clear description of what the bug is.
**To Reproduce:**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior:**
What you expected to happen.
**Screenshots/Logs:**
If applicable, add screenshots or log output.
**Environment:**
- OS:
- Python:
- Node.js:
- ROMA-01 version: Enhancement suggestions are tracked as GitHub issues.
Before Submitting:
- Check if the enhancement has already been suggested
- Determine if it fits the project's scope
- Be as detailed as possible
Template:
**Enhancement Description:**
Clear description of the suggested enhancement.
**Motivation:**
Why would this be useful?
**Possible Implementation:**
Any ideas on how to implement this?
**Alternatives:**
Any alternative solutions or features considered?- 🐛 Bug fixes
- ✨ New features (discuss in issues first)
- 📝 Documentation improvements
- 🧪 Test coverage improvements
- 🎨 UI/UX enhancements
- ⚡ Performance improvements
- 🌐 Internationalization (i18n)
- 🔌 New exchange integrations
- 🤖 New LLM provider integrations
- Python 3.12 or 3.13 (NOT 3.14)
- Node.js 18+
- Git
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/lukema95/roma-01.git
cd roma-01
# Add upstream remote
git remote add upstream https://github.com/lukema95/roma-01.gitcd backend
# Create virtual environment
python3.13 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
# Install development dependencies
pip install pytest pytest-cov black isort mypy
# Copy environment template
cp .env.example .env
# Edit .env with your test credentialscd frontend
# Install dependencies
npm install
# Copy environment template
cp .env.example .env.local
# Start development server
npm run dev# Backend tests
cd backend
pytest tests/ -v
# Frontend tests
cd frontend
npm test# Update your fork
git fetch upstream
git checkout main
git merge upstream/main
# Create feature branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fixBranch Naming:
feature/- New featuresfix/- Bug fixesdocs/- Documentation onlyrefactor/- Code refactoringtest/- Adding testsperf/- Performance improvements
- Write clean, readable code
- Follow style guidelines (see below)
- Add tests for new features
- Update documentation as needed
- Keep commits atomic and well-described
# Run all tests
cd backend && pytest
cd frontend && npm test
# Check code style
cd backend
black --check .
isort --check .
mypy src/
cd frontend
npm run lintFollow Conventional Commits:
git add .
# Format: <type>(<scope>): <subject>
git commit -m "feat(trading): add support for Hyperliquid DEX"
git commit -m "fix(api): resolve race condition in order execution"
git commit -m "docs(readme): update installation instructions"Commit Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, missing semicolons, etc)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding testschore: Maintenance tasks
# Push to your fork
git push origin feature/your-feature-name
# Go to GitHub and create a Pull RequestPR Checklist:
- Code follows style guidelines
- Tests pass locally
- Added tests for new features
- Updated documentation
- No merge conflicts
- Commits are well-formatted
- PR description is clear
PR Template:
## Description
Brief description of the changes.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## How Has This Been Tested?
Describe the tests you ran.
## Checklist
- [ ] My code follows the style guidelines
- [ ] I have performed a self-review
- [ ] I have commented my code where needed
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing tests pass locally- Be responsive to feedback
- Make requested changes promptly
- Keep the discussion focused and professional
- Once approved, a maintainer will merge your PR
We follow PEP 8 with some modifications:
# Format code
black src/
# Sort imports
isort src/
# Type checking
mypy src/Key Points:
- Line length: 100 characters (not 79)
- Use type hints for all function signatures
- Docstrings for all public classes/functions
- Use f-strings for string formatting
- Prefer async/await over callbacks
Example:
async def get_market_price(symbol: str) -> float:
"""
Fetch current market price for a trading pair.
Args:
symbol: Trading pair symbol (e.g., "BTCUSDT")
Returns:
Current market price
Raises:
HTTPException: If API request fails
"""
response = await client.get(f"/api/price/{symbol}")
return response.json()["price"]# Run linter
npm run lint
# Fix automatically
npm run lint:fixKey Points:
- Use TypeScript strict mode
- Functional components with hooks
- Props interfaces defined
- Use camelCase for variables
- Use PascalCase for components
Example:
interface AgentCardProps {
agentId: string;
balance: number;
isRunning: boolean;
}
export function AgentCard({ agentId, balance, isRunning }: AgentCardProps) {
const [expanded, setExpanded] = useState(false);
return (
<div className="agent-card">
{/* Component content */}
</div>
);
}- Use present tense ("add feature" not "added feature")
- Use imperative mood ("move cursor to..." not "moves cursor to...")
- Limit first line to 72 characters
- Reference issues and pull requests when relevant
feat(api): add WebSocket support for real-time updates
- Implement WebSocket endpoint for agent updates
- Add connection management and auto-reconnect
- Update frontend to use WebSocket for live data
Closes #123
- Use clear, concise language
- Include code examples
- Keep line length reasonable (80-100 chars)
- Use proper markdown formatting
- Add table of contents for long docs
- Add provider to
backend/src/ai01/agents/trading_agent.py - Create example config in
backend/config/models/ - Add provider to documentation
- Add logo to
frontend/public/logos/ - Add tests
- Create new toolkit in
backend/src/ai01/toolkits/ - Inherit from
BaseDEXToolkit - Implement all required methods
- Add configuration support
- Add tests
- Update documentation
- Add coin icon to
frontend/public/coins/ - Update
coinIcons.ts - Add to model configs
- Update documentation
# backend/tests/test_risk_management.py
import pytest
from ai01.agents.trading_agent import check_single_trade_limit
def test_single_trade_limit_no_positions():
"""Test single trade limit when no positions exist."""
assert check_single_trade_limit(
amount=500,
available=1000,
has_positions=False
)
assert not check_single_trade_limit(
amount=600,
available=1000,
has_positions=False
)
def test_single_trade_limit_with_positions():
"""Test single trade limit when positions exist."""
assert check_single_trade_limit(
amount=300,
available=1000,
has_positions=True
)
assert not check_single_trade_limit(
amount=400,
available=1000,
has_positions=True
)// frontend/tests/AgentCard.test.tsx
import { render, screen } from '@testing-library/react';
import { AgentCard } from '@/components/AgentCard';
describe('AgentCard', () => {
it('renders agent name correctly', () => {
render(
<AgentCard
agentId="test-agent"
name="Test Agent"
balance={1000}
isRunning={true}
/>
);
expect(screen.getByText('Test Agent')).toBeInTheDocument();
});
it('shows running status', () => {
render(<AgentCard {...props} isRunning={true} />);
expect(screen.getByText(/running/i)).toBeInTheDocument();
});
});- 📖 Read the documentation
- 🐛 GitHub Issues: https://github.com/lukema95/roma-01/issues
- 💬 Discussions: https://github.com/lukema95/roma-01/discussions
- 📧 Email: lukema95@gmail.com
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Given credit in the changelog
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT License).
Thank you for contributing to ROMA-01! 🚀
We appreciate your time and effort in making this project better for everyone.