Contributing

We welcome contributions to TinyBrain! This document provides guidelines for contributing to the project.

Getting Started

Prerequisites

Development Setup

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/yourusername/tinybrain.git
    cd tinybrain
    
  3. Install dependencies:
    go mod download
    
  4. Build the project:
    make build
    
  5. Run tests:
    make test
    

Contribution Guidelines

Code Style

Commit Messages

Use conventional commit format:

type(scope): description

[optional body]

[optional footer]

Types:

Examples:

feat(intelligence): add OSINT data collection capabilities
fix(memory): resolve memory leak in search functionality
docs(api): update API documentation for new endpoints

Pull Request Process

  1. Create a feature branch from main
  2. Make your changes
  3. Add tests for new functionality
  4. Update documentation if needed
  5. Run tests and ensure they pass
  6. Submit a pull request

Pull Request Template

## Description
Brief description of changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [ ] Tests pass locally
- [ ] New tests added for new functionality
- [ ] Manual testing completed

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or breaking changes documented)

Development Areas

Core Features

Intelligence Features

Reverse Engineering

Security Patterns

Integration

Testing

Unit Tests

go test ./internal/...

Integration Tests

go test -tags=integration ./...

Test Coverage

go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

Performance Tests

go test -bench=. ./...

Documentation

Code Documentation

API Documentation

User Documentation

Security

Security Guidelines

Vulnerability Reporting

Report security vulnerabilities privately:

  1. Email: security@tinybrain.dev
  2. Use PGP encryption if possible
  3. Include detailed reproduction steps
  4. Allow reasonable time for response

Security Review Process

Performance

Performance Guidelines

Performance Testing

go test -bench=. -benchmem ./...

Performance Monitoring

Release Process

Version Numbering

We use semantic versioning (MAJOR.MINOR.PATCH):

Release Checklist

Release Steps

  1. Update version numbers
  2. Update CHANGELOG
  3. Create release branch
  4. Run full test suite
  5. Create release tag
  6. Build and test release artifacts
  7. Publish release

Community

Communication

Code of Conduct

We follow the Contributor Covenant Code of Conduct:

Recognition

Contributors are recognized in:

Getting Help

Documentation

Support Channels

Mentorship

License

By contributing to TinyBrain, you agree that your contributions will be licensed under the MIT License.

Thank You

Thank you for considering contributing to TinyBrain! Your contributions help make security tools more accessible and effective for the community.