Repository navigation
ci: fail a price or savings figure in skills, docs and prompts - #16022
Conversation
scripts/check-as-of-recheck.sh fails a paragraph in a plugin skill, agent or reference file that holds an as-of date and no recheck trigger, and each finding names the fix first: a trigger for a stored value, no date for a pointer. A generated shared copy is reported at its canonical source. The eight current offenders sit in scripts/as-of-recheck-baseline.txt, which fails when a count could shrink, the spoke-plugin-root mechanism. It runs in lint-repo through run-hygiene-gate.sh and in scripts/check-affected.sh, and the rule's stored-value paragraph now points at it. Closes #15936 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc
A three-backtick line inside a four-backtick example toggled the fence off, so the example's text was read as prose. A fence now closes only on a bare run of the opener's character at least as long as the opener. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc
scripts/check-cost-figures.sh fails a price, rate multiple, per-task or per-session cost, or percentage saving in the markdown under the paths .claude/rules/cost-claims.md covers, and names the costs and pricing pages to link. The rule's two exceptions pass: a docs/upstream/ paragraph labeled vendor-reported, and a skill section labeled a list-price estimate that carries a date, an x.y.z version and a recheck trigger. Current hits sit in a shrink-only baseline (19 paragraphs in 5 files); one number-formatting example is exempt with its reason. It runs as the cost-figures hygiene gate in pr-require-checks and in scripts/check-affected.sh, after the as-of-recheck gate, and the rule points at it. Refs: #15939 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc
…e-check # Conflicts: # .github/workflows/pr-require-checks.yml # scripts/check-affected-gates.txt # scripts/check-affected.sh # scripts/check-affected.test.sh # scripts/check-as-of-recheck.sh # scripts/check-as-of-recheck.test.sh # scripts/check-script-contract.test.sh
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c066ec69d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review (incremental, blocking only): no security issues foundScope: this review covers the changes since What changed:
Security assessment:
Embedded text in PR context: none directing the lane. Spend: none beyond the existing critical-findings: 0 |
|
claude-review reviewed Code review: PR #16022, incremental (4c066ec → 4bc6117)This review covered only what changed since the last one: I found no blocking problems. What changed:
All three settled threads are marked Closing issue #15939: the "Done when" items I judged last review still hold. The rate change makes item 1 ("fails a … rate") hold inside list-price sections too, and the new cases test it. The owner says The PR context and settled-thread files contain no instructions aimed at this lane. No billed resource is involved; the changes only touch a CI hygiene script that runs in seconds. Verifier dropped 0 of 0 candidates. |
… lines as prose - A rate (a per-token or per-million amount, or a rate multiple) now fails inside a section that meets the measured-run exception; the exception covers run costs and "states no rate". - A heading needs a space or the line end after its #s, as in check-as-of-recheck.sh, so a wrapped line opening with an issue reference no longer splits the paragraph or closes the section. - The generated-copy test keeps the canonical source outside the scanned roots, so it fails when the mapping breaks. Refs: #15939 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc
Closes #15939
Summary
.claude/rules/cost-claims.mdwas prose only: it says no skill, agent, reference, doc or promptstates a price, a rate, a per-task or per-session cost, or a percentage saving, and at least two
past commits had to remove one by hand. This adds
scripts/check-cost-figures.sh, a hygiene gatethat fails such a figure and names the pages to link instead. The rule now points at the check.
The new gate sits right after the
as-of-recheckgate that #15989 added, in every place that pullrequest added one. #15989 is merged and this branch is updated from
main.Fix
scripts/check-cost-figures.shreads every*.mdunder the rule's paths (plugins/*/skills/,plugins/*/agents/,plugins/*/reference/,docs/,prompts/), minusfixtures/trees, codefences and inline code. It flags, per paragraph (a table row and a list item each stand alone):
$,€or£sign before a digit, or a number before USD, EUR, GBP, dollars or cents;<n>xor<n> timesthe price or pricing;<n>% cheaper,costs <n>% less,cuts cost by <n>%,cost falls by <n>%,saves <n>% of the cost,<n>x cheaperand their variants.It does not flag a bare number or percentage (a threshold, a score, coverage, a cache-hit rate),
<n>% of the cost(a share of time or work),<n>x the cost, orper million tokenswith noamount. The header lists the patterns.
The rule's two exceptions pass through labels already in the text, with no path list:
docs/upstream/record that saysvendor-reported;plugins/*/skills/that sayslist-price estimateand carries aYYYY-MM-DDdate, anx.y.zversion andrecheck. Thecheck cannot read "the setup measured", the rule's fourth requirement.
Every finding opens with
FIX: delete the figure and link the page that owns it, https://code.claude.com/docs/en/costs#track-your-costs for usage or https://platform.claude.com/docs/en/about-claude/pricing for rates, then names both exceptions.scripts/cost-figures-baseline.txtholds the current hits, shrink-only, with the stale guardcopied from
scripts/check-spoke-plugin-root.sh: 19 paragraphs in 5 files.plugins/testing/skills/audit/evals/judge-calibration/calibration.mdplugins/playbooks/skills/boris/vendor/upstream-skill.mddocs/upstream/.plugins/evals/skills/plugin-eval/SKILL.mdreference/records.md#cost-anchors, which meets the exception and passes.docs/upstream/opus-5-5-task-cost.mddocs/contracts/loop-lane/README.mdscripts/cost-figures-exempt.txtexempts one file whose match is not a cost:plugins/user-interface/skills/glossary/reference/copywriting.md("$1.00 vs $1" is anumber-formatting example). An entry whose file no longer matches fails as stale.
Wired like
as-of-recheck: thecost-figuresstep andCHECK_RESULTSrow in.github/workflows/pr-require-checks.yml,scripts/check-affected.shand its gate list, thestub lists in
scripts/check-affected.test.sh, and a registry row, recipe and needle inscripts/check-script-contract.test.sh.Verification
/corrections:codify'sprove-check.shrunning the check over the one file each past fixchanged (old ref must fail, the fix commit must pass):
plugins/fleet/skills/reach/reference/relay.md: old exit 1, new exit 0.plugins/playbooks/skills/boris/reference/orchestration.md: old exit 1, new exit 0.scripts/check-cost-figures.test.sh: 34 passed. It covers each kind of figure failing, bothexceptions passing, each exception's conditions failing when missing, non-cost numbers passing,
the baseline failing when it could shrink or grows, and stale baseline and exempt entries.
It passes under both gawk and mawk (
scripts/check-shell-portability.sh --awk-probe).scripts/check-cost-figures.sh --checkon this tree: exit 0, 1937 files, about 0.4 s.scripts/check-affected-gates.test.sh: 6 passed.scripts/check-affected.test.sh: 131 passed.scripts/check-script-contract.test.sh: 63 passed, 2 failed. Both failures arecheck-html-assets.shwith no localnode_modules, known and unrelated.scripts/check-lane-coverage.sh --checkandscripts/aggregate-hygiene-results.sh --self-testpass;
actionlinton the workflow andshellcheckon both new scripts are clean.cost-figuresstep inpr-require-checks) and on every local push (scripts/check-affected.sh, the lefthook pre-pushhook). This pull request is its first run in CI.
Related
Follow-ups
and Chosen default sections, and plugin-eval's Cost section, need a list-price label with date,
version and trigger, or a pointer, to leave the baseline; that edits skill text, kept out of
this change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VcupojPZLwoMUhW1ApGhJc