Browse Source

AGENTS.md: sync with instructions of other repositories (#177)

Fully merged branches are deleted so stale ones don't pile up; a partially merged branch's remaining commits are rebased onto `master` so they stay applicable.

The previous pull request's branch was amended and force-pushed after the pull request had already been merged, so that change never reached `master` — hence the mandatory check of the PR state before pushing.

Also brings over further rules from the other repositories' `AGENTS.md` that fit this repository (Python / `Pipfile`, `blinkcheck`, other repositories' package conventions and CHANGELOG formats omitted).

Sources:
- attribution reference link: https://github.com/fphammerle/docker-postfix/blob/129674aa0010b936ff669f42734c829c10deaf38/AGENTS.md
- "`AGENTS.md` across repositories": https://github.com/fphammerle/python-manchester-code/blob/5376376879d90e4965865210f878f759703982cc/AGENTS.md (proposed in fphammerle/python-manchester-code#245)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fabian Peter Hammerle 9 hours ago
parent
commit
cb29aa5fca
1 changed files with 18 additions and 0 deletions
  1. 18 0
      AGENTS.md

+ 18 - 0
AGENTS.md

@@ -13,6 +13,7 @@
 
 - Attribution line: `Co-Authored-By: Claude <model name> <noreply@anthropic.com>` — always include the model name,
   e.g. `Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>`
+  (see https://web.archive.org/web/20261016172400/https://docs.github.com/en/pull-requests/how-tos/commit-changes/creating-a-commit-with-multiple-authors)
 - Do **not** include a `Claude-Session:` line — the session URL is private.
 - Explain **why**, not what — don't restate in prose what's already obvious from `git diff` of
   the commit (e.g. "add a notice to the README", "update section X").
@@ -46,6 +47,12 @@
   history that's already landed (or been reviewed) and leaves a dangling branch that no longer
   reflects what merged. For a follow-up change, create a **new** branch (from current `master`)
   and a **new** PR instead.
+  - This has happened despite this rule, so before **every** amend / push to an existing branch,
+    first fetch its PR's current state from GitHub — pull requests may have been merged since you
+    last looked.
+- After a branch has been **fully** merged into `master`, delete it (on GitHub and locally). If
+  only a subset of its commits was merged, keep it and rebase the remaining commits onto `master`
+  instead (`git rebase --onto origin/master <last merged commit>`).
 
 ## Merging pull requests
 
@@ -99,3 +106,14 @@
 
 - Don't include the Claude session URL — it's private. A footer containing it may be appended
   automatically when a PR is created; read the description back and remove it with an update.
+
+## `AGENTS.md` across repositories
+
+- The `AGENTS.md` files of the owner's repositories share most of their rules. Find them all with
+  a GitHub code search for `user:fphammerle filename:AGENTS.md`.
+- Creating an `AGENTS.md` for a repository: base it on **all** of them, not just one. Start from
+  the closest sibling, keep only the rules that fit the particular repository (e.g. no Python /
+  `Pipfile` rules for a `Dockerfile`-only repository, no rules on `Dockerfile` version pins for a
+  repository without a `Dockerfile`), and adapt repository-specific examples
+  (e.g. package names, commit subject conventions from `git log`). In the commit message, reference
+  the individual source each part was based on with full permanent URLs (commit hash + path).