brokecrew/CONTRIBUTING.md

2.1 KiB

Contributing to BrokeCrew

Thank you for contributing to BrokeCrew! We want adding personas and extending fallback models to be a 5-minute, zero-code task that anyone can do.

Table of Contents


Adding a New Persona (No Code Required)

You do not need to touch Rust code to add a persona to BrokeCrew.

  1. Open config/personas.example.toml (or your local ~/.config/brokecrew/personas.toml).
  2. Append a new [[persona]] block:
[[persona]]
name = "devops"
system_prompt = "You are a cloud infrastructure and SRE expert. Produce robust Dockerfiles, Kubernetes manifests, and CI scripts."
trigger_words = ["docker", "k8s", "kubernetes", "ci", "deploy", "nginx", "terraform"]

[[persona.candidates]]
id = "meta-llama/llama-3.3-70b-instruct:free"
tier = "free"
is_stealth = false

[[persona.candidates]]
id = "deepseek/deepseek-r1:free"
tier = "free"
is_stealth = false

[[persona.candidates]]
id = "google/gemini-2.0-flash-001"
tier = "paid"
is_stealth = false
  1. Test your persona locally:
brokecrew chat --persona devops "Write an optimized multistage Dockerfile for Rust"
  1. Submit a Pull Request with the tag good-first-issue!

Local Development Setup

Prerequisites:

  • Rust 1.75+ (or latest stable)
  • OpenRouter API key (optional for mocked tests; required for live chat)

Clone and build:

git clone https://github.com/brokecrew/brokecrew.git
cd brokecrew
cargo build

Testing & Quality Checks

BrokeCrew enforces strict clippy and test passes in CI across Linux, macOS, and Windows.

Run tests:

cargo test

Run clippy:

cargo clippy --all-targets -- -D warnings

Format code:

cargo fmt --check

Pull Request Guidelines

  1. Ensure all tests pass and cargo clippy --all-targets -- -D warnings reports zero warnings.
  2. Never commit API keys or private tokens.
  3. Keep library modules decoupled from CLI formatting.