Contributing
Thank you for your interest in contributing to AgentSync. To maintain high code quality and consistency, please follow these guidelines.
Development Workflow
Section titled “Development Workflow”- Fork the repository and create a feature branch from
main. - Implement your changes.
- If it’s core logic, it goes in
src/(Rust). - If it’s related to the NPM package, it goes in
npm/agentsync/.
- If it’s core logic, it goes in
- Verify your changes:
- For Rust: run
cargo test,cargo fmt, and (optionally)cargo clippy. - For TypeScript: run
pnpm run typecheckandpnpm run buildto ensure types and the distribution build succeed.
- For Rust: run
- Open a Pull Request with a clear description of the changes and why they are needed.
Code Style
Section titled “Code Style”- Follow the official Rust style guide.
- Use
cargo fmtbefore committing. - Prefer explicit error handling with
Result<T, E>. - Write unit tests for new functionality.
TypeScript
Section titled “TypeScript”- Use strict typing. No
anyallowed. - Follow the existing kebab-case naming convention for files.
Commit Messages
Section titled “Commit Messages”We follow the Conventional Commits specification:
feat: ...for new features.fix: ...for bug fixes.docs: ...for documentation changes.refactor: ...for code changes that neither fix a bug nor add a feature.
Example: feat: add support for new AI assistant targets
Pull Request Process
Section titled “Pull Request Process”- Ensure the CI pipeline passes and all tests succeed locally.
- Include a clear description of the change, why it is needed, and any migration or compatibility notes.
- Add or update tests and documentation where appropriate.
- Link any related issues in the PR description.
- Once approved by a maintainer, a reviewer will merge the PR.
Getting Help
Section titled “Getting Help”If you have questions, feel free to open a GitHub Issue or start a Discussion.