Thank you for your interest in contributing to Coding Engine! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Coding Standards
- Testing
- Documentation
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
- Python 3.11+
- Node.js 20+
- Docker Desktop
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/coding-engine.git cd coding-engine - Add the upstream remote:
git remote add upstream https://github.com/ORIGINAL_OWNER/coding-engine.git
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Set up pre-commit hooks
pre-commit installcd dashboard-app
npm install
npm run dev # Web mode
npm run dev:electron # Electron modecp .env.example .env
# Edit .env with your configurationBefore creating a bug report:
- Check existing issues to avoid duplicates
- Collect information about the bug:
- Stack trace
- OS and Python version
- Steps to reproduce
Create a bug report using our bug report template.
We welcome feature suggestions! Please:
- Check existing issues and discussions
- Describe the problem your feature would solve
- Explain your proposed solution
Use our feature request template.
- Find an issue - Look for issues labeled
good first issueorhelp wanted - Discuss - Comment on the issue to let others know you're working on it
- Branch - Create a feature branch from
main - Code - Write your code following our standards
- Test - Add tests for your changes
- Document - Update documentation as needed
- Submit - Open a pull request
- Code follows the project's coding standards
- All tests pass locally
- New code has appropriate test coverage
- Documentation is updated
- Commit messages are clear and descriptive
-
Title: Use a clear, descriptive title
feat: Add new agent for database migrationsfix: Resolve race condition in EventBusdocs: Update API documentation
-
Description: Include:
- Summary of changes
- Related issue numbers
- Screenshots for UI changes
- Breaking changes (if any)
-
Size: Keep PRs focused and reasonably sized
- Maintainers will review your PR
- Address any requested changes
- Once approved, a maintainer will merge your PR
- Follow PEP 8 style guide
- Use type hints for function signatures
- Maximum line length: 100 characters
- Use descriptive variable names
# Good
async def process_event(event: Event, timeout: float = 5.0) -> bool:
"""Process an event and return success status."""
...
# Bad
async def proc(e, t=5):
...- Use TypeScript strict mode
- Follow React best practices
- Use functional components with hooks
- Prefer named exports
// Good
export function ProjectCard({ project }: ProjectCardProps): JSX.Element {
const [isLoading, setIsLoading] = useState(false);
...
}
// Bad
export default function(props) {
var loading = false;
...
}Follow Conventional Commits:
feat: Add new feature
fix: Fix bug
docs: Update documentation
style: Format code (no logic changes)
refactor: Refactor code
test: Add or update tests
chore: Update build scripts, etc.
# Python tests
pytest
# With coverage
pytest --cov=src --cov-report=html
# Specific test file
pytest tests/mind/test_event_bus.py -v
# Dashboard tests
cd dashboard-app
npm test- Write tests for new features
- Update tests for bug fixes
- Aim for meaningful coverage, not just high numbers
- Test edge cases and error conditions
# Example test
async def test_event_bus_publishes_to_subscribers():
bus = EventBus()
received = []
async def handler(event):
received.append(event)
bus.subscribe(EventType.BUILD_SUCCEEDED, handler)
await bus.publish(Event(type=EventType.BUILD_SUCCEEDED, data={}))
assert len(received) == 1
assert received[0].type == EventType.BUILD_SUCCEEDED- Add docstrings to all public functions and classes
- Use Google-style docstrings for Python
- Use JSDoc for TypeScript
def create_agent(name: str, config: AgentConfig) -> AutonomousAgent:
"""Create and configure an autonomous agent.
Args:
name: The unique identifier for the agent.
config: Configuration options for the agent.
Returns:
A configured AutonomousAgent instance ready to start.
Raises:
ValueError: If the name is already in use.
"""
...- Update README.md for user-facing changes
- Update CLAUDE.md for developer-facing changes
- Add inline comments for complex logic
- Extend
AutonomousAgentbase class - Define
subscribed_eventsproperty - Implement
should_act()andact()methods - Register in orchestrator
class MyCustomAgent(AutonomousAgent):
"""Custom agent for specific task."""
@property
def subscribed_events(self) -> list[EventType]:
return [EventType.BUILD_SUCCEEDED]
async def should_act(self, event: Event) -> bool:
return event.type in self.subscribed_events
async def act(self) -> None:
# Implement agent logic
...- Open a Discussion
- Check existing issues and documentation
- Join our community chat (coming soon)
Thank you for contributing to Coding Engine!