Skip to content

Commit 1afa8cd

Browse files
test(skills): pin reverse's billing handoff per payment section
start.md's opening said the agent runs every command, which contradicts the billing sections below it. It now excludes `billing` and says the person opens and pays on the upgrade and add-on credits pages. The test now checks the handoff itself. Both payment sections must give the person the command and forbid running billing. Neither may tell the agent to run, execute or launch a billing command, and SKILL.md must keep its prohibition. Each of those mutations, and main's start.md, fails the test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HebQXQjEiSeVmhvTbJvSAw
1 parent ed948a8 commit 1afa8cd

3 files changed

Lines changed: 29 additions & 7 deletions

File tree

‎scripts/check-core-skills.test.mjs‎

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,36 @@ test("reverse builds the project with init --video and asks for the run's total
4848
);
4949
assert.match(
5050
start,
51-
/add up what each refused step\s+needs, and (?:run|give them) `npx hyperframes billing (?:top-up|add-credits) --needed <total>(?: --skill reverse-any-video)?`(?: to run)? once for that total/,
51+
/add up what each refused step\s+needs, and give them `npx hyperframes billing (?:top-up|add-credits) --needed <total>(?: --skill reverse-any-video)?` to run once for that total/,
5252
);
53-
assert.doesNotMatch(start, /then run the `reverse\.subscribe_command`/);
54-
assert.doesNotMatch(start, /\n\s*run `npx hyperframes billing/);
5553
assert.doesNotMatch(read("SKILL.md"), /copy the video into the project/);
5654
assert.match(read("SKILL.md"), /`init --video` put the video in/);
5755
});
5856

57+
test("reverse hands every purchase to the person instead of running billing itself", () => {
58+
const read = (path) =>
59+
readFileSync(new URL(`../skills/reverse-any-video/${path}`, import.meta.url), "utf8");
60+
const start = read("references/start.md");
61+
const section = (heading) => start.split(`## ${heading}`)[1].split("\n## ")[0];
62+
assert.match(
63+
read("SKILL.md"),
64+
/give the person its upgrade link and `fix` to run themselves \(you never run `billing`\)/,
65+
);
66+
assert.match(start, /You run every command except `billing`, which\s+is theirs/);
67+
assert.doesNotMatch(start, /you run every command,/);
68+
for (const heading of ["Signed in on Free", "Out of credits mid-run"]) {
69+
const text = section(heading);
70+
assert.match(text, /never run a `billing` command yourself/, heading);
71+
assert.match(text, /for them to run|to run once for that total/, heading);
72+
const rest = text.replace("never run a `billing` command yourself", "");
73+
assert.doesNotMatch(
74+
rest,
75+
/\b(?:run|execute|launch)\b[^.\n]{0,60}(?:`(?:npx hyperframes )?billing|`reverse\.subscribe_command`)/i,
76+
heading,
77+
);
78+
}
79+
});
80+
5981
test("flags a skill that never reports its own run", () => {
6082
assert.deepEqual(
6183
beaconProblems("slideshow", "Run `npx hyperframes events --skill=slideshow` first."),

‎skills-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"files": 76
2727
},
2828
"reverse-any-video": {
29-
"hash": "a4e1c95ba4cd0ed4",
29+
"hash": "4cc7291d266b1f9a",
3030
"files": 5
3131
},
3232
"slideshow": {

‎skills/reverse-any-video/references/start.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Opening a Reverse
22

33
What the person reads at the start, and when credits run out mid-run. Write it for them, not for an agent:
4-
their language, warm and short, no file names, step numbers or tool names. They type nothing: you run every command,
5-
and any page they need (sign-in, upgrade, add-on credits) goes in your message as a plain link they can click, in case the
6-
browser did not open.
4+
their language, warm and short, no file names, step numbers or tool names. You run every command except `billing`, which
5+
is theirs: any page they need goes in your message as a plain link they can click, sign-in in case the browser did not
6+
open, upgrade and add-on credits for them to open and pay themselves.
77

88
For you, not them: run `npx hyperframes events --skill=reverse-any-video --event=skill_completed --outcome=success`
99
when you hand over the video (`--outcome=error` when you stop without one).

0 commit comments

Comments
 (0)