Skip to content

Commit dd72e00

Browse files
authored
Improve contributing.md (#464)
1 parent bb0875d commit dd72e00

File tree

1 file changed

+41
-13
lines changed

1 file changed

+41
-13
lines changed

CONTRIBUTING.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,50 @@
11
# Contributing to Trinity-RFT
22

3-
Thank you for your interest in contributing to Trinity-RFT! We welcome all types of contributions, including code, documentation, tests, bug reports, and feature suggestions.
3+
Thank you for your interest in Trinity-RFT! Our framework is built on a decoupled architecture consisting of the **Explorer**, **Trainer**, and **Buffer**. We welcome all forms of contributions—from core feature enhancements and new algorithms to documentation and bug reports.
44

5-
## How to Contribute
5+
## Where to Contribute
66

7-
1. Fork this repository and create your branch.
8-
2. Follow the project coding standards (run `pre-commit run --all-files` before committing).
9-
3. Write or update unit tests (`python -m pytest tests`).
10-
4. Submit a Pull Request with a clear description of your changes and motivation.
7+
Trinity-RFT provides modular interfaces for different technical interests. Please refer to our [Developer Guide](https://modelscope.github.io/Trinity-RFT/en/main/tutorial/develop_overview.html) for detailed implementation standards:
118

12-
## Issues and Suggestions
9+
| Focus Area | Interface/Code Directory | Potential Tasks |
10+
| :--- | :--- | :--- |
11+
| **Agentic Workflows** | `Workflow` | Implementing multi-turn dialogs, ReAct workflows, or domain-specific agent training capabilities (e.g., Coding, Math). |
12+
| **RL Algorithms** | `Algorithm` | Integrating new RL algorithms (e.g., RLOO, GSPO) or optimizing loss functions and advantage estimations. |
13+
| **Data & Experience** | `Operator`, `Selector` | Designing data cleaning, selection, reward modeling, or experience augmentation and replay strategies. |
14+
| **Use Cases** | `Examples` | Sharing new usages and improving built-in demonstrated configurations. |
15+
| **General Utility** | `docs/`, `tests/` | Improving documentation, adding translations, fixing bugs, or enhancing CLI/GUI tools. |
1316

14-
- Please submit bug reports and feature requests via [GitHub Issues](https://github.com/modelscope/Trinity-RFT/issues).
15-
- Provide detailed reproduction steps and environment information when possible.
17+
## How to Start: The "Plugin-First" Approach
1618

17-
## Other Contributions
19+
To minimize friction and keep the core codebase stable, we recommend the **Plugin-First** workflow for new features:
1820

19-
- Documentation improvements and translations are welcome.
20-
- For detailed development workflow and branch management, refer to the README and related documents.
21+
1. **Develop**: Create your custom module in the `trinity/plugins/` directory.
22+
2. **Auto-Load**: Trinity-RFT automatically detects and registers modules in this directory at runtime without requiring changes to the framework's internal code.
23+
3. **Integrate**: Once your feature is stable and verified, submit a Pull Request to "graduate" your code from `plugins/` into the formal modules (e.g., `trinity/algorithm/` or `trinity/common/workflows/`).
2124

22-
Thank you for contributing!
25+
## Submission Checklist
26+
27+
To ensure a smooth review process, please complete the following:
28+
29+
1. **Registration**: If moving code from a plugin to the core framework, register it in the corresponding `__init__.py` mapping.
30+
2. **Testing**: Add or update unit tests in the `tests/` directory. Verify your changes by running:
31+
```bash
32+
python -m pytest tests/
33+
```
34+
3. **Code Style**: We use `pre-commit` to maintain code quality. Run the following before committing:
35+
```bash
36+
pre-commit run --all-files
37+
```
38+
4. **Description**: Provide a clear PR title and a description that explains the **motivation** (why this change is needed) and the **implementation** (how it works).
39+
40+
---
41+
42+
## Additional Guidelines
43+
44+
- **Bug Reports & Feature Requests**: Please use [GitHub Issues](https://github.com/modelscope/Trinity-RFT/issues). For bugs, include reproduction steps, environment info, and error logs.
45+
- **Major Changes**: For significant architectural changes or large features, please open an issue first to discuss the design with the maintainers.
46+
- **Documentation**: We highly value improvements to our tutorials, docstrings, and translations.
47+
48+
*For a deep dive into the framework's architecture, please refer to the [Full Doc](https://modelscope.github.io/Trinity-RFT/en/main/index.html).*
49+
50+
**Thank you for helping us build a better Reinforcement Fine-Tuning framework!**

0 commit comments

Comments
 (0)