feat(skills): every skill commit carries the Created-with trailer
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c4a3ab227
commit
9b1f0690de
10 files changed
+34
-26
No files matched your search
@@ -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`.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 "<subject>" -m "<body>" -m "<block>" -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 "<subject>" -m "<body>" -m
|
||||
"<score.py ... --message-block>" --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 <hash>` (the committed diff stat and a 🔖 Commit column), and
|
||||
what remains uncommitted.
|
||||
@@ -36,7 +36,8 @@ hotfix.py void --repo <worktree> --target <t> [--target ...]
|
||||
1. `sync`: fetches, merges `origin/<default>`, 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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 <sha>…`
|
||||
(`-x` records the origin).
|
||||
- The whole branch is wanted: `git merge --no-ff <branch>`.
|
||||
- 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 <sha>`
|
||||
(`-x` records the origin), each then `git commit --amend --no-verify
|
||||
--no-edit --trailer "<Created-with>"`.
|
||||
- The whole branch is wanted: `git merge --no-ff --no-commit <branch>`.
|
||||
- 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`,
|
||||
|
||||
@@ -21,7 +21,8 @@ confirms it.
|
||||
<branch>` 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 #<n>` 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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -38,7 +38,8 @@ busy.
|
||||
|
||||
A worktree in a released directory on `unify/<goal>` from `<line>`. Merge the
|
||||
ready branches, highest register priority first, with
|
||||
`git merge --no-ff --no-verify <branch>`. A conflict: `git merge --abort`, and
|
||||
`git merge --no-ff --no-commit <branch>`, 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
|
||||
|
||||
@@ -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"]])
|
||||
|
||||
|
||||
Reference in new issue
Block a user