Skip to content

Commit fda9549

Browse files
authored
Add AGENTS.md for AI and contributor guidance (#1333)
2 parents a27e1b7 + 08b7178 commit fda9549

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# AGENTS.md
2+
3+
For the full human guide see [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md).
4+
5+
Nightly Rust toolchain (`rust-toolchain.toml`) — required for `cargo fmt`
6+
unstable options.
7+
8+
## Commit Rules
9+
10+
Every commit must pass CI independently.
11+
12+
Commit messages follow the seven rules:
13+
14+
1. Separate subject from body with a blank line
15+
2. Limit the subject line to 50 characters
16+
3. Capitalize the subject line
17+
4. Do not end the subject line with a period
18+
5. Use the imperative mood in the subject line
19+
6. Wrap the body at 72 characters
20+
7. Use the body to explain what and why vs. how
21+
22+
## Pre-commit Checks (Tiered)
23+
24+
**Fast (every commit):**
25+
26+
```sh
27+
cargo fmt --all -- --check
28+
cargo clippy --all-targets --keep-going --all-features -- -D warnings
29+
codespell
30+
```
31+
32+
**Full (before push):**
33+
34+
```sh
35+
./contrib/lint.sh
36+
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features \
37+
--document-private-items
38+
./contrib/test_local.sh # does NOT include payjoin-mailroom
39+
npx prettier --check '**/*.md' # CI runs prettier via treefmt
40+
codespell
41+
```
42+
43+
Per-crate scripts: `{crate}/contrib/test.sh`, `{crate}/contrib/lint.sh`.
44+
45+
## Two Lockfiles
46+
47+
CI tests both `Cargo-minimal.lock` and `Cargo-recent.lock`. After any
48+
dependency change:
49+
50+
```sh
51+
bash contrib/update-lock-files.sh
52+
```
53+
54+
## AI Disclosure
55+
56+
Required in PR body. Do **not** add `Co-Authored-By` in commits.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

0 commit comments

Comments
 (0)