Skip to content

Commit fcf3ed0

Browse files
committed
docs: add contributing guidelines
Provide guidance for new contributors on how to set up the development environment and submit changes. Signed-off-by: leocavalcante <[email protected]>
1 parent 75ceb9e commit fcf3ed0

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

CONTRIBUTING.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Contributing to OpenCoder
2+
3+
Thank you for considering contributing to OpenCoder! This document outlines the process for contributing to this project.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/opencode-plugin-opencoder.git`
9+
3. Install dependencies: `bun install`
10+
4. Create a branch: `git checkout -b feature/your-feature`
11+
12+
## Development
13+
14+
### Prerequisites
15+
16+
- [Bun](https://bun.sh) runtime
17+
- [OpenCode](https://opencode.ai) (optional, for testing agents)
18+
19+
### Commands
20+
21+
```bash
22+
# Install dependencies
23+
bun install
24+
25+
# Run linter
26+
bun run lint
27+
28+
# Fix lint issues
29+
bun run lint:fix
30+
31+
# Format code
32+
bun run format
33+
34+
# Run tests
35+
bun test
36+
37+
# Test postinstall script
38+
node postinstall.mjs
39+
```
40+
41+
### Project Structure
42+
43+
- `agents/` - Agent markdown files (core functionality)
44+
- `src/` - TypeScript source code (plugin metadata)
45+
- `tests/` - Test files
46+
- `postinstall.mjs` - Installs agents to user config
47+
- `preuninstall.mjs` - Removes agents on uninstall
48+
49+
## Making Changes
50+
51+
### Code Style
52+
53+
- Use tabs for indentation
54+
- Use double quotes for strings
55+
- No semicolons (unless required)
56+
- Run `bun run lint:fix` before committing
57+
58+
### Modifying Agents
59+
60+
When editing agent files in `agents/`:
61+
62+
1. Be specific with instructions
63+
2. Include examples for expected output formats
64+
3. Define clear boundaries for agent behavior
65+
4. Test changes by running: `opencode @opencoder`
66+
67+
### Commit Messages
68+
69+
Use [Conventional Commits](https://conventionalcommits.org/):
70+
71+
- `feat:` - New features
72+
- `fix:` - Bug fixes
73+
- `docs:` - Documentation changes
74+
- `chore:` - Maintenance tasks
75+
- `refactor:` - Code refactoring
76+
- `test:` - Test changes
77+
78+
Example: `feat: add cycle limit option to orchestrator`
79+
80+
## Pull Requests
81+
82+
1. Ensure all tests pass: `bun test`
83+
2. Ensure code is linted: `bun run lint`
84+
3. Write a clear PR description
85+
4. Reference any related issues
86+
87+
## Reporting Issues
88+
89+
When reporting issues, please include:
90+
91+
- OpenCode version
92+
- Node.js/Bun version
93+
- Operating system
94+
- Steps to reproduce
95+
- Expected vs actual behavior
96+
97+
## License
98+
99+
By contributing, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)