"From the constraints, gifts. From the spiral, safety."
Thank you for your interest in contributing to coherence-mcp! This MCP server provides coherence, governance, and safety primitives for the SpiralSafe ecosystem.
- Fork the repository and clone your fork
- Install dependencies:
npm install - Build the project:
npm run build - Run tests:
npm test
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following our code style guidelines
-
Write or update tests for your changes
-
Ensure all tests pass:
npm test npm run lint npm run build -
Commit your changes with clear, descriptive commit messages
-
Push to your fork and create a pull request
Use clear, descriptive commit messages:
[category] Brief description
Longer explanation if needed
Categories:
[feature]- New functionality[fix]- Bug fixes[docs]- Documentation changes[test]- Test additions or changes[refactor]- Code refactoring[chore]- Maintenance tasks[security]- Security improvements
Examples:
[feature] Add wave coherence threshold parameter[fix] Resolve bump validation schema issue[docs] Update MCP tool examples in README
- Use TypeScript strict mode
- Provide explicit types for function parameters and return values
- Use meaningful variable and function names
- Keep functions focused and single-purpose
- Avoid deeply nested code
- Use 2 spaces for indentation
- Use single quotes for strings
- Use semicolons
- Run
npm run lintto check formatting
- Write comments to explain why, not what
- Document complex algorithms or business logic
- Use JSDoc for public APIs and exported functions
Example:
/**
* Analyzes text for wave coherence patterns
* @param input - Text or reference to analyze
* @param options - Analysis options including thresholds
* @returns Wave analysis result with coherence score
*/
export async function analyzeWave(input: string, options?: WaveOptions): Promise<WaveResult> {
// Implementation
}- Write unit tests for new functionality
- Update existing tests when modifying behavior
- Use descriptive test names that explain what is being tested
- Follow the existing test patterns in
__tests__/
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run with coverage
npm test -- --coverageWhen adding or modifying MCP tools:
- Define the tool schema in the appropriate location
- Implement the handler following existing patterns
- Add error handling and validation
- Document the tool in README.md with examples
- Write tests for the tool functionality
- Test with an MCP client (e.g., Claude Desktop)
- Use lowercase with underscores:
wave_analyze,bump_validate - Be descriptive but concise
- Group related tools with common prefixes:
atom_*,gate_*,ops_*
- Update documentation if you're changing functionality
- Add tests for new features or bug fixes
- Ensure CI passes on your branch
- Fill out the PR template completely
- Request review from maintainers
- Address feedback promptly and respectfully
PRs will be reviewed for:
- Code quality and style
- Test coverage
- Documentation completeness
- Backwards compatibility
- Security implications
- Performance impact
Do not report security vulnerabilities through public GitHub issues.
Instead:
See SECURITY.md for more details.
- Never commit secrets or credentials
- Validate all user inputs
- Use parameterized queries/commands
- Follow principle of least privilege
- Document security-relevant decisions
Before adding a new dependency:
- Check if it's really needed - Can you implement it simply?
- Verify the license - Must be MIT/Apache/BSD compatible
- Check the package health - Is it maintained? Popular? Secure?
- Run security scan:
npm audit - Document why it's needed in your PR
- Keep README.md up to date with tool changes
- Use clear, simple language
- Provide complete examples
- Include both success and error cases
- Test all code examples
README.md- Main documentation and tool referencedocs/- Detailed guides and architecture docs- Inline code comments - Complex logic and algorithms
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Collaborate openly and transparently
- Respect different viewpoints and experiences
- Harassment or discriminatory language
- Personal attacks
- Trolling or inflammatory comments
- Publishing others' private information
- Other conduct inappropriate in a professional setting
- Open a Discussion
- Create an issue with the
questionlabel - Check existing documentation and issues first
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to coherence-mcp! 🚀
This package is part of a larger ecosystem:
| Repository | Purpose |
|---|---|
| spiralsafe-mono | Core monorepo |
| SpiralSafe | Theory/IP vault |
| coherence-mcp | This repo — MCP server |
| QDI | Quantum Divide Initiative |
See BRANDING.md for styling guidelines. See ROADMAP.md for planned features.
*~ Hope&&Sauced*
✦ The Evenstar Guides Us ✦