Skip to content

Commit 0ed8d0b

Browse files
authored
docs: add contributor protection policy for AI agents (#3151)
Prevents agents from silently overwriting external contributor PRs. Prompted by PR #3143 where bgjackma's work was reimplemented without attribution. - CONTRIBUTING.md: "Your PR Will Not Be Overwritten" section - AGENT_INSTRUCTIONS.md: check-before-you-build procedure + CONTRIBUTING.md reference - AGENTS.md: cross-reference to contributor protection
1 parent bf3a6b2 commit 0ed8d0b

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file exists for compatibility with tools that look for AGENTS.md.
99
- **Issue Tracking** - How to use bd for work management
1010
- **Development Guidelines** - Code standards and testing
1111
- **Visual Design System** - Status icons, colors, and semantic styling for CLI output
12+
- **Contributor Protection** - Read [CONTRIBUTING.md](CONTRIBUTING.md) before handling external PRs
1213

1314
## Visual Design Anti-Patterns
1415

AGENT_INSTRUCTIONS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,25 @@ Crew workers push directly to main. **Never create pull requests.**
111111
- When handling external PRs, use fix-merge: checkout the PR branch locally,
112112
fix/rebase onto main, merge locally, `git push`, then close the PR
113113

114+
### External Contributor PRs: Check Before You Build
115+
116+
**Read [CONTRIBUTING.md](CONTRIBUTING.md)** — it contains promises we've made to contributors. Violating them damages trust and community.
117+
118+
**Before implementing any feature or fix, check for existing open PRs on the same topic:**
119+
120+
```bash
121+
gh pr list --repo gastownhall/beads --state open --search "<topic keywords>" --json number,title,author,headRefName
122+
```
123+
124+
**Contributor work gets priority.** If an external PR already exists:
125+
1. **Review it first** — read the diff, understand the approach
126+
2. **Build on their work, don't rewrite it** — checkout their branch, fix/adapt as needed
127+
3. **Preserve their tests** — contributor tests are signal; keep them unless they're wrong
128+
4. **Attribute properly** — use `Co-authored-by:` in commits, reference their PR number
129+
5. **Never auto-close a contributor PR** by merging a rewrite — that discards their contribution silently
130+
131+
If you must rewrite (e.g., fundamentally different approach needed), explain why on the original PR and credit the contributor's design/tests in your commits.
132+
114133
This is enforced by pre-use hooks. If you try `gh pr create`, it will be blocked.
115134

116135
## Landing the Plane

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,17 @@ When proposing new features:
277277
- Consider backwards compatibility
278278
- Discuss alternatives you've considered
279279

280+
## Your PR Will Not Be Overwritten
281+
282+
This project uses AI agents for maintenance. We've established strict rules to protect contributor work:
283+
284+
- **Your PR has priority.** If you've submitted a PR, agents must review and build on your work — not rewrite it from scratch.
285+
- **Your tests matter.** Agents must preserve contributor tests unless they're actually wrong.
286+
- **You'll get attribution.** Your commits and `Co-authored-by:` will be preserved.
287+
- **No silent closes.** Your PR will never be auto-closed by a parallel rewrite. If changes are needed, they'll be discussed on your PR.
288+
289+
If any of this goes wrong, please open an issue — we take contributor experience seriously.
290+
280291
## Code Review Process
281292

282293
All contributions go through code review:

0 commit comments

Comments
 (0)