Skip to content

Add docs-review skill for PR suggestions#28414

Merged
elithrar merged 4 commits intoproductionfrom
opencode/issue28413-20260218120149
Feb 18, 2026
Merged

Add docs-review skill for PR suggestions#28414
elithrar merged 4 commits intoproductionfrom
opencode/issue28413-20260218120149

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Feb 18, 2026

Done. Here's a summary of what was created:

New skill: .agents/skills/docs-review/

Files created

  • SKILL.md (192 lines) — Main skill definition
  • references/content-rules.md (78 lines) — Detailed review checklist

What the skill covers

When to suggest vs. edit — Decision table mapping instructions like "review", "suggest changes", "only make suggestions", "fix", "address this" to the correct action (post suggestions vs. edit files). Defaults to suggestions unless explicitly told to edit.

gh CLI suggestion API — Concrete, copy-paste examples for:

  • Single-line suggestions (-F line=N)
  • Multi-line suggestions (-F start_line=N -F line=M)
  • Plain review comments (no suggestion block)
  • Batched reviews (single API call with --input - and JSON body for 3+ comments)

Key rules derived from PR research:

  • Use -F (not -f) for numeric fields
  • Always set side="RIGHT" and subject_type="line"
  • Line numbers reference the new file side of the diff
  • Keep prose before suggestion blocks to one sentence

Content review principles — Distilled from ~30 PRs with @elithrar and @irvinebroque feedback:

Closes #28413

github run

Teaches the agent when and how to post GitHub PR suggestions
using the REST API instead of making direct edits. Includes
single-line, multi-line, and batched review examples.

Content rules reference covers MDX, frontmatter, links, style
guide, code examples, and accuracy checks.
@ask-bonk ask-bonk bot requested a review from a team as a code owner February 18, 2026 12:07
@ask-bonk ask-bonk bot mentioned this pull request Feb 18, 2026
@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
* @cloudflare/pcx-technical-writing

- Rewrite decision logic: fix obvious errors by default (MDX syntax, broken
  code, invalid frontmatter), only suggest when explicitly asked or when the
  invoker differs from the PR author
- Remove duplicated code correctness checks (error handling, any types,
  hardcoded secrets) from content-rules.md — defer to code-review skill
- Add cross-references to code-review skill for type checking, API usage,
  and binding patterns
- Slim down Content Accuracy table to reference shared sources instead of
  inlining paths already documented in code-review
@ask-bonk
Copy link
Contributor Author

ask-bonk bot commented Feb 18, 2026

Here's a summary of the changes:

1. Fixed suggest-vs-edit bias (SKILL.md)

Replaced the flat table + "default to suggestions" with a three-step decision logic:

  1. Explicit instruction wins — "suggest" means suggest, "fix" means fix
  2. Different actor = suggest — when the invoker is not the PR author, post suggestions so the author retains control
  3. Same actor or ambiguous = fix by default — MDX syntax errors, broken code, invalid frontmatter, wrong component usage should always be fixed directly

The old default ("suggestions unless clearly asked for edits") is gone. The new default is: fix obvious errors, suggest subjective changes.

2. Reduced duplication with code-review skill (content-rules.md)

  • Removed 3 items from "Code Examples" that duplicated code-review guidance (error handling, any types, hardcoded secrets). The code-review skill covers these in depth across common-patterns.md (Error Handling, Security sections) and its anti-patterns table.
  • Renamed the section to "Code Examples — Component Usage" to clarify its scope: which docs component to use, not code correctness.
  • Replaced the inline file paths in "Content Accuracy" (node_modules/@cloudflare/workers-types/...) with a paragraph that cross-references the code-review skill's sources.
  • Added a row to the SKILL.md quick-reference table pointing to the code-review skill for type/API/binding validation.

The code-review skill itself was not modified — its guidance is already more detailed and authoritative for code correctness concerns.

github run

@elithrar elithrar enabled auto-merge (squash) February 18, 2026 12:28
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

@elithrar elithrar merged commit 673e33f into production Feb 18, 2026
9 of 10 checks passed
@elithrar elithrar deleted the opencode/issue28413-20260218120149 branch February 18, 2026 20:00
Copy link

@ctdsf ctdsf left a comment

Choose a reason for hiding this comment

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

Thanks for the help i dont know wtf im doing but thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

suggestion skill

3 participants

Comments