Skip to content

Commit b27c155

Browse files
authored
docs: add AGENTS.md + CLAUDE.md agent-contributor guidance (#32)
* docs: add AGENTS.md + CLAUDE.md agent-contributor guidance Canonical entry point for AI agents opening PRs against the GitHub App adapter: the mandatory DCO sign-off (git commit -s), branch/PR workflow, local CI gates (cargo check/clippy -D warnings/test), adapter invariants (no App secrets, GitHub-native progress surfaces), and contributor attribution. Notes that a commit can carry both Signed-off-by and Co-authored-by trailers. CLAUDE.md points at AGENTS.md. Signed-off-by: Val Alexander <bunsthedev@gmail.com> * docs: clarify DCO signoff guidance Signed-off-by: Val Alexander <bunsthedev@gmail.com> --------- Signed-off-by: Val Alexander <bunsthedev@gmail.com>
1 parent 0606dd3 commit b27c155

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# AGENTS.md — coven-github
2+
3+
Guidance for **AI agents** (Codex, Claude Code, Hermes, and any Coven familiar)
4+
opening pull requests against this repo. Humans: your canonical guide is
5+
[`CONTRIBUTING.md`](CONTRIBUTING.md) — this is the agent-specific layer on top.
6+
7+
> **Read first:** [`README.md`](README.md) for what this repo is, and
8+
> [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full contribution bar — including
9+
> the **DCO sign-off requirement**, which is mandatory here.
10+
11+
---
12+
13+
## What this repo is (one line)
14+
15+
`coven-github` is the **GitHub App adapter** for OpenCoven (Rust): it routes
16+
GitHub issues, labels, mentions, and review comments into a Coven familiar, then
17+
publishes progress via Check Runs, issue comments, draft PRs, and CovenCave
18+
session links.
19+
20+
## DCO — every commit must be signed off (mandatory)
21+
22+
This repo uses the **Developer Certificate of Origin**. Every commit must carry
23+
a `Signed-off-by` trailer:
24+
25+
```sh
26+
git commit -s -m "type: summary"
27+
```
28+
29+
This produces `Signed-off-by: Your Name <your.email@example.com>`. Use a real
30+
GitHub-linked identity. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full DCO
31+
text.
32+
33+
## Branch & PR workflow (all agents)
34+
35+
- **Never push to `main`.** Every change lands via a PR with green CI. Branch
36+
from current `origin/main`.
37+
- **Fresh branch per task**; use a worktree if multiple sessions may touch this
38+
repo:
39+
```sh
40+
git fetch origin main
41+
git worktree add -b <branch> /tmp/covengh-<branch> origin/main
42+
```
43+
- Keep the diff **scoped to one concern**; conventional-commit subjects
44+
(`feat:`, `fix:`, `docs:`, `chore:`, `refactor:`).
45+
- After merge: delete the remote branch, remove your local worktree/branch.
46+
47+
## CI gates — run locally before opening the PR
48+
49+
CI (`.github/workflows/ci.yml`) rejects on any of these. Run them first:
50+
51+
```sh
52+
cargo check --all-targets
53+
cargo clippy --all-targets -- -D warnings
54+
cargo test --all
55+
```
56+
57+
`-D warnings` has **no exceptions**. Fix lints; don't `#[allow(...)]` without a
58+
justifying comment.
59+
60+
## Repo-specific invariants (don't break these)
61+
62+
- This is an **adapter**, not a familiar. Keep GitHub-webhook/App plumbing here;
63+
don't reimplement familiar/authority logic that belongs in `coven`.
64+
- **Never commit App private keys, webhook secrets, or installation tokens.**
65+
The placeholder-secret list exists to keep test fixtures inert — keep real
66+
credentials out of the repo entirely.
67+
- Surface progress through the GitHub-native primitives (Check Runs, comments,
68+
draft PRs) rather than inventing new side channels.
69+
70+
## Attribution — credit contributors correctly
71+
72+
When you re-land or build on someone else's work, **credit the human
73+
contributor with a working GitHub-linked trailer** so they appear in the
74+
contributors graph and on their profile:
75+
76+
```
77+
Co-authored-by: Full Name <ID+username@users.noreply.github.com>
78+
```
79+
80+
- Use the **numeric-id no-reply form**. Get the id with
81+
`gh api users/<login> --jq .id`.
82+
- **Never** use a machine/`.local` email in a co-author trailer — it links to no
83+
account and gives **zero** credit.
84+
- A commit can carry **both** `Signed-off-by:` (DCO, required) and
85+
`Co-authored-by:` (attribution) trailers — include both when re-landing a
86+
contributor's work.
87+
88+
## Secrets & safety
89+
90+
- Never commit secrets, tokens, or private emails. Use `*.noreply.github.com`
91+
for attribution.
92+
- Don't disable CI gates or branch protection to land a change. If it can't go
93+
through a green PR, surface the blocker instead.
94+
95+
## Claude Code
96+
97+
`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-github
2+
3+
**Read [`AGENTS.md`](AGENTS.md).** It is the canonical guide for AI agents
4+
(including Claude Code) contributing to this repo — the mandatory **DCO
5+
sign-off** (`git commit -s`), branch/PR workflow, local CI gates, the GitHub-App
6+
adapter invariants, and contributor attribution.
7+
8+
Claude Code auto-loads this file; everything you need lives in `AGENTS.md` plus
9+
[`README.md`](README.md) and [`CONTRIBUTING.md`](CONTRIBUTING.md). There is no
10+
separate Claude-only workflow — follow `AGENTS.md` (and remember `-s` on every
11+
commit).

0 commit comments

Comments
 (0)