From e63ecda468d87efb5bdfa217225b5fd3db567665 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 24 Nov 2026 11:31:19 -0500 Subject: [PATCH 1/2] skills: teach git notes for debugging context on fix commits The repository-content-changes skill lands commits but says nothing about preserving the debugging story behind a fix. Add a section explaining why git notes are the right place for root cause and evidence (run ids), and how: the MCP tools cannot write refs/notes/commits, so the agent hands the user the add/push/fetch commands, and treats the notes ref as shared history that is never force-pushed casually. --- .../repository-content-changes/SKILL.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/skills/catalog/skills/repository-content-changes/SKILL.md b/pkg/skills/catalog/skills/repository-content-changes/SKILL.md index e4d92d34c1..e7609724f9 100644 --- a/pkg/skills/catalog/skills/repository-content-changes/SKILL.md +++ b/pkg/skills/catalog/skills/repository-content-changes/SKILL.md @@ -71,6 +71,27 @@ everything; both are covered under confirmation below. repository created without `autoInit` has no default branch, and nothing can be branched from it until the first commit lands. +## Recording the why with git notes + +A commit message says what changed; a fix often also carries a debugging story — root +cause, evidence such as workflow run ids, and why this fix and not another. Git notes +hold that context on the commit without rewriting its message, so `git log --notes` +tells the whole story. + +No tool in this workflow can write notes: they live on `refs/notes/commits`, which the +API commits here never touch, and which a plain `git push` does not send either. When a +fix commit lands through `push_files` or `create_or_update_file`, hand the user the +commands to run locally rather than letting the context drop: + +- add: `git notes add -m "" ` +- push: `git push origin refs/notes/commits` +- fetch on a fresh clone: `git fetch origin refs/notes/commits:refs/notes/commits`, + or set `git config --add remote.origin.fetch '+refs/notes/*:refs/notes/*'` once so + plain fetches pull them too + +Notes are a shared ref. Never rewrite or force-push `refs/notes/commits` casually — +treat it like force-pushing the default branch, and confirm first. + ## Confirm before every write These are the only tools in this workflow that are not reversible by another call, and From b29706fef0f1b5e817ea4bd7b376a77d21e1ea4c Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 24 Nov 2026 11:43:45 -0500 Subject: [PATCH 2/2] skills: express commit-notes guidance without host execution routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestSkillsRouteOnlyThroughTools rejects references to host execution surfaces in bundled skills — the catalog must read the same to a host with no execution surface at all. Reword the notes section in tool-neutral terms: the refs/notes/commits ref, the fact that no tool here writes it, and the instruction to hand the context to the user rather than routing the host to local commands. --- .../repository-content-changes/SKILL.md | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/pkg/skills/catalog/skills/repository-content-changes/SKILL.md b/pkg/skills/catalog/skills/repository-content-changes/SKILL.md index e7609724f9..9deb71831c 100644 --- a/pkg/skills/catalog/skills/repository-content-changes/SKILL.md +++ b/pkg/skills/catalog/skills/repository-content-changes/SKILL.md @@ -71,26 +71,24 @@ everything; both are covered under confirmation below. repository created without `autoInit` has no default branch, and nothing can be branched from it until the first commit lands. -## Recording the why with git notes +## Recording the why with commit notes A commit message says what changed; a fix often also carries a debugging story — root -cause, evidence such as workflow run ids, and why this fix and not another. Git notes -hold that context on the commit without rewriting its message, so `git log --notes` -tells the whole story. - -No tool in this workflow can write notes: they live on `refs/notes/commits`, which the -API commits here never touch, and which a plain `git push` does not send either. When a -fix commit lands through `push_files` or `create_or_update_file`, hand the user the -commands to run locally rather than letting the context drop: - -- add: `git notes add -m "" ` -- push: `git push origin refs/notes/commits` -- fetch on a fresh clone: `git fetch origin refs/notes/commits:refs/notes/commits`, - or set `git config --add remote.origin.fetch '+refs/notes/*:refs/notes/*'` once so - plain fetches pull them too - -Notes are a shared ref. Never rewrite or force-push `refs/notes/commits` casually — -treat it like force-pushing the default branch, and confirm first. +cause, evidence such as workflow run ids, and why this fix and not another. Commit +notes hold that context on the commit without rewriting its message: they live on the +`refs/notes/commits` ref, and a history view that includes notes tells the whole +story. + +No tool in this workflow writes that ref — commits made through this server never +touch it, and the notes ref is neither sent nor received by default. When a fix +commit lands through `push_files` or `create_or_update_file`, hand the user the +context — root cause, evidence, the why — so they can record it on the commit with +their own client rather than letting it drop. Mention that the notes ref needs an +explicit send, and an explicit receive on a fresh clone (`+refs/notes/*:refs/notes/*` +is the mapping to configure once so routine transfers include it). + +The notes ref is shared history. Never rewrite it casually — treat force-updating +`refs/notes/commits` like force-updating the default branch, and confirm first. ## Confirm before every write