Skip to content

docs: add comprehensive documentation guidelines for worker skill bundles#137

Merged
sergiofilhowz merged 1 commit into
mainfrom
docs/skills-guidelines
May 16, 2026
Merged

docs: add comprehensive documentation guidelines for worker skill bundles#137
sergiofilhowz merged 1 commit into
mainfrom
docs/skills-guidelines

Conversation

@sergiofilhowz
Copy link
Copy Markdown
Contributor

@sergiofilhowz sergiofilhowz commented May 15, 2026

This commit introduces a new file, DOCUMENTATION_GUIDELINES.md, which outlines the structure and requirements for authoring worker skill bundles. It details the necessary folder layout, YAML frontmatter specifications, and the required sections for each function's documentation. The guidelines aim to ensure consistency and clarity across all worker documentation, facilitating easier navigation and understanding for users.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guidelines for skill bundle documentation, specifying required folder layouts, YAML metadata frontmatter, mandatory content sections (When to use, Inputs, Outputs, Worked example, Related), optional sections (Side effects, Caching, Rendering rules), and style conventions to ensure consistent, high-quality documentation across all bundles.

Review Change Stack

…dles

This commit introduces a new file, DOCUMENTATION_GUIDELINES.md, which outlines the structure and requirements for authoring worker skill bundles. It details the necessary folder layout, YAML frontmatter specifications, and the required sections for each function's documentation. The guidelines aim to ensure consistency and clarity across all worker documentation, facilitating easier navigation and understanding for users.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

This PR adds DOCUMENTATION_GUIDELINES.md, establishing the required structure and conventions for authoring worker skill bundle documentation. It specifies folder layout for link resolution, mandates YAML frontmatter schemas with required fields, enforces fixed section ordering for how-to pages, documents content contracts for each section, and provides a style checklist covering links, JSON validity, and formatting rules.

Changes

Skill Bundle Documentation Guidelines

Layer / File(s) Summary
Documentation structure, frontmatter contracts, and style conventions
DOCUMENTATION_GUIDELINES.md
Defines complete authoring guidelines for skill bundles: folder layout, YAML frontmatter contracts (type, function_id/functions, title), required how-to sections (When to use, Inputs, Outputs, Worked example, Related), optional sections (Side effects, Caching, Rendering rules), multi-function variant schema, and style checklist for links, JSON examples, field comments, and related bullets.

Possibly related PRs

  • iii-hq/workers#99: Both PRs document skill bundle standards; main PR adds comprehensive guidelines for structure and YAML frontmatter contracts, while PR #99 enhances skills README with rules for filesystem-backed skills and their frontmatter, creating overlapping documentation of the same schema contracts.

Poem

🐰 A guidebook appears, with structure so grand,
YAML frontmatter, sections so planned,
Folder layouts neat, links to unfold,
Style rules and contracts, all to behold,
Skills bundled bright! ✨

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding comprehensive documentation guidelines for worker skill bundles, which matches the addition of DOCUMENTATION_GUIDELINES.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/skills-guidelines

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 25 skipped (no docs/).

Layer Result
structure
vale
ai

Three for three. Nicely done.

Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@DOCUMENTATION_GUIDELINES.md`:
- Line 274: The phrase "rendered markdown document" in
DOCUMENTATION_GUIDELINES.md should use the proper noun capitalization; update
the text so "rendered markdown document" becomes "rendered Markdown document"
(i.e., replace the lowercase "markdown" with "Markdown" wherever that exact
phrase appears).
- Around line 312-314: The document has a contradictory rule about where
optional sections go: the single-function variant says optional sections slot
between `# Outputs` and `# Worked example`, but the multi-function text (lines
describing "Any applicable optional sections...") claims they go after `# Worked
example` and that this is "same as the single-function variant"; fix by making
the multi-function description consistent with the single-function ordering—edit
the sentence that begins "Any applicable optional sections..." so it states that
optional sections appear between `# Outputs` and `# Worked example` (before `#
Worked example` and before `# Related`), or if the intent was to differ, remove
"same as the single-function variant" and add a short justification for the
differing placement; update the wording accordingly wherever the phrase appears
to eliminate the contradiction.
🪄 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: f834091a-b1e7-4fb5-b6f3-57712f6675fe

📥 Commits

Reviewing files that changed from the base of the PR and between 673f85b and c9a097a.

📒 Files selected for processing (1)
  • DOCUMENTATION_GUIDELINES.md


### `# Rendering rules`

**Required** when the function returns a rendered markdown document (a
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Capitalize "Markdown" as a proper noun.

"Markdown" is the proper name of the formatting language, so it should be capitalized.

Proposed fix
-**Required** when the function returns a rendered markdown document (a
+**Required** when the function returns a rendered Markdown document (a
📝 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
**Required** when the function returns a rendered markdown document (a
**Required** when the function returns a rendered Markdown document (a
🧰 Tools
🪛 LanguageTool

[uncategorized] ~274-~274: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...** when the function returns a rendered markdown document (a body field whose contents...

(MARKDOWN_NNP)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DOCUMENTATION_GUIDELINES.md` at line 274, The phrase "rendered markdown
document" in DOCUMENTATION_GUIDELINES.md should use the proper noun
capitalization; update the text so "rendered markdown document" becomes
"rendered Markdown document" (i.e., replace the lowercase "markdown" with
"Markdown" wherever that exact phrase appears).

Comment on lines +312 to +314
- Any applicable optional sections (`# Side effects`, `# Caching`,
`# Rendering rules`) come after `# Worked example` and before
`# Related`, same as the single-function variant.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Critical inconsistency: Optional section placement contradicts single-function variant.

Lines 312-314 state that optional sections come "after # Worked example and before # Related" and claim this is "same as the single-function variant." However, lines 131-132 explicitly state that optional sections "slot in between # Outputs and # Worked example" for single-function how-tos.

This creates contradictory ordering:

  • Single-function: Outputs → [Optional sections] → Worked example → Related
  • Multi-function: Worked example → [Optional sections] → Related

Either the placement differs between variants (in which case line 314's "same as" claim is incorrect), or one of the placements is wrong.

Proposed fix

If optional sections should appear in the same relative position in both variants, update lines 312-314:

-- Any applicable optional sections (`# Side effects`, `# Caching`,
-  `# Rendering rules`) come after `# Worked example` and before
-  `# Related`, same as the single-function variant.
+- Any applicable optional sections (`# Side effects`, `# Caching`,
+  `# Rendering rules`) come after the per-function `## Outputs` blocks
+  and before `# Worked example`, same as the single-function variant.

Alternatively, if the placement intentionally differs, remove the "same as" claim and document why:

-- Any applicable optional sections (`# Side effects`, `# Caching`,
-  `# Rendering rules`) come after `# Worked example` and before
-  `# Related`, same as the single-function variant.
+- Any applicable optional sections (`# Side effects`, `# Caching`,
+  `# Rendering rules`) come after `# Worked example` and before
+  `# Related`. (Note: This differs from single-function how-tos where
+  optional sections precede `# Worked example`.)
📝 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
- Any applicable optional sections (`# Side effects`, `# Caching`,
`# Rendering rules`) come after `# Worked example` and before
`# Related`, same as the single-function variant.
- Any applicable optional sections (`# Side effects`, `# Caching`,
`# Rendering rules`) come after the per-function `## Outputs` blocks
and before `# Worked example`, same as the single-function variant.
Suggested change
- Any applicable optional sections (`# Side effects`, `# Caching`,
`# Rendering rules`) come after `# Worked example` and before
`# Related`, same as the single-function variant.
- Any applicable optional sections (`# Side effects`, `# Caching`,
`# Rendering rules`) come after `# Worked example` and before
`# Related`. (Note: This differs from single-function how-tos where
optional sections precede `# Worked example`.)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DOCUMENTATION_GUIDELINES.md` around lines 312 - 314, The document has a
contradictory rule about where optional sections go: the single-function variant
says optional sections slot between `# Outputs` and `# Worked example`, but the
multi-function text (lines describing "Any applicable optional sections...")
claims they go after `# Worked example` and that this is "same as the
single-function variant"; fix by making the multi-function description
consistent with the single-function ordering—edit the sentence that begins "Any
applicable optional sections..." so it states that optional sections appear
between `# Outputs` and `# Worked example` (before `# Worked example` and before
`# Related`), or if the intent was to differ, remove "same as the
single-function variant" and add a short justification for the differing
placement; update the wording accordingly wherever the phrase appears to
eliminate the contradiction.

@sergiofilhowz sergiofilhowz merged commit 80b2026 into main May 16, 2026
2 checks passed
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.

1 participant