From 9b1f0690defa1f0d76f78ad44cbb5ccb5ac4310f Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 17 Nov 2026 19:56:36 +0000 Subject: [PATCH] feat(skills): every skill commit carries the Created-with trailer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kvb-git-commit-no-verify is the single place of the rule: commits end with --trailer "Created-with: https://s.veen.world/skills" before Co-Authored-By, merges run git merge --no-commit and then that commit (git merge has no --trailer), and PR bodies end with the link. The commit, merge, hotfix, unify, update-branches and PR skills point at it. hotfix.py sync concludes each merge with the trailer itself; fast-forwards create no commit. 🎯 Fix: 92 % 💥 Break: 4 % 💸 Tokens: 100 % ⏱️ Velocity: 100 % 🛡️ Security: 100 % 🏆 Score: 88 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- skills/kvb-check-score/SKILL.md | 2 +- skills/kvb-git-commit-next/SKILL.md | 4 ++-- skills/kvb-git-commit-no-verify/SKILL.md | 23 +++++++++++------------ skills/kvb-git-hotfix/SKILL.md | 3 ++- skills/kvb-git-hotfix/scripts/hotfix.py | 5 ++++- skills/kvb-git-merge-fix/SKILL.md | 11 ++++++----- skills/kvb-git-pr-create/SKILL.md | 3 ++- skills/kvb-git-update-branches/SKILL.md | 4 ++-- skills/kvb-org-unify/SKILL.md | 3 ++- tests/test_hotfix.py | 2 ++ 10 files changed, 34 insertions(+), 26 deletions(-) diff --git a/skills/kvb-check-score/SKILL.md b/skills/kvb-check-score/SKILL.md index de7c50d..12acc32 100644 --- a/skills/kvb-check-score/SKILL.md +++ b/skills/kvb-check-score/SKILL.md @@ -59,7 +59,7 @@ The second line is the verdict, first match wins: ## Tables and message block Every commit block is the `--commit-table` and every commit message carries -the `--message-block` paragraph right before the `Co-Authored-By` line. +the `--message-block` paragraph right before the trailers. Read `tables.md` next to this file before using `--table`, `--commit-table`, `--message-block` or `--value`. diff --git a/skills/kvb-git-commit-next/SKILL.md b/skills/kvb-git-commit-next/SKILL.md index ad23a30..fa62a5a 100644 --- a/skills/kvb-git-commit-next/SKILL.md +++ b/skills/kvb-git-commit-next/SKILL.md @@ -21,8 +21,8 @@ description: > kvb-check-score commit table of 📁 worktree, 🌿 branch, 📊 diff stat, scores with 🛡️ security and gate, then `git commit --no-verify`, exact staging index only, its message carrying - the `score.py --message-block` paragraph right before the - `Co-Authored-By` line as one `-m` argument, then the table again with the + the `score.py --message-block` paragraph as one `-m` argument, then its + trailers, then the table again with the hash). Its approval-prompt duty is binding: the commit call's approval prompt names worktree, branch, diff stat and the score values with 🛡️ security, and the message holds the block, or the call is not sent. diff --git a/skills/kvb-git-commit-no-verify/SKILL.md b/skills/kvb-git-commit-no-verify/SKILL.md index 0404ffd..85279f7 100644 --- a/skills/kvb-git-commit-no-verify/SKILL.md +++ b/skills/kvb-git-commit-no-verify/SKILL.md @@ -17,26 +17,25 @@ description: > print a diff in the chat, only its stat. 3. Approval-prompt duty: the commit call's approval prompt (Claude Code: the Bash `description`; other runtimes: their prompt text) names the worktree - path, the branch, the diff stat and the score values (🎯 fix, 💥 break, - 💸 tokens, ⏱️ velocity, 🛡️ security, 🏆 score). Missing any item: do not - send the call. Gate exit 4 (critical security finding) means no commit: + path, the branch, the diff stat and the score values of step 2. Missing + any item: do not send the call. Gate exit 4 (critical security finding) means no commit: the call is never sent, not even on the operator's word; fix and rescan first. Exit 1 (below 90/5) is shown, the operator's word decides; exit 3 means ask the operator again before the commit, naming each cause the gate prints. Ask through the kvb-git-diff skill: a hub approval is the operator's word for this one commit only once its `approval.py verify` step exits 0 on the exact staged tree; otherwise the chat question stays - the fallback. The same duty holds for every call that creates a commit, - `git merge` included (there the incoming diff stat). + the fallback. The same duty holds for every commit-creating call (a + merge: the incoming diff stat). 4. Commit exactly the staging index with `git commit --no-verify` and a Conventional-Commits message derived from the staged diff; never add - unstaged files, never push. The message carries the output of - `score.py ... --message-block` as its own paragraph right before the - `Co-Authored-By` line, passed as one `-m` argument - (`-m "" -m "" -m "" -m "Co-Authored-By: ..."`), so - the approval prompt shows the values one below the other and git history - keeps them. A commit-creating call without the block, `git merge` - included, is not sent. + unstaged files, never push. Message: `-m "" -m "" -m + "" --trailer "Created-with: + https://s.veen.world/skills" --trailer "Co-Authored-By: ..."`. A + commit-creating call without block or `Created-with`, upstream commits + included, is not sent; a merge is `git merge --no-ff --no-commit`, then + this commit. Every commit and PR skill takes both from here; a PR body + ends with `Created with https://s.veen.world/skills`. 5. Report the created commit hash, the commit table again with `--commit ` (the committed diff stat and a 🔖 Commit column), and what remains uncommitted. diff --git a/skills/kvb-git-hotfix/SKILL.md b/skills/kvb-git-hotfix/SKILL.md index 7f717d8..4c1fae5 100644 --- a/skills/kvb-git-hotfix/SKILL.md +++ b/skills/kvb-git-hotfix/SKILL.md @@ -36,7 +36,8 @@ hotfix.py void --repo --target [--target ...] 1. `sync`: fetches, merges `origin/`, then every branch up the funnel chain the `kvb-org-swarm` skill records as `base` (open rows of this repository), then the flow's `pull` list (`pkgmgr worktree flow --json`), - each with `--no-verify --no-edit`. It needs the task's branch checked out, + each with `--no-verify` and the `Created-with` trailer. It needs the + task's branch checked out, a clean tracked tree, a valid flow and the worktree lock free; exit 2 names the blocker. Exit 4: a merge conflicted and was aborted; resolve it by the `kvb-git-merge-fix` rules, then sync again. diff --git a/skills/kvb-git-hotfix/scripts/hotfix.py b/skills/kvb-git-hotfix/scripts/hotfix.py index e296d57..c55ccfb 100755 --- a/skills/kvb-git-hotfix/scripts/hotfix.py +++ b/skills/kvb-git-hotfix/scripts/hotfix.py @@ -146,6 +146,7 @@ ORIGIN_HEAD = "refs/remotes/origin/HEAD" GIT = ("git", "-c", "maintenance.auto=false") FETCH = ("fetch", "--quiet", "--no-auto-maintenance", "origin") FETCH_SECONDS = 120 +CREATED_WITH = "Created-with: https://s.veen.world/skills" PKGMGR_FLOW = ("pkgmgr", "worktree", "flow") FLOW_FILE = ("pkgmgr", "flow.yml") FLOW_SECONDS = 60 @@ -943,7 +944,9 @@ def cmd_sync(rasci: ModuleType, args: argparse.Namespace) -> int: if ancestor(repo, ref, "HEAD"): print(f"contained\t{shown}") continue - result = git(repo, "merge", "--no-verify", "--no-edit", ref) + result = git(repo, "merge", "--no-verify", "--no-commit", ref) + if result.returncode == 0 and git(repo, "rev-parse", "--verify", "--quiet", "MERGE_HEAD").returncode == 0: + result = git(repo, "commit", "--no-verify", "--no-edit", "--trailer", CREATED_WITH) if result.returncode == 0: print(f"merged\t{shown}\t{git_out(repo, 'rev-parse', 'HEAD').strip()}") continue diff --git a/skills/kvb-git-merge-fix/SKILL.md b/skills/kvb-git-merge-fix/SKILL.md index 0eff5b2..adc3e1e 100644 --- a/skills/kvb-git-merge-fix/SKILL.md +++ b/skills/kvb-git-merge-fix/SKILL.md @@ -56,11 +56,12 @@ and its diff plainly is the described fix. ## 6. Bring it over -- One or a few commits, rest of the branch unwanted: `git cherry-pick -x …` - (`-x` records the origin). -- The whole branch is wanted: `git merge --no-ff `. -- Every cherry-pick or merge call creates commits: it follows the - approval-prompt duty of `kvb-git-commit-no-verify`. +- One or a few commits, rest of the branch unwanted: `git cherry-pick -x ` + (`-x` records the origin), each then `git commit --amend --no-verify + --no-edit --trailer ""`. +- The whole branch is wanted: `git merge --no-ff --no-commit `. +- Both follow the approval-prompt duty and trailers of + `kvb-git-commit-no-verify`. - Conflicts: resolve them by reading both sides. Never `-X ours`/`-X theirs`, never `git checkout --ours/--theirs` wholesale: that silently drops one side's fix. Unresolvable → `git cherry-pick --abort` / `git merge --abort`, diff --git a/skills/kvb-git-pr-create/SKILL.md b/skills/kvb-git-pr-create/SKILL.md index 7f91000..2bae3da 100644 --- a/skills/kvb-git-pr-create/SKILL.md +++ b/skills/kvb-git-pr-create/SKILL.md @@ -21,7 +21,8 @@ confirms it. ` shows the branch's head commit. 4. **Body**, written to a scratch file: what changed and why, the test evidence, the score block, and one `Closes #` line per issue the - branch fixes, each verified as the `kvb-git-issue-close` skill does. + branch fixes, each verified as the `kvb-git-issue-close` skill does, and + last the `kvb-git-commit-no-verify` `Created with` line. 5. **Confirm** with one `AskUserQuestion`: title (Conventional Commits), base, state and labels. The state follows the bar of the `kvb-org-swarm` skill (fix confidence ≥ 90 %, break risk ≤ 5 %, tokens and velocity diff --git a/skills/kvb-git-update-branches/SKILL.md b/skills/kvb-git-update-branches/SKILL.md index 1d99f20..2e6ea25 100644 --- a/skills/kvb-git-update-branches/SKILL.md +++ b/skills/kvb-git-update-branches/SKILL.md @@ -35,8 +35,8 @@ request, owner and lag, nothing preselected. Only the picks are updated. to the operator. - **Any other branch**: in the worktree that already has it checked out, else a temporary one under `/tmp` (the repository's own worktree targets - where it has them), `git merge --no-verify --no-edit origin/main`, with the - approval-prompt duty of `kvb-git-commit-no-verify`. On a conflict, `git + where it has them), `git merge --no-verify --no-commit origin/main`, then + the `kvb-git-commit-no-verify` commit. On a conflict, `git merge --abort` and report the files; the `kvb-git-merge-fix` skill or the operator resolves it later. - Remove the temporary worktrees afterwards. diff --git a/skills/kvb-org-unify/SKILL.md b/skills/kvb-org-unify/SKILL.md index 1e384ca..0fbff6d 100644 --- a/skills/kvb-org-unify/SKILL.md +++ b/skills/kvb-org-unify/SKILL.md @@ -38,7 +38,8 @@ busy. A worktree in a released directory on `unify/` from ``. Merge the ready branches, highest register priority first, with -`git merge --no-ff --no-verify `. A conflict: `git merge --abort`, and +`git merge --no-ff --no-commit `, then the `kvb-git-commit-no-verify` +commit. A conflict: `git merge --abort`, and the branch becomes a proposal naming the conflicting files. ## Step 3: gate diff --git a/tests/test_hotfix.py b/tests/test_hotfix.py index 4cd1781..00c30f3 100644 --- a/tests/test_hotfix.py +++ b/tests/test_hotfix.py @@ -562,6 +562,8 @@ class TestHotfix(unittest.TestCase): for name in ("db.txt", "line2.txt", "side.txt"): self.assertTrue((self.work / name).is_file(), name) self.assertEqual(self.git(self.work, "rev-list", "--count", "--merges", "HEAD").strip(), "2") + self.assertEqual(self.git(self.work, "log", "--merges", "--format=%(trailers:key=Created-with,valueonly)").split(), + ["https://s.veen.world/skills"] * 2) self.assertEqual(self.merges(self.sync(self.work, "work/side")), [["contained", "origin/main"], ["contained", "line"]])