Skip to content

Build: Add docs-review skill#34451

Merged
kylegach merged 2 commits into
nextfrom
docs-skill
Apr 16, 2026
Merged

Build: Add docs-review skill#34451
kylegach merged 2 commits into
nextfrom
docs-skill

Conversation

@kylegach
Copy link
Copy Markdown
Contributor

@kylegach kylegach commented Apr 2, 2026

What I did

See title

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Run the skill

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive docs-review package: evaluation principles, a catalog of docs antipatterns, Storybook editorial/style guidelines, and a structured review workflow that maps intent, classifies doc types/sections, diagnoses quality across ordered dimensions, and prescribes mode-specific outputs (maintenance, improve, rewrite, author, strategy).
  • Chores
    • Clarified operational rules: when to edit vs. plan, escalation/split guidance, validation/formatting behavior for edit modes, and handoff constraints for publishing.

@kylegach kylegach self-assigned this Apr 2, 2026
@kylegach kylegach added the build Internal-facing build tooling & test updates label Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Adds a new docs-review AI skill and four reference guides that define scope, intent→mode routing, doc-type classification, ordered diagnosis across quality dimensions, intervention thresholds, mode-specific actions, Storybook editorial rules, antipatterns, and validation/handoff constraints for /docs and docs-owned snippets.

Changes

Cohort / File(s) Summary
Skill definition
.agents/skills/docs-review/SKILL.md
New main skill spec: eligibility constraints (only /docs and docs/_snippets), intent→mode mapping (maintenance/improve/rewrite/author/strategy, hybrid review behavior), single primary doc-type classification, ordered diagnosis across quality dimensions, intervention thresholds and split/escalation rules, mode-specific edit actions, formatting/validation rules for edit modes, and handoff constraints (no automatic PR creation).
References — Principles & Strategy
.agents/skills/docs-review/references/docs-principles.md, .agents/skills/docs-review/references/docs-strategy.md
New docs-principles rubric (North Star, Dual-Reader, seven quality dimensions) and docs-strategy operational contract (mode semantics, selection control flow, doc-type shapes, secondary-section rules, split/escalation framework, required outputs for strategy mode).
References — Antipatterns & Style
.agents/skills/docs-review/references/docs-antipatterns.md, .agents/skills/docs-review/references/storybook-style.md
New antipatterns catalog (10 recurring failure modes with recognize/fix templates) and Storybook style guide (voice/tone, MDX/frontmatter rules, allowed components and constraints, snippet/component path rules, formatting markers and mappings to yarn fmt:write / yarn docs:check).

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant Skill as Docs-Review Skill
  participant Refs as References (Principles/Strategy/Antipatterns/Style)
  participant Classifier as Doc-Type Classifier
  participant Editor as Editor/Agent Edits
  participant Validator as Validator (yarn fmt:write / yarn docs:check)
  participant PR as PR Skill

  User->>Skill: Submit review request + files
  Skill->>Refs: Load ordered references
  Skill->>Classifier: Classify primary doc type (& optional secondary)
  Skill->>Skill: Map intent → mode (maintenance/improve/rewrite/author/strategy)
  Skill->>Refs: Run diagnosis across quality dimensions (use antipatterns as needed)
  Skill->>Editor: Generate edits or planning artifact (strategy)
  Editor-->>Skill: Return edits or plan
  alt edit mode
    Skill->>Validator: Run formatting & docs checks
    Validator-->>Skill: Return validation results
  else strategy mode
    Note over Skill,Editor: No formatting/validation
  end
  Skill->>PR: Provide handoff details (no auto-PR creation)
  PR-->>User: Handoff/PR summary (if requested)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/docs-review/SKILL.md:
- Line 90: The sentence "For secondary sections, evaluate dimensions 3
(Information Shape) and 5 (Task Usability) against the secondary section's own
doc type, not the page's primary type. All other dimensions apply page-wide."
conflicts with references/docs-strategy.md; update the line in SKILL.md so that
the rule clearly states secondary sections are evaluated by their own doc-type
criteria (i.e., apply the section's doc-type criteria to the secondary section
for all relevant dimensions) and remove the special-case limiting to dimensions
3 and 5; ensure the wording references the same "secondary sections" rule as in
references/docs-strategy.md to avoid inconsistent diagnosis behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6653d984-8124-4fd7-8d09-075022b7ee74

📥 Commits

Reviewing files that changed from the base of the PR and between 805b048 and 2d1f06a.

📒 Files selected for processing (4)
  • .agents/skills/docs-review/SKILL.md
  • .agents/skills/docs-review/references/docs-antipatterns.md
  • .agents/skills/docs-review/references/docs-principles.md
  • .agents/skills/docs-review/references/docs-strategy.md
✅ Files skipped from review due to trivial changes (2)
  • .agents/skills/docs-review/references/docs-principles.md
  • .agents/skills/docs-review/references/docs-antipatterns.md

6. Example quality
7. Economy

For secondary sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability) against the secondary section's own doc type, not the page's primary type. All other dimensions apply page-wide.
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.

⚠️ Potential issue | 🟠 Major

Secondary-section evaluation rule conflicts with docs-strategy.md.

This line narrows secondary-section evaluation to dimensions 3 and 5, but references/docs-strategy.md states secondary sections should be evaluated by their own doc-type criteria. Please align this to avoid inconsistent diagnosis behavior.

Suggested fix
-For secondary sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability) against the secondary section's own doc type, not the page's primary type. All other dimensions apply page-wide.
+For secondary sections, evaluate them against their own doc type's criteria (as defined in `references/docs-strategy.md`), not the page's primary type. Apply page-wide dimensions where appropriate.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For secondary sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability) against the secondary section's own doc type, not the page's primary type. All other dimensions apply page-wide.
For secondary sections, evaluate them against their own doc type's criteria (as defined in `references/docs-strategy.md`), not the page's primary type. Apply page-wide dimensions where appropriate.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/docs-review/SKILL.md at line 90, The sentence "For secondary
sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability)
against the secondary section's own doc type, not the page's primary type. All
other dimensions apply page-wide." conflicts with references/docs-strategy.md;
update the line in SKILL.md so that the rule clearly states secondary sections
are evaluated by their own doc-type criteria (i.e., apply the section's doc-type
criteria to the secondary section for all relevant dimensions) and remove the
special-case limiting to dimensions 3 and 5; ensure the wording references the
same "secondary sections" rule as in references/docs-strategy.md to avoid
inconsistent diagnosis behavior.

Base automatically changed from docs-formatting to next April 16, 2026 23:33
kylegach and others added 2 commits April 16, 2026 17:36
Pages still have one primary doc type, but well-structured secondary
sections (e.g., a reference table at the end of a task page) are now
recognized and evaluated by their own type's criteria instead of being
flagged as an antipattern or triggering a split recommendation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kylegach kylegach added the ci:docs Run the CI jobs for documentation checks only. label Apr 16, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.agents/skills/docs-review/SKILL.md (1)

90-90: ⚠️ Potential issue | 🟠 Major

Secondary-section evaluation rule conflicts with docs-strategy.md.

This line limits secondary-section evaluation to dimensions 3 and 5, but references/docs-strategy.md line 26 states that "each secondary section is evaluated by its own type's criteria" without restricting which dimensions apply. This creates inconsistent diagnosis behavior between the two reference documents.

The strategy document's broader guidance (evaluate by the section's own doc-type criteria) is more aligned with the well-structured secondary sections described in lines 57-61 of docs-strategy.md.

Suggested fix
-For secondary sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability) against the secondary section's own doc type, not the page's primary type. All other dimensions apply page-wide.
+For secondary sections, evaluate them against their own doc type's criteria (as defined in `references/docs-strategy.md`). Apply page-wide dimensions where appropriate.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/docs-review/SKILL.md at line 90, The rule in SKILL.md
restricting secondary-section evaluation to only dimensions 3 (Information
Shape) and 5 (Task Usability) conflicts with references/docs-strategy.md; update
the SKILL.md wording so that each secondary section is evaluated using its own
doc-type criteria for all relevant dimensions (not just 3 and 5), ensuring
consistency with the guidance in docs-strategy.md and the "well-structured
secondary sections" rules referenced there.
🧹 Nitpick comments (1)
.agents/skills/docs-review/SKILL.md (1)

69-69: Clarify "lookup" phrasing.

The word "lookup" is unclear here. Consider "look up options" or "reference for options" for better readability.

📝 Suggested refinement
-- `reference` — lookup for options, API, or config
+- `reference` — look up options, API, or config
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/docs-review/SKILL.md at line 69, Change the phrasing for the
`reference` entry to avoid the unclear single-word "lookup"; update the text to
something like "`reference` — reference for options, API, or config" or
"`reference` — look up options, API, or config" so it reads clearly; edit the
SKILL.md line containing "`reference` — lookup for options, API, or config" to
use one of these clearer alternatives.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/docs-review/references/storybook-style.md:
- Line 85: Update the wording in the line that reads "External: full URLs,
always wrapped in markdown link syntax (no bare URLs in prose). `[auto]`" to
capitalize the formatting language as "Markdown" (i.e., change "markdown link
syntax" to "Markdown link syntax") so the proper noun is used consistently
across the document.

---

Duplicate comments:
In @.agents/skills/docs-review/SKILL.md:
- Line 90: The rule in SKILL.md restricting secondary-section evaluation to only
dimensions 3 (Information Shape) and 5 (Task Usability) conflicts with
references/docs-strategy.md; update the SKILL.md wording so that each secondary
section is evaluated using its own doc-type criteria for all relevant dimensions
(not just 3 and 5), ensuring consistency with the guidance in docs-strategy.md
and the "well-structured secondary sections" rules referenced there.

---

Nitpick comments:
In @.agents/skills/docs-review/SKILL.md:
- Line 69: Change the phrasing for the `reference` entry to avoid the unclear
single-word "lookup"; update the text to something like "`reference` — reference
for options, API, or config" or "`reference` — look up options, API, or config"
so it reads clearly; edit the SKILL.md line containing "`reference` — lookup for
options, API, or config" to use one of these clearer alternatives.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f84e5060-fedc-40e2-9cc4-363dac85229f

📥 Commits

Reviewing files that changed from the base of the PR and between 2d1f06a and b5caab0.

📒 Files selected for processing (5)
  • .agents/skills/docs-review/SKILL.md
  • .agents/skills/docs-review/references/docs-antipatterns.md
  • .agents/skills/docs-review/references/docs-principles.md
  • .agents/skills/docs-review/references/docs-strategy.md
  • .agents/skills/docs-review/references/storybook-style.md
✅ Files skipped from review due to trivial changes (1)
  • .agents/skills/docs-review/references/docs-principles.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .agents/skills/docs-review/references/docs-antipatterns.md

## Links

- Internal: relative paths to `.mdx` files, e.g. `[text](../path/to/file.mdx)`. `[auto]`
- External: full URLs, always wrapped in markdown link syntax (no bare URLs in prose). `[auto]`
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.

⚠️ Potential issue | 🟡 Minor

Capitalize "Markdown" as a proper noun.

The word "markdown" should be capitalized as "Markdown" when referring to the formatting language.

📝 Proposed fix
-External: full URLs, always wrapped in markdown link syntax (no bare URLs in prose). `[auto]`
+External: full URLs, always wrapped in Markdown link syntax (no bare URLs in prose). `[auto]`
🧰 Tools
🪛 LanguageTool

[uncategorized] ~85-~85: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ... External: full URLs, always wrapped in markdown link syntax (no bare URLs in prose). `[...

(MARKDOWN_NNP)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/skills/docs-review/references/storybook-style.md at line 85, Update
the wording in the line that reads "External: full URLs, always wrapped in
markdown link syntax (no bare URLs in prose). `[auto]`" to capitalize the
formatting language as "Markdown" (i.e., change "markdown link syntax" to
"Markdown link syntax") so the proper noun is used consistently across the
document.

@kylegach kylegach merged commit 09fb0ba into next Apr 16, 2026
21 checks passed
@kylegach kylegach deleted the docs-skill branch April 16, 2026 23:44
@github-actions github-actions Bot mentioned this pull request Apr 17, 2026
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:docs Run the CI jobs for documentation checks only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant