Skip to content

docs(issues): [#2873] add issue specification for shortening the skill descriptions - #2875

Merged
josecelano merged 11 commits into
torrust:developfrom
josecelano-bot:2873-shorten-skill-descriptions-spec
Nov 16, 2026
Merged

josecelano merged 11 commits into
torrust:developfrom
josecelano-bot:2873-shorten-skill-descriptions-spec

Conversation

@josecelano-bot

Copy link
Copy Markdown
Contributor

Related to #2873
Related to #2003

Summary

Spec-only PR for #2873, a sub-issue of EPIC #2003 and task T1 of #2866: shorten and retune the 53 agent skill descriptions so Claude Code's skill listing fits its budget.

What the spec covers

  • The listing budget is 1% of the context window. With the 53 project skills the Skills category is at its cap (9.9k tokens on a 1M window); the project entries cost about 6,980 tokens and 7 claude.ai sync skills lost their descriptions. Re-measured with claude -p "/context" (Claude Code 2.1.318) at develop a35960402: same numbers as Move the agent skills to .claude/skills/ so Claude Code discovers them #2866's spec.
  • Description rules: 200 characters or less (YAML-parsed), "what" then "Use when", keep the distinguishing trigger words. About half of today's cost.
  • The defect: the write-markdown-docs description is a plain YAML scalar containing a space followed by #, so YAML keeps 123 of its 578 characters. Fixed by quoting, through the fix-bug process.
  • A frontmatter-validator rule for over-long or comment-cut descriptions, next to Move the agent skills to .claude/skills/ so Claude Code discovers them #2866's skill rules.
  • /context before and after, plus sample prompts checking that the same skills still load.
  • Timing: the description edits land after Move the agent skills to .claude/skills/ so Claude Code discovers them #2866's implementation PR merges, on .claude/skills/<name>/.

Checks

linter all passes; the pre-commit and pre-push hooks ran.

🤖 Generated with Claude Code

…he skill descriptions

Adds the spec for EPIC torrust#2003 sub-issue torrust#2873, task T1 of torrust#2866: shorten
the 53 skill descriptions to 200 characters or less so Claude Code's
skill listing fits its 1% budget, fix the write-markdown-docs description
that YAML cuts at a '#', and add a frontmatter-validator rule. Adds row 22
to the EPIC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@josecelano josecelano self-assigned this Nov 16, 2026
@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot November 16, 2026 08:33
da2ce7
da2ce7 previously approved these changes Nov 16, 2026

@da2ce7 da2ce7 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.

Reviewed at 148e83058d2e8225b5597d4fe397b8e7eb79ac3f. Recomputed from the bytes at this head, against the merge base a35960402; git merge-tree against develop 1c3daab4b writes a clean tree, and the develop commits since the base touch neither changed file.

Process: a spec-only PR for an EPIC sub-issue, governed by create-issue (folder layout, template sections, -spec branch equal to branch:, parent line under the title, model named in each log entry, Related to links) and, because the cut description is a defect, by fix-bug. Both are met except where F1 and F2 say.

The change against its claim: the spec, EPIC row 22, its frontmatter links and its log entry are what the description and commit say. Every figure recomputes from the 53 SKILL.md files (YAML scalar parse): total 19,489, mean 368, max 724; 42 at 300 or more; 4 at 200 or less; names average 19.9 characters; write-markdown-docs parses to 123 of 578 characters, ending especially the critical; no other description is cut. The 3,900 and 3,300 projections against ~6,980, and 2k on a 200k window, follow from the stated 0.33 tokens per character. add-new-skill says max 1024 chars, and no validator rule reads descriptions. The listing token counts cannot be rerun offline; they match the #2866 spec.

Consistency: frontmatter values are valid for an open spec, spec-path matches, the four skill links and every present-tense artifact resolve, the in-file anchor resolves, and post-move paths are stated as such. The EPIC table keeps five columns.

Hygiene: one commit, Conventional subject with [#2873] as the repository's spec PRs use, body matches the diff, author equals committer, one attribution footer line (no rule in the tree on it); git diff --check is clean; the PR-branch commit-id check prints nothing; the closing-keyword pattern matches nothing in the description, title or commit. The description carries one attribution footer line too.

Findings: F1 (Minor), the fix precedes the regression test in the plan; F2 (Minor), no recorded, classified reproduction; F3 (Suggestion), the governance ADR's review cadence. None blocks: each is repairable in the implementation PR and no figure is wrong.

Checked, no finding: hard wrap and table alignment (MD013 and MD060 are off), table column counts, spelling (retune, autolink already pass in tracked files), no review threads and so no audit record due, #2866's T1 row left to its own PR.

Checks

On the loop's compute node at this head, against the merge base a35960402 (receipt server-gates-kranich-932): the repository's pre-commit gate and lint roster exit 0 (190 s wall). This PR has no audit record, so the gate ran no validator for it. The PR changes documentation only, so no package tests apply. F1 checked against the bytes at posting: in the task table of docs/issues/open/2873-2003-shorten-skill-descriptions/ISSUE.md, T2 (the write-markdown-docs quoting fix, line 192) precedes T3 (the validator rule and its unit tests, line 193). GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is a25a27e23.

@da2ce7

da2ce7 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

ACK 148e830 — every measured figure, path, anchor, frontmatter field and EPIC registration in the spec recomputes from the bytes at this head

…nd record the reproduction

Addresses review 5917183183 on PR torrust#2875:

- F1: the validator rule and its red run (now T2) come before the
  write-markdown-docs quoting fix (now T3), as fix-bug requires.
- F2: manual-verification-evidence.md records the reproduction (V0),
  classified Reproduced.
- F3: T6 adds a row to the governance ADR's Review records table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The plan could enable validation before descriptions comply, lacks recorded reproduction evidence, and schedules the truncation regression after its fix without requiring a separate failing run.

3 open issues
What changed in this PR

This spec-only PR plans #2873 under automation EPIC #2003: shorten the 53 project skill descriptions to reduce Claude Code’s skill-listing cost. Implementation is deferred until the skill migration in #2866 merges.

Changes:

  • Defines a 200-character description limit, trigger-word guidance, and quoting rules.
  • Plans the YAML-truncation fix, validator coverage, and before/after cost and skill-selection checks.
  • Adds the subissue to the parent EPIC’s tracking metadata and progress log.
File Description
docs/​issues/​open/​2873-2003-shorten-skill-descriptions/​ISSUE.md Adds scope, implementation tasks, acceptance criteria, and verification plans.
docs/​issues/​open/​2003-overhaul-guardrails-and-automation/​EPIC.md Registers #2873 as subissue 22 and records its dependency on #2866.

Review effort: Balanced

josecelano-bot and others added 2 commits November 16, 2026 08:53
…he descriptions comply

Addresses Copilot's review 5917272531 on PR torrust#2875: the pre-commit hook
already runs frontmatter-validator --staged, so T2's rule stays opt-in
until T4's last commit turns it on in the staged and whole-tree gates.
Also logs a correction for the 08:47 UTC progress-log stamp, which is
later than its commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK 2a5b9ae

@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot November 16, 2026 09:07
da2ce7
da2ce7 previously approved these changes Nov 16, 2026

@da2ce7 da2ce7 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.

Reviewed at 2a5b9aec57a415c78285038e78008d51195e4af9. Recomputed from the bytes at this head, against the merge base a35960402; git merge-tree against develop a25a27e23 writes a clean tree, and the develop commits since the base touch none of the four files.

What moved since 148e83058: three fast-forward commits, 0f1071e7c, 8ee0a83f1 and 2a5b9aec5, each matching its subject.

Round 1 findings: F1 is fixed (T2 is the rule, red on the tree before the T3 quoting fix; every T-number mention agrees). F2 is fixed: V0 is classified Reproduced, and its 578 raw, 123 parsed, the printed text and the ~47 and ~199 token estimates recompute at a35960402. F3 is fixed (T6 plans the Review records row).

In 8ee0a83f1: the hook does run frontmatter-validator --staged (contrib/dev-tools/git/hooks/pre-commit.sh:54), and T3 stages a 578-character description, so the rule must stay opt-in until T4's last commit. The T2 row, T4 row and Commit Points agree.

Audit record (2a5b9aec5): six rows, one per thread, each with a matching detail entry. Review IDs, reply threading, severities and resolution subjects match the captured comments and the branch commits. The two re-raises are NO_ACTION/SUPERSEDED with the prescribed reply. The late start and the shared fix commit are logged, with stamps that match the timeline. The validator's own logic, run offline on the capture, gives 6 rows, 5 log entries, 0 failures. Every thread has a reply and is resolved.

Hygiene: author equals committer on all four commits, each with one attribution footer line (no rule in the tree on it). git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword pattern matches nothing in the description, title or commits. The description is unchanged and carries one attribution footer line too.

Findings: F5 (Nit), the evidence file departs from its template's headings; it does not block. F4, a missing audit record raised while this round was drafted, is met by 2a5b9aec5 and is not posted.

Checked, no finding: the record keeps the template's verbatim sections; the evidence last-updated-utc of 08:47 is its 08:46:59 commit rounded to the minute; spelling, fences, anchors and table column counts.

Checks

On the loop's compute node at this head, against the merge base a35960402 (receipt server-gates-kranich-938): the repository's pre-commit gate and lint roster exit 0, and the review-audit validator reports 6 rows, 5 log entries and no failure. The PR changes documentation only, so no package tests apply. The record was checked against the bytes at posting: docs/pr-reviews/pr-2875-review/PR-REVIEW.md names review 5917183183 six times, and in the spec's task table the regression test (T2) now precedes the quoting fix (T3). GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is a25a27e23.

@da2ce7

da2ce7 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

ACK 2a5b9ae — the regression-first plan with its opt-in rule, the recorded V0 reproduction, the review-record row and the six-row audit record recompute from the bytes at this head

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The verification evidence overstates direct runtime observation, and the proposed raw-versus-parsed length check would reject valid YAML descriptions rather than reliably detect comment truncation.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Low severity Detect plain-scalar truncation without rejecting valid YAML scalars

docs/​issues/​open/​2873-2003-shorten-skill-descriptions/​ISSUE.md:188

[Minor][F8] Comparing raw and parsed lengths would flag valid quoted descriptions because YAML removes the quotes; escape decoding and block-scalar folding also change lengths legitimately. This would reject T3's quoting fix rather than detect comment truncation. Detect comment truncation in plain scalars and add passing tests for valid quoted and block-scalar descriptions.

3 resolved since last review

Review effort: Balanced

josecelano-bot and others added 2 commits November 16, 2026 09:37
Addresses review-finding:pr-2875-f5: the evidence file uses the
template's Observed Result and Conclusion headings and its Failures and
Follow-up section, and the spec again says the file follows the template.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…evidence

Addresses review-finding:pr-2875-f7: /context shows a token count, not
the description text, so the reproduction is classified Reproduced for
the parser, and the /context row is recorded as an inference in V0, the
Background, the Bug-Fix Process, T3, AC3 and M2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…th comparison

Addresses review-finding:pr-2875-f8: comparing raw and parsed lengths
would reject valid quoted and block-scalar descriptions, including T3's
quoting fix. The rule detects a space followed by '#' in a plain scalar,
and AC4 asks for passing tests for quoted and block-scalar descriptions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@josecelano-bot

Copy link
Copy Markdown
Contributor Author

Response to Copilot's review 5917643855, finding F8 (in the review body, no thread): fixed. The spec's Regression Test Strategy no longer proposes comparing raw and parsed lengths, since quoting, escape decoding and block-scalar folding change a valid description's length and the comparison would reject T3's quoting fix. The rule fails only when the description: value is a plain scalar containing a space followed by #, and AC4 asks for passing tests for quoted and block-scalar descriptions. Resolution: docs(issues): [#2873] detect comment truncation without a length comparison. F7 of the same review is answered on its thread.

da2ce7
da2ce7 previously approved these changes Nov 16, 2026

@da2ce7 da2ce7 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.

Reviewed at dfe605d88b43f280fbe92bc16c7602a86ff973c8. Recomputed from the bytes at this head, against the merge base a35960402; git merge-tree against develop a25a27e23 writes a clean tree, and the develop commits since the base touch none of the four files.

What moved since 2a5b9aec5: a6b7740a8, 902a11f4a, e68726e5d and dfe605d88, each matching its subject.

F5 is fixed: the evidence file uses Observed Result and Conclusion and ends with Failures and Follow-up. 902a11f4a makes V0 Reproduced for the parser only and records the /context row as corroborating inference. e68726e5d drops the raw-versus-parsed length comparison, which would have flagged the three quoted descriptions (151 of 153, 204 of 206, 370 of 372) and T3's quoted value (578 of 596). The rule now fails only on a plain value with a space followed by #, and AC4 asks for passing plain, quoted and block-scalar tests.

Audit record (dfe605d88): three new rows, F7 to F9, for the second round's findings. Their review IDs, reply threading and severities match the captured comments; the reviewers' colliding IDs (F5; F7 and F8) are kept as Reviewer finding ID. The record states that the commit references review-finding:pr-2875-f5, -f7 and -f8 mean its F7, F8 and F9. The body finding is NON_RESOLVABLE, sourced from the review and answered by conversation comment 6913012946. The log is in order and its stamps match the timeline. The validator's own logic, run offline on the capture, gives 9 rows, 11 log entries, 0 failures. All eight threads have a reply, a row and a resolution.

Hygiene: author equals committer on the four new commits, each with one attribution footer line (no rule in the tree on it). git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword pattern matches nothing. The description is unchanged and carries one attribution footer line too.

Findings, none blocking: F8 (Nit), two statements the corrections did not sweep; F9 (Suggestion), white space rather than a space in the detection rule. F6 (the length comparison) and F7 (the missing rows), raised while this round was drafted, are met by e68726e5d and dfe605d88 and are not posted.

Checked, no finding: the record discloses that its author did not run the validator this round; stamps precede their commits; tables, fences and spelling.

Checks

On the loop's compute node at this head, against the merge base a35960402 (receipt server-gates-kranich-944): the repository's pre-commit gate and lint roster exit 0, and the review-audit validator reports 9 rows, 11 log entries and no failure. The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: the audit record names review 5917548188 four times, and line 71 of docs/issues/open/2873-2003-shorten-skill-descriptions/ISSUE.md still calls the parsed value "the text Claude Code reads" (F8). GitHub checks at this head at posting time: "". At posting, develop is a25a27e23.

@da2ce7

da2ce7 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

ACK dfe605d — the restored evidence headings, the parser-only reproduction, the comment-only detection rule and the nine-row audit record with its reviewer-id mapping recompute from the bytes at this head

josecelano-bot and others added 2 commits November 16, 2026 10:02
…as observed

Addresses da2ce7's F8 on PR torrust#2875: the measurement note no longer says
as fact that Claude Code reads the parsed text, and the evidence says
the 08:45:16 UTC parse repeated the drafting-time one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Addresses da2ce7's F9 on PR torrust#2875: YAML starts a comment at white
space (a space or a tab) followed by '#', so the rule, the analysis and
T2's unit tests cover a tab as well as a space.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK dfe605d

@da2ce7 da2ce7 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.

Reviewed at 23e9c91d9bce15afced8fb4e7d75ce6414e576d3. Recomputed from the bytes at this head, against the merge base a35960402; git merge-tree against develop a25a27e23 writes a clean tree, and the develop commits since the base touch none of the four files.

What moved since dfe605d88: 4aed75d27, b55e8848d and 23e9c91d9, each matching its subject.

F8 is fixed. The measurement note calls the parsed values the text a YAML parser reads, and says that the harness reads the same text is an inference. The evidence says V0's parse first ran while drafting and was repeated at 08:45:16 with the same 123 of 578. F9 is fixed. The Background, Analysis bullet, Regression Test Strategy and M4 say white space (a space or a tab) before #; the rule scans the whole value, continuation lines included; and T2's unit tests gain failing space and tab cases.

Audit record (23e9c91d9): two new rows, F10 and F11, for the two findings of review 5918129806. Their review ID, reply threading and severities (Nit, Suggestion) match the captured comments, and the reviewer's colliding IDs (F8, F9) are kept as Reviewer finding ID. Both rows' grep claims reproduce at this head: three lines for the harness-reads phrase, each an inference or the log entry, and one line, M4, for space followed. The three new log entries are in order and match the timeline. The validator's own logic, run offline on the capture, gives 11 rows, 14 log entries, 0 failures. All ten threads have a reply, a row and a resolution.

Hygiene: author equals committer on the three new commits, each with one attribution footer line (no rule in the tree on it). git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword pattern matches nothing. The description is unchanged and carries one attribution footer line too.

Findings: none. F10, the missing rows raised while this round was drafted, is met by 23e9c91d9 and is not posted.

Checked, no finding: the record discloses that the validator was not run by its author; stamps precede their commits; the record's table keeps eight columns; two hard-wrapped spec lines are uneven (not linted).

Checks

On the loop's compute node at this head, against the merge base a35960402 (receipt server-gates-kranich-951): the repository's pre-commit gate and lint roster exit 0 (51 s wall), and the review-audit validator reports 11 rows, 14 log entries and no failure. The PR changes documentation only, so no package tests apply. The record was checked against the bytes at posting: docs/pr-reviews/pr-2875-review/PR-REVIEW.md names review 5918129806 five times, so the round 3 threads have their rows. GitHub checks at this head at posting time: "". At posting, develop is a25a27e23.

@da2ce7

da2ce7 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

ACK 23e9c91 — the inference-only wording of what the harness reads, the recorded V0 rerun, the white-space comment rule with its tab case and the eleven-row audit record recompute from the bytes at this head

@josecelano

Copy link
Copy Markdown
Member

ACK 23e9c91

@josecelano
josecelano merged commit 77ad346 into torrust:develop Nov 16, 2026
1 check passed
josecelano added a commit that referenced this pull request Nov 17, 2026
…it DONE in EPIC #2003

1b21e7e chore(issues): [#2873] archive the closed spec and mark it DONE in EPIC #2003 (josecelano-bot)

Pull request description:

  Close-out of #2873, after PR #2893 merged on 2026-11-17 at 08:57 UTC and closed the issue.

  - Verified issue #2873 is `CLOSED` on GitHub.
  - Moved `docs/issues/open/2873-2003-shorten-skill-descriptions/` to `docs/issues/closed/`.
  - `ISSUE.md`: `status: done`, new `spec-path` and related-artifact paths, the "Issue closed and spec moved" checkpoint ticked, and a progress-log entry. No retrospective: the spec already records why none is needed.
  - The two evidence files point at the new path.
  - EPIC #2003: row 22 is `DONE`, points at the archived spec, and names spec PR #2875 and implementation PR #2893.
  - No live reference to the old path remains outside the PR review audit records, which stay as historical records.
  - Pre-commit and pre-push checks passed.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  da2ce7:
    ACK 1b21e7e — the archive move, its frontmatter and EPIC row 22 recompute from the bytes at this head, no live reference keeps the old path, and the merge with develop is clean
  josecelano:
    ACK 1b21e7e

Tree-SHA512: f7fd6c6fb129e5a616f5395fe3186c42e4bd110b266fdccac81d2f9d6f29ad1f70f501c81cdceb2722425f2d74f0fce9a0ab7e882133a659d4409daaff40602a
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.

4 participants