90 lines
2.1 KiB
Markdown
90 lines
2.1 KiB
Markdown
# 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)](#adding-a-new-persona-no-code-required)
|
|
- [Local Development Setup](#local-development-setup)
|
|
- [Testing & Quality Checks](#testing--quality-checks)
|
|
- [Pull Request Guidelines](#pull-request-guidelines)
|
|
|
|
---
|
|
|
|
## 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:
|
|
|
|
```toml
|
|
[[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
|
|
```
|
|
|
|
3. Test your persona locally:
|
|
```bash
|
|
brokecrew chat --persona devops "Write an optimized multistage Dockerfile for Rust"
|
|
```
|
|
4. 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:
|
|
```bash
|
|
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:
|
|
```bash
|
|
cargo test
|
|
```
|
|
|
|
Run clippy:
|
|
```bash
|
|
cargo clippy --all-targets -- -D warnings
|
|
```
|
|
|
|
Format code:
|
|
```bash
|
|
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.
|