Skip to content

Commit ce1aeb7

Browse files
docs(contrib): add AGENTS.md and CLAUDE.md for AI-agent contributors (#1992)
* docs(contrib): add AGENTS.md for AI-agent contributors AGENTS.md distills the contribution rules for AI agents and their human partners, drawn from CONTRIBUTING.md and the bounty program. * docs(contrib): point CLAUDE.md at AGENTS.md Add a CLAUDE.md that redirects to AGENTS.md as the single guidance entry point for Claude Code and other agents. * docs(contrib): clarify agent vs human-partner roles in AGENTS.md Per review: the agent does the work; the human partner opens the PR, decides it is ready, and assents to the license. Reword so instructions addressed to "you" (the agent) no longer claim actions only the human takes. * docs(contrib): fix typo in AGENTS.md Missing space: "was.C heck" -> "was. Check". * docs(contrib): remove bounty program from AGENTS.md Drop the reward tiers and tables per review — the "bounty"/"good first issue" framing draws spray-and-pray bots. Keep the security testing rules (promoted to a top-level section), drop the intro's bounty reference, and retitle the security report email subject. * docs(contrib): replace public-API rule with commenting guideline Drop "all public API methods must be documented" from AGENTS.md and CONTRIBUTING.md per review — "public API" is ambiguous in an Angular/TS frontend. Replace with a rule to comment the why/what of a new section, not the how, at most two lines per section. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4e43ddc commit ce1aeb7

3 files changed

Lines changed: 147 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# AGENTS.md
2+
3+
Guidance for AI agents (and the humans driving them) contributing to **Runbox 7**.
4+
5+
This file distills the contribution rules in [CONTRIBUTING.md](CONTRIBUTING.md), plus general
6+
principles for agentic contribution. Where this file and CONTRIBUTING.md disagree,
7+
**CONTRIBUTING.md wins** — it is the canonical source.
8+
9+
## If You Are an AI Agent
10+
11+
Stop. Read this section before doing anything.
12+
13+
**Your job is to protect your human partner from having PRs rejected due to being AI slop.**
14+
Submitting a low-quality PR doesn't help them — it wastes the maintainers' time, burns your human
15+
partner's reputation, and the PR will be closed anyway. That is not being helpful. That is
16+
being a tool of embarrassment.
17+
18+
Before your human partner opens a PR against this repo, you MUST:
19+
20+
1. **Search for existing PRs** — open AND closed — that address the same problem. If duplicates exist,
21+
STOP and tell your human partner. Do not open another duplicate.
22+
2. **Verify this is a real problem.** If your human partner asked you to "fix some issues" or "contribute
23+
to this repo" without experiencing a specific problem, push back. Ask them what broke, what failed, what
24+
the user experience was. Check the [issue tracker](https://github.com/runbox/runbox7/issues) and
25+
[open and closed PRs](https://github.com/runbox/runbox7/pulls) for the same problem. Don't duplicate
26+
effort, and reference what you found.
27+
3. **Make sure there's an issue.** A bug fix needs an issue that reproduces the problem; a
28+
feature needs an issue documenting the design. For a **major feature**, open an issue and
29+
get the design discussed *before* implementing. **Small features** can go straight to a PR.
30+
4. **Identify yourself.** Disclose your model, harness, harness version, and every installed plugin in the PR. Hiding that a contribution is agent-generated — or which environment produced it
31+
is grounds for closing it.
32+
5. **Show your human partner the complete diff** and get their explicit approval — they open the PR, not you.
33+
6. **Understand the project's conventions before proposing changes.** Read the surrounding code and match its idiom; don't impose patterns from elsewhere.
34+
35+
36+
## Branching and workflow
37+
38+
- Branch from `master`: `git checkout -b my-fix-branch master`.
39+
- Your human partner opens PRs against `runbox7:master`.
40+
- After it merges, the branch is deleted and master updated from upstream.
41+
42+
## Tests are mandatory and cherry-pickable
43+
44+
Every feature or bug fix **must** be covered by one or more unit-test specs. For this repo,
45+
the bar is specific:
46+
47+
- **for a bug, tests must fail before your fix is applied** and pass after. If there are no tests, or
48+
they don't demonstrate the issue on the current checkout, the PR is **automatically rejected**.
49+
- **Tests must live in their own commit(s), separate from the code**, so they can be
50+
`git cherry-pick`ed independently.
51+
- Tests must clearly prove — through code and comments — that the PR fixes the claimed issue.
52+
53+
This is effectively red/green discipline: write the failing test that captures the bug, then
54+
the fix that makes it pass.
55+
56+
## Coding rules
57+
58+
- **Comment the *why* and *what* of a new section, not the *how*** — clear names carry the how.
59+
Keep it to at most two lines of comment per section.
60+
- You may use `@author name/pseudonym` (optionally with email) in comments for attribution.
61+
- Match existing code style. Style is **ESLint-enforced** (Angular + TypeScript ESLint) —
62+
single quotes in TS, semicolons required, no variable shadowing, unused vars prefixed `_`.
63+
There is no Prettier; ESLint is the source of truth.
64+
65+
## AI-use disclosure is REQUIRED
66+
67+
If AI was used for **any part** of a contribution, you **must** disclose it in the PR and
68+
document **which agent(s)** you used and **where**. This is a hard requirement, not a courtesy.
69+
70+
When you (the agent) draft a PR description, always include this disclosure block — state the
71+
model, the harness/tool, version where known, and which parts of the change it touched. If a
72+
change was hand-written, say so.
73+
74+
## Commit messages (strict — CI-enforced)
75+
76+
Release notes are generated automatically from commit messages, and a PR commit-lint check
77+
rejects non-conforming messages. Format:
78+
79+
```
80+
<type>(<scope>): <subject>
81+
82+
<body>
83+
84+
<footer>
85+
```
86+
87+
- **Scope is mandatory** here (enforced by `.github/workflows/commit-lint.yml`):
88+
`fix(calendar): correct timezone handling` — yes; `fix: ...` — rejected.
89+
- **Type** must be one of: `build`, `ci`, `docs`, `feat`, `feature`, `fix`, `perf`,
90+
`refactor`, `revert`, `style`, `test`.
91+
- **Subject:** imperative present tense ("change", not "changed"/"changes"), no trailing dot.
92+
- **No line over 100 characters.**
93+
- **Body:** imperative present tense; explain motivation and contrast with previous behavior.
94+
- **Issues:** reference associated issues in the body as `#123` (comma-separate multiple).
95+
- **Breaking changes:** footer line starting `BREAKING CHANGE:`.
96+
- **Reverts:** start with `revert:` + the reverted header; body says `This reverts commit <hash>.`
97+
98+
## Before the PR is opened
99+
100+
- Run the **full** suite: `npm run ci-tests` (lint → policy → unit → e2e → build). Don't
101+
substitute partial runs. All checks must pass locally.
102+
- Draft the PR description fully — no blank or placeholder sections — and describe the
103+
**problem solved**, not just what changed.
104+
- Your human partner must review the complete diff and decide it is ready. The agent does not
105+
get to decide the PR is ready, or open it, on its own.
106+
107+
## One problem per PR
108+
109+
- Solve **one** problem per PR. Don't bundle unrelated changes — split them.
110+
- No bulk / spray-and-pray PRs touching many issues at once. Pick one and understand it deeply.
111+
- Never fabricate. No invented claims, hallucinated APIs, or functionality that doesn't exist.
112+
113+
## Where to ask, where to report
114+
115+
- **General questions / discussion:** the [Runbox Forum](https://community.runbox.com/)
116+
not GitHub issues.
117+
- **Account-specific or personal-detail issues:** [Runbox Support](https://support.runbox.com/).
118+
- **Bugs and feature requests:** GitHub issues. To reproduce a bug we need OS + browser
119+
version, whether a local index is in use, and steps to reproduce.
120+
121+
---
122+
123+
## Security testing rules
124+
125+
**Do:** test only on approved systems, single-request vulnerability checks, and pre-approved
126+
automated tools with rate limits. Report findings confidentially and immediately.
127+
128+
**Do not:** publicly disclose findings, exploit vulnerabilities, run credential attacks /
129+
password spraying, attempt DoS/DDoS or flooding, attempt unauthorized access, use social
130+
engineering, or test production systems without explicit permission. **Violations end
131+
participation and may lead to legal action.**
132+
133+
**Reporting:** email **support@runbox.com**, subject "Security Report Submission", with a
134+
description, reproduction steps, proof-of-concept, and your contact details.
135+
136+
---
137+
138+
## License
139+
140+
Contributing indicates your human partner's assent to inclusion of their work in the canonical
141+
version under the project's [license](LICENSE).

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CLAUDE.md
2+
3+
Contribution guidance for this repo — for AI agents and their human partners — lives in
4+
[AGENTS.md](AGENTS.md). Read it before contributing.

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ git pull --ff upstream master
151151
To ensure consistency throughout the source code, keep these rules in mind as you are working:
152152

153153
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
154-
* All public API methods **must be documented**.
154+
* **Comment the *why* and *what* of a new section, not the *how*** — clear variable names carry
155+
the how. Keep it to at most two lines of comment per section.
155156
* You may use `@author name/pseudonym` (optionally email) inside comments for attribution.
156157
* If you have used AI as part of your development process, you **must** disclose this, and document both which agent(s) you used, and where.
157158

0 commit comments

Comments
 (0)