docs/agents/pr-conventions.md
PR titles follow Conventional Commits format. They become squash-merge commit messages and changelog entries.
<type>(<scope>): <description>
<type>(<scope>)!: <description> # Breaking changes
| Type | Use For |
|---|---|
feat | New CLI feature or major webui feature |
fix | Bug fix in CLI or major webui bug fix |
chore | Maintenance, upgrades, minor fixes, non-user-facing |
refactor | Code restructuring without behavior change |
docs | Documentation only (use with site scope for site/) |
test | Test-only changes (new tests, test fixes, test infra) |
ci | CI/CD changes |
revert | Revert previous change |
perf | Performance improvement |
Changelog visibility: Only feat, fix, and breaking changes (!) appear in release notes. Use ci, chore, test, docs, or refactor for changes that shouldn't be user-facing.
Breaking changes: Add ! after scope: feat(api)!:, chore(deps)!:
Use test: when the PR only contains test changes:
Use fix: when fixing bugs in application code (even if tests are included):
src/ with accompanying test changes → fix:test:Use the primary change to determine type:
| PR Contains | Type | Why |
|---|---|---|
| Bug fix + new tests | fix | Fix is primary, tests support it |
| Feature + documentation | feat | Feature is primary |
| Only test changes | test | No application code changed |
| Only doc changes | docs | No application code changed |
| Minor webui fix (styling, typos) | chore | Not a major user-facing fix |
| Refactor + minor fixes discovered | refactor | Refactor was the intent |
Major webui changes = new pages, significant UX changes, core functionality bugs
Minor webui changes = styling tweaks, copy changes, internal refactors → use chore
redteam - MANDATORY when redteam is the PR's primary change or product surface:
Other feature domains: providers, assertions, eval, api, db
webui - React app in src/app/cli - CLI in src/server - Web server in src/server/Note: Documentation site changes use docs(site):, not a standalone site scope.
deps - Dependency updatesci - CI/CD pipelines, GitHub Actionstests - Test infrastructurebuild - Build toolingexamples - Non-redteam examplesauth, cache, config, python, mcp, code-scan
For generic/cross-cutting changes: chore: bump version 0.119.11
If a PR is primarily redteam-related, use (redteam) scope.
This applies even if the redteam change is only in UI, CLI, docs, examples, utilities, tests, or server endpoints.
For broad, cross-cutting maintenance PRs, do not choose (redteam) solely because one touched file lives under src/redteam/ or because one generic helper is also used by redteam. Use the PR's primary purpose/scope and call out the redteam-adjacent touch in the PR description when it is review-relevant.
❌ Wrong:
fix(webui): fix Basic strategy checkbox in red team setup
feat(cli): add redteam validate command
chore(redteam): resolve repo-wide lint findings
✅ Correct:
fix(redteam): fix Basic strategy checkbox in setup UI
feat(redteam): add validate target CLI command
chore: resolve repo-wide lint findings
Why? Redteam spans CLI, webui, server, docs, and examples. Consistent scoping makes it easy to find all redteam work.
1. Is the PR primarily redteam-related? → Use (redteam)
2. Is it another feature domain? → Use that scope
3. Is it localized to one product area? → Use that scope
4. Is it infrastructure? → Use that scope
5. Otherwise → No scope
fix(deps) - Patch versions (security/bug fixes)chore(deps) - Minor/major upgrades, bulk updates, dev dependencies✅ Good:
feat(redteam): add FERPA compliance plugin
feat(cli): add --json output flag to eval command
fix(cli): handle empty config file gracefully
fix(webui): fix pagination crash on empty results
chore(webui): update button styling on settings page
docs(site): add guide for custom providers
chore(deps): update Material-UI monorepo to v8 (major)
fix(deps): update dependency better-sqlite3 to v12.4.6
feat(api)!: simplify provider interface
chore: bump version 0.119.11
test: add smoke tests for CLI commands
test(redteam): fix flaky plugin integration tests
❌ Bad:
feat: add new redteam thing # Missing (redteam) scope
fix(webui): red team checkbox # Should be fix(redteam)
chore(webui): update dependency # Should be chore(deps)
feat: stuff # Too vague
fix: bug fix # What bug? Be specific
Fix(cli): Add feature # Wrong case, not imperative
fix(test): resolve lint errors # Should be test: (test-only)
docs: update site # Should be docs(site):
site: update guides # Should be docs(site):
feat(webui): minor styling update # Minor = chore, not feat
Open PRs ready for review by default:
gh pr create --title "feat(scope): description" --body "..."
Use --draft only when:
AGENTS.md
"Security-Sensitive PRs")Co-Authored-By: Claude… trailers, "Generated with Claude Code" footers, or
similar markers. Use your configured git identity only.(redteam) scope! after scopenpm run l && npm run f--draft) unless one of the exceptions above applies