From 6c4f33f3eece9e5d37f9ad5026fbac1cd8a1feb0 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 31 Aug 2026 15:43:59 +0300 Subject: [PATCH] Write down two commit rules that were only ever conventions Both were being followed by habit and neither was written anywhere, so each new contributor (human or agent) had to rediscover them: - Never amend. An existing commit is history someone may already have read; corrections belong in the next commit, not in a rewrite of the last one. - Every commit is a release candidate. Landing a half-applied refactor or a fix whose test is still to come leaves the tree in a state where the pre-commit gate no longer means what it claims. Large changes get split into independently sound steps, not into a break followed by a repair. --- AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 7d4404e3a..d2f1c38a7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -248,6 +248,14 @@ When diagnosing a hang, prefer reading full `cargo test` output over piping thro warnings; CI will fail the same checks. - Do not force-push shared history unless the user asks. - Do not commit secrets, large binaries, or lockfiles that this repo intentionally ignores. +- **Never amend a commit** unless the user explicitly asks for it in the current conversation. A + commit that is already written is history someone else may have read; correct it by adding the + next commit, not by rewriting the last one. +- **Every commit is a release candidate.** Do not land partial work, a half-applied refactor, or a + fix whose test is still to come. Each commit must build, pass the pre-commit gate above, and leave + no capability worse off than the commit before it. If a change is too large to land in one sound + step, split it into steps that are each independently sound - not into a broken step followed by a + repair. ## The loop (unit of work)