Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,32 @@ python -m brigade init --target "$target" --depth workspace --harnesses claude,c
python -m brigade doctor --target "$target"
```

## Pull requests

`main` is branch-protected. A dispatched session cannot supply the review artifact required by its own pull request, and GitHub enforces the gate regardless of the dispatch prompt.

The current rule set requires all of the following before a pull request can merge:

- All 22 required GitHub Actions checks pass. The checks are pinned to GitHub Actions app id 15368, and the branch must be up to date with `main`.
- A current formal `APPROVED` review exists from a non-author reviewer.
- All review conversations are resolved.
- The approval was recorded after the last push. New commits dismiss stale approvals.

The pull request author cannot approve their own pull request. `gh pr review --approve` fails with "Can not approve your own pull request" when the author and reviewer share one GitHub identity.

CodeRabbit is the current external review identity. Its green commit status is not the grading artifact because the status can be green while the formal GitHub review is still `CHANGES_REQUESTED`. The artifacts that count are a current formal non-author `APPROVED` review and all required checks passing.

Inspect the gate before attempting a merge:

```bash
gh pr checks <number> --required
gh pr view <number> --json reviewDecision,mergeStateStatus
```

`reviewDecision` reports `REVIEW_REQUIRED`, `CHANGES_REQUESTED`, or `APPROVED`. `mergeStateStatus` reports states such as `CLEAN`, `BLOCKED`, and `BEHIND`.
Comment thread
solomonneas marked this conversation as resolved.

Dispatched sessions should open the pull request, run local verification, push commits, and stop. The external reviewer records the approval after reviewing the final push.

## Adding a harness

A harness is a manifest under `src/brigade/templates/harnesses/<id>.json` plus any template files it references. The manifest declares `role: "writer"` (gets an inbox) or `role: "reader"` (gets adapter fragments).
Expand Down
Loading