Skip to content

skills/pr-management-mentor: trim frontmatter to fit metadata budget - #119

Merged
potiuk merged 1 commit into
apache:mainfrom
choo121600:trim-pr-management-mentor-skill
May 11, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
choo121600:trim-pr-management-mentor-skill

Conversation

@choo121600

Copy link
Copy Markdown
Member

Summary

Trims pr-management-mentor frontmatter (description + when_to_use) from 1,514 → 972 characters. The skill was sitting 22 characters under Claude Code's per-skill metadata budget of 1,536 — one edit could push it over.

Same principle as #103: keep trigger phrases, short task descriptions, and routing cues in the frontmatter. Move rationale, "distinct from X" explanations, implementation details, and enumerated hand-off triggers to the body, which already covers them.

Tracking: #118

Before / after

before after Δ
description 954 512 -442
when_to_use 560 460 -100
total 1,514 972 -542
budget margin 22 564 +542
budget 1,536 1,536

What moved where

Detail Where it lives now
<upstream> default-resolution detail (default: read from <project-config>/project.md → upstream_repo) Placeholder-convention HTML comment + ## Adopter contract
"runs the tone checklist, then waits for explicit maintainer confirmation before posting via gh" ## Runtime loop steps 7–9
"Does not triage / review code / open PRs" distinctions ## What this skill does not do (already enumerated)
Four hand-off triggers (max_agent_turns, design pushback, out_of_scope_topics, asks for human) ## Hand-off section (already enumerated)
"the agent should not talk over a human reviewer" ## Runtime loop step 4

No body content was removed — the body already covered everything the frontmatter was duplicating.

Trigger-phrase preservation

Every literal trigger phrase from the original when_to_use is preserved verbatim:

  • "mentor PR NNN"
  • "help the reporter on issue NNN"
  • "draft a clarifying comment for NNN"
  • "explain the convention to this contributor on NNN"
  • chains after pr-management-triage flags as "first contributor, missing repro / convention"

Skip cues also retain their matchable substrings ("mid-review with a maintainer", "security-sensitive", "*deliberately* not replied yet"). Routing recall does not regress.

@choo121600 choo121600 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Budget compliance confirmed. Pre-change total was 1,514 chars (22 under the 1,536 limit); post-change is 972 chars (564-char margin). The trim is safe and leaves meaningful headroom for future edits.

Checked all five dimensions:

Semantic faithfulness — all four hand-off triggers are still present in ## Hand-off (lines 161–165 of the body); the description's new pointer phrase "the four hand-off triggers" is a correct forward reference. All scope-exclusion rules live in ## What this skill does not do. No body content has lost its frontmatter anchor.

Trigger-phrase preservation — all five when_to_use trigger phrases are verbatim-preserved; all three skip-cues (mid-review with a maintainer, security-sensitive, *deliberately* not replied yet) are retained. Routing recall does not regress.

Frontmatter shape — name, description, when_to_use, license: Apache-2.0 all present and non-empty. mode: Mentoring retained. SPDX header and placeholder-convention comment are both present below the closing ---.

Placeholder convention — `<upstream>` is backticked. `<project-config>` and `<tracker>` do not appear in the frontmatter, matching the pre-change state.

One nit: the post-description says "the project's tone guide and convention pointers" but the artefact it refers to is tone-checks.md — a checklist. The body (step 7) uses "tone checks". Suggest "tone checklist" for precision. Easy to fix inline or in a follow-up.

🤖 This review was drafted by an AI-assisted tool. An apache-steward maintainer has read and confirmed it before posting; mistakes are still possible — point them out and the maintainer will sort it. See CONTRIBUTING.md for what an apache-steward maintainer review covers.

The frontmatter for pr-management-mentor was sitting at 1,514 / 1,536
characters — 22 chars from Claude Code's per-skill metadata budget.
One edit could push it over. Trims description + when_to_use down to
972 chars (margin 564) using the same principle as #103: frontmatter
is the routing layer, so the body absorbs rationale, "distinct from
X" explanations, and enumerated hand-off triggers (all already
covered in the body).

Every literal trigger phrase from the original when_to_use is
preserved verbatim, so routing recall does not regress.

Tracking: #118
potiuk pushed a commit that referenced this pull request May 11, 2026
…#120)

security-issue-triage shipped in #113 with frontmatter at 1,405 /
1,536 characters — margin of 131. Trims description + when_to_use
down to 1,103 chars (margin 433) using the same principle as #103
and #119: the body already enumerates the five-class disposition
table (Golden rule 4), the read-only invariant (Golden rule 1),
the standalone-top-level posting rule (Golden rule 3), and the
Composes-with sibling-skills list, so the frontmatter does not
need to duplicate them.

Every literal trigger phrase from the original when_to_use is
preserved verbatim, including the post-consensus skip-routing
("invoke /security-cve-allocate / -invalidate / -deduplicate
directly"), so routing recall does not regress.

Tracking: #118
@potiuk
potiuk merged commit 6ac4b04 into apache:main May 11, 2026
12 checks passed
@potiuk potiuk added capability:review Deep per-item code review or contributor mentoring family:pr-management pr-management-* skills labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:review Deep per-item code review or contributor mentoring family:pr-management pr-management-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants