Contributing
Guidelines for code contributions, development workflow, commit messages, and pull requests
Related: Getting Started | Architecture | API Reference
Thank you for your interest in contributing to duyetbot-agent!
Code of Conduct
Be respectful and constructive. We welcome contributors of all skill levels.
Getting Started
- Fork the repository
- Clone your fork:
- Install dependencies:
- Create a branch:
Development Workflow
1. Read PLAN.md
Before starting work, read PLAN.md to understand:
- Current phase and priorities
- Dependencies between tasks
- What has been completed
2. Make Changes
- Write clear, documented code
- Follow existing patterns
- Add tests for new functionality
3. Test Your Changes
4. Commit
Use semantic commit messages:
Format: <type>: <description in lowercase>
5. Push and Create PR
Then create a Pull Request on GitHub.
Commit Types
| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation |
test | Adding tests |
refactor | Code refactoring |
perf | Performance improvement |
chore | Maintenance |
ci | CI/CD changes |
build | Build system |
Code Style
TypeScript
- Use strict TypeScript (no
anywithout justification) - Export types from
@duyetbot/typespackage - Use Zod for runtime validation
Formatting
- Use Biome for linting and formatting
- Run
pnpm run formatbefore committing
Testing
- Write tests for all new code
- Use Vitest for testing
- Follow existing test patterns
- Aim for high coverage
Documentation
- Document public APIs with JSDoc
- Update README/docs for user-facing changes
- Include examples in documentation
Project Structure
When adding new features:
Adding a New Tool
-
Create tool in
packages/tools/src/: -
Register in
packages/tools/src/registry.ts -
Add tests in
packages/tools/src/__tests__/ -
Export from
packages/tools/src/index.ts
Adding a New LLM Provider
-
Create adapter in
packages/providers/src/: -
Register in
packages/providers/src/factory.ts -
Add tests
-
Update documentation
Pull Request Guidelines
Title
Use semantic format: feat: add new feature
Description
- Describe what changed and why
- Link to related issues
- Include testing instructions
Checklist
- Tests pass (
pnpm test) - Linting passes (
pnpm run lint) - Types check (
pnpm run type-check) - Documentation updated if needed
- PLAN.md updated if completing tasks
Reporting Issues
Bug Reports
Include:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment (Node version, OS)
- Error messages/logs
Feature Requests
Include:
- Use case description
- Proposed solution
- Alternatives considered
Questions?
- Open a GitHub Discussion
- Check existing issues for similar questions
- Read the Architecture docs
License
By contributing, you agree that your contributions will be licensed under the MIT License.