From 12b6caf90d0001e38972b3dc262ad47fd8871964 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:12:42 +0200 Subject: [PATCH 01/10] test(skills): guard discovery frontmatter boundaries --- tests/discovery-frontmatter.test.mjs | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/discovery-frontmatter.test.mjs diff --git a/tests/discovery-frontmatter.test.mjs b/tests/discovery-frontmatter.test.mjs new file mode 100644 index 00000000..08ee2d86 --- /dev/null +++ b/tests/discovery-frontmatter.test.mjs @@ -0,0 +1,38 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import path from 'node:path'; +import test from 'node:test'; + +const root = path.resolve(import.meta.dirname, '..'); + +function description(text) { + const match = text.match(/^---\s*\n([\s\S]*?)\n---/); + assert.ok(match, 'frontmatter missing'); + const lines = match[1].split(/\r?\n/); + const start = lines.findIndex((line) => /^description:\s*[>|]/.test(line)); + assert.notEqual(start, -1, 'description missing'); + const parts = []; + for (let i = start + 1; i < lines.length; i += 1) { + if (/^\S/.test(lines[i])) break; + parts.push(lines[i].trim()); + } + return parts.join(' '); +} + +const workflowLeak = /\b(?:must|always)\s+(?:run|load|read|execute|call|invoke)\b|(?:scripts\/|references\/)[^\s`]+/i; + +test('github-delivery discovery description routes without embedding executable procedure', async () => { + const desc = description(await readFile(path.join(root, 'SKILL.md'), 'utf8')); + assert.doesNotMatch(desc, workflowLeak); + assert.match(desc, /GitHub/i); + assert.match(desc, /Not for/i); +}); + +for (const name of ['babysit', 'babysit-pr', 'review-security']) { + test(`${name} redirect description names the destination without embedding its workflow`, async () => { + const desc = description(await readFile(path.join(root, 'overrides', name, 'SKILL.md'), 'utf8')); + assert.match(desc, /github-delivery/i); + assert.match(desc, /redirect/i); + assert.doesNotMatch(desc, workflowLeak); + }); +} From 2fd150495fc387bc70ebe1a96beabef6ad59cd6c Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:12:49 +0200 Subject: [PATCH 02/10] refactor(skills): narrow babysit discovery metadata --- overrides/babysit/SKILL.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/overrides/babysit/SKILL.md b/overrides/babysit/SKILL.md index 6a7ce8ac..041b0c89 100644 --- a/overrides/babysit/SKILL.md +++ b/overrides/babysit/SKILL.md @@ -1,11 +1,9 @@ --- name: babysit description: > - Prefer this over Cursor’s built-in babysit. Use when the user says babysit, - watch, monitor, keep an eye on, or poll a GitHub PR / CI / review comments. - This personal skill is a redirect: always load github-delivery and run its - watch-pr (or fix-pr-bots if they asked merge-ready). Do not run the thin - built-in conflict/CI-only babysit loop from ~/.cursor/skills-cursor/babysit. + Compatibility redirect for the explicit babysit alias and requests to watch or + monitor a GitHub PR or CI loop. Routes to github-delivery; not a standalone + PR or CI workflow. --- # Babysit → github-delivery From b6b7dc4f0eb5d655ee7e5f79c0ec35dbd793c13e Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:12:58 +0200 Subject: [PATCH 03/10] refactor(skills): narrow babysit-pr discovery metadata --- overrides/babysit-pr/SKILL.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/overrides/babysit-pr/SKILL.md b/overrides/babysit-pr/SKILL.md index 4bf55221..6a3da5fd 100644 --- a/overrides/babysit-pr/SKILL.md +++ b/overrides/babysit-pr/SKILL.md @@ -1,12 +1,9 @@ --- name: babysit-pr description: > - Prefer this over OpenAI Codex babysit-pr (and similar Claude marketplace - installs). Use when the user says babysit-pr, babysit a PR, watch CI, monitor - a pull request, handle review comments in a loop, or keep an eye on an open - PR. This personal skill is a redirect: always load github-delivery and run - watch-pr (or fix-pr-bots if they asked merge-ready). Do not run openai/codex - babysit-pr’s gh_pr_watch.py-only loop when github-delivery is available. + Compatibility redirect for the explicit babysit-pr alias and requests to + babysit a GitHub pull request. Routes to github-delivery; not a standalone + PR or CI workflow. --- # babysit-pr → github-delivery From 233a8dddfb6a592fc0fa9b1685200f0174e435ff Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:13:03 +0200 Subject: [PATCH 04/10] refactor(skills): narrow review-security discovery metadata --- overrides/review-security/SKILL.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/overrides/review-security/SKILL.md b/overrides/review-security/SKILL.md index 82ecb5be..961d6876 100644 --- a/overrides/review-security/SKILL.md +++ b/overrides/review-security/SKILL.md @@ -1,11 +1,9 @@ --- name: review-security description: > - Prefer this over Cursor’s built-in review-security / Security Review harness. - Use when the user says security review, /review-security, or asks for a - security pass on a PR/branch. This personal skill is a redirect: always load - github-delivery and run references/security-review.md. Do not launch Task - subagent_type security-review. + Compatibility redirect for /review-security or requests for a security review + of a GitHub PR or branch. Routes to github-delivery; not a standalone security + review workflow. --- # review-security → github-delivery From f67ebb0fb9da2602e84fceec5b8541d1c7827035 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:13:30 +0200 Subject: [PATCH 05/10] refactor(skills): keep execution procedure out of discovery metadata --- SKILL.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SKILL.md b/SKILL.md index 6149377f..dfab4a3a 100644 --- a/SKILL.md +++ b/SKILL.md @@ -1,10 +1,11 @@ --- name: github-delivery description: > - Git/GitHub delivery: commits, version/changelog prep, PRDs, triage/QA, - research, PRs, trackers, stacks, backports, reviews, conflicts, watch/status, - merge/closure. Watch MUST run scripts/ship-gate.mjs every wake. Default mode - is read-only. Not for general local debugging, non-GitHub planning, or skill authoring. + Owns Git/GitHub delivery from scoped repository work through pull requests, + review and CI handling, backports, release preparation, merge, and closure. + Use for GitHub PR delivery, branch or commit operations, release preparation, + stacked or backport PRs, or ongoing PR and CI monitoring. Default mode is + read-only. Not for general local debugging, non-GitHub planning, or skill authoring. --- # GitHub Delivery From 64dfe1a6785c7755316fbad1587453451fee3e54 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:25:35 +0200 Subject: [PATCH 06/10] refactor(skills): sharpen PR watch discovery triggers --- SKILL.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SKILL.md b/SKILL.md index dfab4a3a..a7d4f367 100644 --- a/SKILL.md +++ b/SKILL.md @@ -2,10 +2,11 @@ name: github-delivery description: > Owns Git/GitHub delivery from scoped repository work through pull requests, - review and CI handling, backports, release preparation, merge, and closure. - Use for GitHub PR delivery, branch or commit operations, release preparation, - stacked or backport PRs, or ongoing PR and CI monitoring. Default mode is - read-only. Not for general local debugging, non-GitHub planning, or skill authoring. + reviews and CI handling, backports, release preparation, merge, and closure. + Use for GitHub pull request or PR delivery, branch or commit operations, + release preparation, stacked or backport PRs, or ongoing PR and CI watch or + monitoring. Default mode is read-only. Not for general local debugging, + non-GitHub planning, or skill authoring. --- # GitHub Delivery From ed13facde01824e099c8e7173da0c90ba7bbfbd0 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:54:38 +0200 Subject: [PATCH 07/10] fix(skill): preserve ship-gate body contract --- SKILL.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/SKILL.md b/SKILL.md index a7d4f367..058cddb8 100644 --- a/SKILL.md +++ b/SKILL.md @@ -117,8 +117,7 @@ no GitHub write authority. Run routine deterministic tooling quietly; narrate on the resulting non-empty candidate diff before publication; it must never be treated as a prerequisite for writing the first implementation commit. Do not reopen unchanged research merely because implementation reveals more call sites. -- **Authoritative gate: `scripts/ship-gate.mjs`.** Watch MUST run - scripts/ship-gate.mjs every wake. Before merge-ready or merge, the final `ship-gate.mjs` result must be `ready` on unchanged heads. +- **Authoritative gate: `scripts/ship-gate.mjs`.** Watch MUST run scripts/ship-gate.mjs every wake. Before merge-ready or merge, the final `ship-gate.mjs` result must be `ready` on unchanged heads. Component helpers diagnose; they never overrule that decision. - Red required checks use the `baseHealth` component: `fix_in_pr`, `separate_follow_up`, or `investigate`; unknown origin is a hard evidence stop. @@ -128,7 +127,7 @@ no GitHub write authority. Run routine deterministic tooling quietly; narrate on **Never resolve a bot thread with only a defer/skip reply.** See `references/policy/reviews.md`. - Merge-ready paths run their required Bug + Security + Spec + Standards review - and **proactive contract verification**; passing bots/checks alone is not + and **proactive contract verification**; passing bots/checks alone are not sufficient. See `references/policy/reviews.md` and focused review methods. - Non-merge writes use `github-mutate.mjs`; merges use only `merge-pr-driver.mjs`. Generic `merge_pr` mutation documents are rejected. Do not invoke From 5e5793978a63f9b8267d2ac6163b93fa24a99d22 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 08:55:07 +0200 Subject: [PATCH 08/10] chore(skill): keep unrelated wording unchanged --- SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SKILL.md b/SKILL.md index 058cddb8..26c36602 100644 --- a/SKILL.md +++ b/SKILL.md @@ -127,7 +127,7 @@ no GitHub write authority. Run routine deterministic tooling quietly; narrate on **Never resolve a bot thread with only a defer/skip reply.** See `references/policy/reviews.md`. - Merge-ready paths run their required Bug + Security + Spec + Standards review - and **proactive contract verification**; passing bots/checks alone are not + and **proactive contract verification**; passing bots/checks alone is not sufficient. See `references/policy/reviews.md` and focused review methods. - Non-merge writes use `github-mutate.mjs`; merges use only `merge-pr-driver.mjs`. Generic `merge_pr` mutation documents are rejected. Do not invoke From 77b5cd11cf05389db50ac643dc13f4e822c9b0fa Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 09:36:59 +0200 Subject: [PATCH 09/10] fix(skill): advertise PR security review ownership --- SKILL.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SKILL.md b/SKILL.md index 26c36602..4f1f9f57 100644 --- a/SKILL.md +++ b/SKILL.md @@ -3,10 +3,10 @@ name: github-delivery description: > Owns Git/GitHub delivery from scoped repository work through pull requests, reviews and CI handling, backports, release preparation, merge, and closure. - Use for GitHub pull request or PR delivery, branch or commit operations, - release preparation, stacked or backport PRs, or ongoing PR and CI watch or - monitoring. Default mode is read-only. Not for general local debugging, - non-GitHub planning, or skill authoring. + Use for GitHub pull request or PR delivery, PR security reviews, branch or + commit operations, release preparation, stacked or backport PRs, or ongoing + PR and CI watch or monitoring. Default mode is read-only. Not for general + local debugging, non-GitHub planning, or skill authoring. --- # GitHub Delivery From f51efe37c0b2ab40a7d302918c31e0fe32b72265 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Sun, 13 Sep 2026 10:01:11 +0200 Subject: [PATCH 10/10] fix(skill): stay within policy context budget --- SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SKILL.md b/SKILL.md index 4f1f9f57..124eed7f 100644 --- a/SKILL.md +++ b/SKILL.md @@ -4,7 +4,7 @@ description: > Owns Git/GitHub delivery from scoped repository work through pull requests, reviews and CI handling, backports, release preparation, merge, and closure. Use for GitHub pull request or PR delivery, PR security reviews, branch or - commit operations, release preparation, stacked or backport PRs, or ongoing + commit operations, release preparation, stacked or backport PRs, ongoing PR and CI watch or monitoring. Default mode is read-only. Not for general local debugging, non-GitHub planning, or skill authoring. ---