First off, thank you for considering contributing to Coderrr! 🎉
This project and everyone participating in it is governed by our commitment to providing a welcoming and inspiring community for all.
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps which reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include screenshots if possible
- Include your environment details (OS, Node.js version, Python version)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain the behavior you expected to see
- Explain why this enhancement would be useful
The project follows a strict branching workflow to maintain code quality:
Branch Structure:
main- Production-ready code (protected)dev- Development branch for integrationfeature/*- Feature branches for new work
Workflow:
- Feature branches merge to
dev devmerges tomainafter testing- Direct feature → main PRs are blocked by CI
Creating a Pull Request:
-
Create a feature branch from
dev:git checkout dev git pull origin dev git checkout -b feature/your-feature-name
-
Make your changes and commit:
git add . git commit -m "feat: add your feature description"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create PR to
devbranch (NOT tomain)- Go to GitHub and create a Pull Request
- Base branch:
dev - Compare branch:
feature/your-feature-name
-
Wait for CI tests to pass:
- All tests run automatically on PR
- Tests run in development environment
- Fix any failures before requesting review
-
After merge to
dev:- Maintainers will create
dev→mainPR - Production tests run before merge to
main
- Maintainers will create
PR Requirements:
- Fill in the required template
- Follow the JavaScript and Python style guides
- Include thoughtful tests
- Update documentation as needed
- End all files with a newline
- All CI checks must pass
- Node.js 16+ and npm
- Python 3.8+
- Git
-
Fork and clone the repository
git clone https://github.com/YOUR-USERNAME/coderrr.git cd coderrr -
Install Node.js dependencies
npm install
-
Set up Python virtual environment
python -m venv env # On Windows: .\env\Scripts\Activate.ps1 # On Linux/Mac: source env/bin/activate
-
Install Python dependencies
pip install -r backend/requirements.txt
-
Create your
.envfilecp .env.example .env # Edit .env with your API keys -
Link the CLI for local development
npm link
-
Create your feature branch from
devgit checkout dev git pull origin dev git checkout -b feature/your-feature-name
# Run all tests
npm test
# Run specific test
node test/test-scanner.js
node test/test-agent-scanner.jscoderrr/
├── src/ # Core Node.js modules
├── bin/ # CLI entry points
├── backend/ # Python FastAPI backend
│ ├── main.py # Backend server
│ └── requirements.txt
├── test/ # Test files
├── docs/ # Documentation
├── examples/ # Usage examples
└── .github/ # GitHub workflows and templates
- Use 2 spaces for indentation
- Use semicolons
- Use single quotes for strings
- Use meaningful variable names
- Add JSDoc comments for functions
- Follow existing code patterns
- Follow PEP 8
- Use 4 spaces for indentation
- Use type hints where appropriate
- Add docstrings to functions and classes
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Use conventional commit format (feat, fix, docs, style, refactor, test, chore)
Commit Prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, semicolons, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Example:
feat: add codebase scanner feature
- Implement automatic project scanning
- Cache results for performance
- Add tests for scanner functionality
Closes #42
The backend (backend/main.py) handles:
- AI model communication (Mistral/GitHub Models)
- Request/response processing
- JSON schema enforcement
The CLI (src/) handles:
- User interaction
- File operations
- Command execution with permission
- TODO list management
- Auto-testing
- Separation of Concerns: Backend handles AI, frontend handles file system
- Permission-Based Execution: All commands require user approval
- Codebase Awareness: Scanner provides project context to AI
- Modular Architecture: Each feature is a separate module
- Strict Branching Model:
feature→dev→mainworkflow enforced by CI
- Write tests for new features
- Ensure existing tests pass
- Test both success and failure cases
- Include integration tests for major features
- Update README.md for user-facing changes
- Update .github/copilot-instructions.md for architecture changes
- Add JSDoc comments to new functions
- Create examples for new features
-
Create a feature branch from
dev:git checkout dev git checkout -b feature/your-feature-name
-
Make your changes:
- Write code following style guides
- Add/update tests
- Update documentation
-
Test locally:
npm test node test/test-scanner.js -
Commit with conventional format:
git commit -m "feat: your feature description" -
Push and create PR to
dev:git push origin feature/your-feature-name
- Create PR on GitHub:
feature/your-feature-name→dev
- Create PR on GitHub:
-
CI/CD Automated Checks:
- Branch workflow validation (blocks feature → main)
- Node.js tests (3 OS × 3 versions = 9 jobs)
- Python tests (3 OS × 4 versions = 12 jobs)
- Integration tests
- Linting & security audits
- Environment: Development
-
Code Review:
- Respond to review feedback
- Make requested changes
- Re-push to update PR
-
After approval and merge to
dev:- Maintainers will handle
dev→mainPR - Production environment tests run
- Deployment to production
- Maintainers will handle
-
Celebrate when merged! 🎉
Contributors will be added to:
- README.md Contributors section
- GitHub contributors page
- Release notes
Feel free to:
- Open an issue with the "question" label
- Start a discussion in GitHub Discussions
- Reach out to maintainers
Thank you for contributing! 🚀