Thank you for your interest in contributing to Forge! This guide will help you get started with contributing to our AI-enhanced terminal development environment.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/antinomyhq/forge/llms.txt
Use this file to discover all available pages before exploring further.
Ways to Contribute
There are many ways to contribute to Forge:- 🐛 Report bugs - Help us identify and fix issues
- 💡 Suggest features - Share ideas for new capabilities
- 📝 Improve documentation - Make our docs clearer and more comprehensive
- 🔧 Submit code - Fix bugs or implement new features
- 🧪 Write tests - Improve test coverage and reliability
- 🎨 Enhance UI/UX - Improve the terminal interface and user experience
- 🌍 Help others - Answer questions on Discord and GitHub
- ⭐ Spread the word - Star the repository and share with others
Getting Started
Prerequisites
Before contributing, ensure you have:- Rust toolchain (1.75+) - Install from rustup.rs
- Git - For version control
- GitHub account - For submitting contributions
- Node.js (16+) - For npm-related tasks
- Optional: GitHub CLI (
gh) for PR operations
Setting Up Development Environment
- Fork the repository Visit github.com/antinomyhq/forge and click “Fork”
-
Clone your fork
-
Add upstream remote
-
Install dependencies
-
Verify setup
Development Guidelines
Code Style
Forge follows standard Rust conventions with some project-specific guidelines:-
Formatting: Use
rustfmtfor code formatting -
Linting: Run
clippybefore submitting -
Documentation: Write Rust docs (
///) for all public APIs- Document parameters with
# Arguments - Document errors with
# Errors - Focus on clear functionality descriptions
- Avoid code examples (docs are for LLMs)
- Document parameters with
Error Handling
- Use
anyhow::Resultfor error handling in services and repositories - Create domain errors using
thiserror - Never implement
Fromfor converting domain errors; convert them manually
Writing Tests
All tests should follow a three-step pattern:- Use
pretty_assertionsfor better error messages - Use fixtures to create test data
- Keep tests in the same file as source code
- Use
Default,new(), andderive_setters::Settersfor test objects - Prefer
unwrap()in tests; useexpect()when error context is useful - Assert on full objects rather than individual fields
Running Tests
Building
Project Structure
Forge follows a modular architecture:Service Implementation Guidelines
When implementing services: Core principles:- No service-to-service dependencies
- Services depend only on infrastructure abstractions
- Single type parameter for infrastructure
- No trait objects (
Box<dyn ...>) - Constructor pattern without type bounds
- Use
Arc<T>for infrastructure - Tuple struct pattern for simple services
Making Changes
Creating a Branch
Commit Guidelines
- Write clear, descriptive commit messages
-
Use conventional commit format:
-
Include co-author attribution:
Submitting Pull Requests
-
Push your changes
-
Create a pull request
- Visit your fork on GitHub
- Click “New Pull Request”
- Select your feature branch
- Fill out the PR template
-
PR checklist
- Tests pass (
cargo test) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy) - Documentation is updated
- Commit messages follow conventions
- PR description explains changes clearly
- Co-author attribution included
- Tests pass (
- Sign the CLA First-time contributors must sign the Contributor License Agreement. The CLA assistant bot will guide you through this process.
Code Review Process
- Maintainers will review your PR
- Address feedback by pushing new commits
- Once approved, your PR will be merged
- Squash commits may be used for cleaner history
Reporting Issues
Bug Reports
Use the bug report template and include:- Clear description of the bug
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Error logs (run with
--verbose) - Forge version (
forge --version) - Operating system and version
- AI provider and model
- Configuration (
forge.yaml, with secrets removed)
Feature Requests
Use the feature request template and describe:- Use case - What problem does this solve?
- Proposed solution - How should it work?
- Alternatives - What other solutions have you considered?
- Additional context - Screenshots, examples, references
Other Issue Types
We also have templates for:- Documentation improvements
- Performance issues
- Provider integration requests
Documentation Contributions
Documentation lives in thedocs/ directory and uses Mintlify.
Setting Up Documentation Environment
http://localhost:3000
Documentation Guidelines
- Use active voice: “Run the command” not “The command should be run”
- Address the reader directly: Use “you” instead of “the user”
- Keep sentences concise: One idea per sentence
- Lead with the goal: Start with what the user wants to accomplish
- Use consistent terminology: Don’t alternate between synonyms
- Include examples: Show, don’t just tell
- Use sentence case for headings
- Bold UI elements: Click Settings
- Code formatting: For file names, commands, paths
Community Guidelines
Code of Conduct
We expect all contributors to:- Be respectful and inclusive
- Welcome newcomers and help them learn
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy towards other community members
Getting Help
- Discord: discord.gg/kRZBPpkgwq - Chat with the community
- GitHub Discussions: Ask questions and share ideas
- GitHub Issues: Report bugs and request features
Recognition
Contributors are recognized through:- GitHub contributor graph
- Release notes acknowledgments
- Community shoutouts on Discord
Release Process
Releases are managed by maintainers:- Version is bumped following Semantic Versioning
- Changelog is updated with release notes
- Release is tagged and published to GitHub
- NPM package is updated
- Documentation is updated
Git Operations
- Git and GitHub CLI (
gh) are pre-installed in the development environment - Always use
Co-Authored-By: ForgeCode <noreply@forgecode.dev>for commits - Use GitHub CLI for PR operations when possible
Additional Resources
- Source Code: github.com/antinomyhq/forge
- Documentation: forgecode.dev/docs
- Discord: discord.gg/kRZBPpkgwq
- Issue Templates: GitHub Issues
- Agent Guidelines: See
AGENTS.mdin the repository
Questions?
If you have questions about contributing:- Check this guide and the FAQ
- Search existing issues
- Ask on Discord
- Create a GitHub Discussion