Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 2.11 KB

File metadata and controls

73 lines (47 loc) · 2.11 KB

Contributing to llmgo

First off, thank you for considering contributing to llmgo! It's people like you that make the open-source community such a fantastic place to learn, inspire, and create.

We welcome all contributions, from bug fixes and documentation improvements to new features (e.g., new Agent types, new VectorDB integrations).

Development Workflow

1. Fork & Clone

  1. Fork the repository on GitHub.

  2. Clone your fork locally:

    git clone https://github.com/YOUR-USERNAME/llmgo.git
    cd llmgo
  3. Initialize your local environment (This automatically installs Git hooks to format your code before committing):

    make setup

2. Branching Strategy

Create a new branch for your feature or bugfix. Use a descriptive name:

git checkout -b feature/redis-memory
# or
git checkout -b fix/router-nil-pointer

3. Making Changes

  • Follow idiomatic Go standards.
  • Write clear, concise commit messages.
  • Ensure your code focuses on Concurrency Safety and Zero-GC Bloat.

4. Running Tests (Crucial Step)

Before submitting a Pull Request, you must ensure all tests pass and code quality is maintained. We use Makefile to simplify this:

# 1. Format your code
make fmt

# 2. Run the linter
make lint

# 3. Run tests with Race Detector (Mandatory for llmgo)
make test-race

# 4. Check Test Coverage
make test-coverage

⚠️ Coverage Rule: We enforce a strict > 80% Test Coverage rule. If you add a new feature, please include the corresponding _test.go files. The CI pipeline will automatically reject PRs that drop the overall coverage below 80%.

5. Submitting a Pull Request (PR)

  1. Push your branch to your forked repository.
  2. Open a Pull Request against the main branch of the llmgo repository.
  3. Fill out the PR template, referencing any related issues.
  4. Wait for the CI Pipeline (GitHub Actions) to complete successfully.
  5. A maintainer will review your code shortly!

Getting Help

If you need help or have architectural questions, feel free to open a "Discussion" or an Issue with the question label.