Contributing Guide
Overviewโ
This guide explains how to contribute to the MCP ADR Analysis Server project. We welcome contributions from the community and appreciate your interest in improving this tool.
Getting Startedโ
Prerequisitesโ
- Node.js 20.0.0 or higher
- npm 9.0.0 or higher
- Git
- Basic understanding of TypeScript and MCP
Development Setupโ
-
Fork and Clone
git clone https://github.com/your-username/mcp-adr-analysis-server.git
cd mcp-adr-analysis-server -
Install Dependencies
npm install -
Build the Project
npm run build -
Run Tests
npm test
Contribution Typesโ
Bug Reportsโ
When reporting bugs, please include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Node.js version, etc.)
Feature Requestsโ
For new features, please:
- Describe the use case
- Explain the expected behavior
- Consider backward compatibility
- Discuss implementation approach
Code Contributionsโ
-
Create a Branch
git checkout -b feature/your-feature-name -
Make Changes
- Follow existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test Your Changes
npm run test
npm run lint
npm run typecheck -
Commit Changes
git add .
git commit -m "feat: add your feature description" -
Push and Create PR
git push origin feature/your-feature-name
Code Styleโ
TypeScriptโ
- Use strict TypeScript configuration
- Prefer interfaces over types for object shapes
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
Testingโ
- Write unit tests for new functionality
- Use descriptive test names
- Follow AAA pattern (Arrange, Act, Assert)
- Aim for high test coverage
Documentationโ
- Update README.md for user-facing changes
- Add JSDoc comments for new functions
- Update API reference for new tools
- Follow Diataxis framework for documentation
Development Workflowโ
Branch Namingโ
feature/description- New featuresbugfix/description- Bug fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
Commit Messagesโ
Follow conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Test additions/changeschore:- Maintenance tasks
Pull Request Processโ
-
Create Pull Request
- Use descriptive title
- Link related issues
- Add detailed description
-
Review Process
- Address reviewer feedback
- Update PR as needed
- Ensure all checks pass
-
Merge
- Squash commits if requested
- Delete feature branch after merge
- Update version if needed
Testingโ
Running Testsโ
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run specific test suites
npm run test:unit
npm run test:integration
Test Structureโ
tests/unit/- Unit teststests/integration/- Integration teststests/fixtures/- Test data and fixtures
Documentationโ
Documentation Structureโ
docs/- Main documentationdocs/tutorials/- Step-by-step guidesdocs/how-to-guides/- Task-oriented guidesdocs/reference/- API and technical referencedocs/explanation/- Conceptual explanations
Writing Documentationโ
- Use clear, concise language
- Include code examples
- Add screenshots when helpful
- Keep documentation up to date
Release Processโ
Version Managementโ
- Follow semantic versioning (semver)
- Update
package.jsonversion - Update
CHANGELOG.md - Tag releases in Git
Release Stepsโ
- Update version in
package.json - Update
CHANGELOG.md - Create release PR
- Tag release in Git
- Publish to npm
Community Guidelinesโ
Code of Conductโ
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Respect different perspectives
Communicationโ
- Use GitHub Issues for discussions
- Be clear and concise
- Provide context for questions
- Help others when possible
Getting Helpโ
Resourcesโ
- README.md - Project overview
- API Reference - Technical documentation
- Troubleshooting Guide - Common issues
- Developer Guidance - Development details
Supportโ
- GitHub Issues for bug reports and feature requests
- GitHub Discussions for questions and ideas
- Pull Requests for code contributions
Recognitionโ
Contributors are recognized in:
CONTRIBUTORS.mdfile- Release notes
- Project documentation
- GitHub contributors page
Thank you for contributing to the MCP ADR Analysis Server project!