Repository navigation
perf(setup): trim the setup family skills without changing behaviour - #1353
Merged
Merged
Conversation
Move Golden rules 7 and 9 out of setup/SKILL.md into the sibling files that use them (overrides.md, snapshot-model.md), byte-for-byte, and repoint their references. Trim the setup frontmatter under the 200-token always-on budget. Tighten the prose of setup and six more setup-family skills to one sentence per line, with headings, golden-rule headlines, code blocks and pre-flight blocks unchanged. Fixes stale pointers found on the way: rule 6 links aimed at SKILL.md, link text naming the removed docs/setup/install-recipes.md, and a doctor cross-reference to the wrong probe. Body tokens across the seven skills: 31,951 -> 29,242. Part of apache#1342. Generated-by: Claude Opus 5
This was referenced Sep 22, 2026
3 tasks done
liwenjie200543
added a commit
to liwenjie200543/magpie
that referenced
this pull request
Sep 26, 2026
Body tokens across the eight pr-management skills drop from 54,714 to 34,298 (-37.3%), all inside the 5,000-token body budget and the 500-line cap, with all always-on frontmatter budgets met. - Trim every skill's frontmatter under the 200-token always-on budget (7 of 8 skills were over). - Move sub-action-specific sections and individual sub-action golden rules into sibling files byte-for-byte and repoint their references, the same technique as the setup-family PRs (apache#1353): 16 new sibling files, no section left in two places. - Tighten remaining prose to SemBr one-sentence-per-line, keeping headings, golden-rule headlines, code blocks, tables and the generated pre-flight block byte-identical. - Fix one stale pointer per the apache#1353 precedent: pr-triage's moved Step 6b block in session-history.md anchored [Parameters] at the sibling itself. - Regenerate docs/mode-economics.md via skill-token-count --write. Verification: skill-token-count --check passes against the regenerated table; all 22 eval step-config.json extraction targets across the suites touching this family resolve to their exact heading in the exact file they point to; check-shared-blocks in sync across all 65 skills; check-duplication reports 0 pairs above the fail threshold; skill-evals pytest runs 174 tests with no new failures vs the untouched baseline; skill-and-tool-validate reports no findings in the touched plugin. Closes apache#1346. Part of apache#1342. Generated-by: GLM-5.3-Flash
liwenjie200543
added a commit
to liwenjie200543/magpie
that referenced
this pull request
Sep 26, 2026
Body tokens across the eight pr-management skills drop from 54,714 to 34,298 (-37.3%), all inside the 5,000-token body budget and the 500-line cap, with all always-on frontmatter budgets met. - Trim every skill's frontmatter under the 200-token always-on budget (7 of 8 skills were over). - Move sub-action-specific sections and individual sub-action golden rules into sibling files byte-for-byte and repoint their references, the same technique as the setup-family PRs (apache#1353): 16 new sibling files, no section left in two places. - Tighten remaining prose to SemBr one-sentence-per-line, keeping headings, golden-rule headlines, code blocks, tables and the generated pre-flight block byte-identical. - Fix one stale pointer per the apache#1353 precedent: pr-triage's moved Step 6b block in session-history.md anchored [Parameters] at the sibling itself. - Regenerate docs/mode-economics.md via skill-token-count --write. Verification: skill-token-count --check passes against the regenerated table; all 22 eval step-config.json extraction targets across the suites touching this family resolve to their exact heading in the exact file they point to; check-shared-blocks in sync across all 65 skills; check-duplication reports 0 pairs above the fail threshold; skill-evals pytest runs 174 tests with no new failures vs the untouched baseline; skill-and-tool-validate reports no findings in the touched plugin. Closes apache#1346. Part of apache#1342. Generated-by: GLM-5.3-Flash
potiuk
pushed a commit
to liwenjie200543/magpie
that referenced
this pull request
Sep 26, 2026
Body tokens across the eight pr-management skills drop from 54,714 to 34,298 (-37.3%), all inside the 5,000-token body budget and the 500-line cap, with all always-on frontmatter budgets met. - Trim every skill's frontmatter under the 200-token always-on budget (7 of 8 skills were over). - Move sub-action-specific sections and individual sub-action golden rules into sibling files byte-for-byte and repoint their references, the same technique as the setup-family PRs (apache#1353): 16 new sibling files, no section left in two places. - Tighten remaining prose to SemBr one-sentence-per-line, keeping headings, golden-rule headlines, code blocks, tables and the generated pre-flight block byte-identical. - Fix one stale pointer per the apache#1353 precedent: pr-triage's moved Step 6b block in session-history.md anchored [Parameters] at the sibling itself. - Regenerate docs/mode-economics.md via skill-token-count --write. Verification: skill-token-count --check passes against the regenerated table; all 22 eval step-config.json extraction targets across the suites touching this family resolve to their exact heading in the exact file they point to; check-shared-blocks in sync across all 65 skills; check-duplication reports 0 pairs above the fail threshold; skill-evals pytest runs 174 tests with no new failures vs the untouched baseline; skill-and-tool-validate reports no findings in the touched plugin. Closes apache#1346. Part of apache#1342. Generated-by: GLM-5.3-Flash
potiuk
added a commit
that referenced
this pull request
Sep 26, 2026
…our (#1390) * perf(pr-management): trim the family's skills without changing behaviour Body tokens across the eight pr-management skills drop from 54,714 to 34,298 (-37.3%), all inside the 5,000-token body budget and the 500-line cap, with all always-on frontmatter budgets met. - Trim every skill's frontmatter under the 200-token always-on budget (7 of 8 skills were over). - Move sub-action-specific sections and individual sub-action golden rules into sibling files byte-for-byte and repoint their references, the same technique as the setup-family PRs (#1353): 16 new sibling files, no section left in two places. - Tighten remaining prose to SemBr one-sentence-per-line, keeping headings, golden-rule headlines, code blocks, tables and the generated pre-flight block byte-identical. - Fix one stale pointer per the #1353 precedent: pr-triage's moved Step 6b block in session-history.md anchored [Parameters] at the sibling itself. - Regenerate docs/mode-economics.md via skill-token-count --write. Verification: skill-token-count --check passes against the regenerated table; all 22 eval step-config.json extraction targets across the suites touching this family resolve to their exact heading in the exact file they point to; check-shared-blocks in sync across all 65 skills; check-duplication reports 0 pairs above the fail threshold; skill-evals pytest runs 174 tests with no new failures vs the untouched baseline; skill-and-tool-validate reports no findings in the touched plugin. Closes #1346. Part of #1342. Generated-by: GLM-5.3-Flash * fix(pr-management): resolve the prek findings from the family trim - markdownlint: drop a double blank line in pr-triage SKILL.md, insert blank lines before thematic breaks that parsed as setext headings (quick-merge fetch-and-screen, stats classify/fetch/render), and promote the moved Step 6b section to h2 in session-history.md so heading levels increment. - Anchors: repoint six links whose SKILL.md targets moved into sibling files (pr-triage actions/classify-and-act/interaction-loop/ prerequisites, quick-merge present-and-handoff, and the projects/_template config), keeping every fragment slug identical. - docs/setup/marketplace.md: refresh the family's declared always-on tokens to ~0.8k after the frontmatter trim. - Regenerate docs/mode-economics.md and docs/vendor-neutrality.md. Verification: skill-token-count --check passes; check-shared-blocks in sync (65 skills); check-duplication 0 pairs above threshold; skill-evals pytest 174 tests with no new failures vs the untouched baseline; every eval step-config extraction target still resolves; all six repointed anchors verified against the headings now holding them. Generated-by: GLM-5.3-Flash * fix(pr-management): keep reviewer-routing's session-scoped confirmation and catch-all trigger The trim dropped "in this session" from Golden rule 1, loosening the confirmation requirement, and the "any variation on proposing a first reviewer" catch-all from when_to_use, which routes paraphrased requests to the skill. Restore both. Re-stamp measured_tokens after rebasing onto the per-skill token stamps. Generated-by: Claude Opus 5 --------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
optimize-skillrecipe to thesetupfamily, without changing what any skill does: 31,951 → 29,242 body tokens across seven skills (−8.5%), and thesetupfrontmatter (loaded in every session) from ~228 to ~167 tokens, under the 200-token budget.setup/SKILL.md, byte-for-byte, into the sibling files that use them (overrides.md,snapshot-model.md); rule 8 stays because 12 places cite it.setupplus isolated-setup-doctor / -verify / -update, upstream-fix, override-upstream and shared-config-sync.setupsetup-isolated-setup-verifysetup-upstream-fixsetup-shared-config-syncsetup-isolated-setup-updatesetup-override-upstreamsetup-isolated-setup-doctorType of change
docs/mode-economics.md,docs/setup/marketplace.mdtoken figures)Test plan
prek run --all-filespasses (validator, lychee, surface-hash, token count, doc-sync)mainfor every rewritten file: frontmatter, pre-flight block, fenced code blocks, headings, golden-rule headlines and link targets identical; inline code spans preserved (whitespace-normalised). The only removed span is link text naming the deleteddocs/setup/install-recipes.md, now matching its unchanged target.main(outside the sandbox — the harness'sclaude -pexits 1 inside it):mainmain(preflight-floor2/8,uninstall-default-set1/3)Every failure on this branch either fails on
maintoo or is non-deterministic: re-running the branch-only failures (verifystep-1-classifycase-3 / case-6, override-upstreamstep-0case-3) passed them, and other cases in those steps failed instead.step-m3andstep-override-bypassextract text this PR does not touch.RFC-AI-0004 compliance
No behaviour change; every confirmation gate, "never" rule and placeholder is preserved.
Linked issues
Closes #1343. Part of #1342.
Notes for reviewers
setup'ssurface_hashchanges (golden-rule callouts are fingerprinted with their file), so adopters who reconciled or overrodesetupsee one stale-configuration notice. The other six skills' hashes are unchanged.SKILL.md#golden-rules, three link labels naming the deletedinstall-recipes.md, a doctor cross-reference to the wrong probe, a shared-config-sync pointer to a non-existent golden rule.🤖 Generated with Claude Code