Skip to content

perf(repo-health): trim the family's skills without changing behaviour - #1467

Merged
onlyarnav merged 3 commits into
apache:mainfrom
liwenjie200543:perf/repo-health-family-trim
Oct 2, 2026
Merged

onlyarnav merged 3 commits into
apache:mainfrom
liwenjie200543:perf/repo-health-family-trim

Conversation

@liwenjie200543

@liwenjie200543 liwenjie200543 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Apply the #1342 setup-family recipe to the repo-health family (#1349),
as previously applied to setup (#1353), pr-management (#1390), and issue
(#1400).

What changed

Always-on frontmatter — the five skills over the 200-token budget
(dependency-license-audit ~256, audit-finding-fix ~211,
license-compliance-audit ~214, flaky-test-triage ~210,
ci-runner-audit ~207, workflow-security-audit ~204) had their
description / when_to_use tightened; every quoted routing phrase is
kept.

Bodies — the two skills over the 5,000-token / 500-line budgets moved
sub-action-specific sections byte-for-byte into sibling files, leaving
one-line pointers:

skill siblings measured tokens lines
dependency-license-audit audit-tool-setup.md, scan-commands.md, license-normalization.md 5244 → 3455 523 → 315
audit-finding-fix compose-commit.md, draft-pr-procedure.md, pre-pr-adversarial-review.md 6170 → 4584 591 → 450

The moved sections are byte-identical to the text on main (verified by
script, not by eye). Family total: 27979 → 24475 measured tokens (−12.5%).
All seven skills now sit inside the 5,000-token body budget, the 500-line
cap, and the 200-token always-on budget.

measured_tokens was re-stamped via skill-token-count; surface_hash
was re-stamped only where structural anchors moved between files
(dependency-license-audit) — the other five keep their hashes.

How checked

  • tools/dev/estimate-skill-tokens.py --check: OK (published figures
    match the live frontmatter).
  • check-placeholders.sh, check-duplication.py,
    check-companion-skills.py: OK.
  • The skill-evals suites for audit-finding-fix and
    dependency-license-audit need the --cli model runner, so they are
    left to CI rather than this offline environment.
  • Note: check-skill-config.py flags pre-existing requires_config table
    drift in docs/{security,setup,utilities}/README.md — present on
    main before this PR and untouched by it.

Gen-AI disclosure

Authored with ZCode (GLM) under
docs/ai-contribution-policy.md;
every line reviewed and the checks above run locally by me before posting.

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the optimization pass! All quoted routing triggers are strictly preserved, frontmatters/bodies sit well within budgets, and static checks pass.

Minor nit:
In dependency-license-audit/ (audit-tool-setup.md, license-normalization.md, and scan-commands.md), the # <Title> top-level heading is immediately repeated as a ## <Title> sub-heading below the companion preamble. You can drop the duplicate ## <Title> for cleaner markdown structure.

Also, please rebase on latest main to resolve the merge conflict so this can be merged.

Apply the apache#1342 setup-family recipe to the repo-health family (apache#1349):

- Always-on frontmatter (description / when_to_use) tightened on the five
  skills over the 200-token budget; every quoted routing phrase kept.
- dependency-license-audit: tool-setup, scan-command, and license-
  normalization sections moved byte-identically into sibling files with
  one-line pointers (5244 -> 3453 measured tokens; 523 -> 315 lines).
- audit-finding-fix: Step 6 and Step 8 moved byte-identically into
  compose-commit.md / draft-pr-procedure.md / pre-pr-adversarial-review.md
  (6170 -> 4663 measured tokens; 591 -> 461 lines).
- measured_tokens re-stamped via skill-token-count; surface_hash re-stamped
  where structural anchors moved; family total 27979 -> 24554 tokens.

Generated-by: ZCode (GLM, coding agent)

Authored-by: liwenjie200543 <liwenjie200543@users.noreply.github.com>
…on figure

- dependency-license-audit siblings ended with a stray blank line
  (end-of-file-fixer).
- draft-pr-procedure.md had consecutive blank lines (markdownlint MD012).
- docs/setup/marketplace.md published ~0.7k always-on tokens for
  magpie-repo-health; the tightened frontmatter measures ~0.6k.

Generated-by: ZCode (GLM, coding agent)

Authored-by: liwenjie200543 <liwenjie200543@users.noreply.github.com>
@liwenjie200543
liwenjie200543 force-pushed the perf/repo-health-family-trim branch from 69b5260 to 4e29a59 Compare September 29, 2026 14:58
@liwenjie200543

Copy link
Copy Markdown
Contributor Author

Both done: the duplicated ## <Title> sub-headings in the three dependency-license-audit companions are dropped, and the branch is rebased on current main. The rebase folds in #1470's Snapshot-drift removal for audit-finding-fix (the section is gone from SKILL.md; the Drift check prerequisite now points at the generated pre-flight block), with surface_hash / measured_tokens re-stamped via the repo tools. All static checks pass locally.

@liwenjie200543
liwenjie200543 force-pushed the perf/repo-health-family-trim branch from 4e29a59 to d311158 Compare September 29, 2026 15:12

@onlyarnav onlyarnav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@onlyarnav
onlyarnav merged commit 58de3f2 into apache:main Oct 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants