]> git.giacomolli.uk - onechat/blobdiff - .agents/skills/commit/SKILL.md
Define the required code and commit rules
[onechat] / .agents / skills / commit / SKILL.md
index 7e1f65766ba55b8bc9c37816c7ee4f565d679dc8..14ea4b3d26d11fa47e6d300f41db737fd5dde9c8 100644 (file)
@@ -7,20 +7,33 @@ description: Commit procedure and message rules. Use for every commit.
 
 ## Procedure
 
-1. Do the `check` skill. All checks must pass before you commit.
-2. Stage only the files that belong to this change. Keep unrelated
+1. Confirm that the configured signing key is available. If signing is
+   unavailable or fails, stop and report the problem. Never disable
+   signing, bypass it with a command or configuration override, or
+   create an unsigned commit.
+2. Do the `check` skill. All checks must pass before you commit.
+3. Stage only the files that belong to this change. Keep unrelated
    changes in separate commits.
-3. Write the message to a file or a here-document and commit with
-   `git commit -F`. Never put `\n` in `git commit -m`.
-4. When `.githooks/commit-msg` rejects the message, fix the message and
+4. Write the message to a file or a here-document and sign the commit
+   with the configured key, using `git commit -S -F`. Never put `\n` in
+   `git commit -m`.
+5. When `.githooks/commit-msg` rejects the message, fix the message and
    commit again. Do not skip the hook with `--no-verify`.
+6. Cryptographically verify each new commit's signature against the
+   configured key before reporting completion. A signature header alone
+   is not verification. If verification fails, stop and report it. Do
+   not claim completion or publish the commit.
 
 ## Size
 
 - Commit often. Split the work into small, coherent, working steps, and
   do not wait for a full feature.
-- Before a push, rebase on the latest `master` and fix conflicts during
-  the rebase. Never make a merge commit.
+- Push code only with the user's authorization. A remote does not give
+  permission to push.
+- Rebase before an authorized push only when the task permits it. Do not
+  rewrite published commits without the user's explicit approval. Stop
+  and ask when an operation needs that approval. Never make a merge
+  commit.
 
 ## Subject
 
@@ -45,9 +58,10 @@ description: Commit procedure and message rules. Use for every commit.
 ## Trailers
 
 - When the change belongs to an issue, end the message with one `Issue:`
-  trailer with the git-bug ID of that issue. Add it with
-  `git commit --trailer`. Never use a closing keyword such as "Fixes" or
-  "Closes".
+  trailer. Use the shortest unique git-bug issue ID in the `Issue:`
+  trailer, with a minimum of seven characters. Check uniqueness against
+  all issues, not only open issues. Add it with `git commit --trailer`.
+  Never use a closing keyword such as "Fixes" or "Closes".
 - Link the bug report when a change fixes a reported bug.
 - Do not add an AI tool as co-author. Do not add attribution trailers.