Skip to content

Commit 304b04b

Browse files
authored
docs: add agent-contributor workflow and attribution guidance
Verification: reviewed PR diff; docs-only change updating AGENTS.md and adding CLAUDE.md. GitHub merge state was CLEAN and no status checks are configured for this repo.
1 parent 3571597 commit 304b04b

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,37 @@ tests/
5252
}
5353
}
5454
```
55+
56+
## Contributing as an agent (branch, PR, CI)
57+
58+
- **Never push to `main`.** Every change lands via a PR with green CI. Branch from current `origin/main`.
59+
- **Fresh branch per task**; use a worktree if multiple sessions may touch this repo:
60+
```sh
61+
git fetch origin main
62+
git worktree add -b <branch> /tmp/reach-<branch> origin/main
63+
```
64+
- Keep the diff scoped to one concern; conventional-commit subjects (`feat:`, `fix:`, `docs:`, `chore:`, `refactor:`).
65+
- Run the gates locally before opening the PR:
66+
```sh
67+
cargo fmt --all --check
68+
cargo clippy --all-targets -- -D warnings
69+
cargo test -- --test-threads=1 # tests share COVEN_REACH_ALLOWED_PATHS; run sequentially
70+
```
71+
- After merge: delete the remote branch, remove your local worktree/branch.
72+
73+
## Attribution — credit contributors correctly
74+
75+
When you re-land or build on someone else's work (a fork PR, an issue author's proposal, a co-author), **credit the human contributor with a working GitHub-linked trailer** so they appear in the contributors graph and on their profile:
76+
77+
```
78+
Co-authored-by: Full Name <ID+username@users.noreply.github.com>
79+
```
80+
81+
- Use the **numeric-id no-reply form**. Get the id with `gh api users/<login> --jq .id`.
82+
- **Never** use a machine or `.local` email (e.g. `name@Someones-Mac.local`) in a co-author trailer — it links to no account and gives **zero** credit.
83+
- When a squash-merge folds a contributor's PR into an internal branch, preserve their `Co-authored-by:` line in the squash commit message.
84+
- Credit **people**, not AI tools.
85+
86+
## Claude Code
87+
88+
`CLAUDE.md` points here — this file is the source of truth for both.

CLAUDE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CLAUDE.md — coven-reach
2+
3+
**Read [`AGENTS.md`](AGENTS.md).** It is the canonical guide for AI agents
4+
(including Claude Code) contributing to this repo — the MCP-server invariants
5+
(no unsafe, path checks, secret-value confinement), the branch/PR workflow,
6+
local CI gates (`cargo fmt/clippy/test --test-threads=1`), and contributor
7+
attribution.
8+
9+
Claude Code auto-loads this file; everything you need lives in `AGENTS.md` plus
10+
[`README.md`](README.md) and [`CONTRIBUTING.md`](CONTRIBUTING.md). There is no
11+
separate Claude-only workflow — follow `AGENTS.md`.

0 commit comments

Comments
 (0)