|
| 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. |
0 commit comments