Skip to content

How to Contribute

We welcome contributions! Here's how to get started.

Quick Start

bash
git clone https://github.com/Totoro-jam/battle-tested-patterns.git
cd battle-tested-patterns
pnpm install
pnpm dev        # Start docs dev server
pnpm test       # Run all tests (exercises + docs components)

Types of Contributions

Add a New Pattern

  1. Open an Issue to propose the pattern
  2. Follow SOP 01: New Pattern
  3. Submit a PR with the filled-out checklist

Add a Language Implementation

Improve Documentation

  • Fix typos, clarify explanations, improve diagrams
  • Use commit type docs:

Quality Bar

Every pattern must meet these minimums:

  • ≥ 2 production proofs with precise GitHub links (to line numbers)
  • TypeScript implementation + ≥ 1 other language (Rust/Go/Python)
  • Exercise files in all 4 languages (TS, Rust, Go, Python) + answer files
  • Chinese translation with identical code blocks
  • All tests pass (pnpm test · cargo test · go test ./... · pytest), no lint errors

See the full checklist in the PR template.

Commit Convention

We use Conventional Commits:

text
feat: add cooperative-scheduling pattern
fix: update broken Linux source link in bitmask
docs: improve Core Idea diagram for double-buffering
test: add advanced exercise for min-heap
ci: add Go test step to CI workflow
chore: update dependencies

Released under the MIT License.