We love your input! We want to make contributing to Replicant as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Issue that pull request!
- Clone the repository:
git clone https://github.com/yourusername/replicant.git
cd replicant
- Install dependencies:
npm install
- Create a
.env
file for development:
ANTHROPIC_API_KEY=your_test_key
DISCORD_TOKEN=your_test_token
TELEGRAM_TOKEN=your_test_token
- Build the project:
npm run build
- Run tests:
npm test
replicant/
├── src/
│ ├── core/ # Core framework components
│ ├── integrations/ # Platform integrations
│ ├── utils/ # Utility functions
│ ├── examples/ # Example implementations
│ └── cli/ # CLI tools
├── tests/ # Test files
├── docs/ # Documentation
└── scripts/ # Build and maintenance scripts
- We use TypeScript for type safety
- Follow the existing code style
- Use meaningful variable names
- Write descriptive commit messages
- Comment your code when necessary
- Use ESLint and Prettier for formatting
- Update the README.md with details of changes to the interface
- Update the API.md with any API changes
- Update the package.json version following SemVer
- The PR will be merged once you have the sign-off of two maintainers
- Write unit tests for new functionality
- Ensure all tests pass before submitting PR
- Include integration tests for platform integrations
- Test edge cases and error handling
// Example test structure
describe('Agent', () => {
let agent: Agent;
beforeEach(() => {
agent = new Agent({
domain: 'test',
userId: 'test-agent',
platform: 'test',
capabilities: ['test'],
permissions: ['test']
});
});
it('should process messages correctly', async () => {
// Test implementation
});
});
- Keep README.md updated
- Document all public APIs in API.md
- Include JSDoc comments for TypeScript interfaces
- Provide examples for new features
- Update changelog for significant changes
When reporting bugs, include:
- Quick summary and/or background
- Steps to reproduce
- Be specific!
- Provide sample code if possible
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening)
When requesting features:
- Explain the problem you're trying to solve
- Describe the solution you'd like
- Describe alternatives you've considered
- Note any additional context
By contributing, you agree that your contributions will be licensed under its MIT License.