applies-to-tagging: add generate-from-intent mode and cumulative-docs rules#69
Merged
theletterf merged 5 commits intoMay 21, 2026
Conversation
… rules
Two related additions to make this skill the canonical home for both
applies_to syntax *and* the cumulative-docs decisions that surround it
(preserve vs replace, append vs replace lifecycle, when to delete a
removed feature's page).
1) Generate-from-intent mode
The skill currently only validates existing tags or fixes them in
place. Callers who need to generate the right tag from a structured
change description (feature, version, lifecycle, dimension,
products) — for example, the docs-quest-scanner skill when drafting
a docsGap entry from a PR — have no clean entry point. Adds a
second mode with a five-step flow: extract change description →
apply preservation rules → pick the lightest format → generate
syntax → output with rationale.
2) Cumulative documentation rules
Captures the "do users on previous versions still need the old
information?" question and its consequences:
- Versioned products (stack): append the new lifecycle, keep the old
- Unversioned products (serverless): replace the old state
- Removals from versioned products: keep content + add `removed`
- Lightest-format preference order: tagged paragraph/admonition →
tagged list items → applies-switch tabs (last resort)
These rules already live (informally) inside the docs-quest-scanner
skill. Lifting them here puts them next to the syntax they govern.
Changes:
- SKILL.md: adds Modes section, Cumulative-documentation-rules section
(between Common patterns and Task execution), Generate-from-intent
execution section. Existing validation rules and syntax reference
unchanged.
- evals.json: 4 new evals (ids 6–9) covering simple generation
(stack+serverless), multi-lifecycle generation (preview→GA), default
value preservation, and removal handling.
- Skill version bumped 1.1.0 → 1.2.0 (MINOR — new capabilities, no
breaking change).
- Plugin version bumped 1.0.3 → 1.0.4 per validate-skills CI.
Motivation: docs-quest-scanner currently inlines both a long
applies_to syntax cheatsheet and the cumulative-docs decision rules.
Lifting these upstream lets the orchestrator skill delegate cleanly
and keeps one canonical version of the rules.
Replaces the "Lightest-format preference" framing with the analytical
principle from docs-content/CLAUDE.md: it's not about lightness, it's
about scope. The new framing has three pieces:
1. Decide whether applies_to is needed at all
- Don't tag when the edit is valid for all versions (rewording,
typo fixes, restructuring)
- Don't tag when a parent page or section already has the correct
applies_to
- Don't tag when a small inline pattern carries the meaning (most
commonly a renamed UI element written as
"Select **New name** (or **Old name** in earlier versions)")
- Don't tag GA features in unversioned products where the
page-level lifecycle already covers it
- Tag when content is genuinely version- or deployment-scoped,
isn't covered by a parent tag, and isn't better expressed inline
2. Place applies_to where the change applies
- Section level (fenced block after heading) when the change is
relevant to a section
- Page level (frontmatter) when the whole page is scoped
- Inline only at start of list item / end of definition term /
inside table cell — never mid-sentence or floating between
sentences in a paragraph
- Restructure prose into an admonition or dropdown with
`:applies_to:` when it doesn't fit those inline positions
- applies-switch tabs only when content truly diverges
3. Scope must be unambiguous
- Reader must be able to tell exactly what the tag covers from
heading + block position alone
Also drops the misframed "Lightest-format preference" subsection
from Cumulative documentation rules and updates the
generate-from-intent Step 3 wording to reference the corrected
placement rules.
Adds eval id 10: a renamed-UI-element prompt that should NOT result
in an applies_to tag, but in the inline parenthetical pattern. This
exercises the gating-rule carve-out that's easy to get wrong.
Trivial conflict: — escape vs literal — em dash in description. Kept the literal character form from main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Two related additions that make
docs-applies-to-taggingthe canonical home for bothapplies_tosyntax and the cumulative-docs decisions that surround it (preserve vs. replace, append vs. replace lifecycle, when to delete a removed feature's page).applies_tosyntax, instead of only validating an existing file.4 new evals exercise both additions. Skill version: 1.1.0 → 1.2.0 (MINOR). Plugin version: 1.0.3 → 1.0.4.
Why
Two gaps exist today:
docs-quest-scannerskill, when drafting adocsGapentry from a PR) have no clean way to ask this skill to generate a tag.docs-quest-scanner's SKILL.md instead of next to the syntax they govern.This PR fixes both, so downstream skills can delegate to one canonical source.
What changed
SKILL.md
Modes section (new)
Distinguishes validate mode (existing — file or pasted content) from generate-from-intent mode (new — structured change description). Detection cues for the new mode are explicit; ambiguous cases prompt one focused clarifying question rather than guessing.
Cumulative documentation rules (new section, before Task execution)
stack: ga 9.2+, preview =9.0), unversioned replace.removed 9.x; removed from unversioned only → can delete; preview/beta-only feature ending → can delete.applies-switchtabs (last resort).Generate-from-intent execution (new section)
Five-step flow:
Task execution (lightly edited)
The validate flow now references generate-from-intent for the "no file, just a change description" case so users land in the right mode.
Description (frontmatter)
Widened to mention preservation decisions — this is now a triggering use case in addition to validation and generation.
evals.json
4 new evals (ids 6–9):
stack: ga 9.5+plus theserverless.elasticsearch: gasub-key (not bareserverless: ga, since the user specified the sub-project).stack: ga 9.5+, preview =9.4, ordered newest-first, with=9.4for the exact preview version.stack: removed 9.4," not deletion.Test plan
python3 -m json.tool evals/evals.json— validvalidate-skills.ymlPython checks — 17 skills validated, 0 errorsvalidate-skills.ymlandskill-eval-test.mdruns on PRNotes for reviewers
content-type-checker). Whichever lands second will need a one-line plugin version rebase.