Thank you for your interest in contributing to π Multi-Agent! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Commit Message Guidelines
This project adheres to our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/Pi-Multi-Agent.git cd Pi-Multi-Agent - Add the upstream remote:
git remote add upstream https://github.com/jwangkun/Pi-Multi-Agent.git
- Install dependencies:
npm install
- Node.js 18+
- npm or yarn
- A DeepSeek API key (or OpenAI-compatible endpoint) for testing
- Copy the example environment file:
cp .env.example .env
- Add your API key to
.env:DEEPSEEK_API_KEY=your_api_key_here
# Build the project
npm run build
# Run type checking
npm run typecheck
# Run tests
npm run test
# Run linting
npm run lint# Watch mode for development
npm run dev-
Create a branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following our coding standards
-
Test your changes thoroughly:
- Run all tests:
npm run test - Ensure type checking passes:
npm run typecheck - Test with example scripts if applicable
- Run all tests:
-
Commit your changes with clear, descriptive messages (see Commit Message Guidelines)
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub:
- Use a clear title describing the change
- Fill out the PR template with all relevant information
- Link any related issues
- Wait for CI checks to pass
- Respond to reviewer feedback
- Use TypeScript for all code (no
.jsfiles in source) - Follow strict mode: no
anytypes in public APIs - Use meaningful type names and interfaces
- Prefer
constoverletwhere possible
- Follow existing code formatting (Prettier configuration)
- Use 2-space indentation
- Maximum line length: 100 characters
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Keep files focused on a single responsibility
- Group related functionality in modules
- Use index files for clean exports
- Follow the existing directory structure
- Files: kebab-case (e.g.,
agent-cluster.ts) - Classes: PascalCase (e.g.,
AgentCluster) - Functions/Variables: camelCase (e.g.,
createPlan) - Constants: UPPER_SNAKE_CASE (e.g.,
DEFAULT_TIMEOUT) - Types/Interfaces: PascalCase (e.g.,
AgentConfig)
- Place tests alongside source files (
.test.tssuffix) - Use descriptive test names:
should [expected behavior] when [condition] - Test edge cases and error conditions
- Mock external dependencies (API calls, file system)
- Keep tests independent and isolated
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run specific test file
npx vitest run src/core/agent.test.tsAim for high test coverage, especially for:
- Core functionality
- Public APIs
- Error handling
- Edge cases
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(orchestration): add deep planner with LLM-powered task decomposition
- Implement DeepPlanner class with OpenAI API integration
- Add task decomposition with dependency graph
- Include quality thresholds and retry logic
Closes #123
fix(core): handle timeout errors in agent execution
- Add TimeoutError to error hierarchy
- Implement timeout handling in Agent.execute()
- Add tests for timeout scenarios
docs(readme): update quick start examples
- Add installation instructions
- Include collaboration mode examples
- Fix code snippet formatting
If you have questions or need help, please:
- Check existing issues and discussions
- Read the documentation
- Ask in the project community channels
Thank you for contributing to π Multi-Agent! 🎉