Skip to content

Commit a336ee0

Browse files
authored
Merge pull request #3721 from replicatedhq/claude-docs-review-skill
Add claude subagent for docs reviews
2 parents 0e33def + a6267de commit a336ee0

File tree

6 files changed

+191
-289
lines changed

6 files changed

+191
-289
lines changed

.claude/agents/docs-reviewer.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
name: docs-reviewer
3+
description: Reviews technical documentation for style, word choice, tone/voice, and content structure. Use after writing or editing Replicated docs.
4+
tools: Read, Grep, Glob, Terminal
5+
model: inherit
6+
---
7+
8+
# Your Role
9+
10+
You are a documentation reviewer ensuring consistent structure, style, tone and voice, and formatting across the documentation. You enforce the Replicated Documentation Style Guide.
11+
12+
## When Invoked
13+
14+
1. **Load the style guide**:
15+
- Read `README.md` to load the current style guidelines
16+
- This is your authoritative reference for all reviews
17+
18+
2. **Identify which file to review**:
19+
- Ask the user which file to review if not already specified
20+
21+
3. **Read full context**:
22+
- Read the complete contents of each file that the user wants reviewed for context
23+
24+
4. **Review against the style guide**:
25+
- Check each style guideline from `README.md`
26+
- Review the "Cheatsheet for Generating Content with LLMs" section of `README.md`
27+
- Review only the modified content (or entire file if newly created)
28+
29+
5. **Generate and output report**:
30+
- Output the report directly
31+
- You may include 0 to 7 issues in the report
32+
- If you identify more than 7 issues, tell the user that you found more issues than are listed in this report, and they should review the rest of their doc for similar issue patterns
33+
- Prioritize reporting on issues that are called out in the "Cheatsheet for Generating Content with LLMs" section of `README.md`
34+
- Use the Report Structure and Issue Format specified below
35+
- Refer to the Report Tone Guidelines below
36+
37+
## Report Structure
38+
39+
Use this structure for the docs review report (do not include any additional sections or summaries):
40+
41+
```
42+
File(s) Reviewed: [filename(s)]
43+
44+
## Style Guide Issues
45+
46+
[List each issue individually using the Issue Format below]
47+
```
48+
49+
## Issue Format
50+
51+
In the report, you must list each issue individually using this format:
52+
53+
```
54+
[Issue number]
55+
- "[exact text from the doc]"
56+
- Location: [filename], line [number]
57+
- Suggestion: "[proposed replacement text]" or [explanation of change]
58+
- Explanation: reasoning behind the suggestion, based on the style guide
59+
```
60+
61+
## Example of Correct Report Format
62+
63+
```
64+
File(s) Reviewed: example.md, example-2.md
65+
66+
Issue 1
67+
- "In the future, we will release a version that adds that functionality."
68+
- Location: example.md, line 23
69+
- Suggestion: Remove this sentence
70+
- Explanation: Avoid time-bound terminology like "currently", "new", "at this time", and "now". Instead, write timeless documentation that makes no assumptions about a reader's prior knowledge.
71+
72+
Issue 2
73+
- "## Best Practices"
74+
- Location: example.md, line 67
75+
- Suggestion: Carefully review this section and consider removing it
76+
- Explanation: LLMs often add Best Practices sections that are redundant with existing content on the page. Is this Best Practices section adding valuable new information, or can it be removed?
77+
78+
Issue 3
79+
- "If the settings won't save, we suggest that you try the following:"
80+
- Location: example-2.md, line 5
81+
- Suggestion: "If the settings won't save, Replicated suggests that you try the following:"
82+
- Explanation: Instead of "we", use "Replicated" to talk about recommendations/suggestions.
83+
84+
Issue 4
85+
- Multiple subsections use the same information repeated in different ways (e.g., the "Field Reference" section starting at line 80 repeats information already provided in the "Configuration Structure" section starting at line 35)
86+
- Location: example.md, lines 35-79 and lines 80-219
87+
- Suggestion: Consider consolidating these sections to avoid repetition
88+
- Explanation: Don't repeat the same information multiple times. Focus on being concise and using as few words as possible to get the point across.
89+
```
90+
91+
## Report Tone Guidelines
92+
93+
Do:
94+
- Use the report format outlined and add helpful explanations for your suggestions based on the style guide
95+
- Use a friendly, collaborative, helpful tone
96+
- Use terms like "suggest," "issue," "consider," or "update"
97+
98+
Do not:
99+
- Use words like "critical," "violation," "must," "error," "extensive," or "prohibited"
100+
- Group issues into summary categories or provide overviews
101+
- Include "Recommended Action," "Recommendation," or "Summary" sections beyond what's in the Report Structure
102+
- Provide example rewrites of entire sections
103+
- Use checkmarks (✅), X marks (❌), or other status indicators
104+
- Say things like "needs complete rewrite" or assess severity

.cursor/rules/docs-style-guide.mdc

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,10 @@
11
---
2-
description:
3-
globs:
2+
description: Replicated Documentation Style Guide
3+
globs: ["docs/**/*.md", "docs/**/*.mdx"]
44
alwaysApply: true
55
---
66
# Replicated Documentation Style Guide
77

8-
## Overview
9-
10-
This set of rules provides guidelines for writing clear and consistent product documentation for the Replicated Platform.
11-
12-
## General Principles
13-
14-
### Tone and Voice
15-
- Use active voice instead of passive voice
16-
- Use the second person "you" to address the reader
17-
- Never use "we" or "let's"
18-
- Write in a friendly tone without using slang, jargon, or frivolous words.
19-
20-
### Accessibility and Inclusivity
21-
- Write for a global audience by avoiding culturally-specific references, jargon, and figures of speech.
22-
- In HTML, use semantic tagging.
23-
- Avoid unnecessary font formatting.
24-
- Avoid large blocks of text by using short paragraphs, headings, and lists
25-
- Use shorter sentences. Try to use fewer than 26 words per sentence.
26-
27-
### Excessive Claims, Future Claims, and Marketing-Focused Language
28-
- Never use phrases like "simply" or "easily" in a procedure.
29-
- Avoid superlatives like best, worst, simplest, fastest, never, and always
30-
- Don't make any claims about a product that the user would not be able to easily verify.
31-
32-
### Timeless Documentation
33-
- Avoid time-bound terminology like "currently", "new", "at this time", and "now". Instead, write timeless documentation that makes no assumptions about a reader's prior knowledge.
34-
35-
## Formatting
36-
37-
### Text Formatting
38-
- Use bold for UI elements
39-
- Use bold for navigation steps in a UI, such as **Releases > Create Release**.
40-
- Use italics to draw attention to a word or phrase, such as when defining the term for the first time
41-
42-
### Capitalization
43-
- Use title case for titles and headings
44-
- Use all caps with underscores between words for placeholder text
45-
- Avoid all caps outside of placeholder text and code examples
46-
47-
### Symbols
48-
- Avoid using the ampersand symbol (&) except when describing UI elements, writing code examples, or in tables where space is limited
49-
50-
### Punctuation
51-
- Avoid semicolons
52-
- Avoid exclamation marks
53-
- Avoid question marks
54-
55-
## Linking
56-
57-
### Cross-references
58-
- A good cross-reference describes what information the reader can expect to learn, as well as the exact title (and location) of the page they will be taken to.
59-
- Do not embed links within a sentence.
60-
- Use the following format for cross references: "For more information about X, see [Topic Title](mdc:url)."
61-
- For links to other websites outside of docs.replicated.com, use the following format: "For more information about X, see [Topic Title](mdc:url) in the Company Name documentation."
8+
The style guide is maintained in this repo at `README.md`.
629

10+
When writing or editing documentation in the `/docs` folder, follow all guidelines in the `README.md` file.

README.md

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,89 @@
22

33
Welcome to the repository for the [Replicated documentation site](https://docs.replicated.com/).
44

5-
## Contribute to the Replicated Docs
6-
7-
This repository has been made public so that vendors and the open-source community can contribute to the content using the following methods:
8-
9-
- **Submit a PR** You can submit a PR directly from a specific topic in the documentation by clicking the **Create pull request or raise issue on GitHub** at the bottom of the page. This method lets you edit the content directly and commit your changes on a new branch. After submitting your proposed changes, the Replicated team will verify the accuracy of the changes and perform an editorial review. If the PR is approved, it will be merged directly into the main branch.
10-
11-
- **Open a Github Issue** - To open a GitHub issue for this repository, click the Issues tab and click **New Issue**. This method may be more useful when you want to report a bug specifically for the documentation. If you are having an issue with the product itself, we encourage you to report it to us in a support issue submitted in the vendor portal.
5+
## Contribute to Replicated Docs
6+
7+
This repository has been made public so that the Replicated community can contribute to the content.
8+
9+
### Submit a PR
10+
11+
You can submit a PR directly from a specific topic in the documentation by clicking **Propose Changes** at the bottom of the page. This method lets you edit the content directly and commit your changes on a new branch. After submitting your proposed changes, the Replicated Docs team will verify the accuracy of the changes and perform an editorial review. If the PR is approved, it will be merged directly into the main branch.
12+
13+
### Open a Github Issue
14+
15+
You can open a GitHub issue in this repo to provide feedback or report a bug for the documentation. To open an issue, either go to **Issues > New Issue** in this repo in GitHub, or click **Provide Feedback** at the bottom of any page in the documentation.
16+
17+
If you are having an issue with the product itself, report it to the Replicated team in a support issue submitted in the Vendor Portal.
18+
19+
## Style Guide
20+
21+
The Replicated docs use the Google Developer Docs Style Guide: https://developers.google.com/style/. Refer to the Google Developer Docs Style Guide if you have a style guide question that's not covered in the Style Guide Summary in this document.
22+
23+
The following is a summary of the most important elements of our style guide, plus some house rules that aren't captured or differ from what's in the Google Developer Docs Style Guide:
24+
25+
- Word Choice, Tone, and Voice:
26+
- Use active voice
27+
- Use the second person "you" to address the reader. Never use "let's" or "we" to refer to an action that the user is doing
28+
- Use "Replicated" instead of "we" to talk about recommendations/suggestions. As in "Replicated recommends that you test your releases..." and not "we recommend"
29+
- Use present tense (for example, use "returns" and not "will return")
30+
- Write in a friendly tone without using slang, jargon, or frivolous words
31+
- Avoid marketing language that is overly promotional
32+
- Avoid terms like "simple" or "easy"
33+
- Use common words. Don't use words like "utilize" or "leverage" when you mean "use". Using common words makes the docs more suitable for a global audience
34+
- Try to use fewer than 26 words per sentence
35+
- Avoid time-bound terminology like "currently", "new", "at this time", and "now". Instead, write timeless documentation that makes no assumptions about a reader's prior knowledge.
36+
37+
- Formatting:
38+
- Use bold and italic text sparingly.
39+
- Bold text is primarily used to identify UI elements. For example, "Click **Save**."
40+
- Do not use bold text to emphasize important content. Instead, if discoverability is a concern, consider how the content could be reorganized or how you could use clearer headings.
41+
- It's okay to use bold text for introducing an example (`**Example:**`) or for run-in headings in unordered lists (`* **Item 1:** Description`)
42+
- Use colons instead of dashes for run-in headings in description lists (`- Item 1: Description`, not `- Item 1 - Description`)
43+
- Use title case for titles and headings
44+
- Use a bare infinitive verb form for how-to titles/headings. As in, use "Create a Release" instead of "Creating a Release"
45+
- Procedural/how-to content must use numbered steps. For one-step procedures, use a bullet point. See https://developers.google.com/style/procedures#single-step-procedures for examples
46+
- Use the following formats for cross references:
47+
- "For more information about X, see [Topic Title](mdc:url)"
48+
- "For more information about X, see [Section Heading](mdc:url#section-heading) in _Topic Title_."
49+
- "For more information about X, see [Section Heading](#section-heading) in this document."
50+
- We use "Note" and "Important" admonitions.
51+
- Notes are for informational asides. Only use notes if the info is relevant but not required to succeed in whatever the user is doing right now. Don't use notes to state expected results or to include information that simply describes what precedes.
52+
```md
53+
:::note
54+
note content
55+
:::
56+
```
57+
- Important admonitions are to provide cautionary/warning messages.
58+
```md
59+
:::impotant
60+
important content
61+
:::
62+
```
63+
64+
### Cheatsheet for Generating Content with LLMs
65+
66+
When generating content for Replicated Docs with LLMs, add the following to the context window:
67+
68+
```md
69+
- Refer to the style guidelines in this repo at `README.md`
70+
- Don't add Troubleshooting, Best Practices, Conclusion, Summary, or Next Steps sections unless specifically asked
71+
- Never use bold text to emphasize important information or as section/category headings
72+
- Don't repeat the same information mutiple times. Focus on being concise and using as few words as possible to get the point across
73+
- Use paragraphs instead of bulleted lists unless specifically asked
74+
- Don't number the items in unordered lists. Numbered lists are reserved for step-by-step procedures
75+
- Limit the use of notes and asides
76+
```
77+
78+
### Use the @doc-reviewer Claude Subagent
79+
80+
The `@docs-reviewer` subagent reviews documentation files against this style guide and identifies issues with suggestions for fixes. You can use it to help you catch common style problems before submitting PRs.
81+
82+
To use it, invoke `@docs-reviewer` in Claude Desktop or Claude Code and specify the file you want reviewed.
83+
84+
For example:
85+
```
86+
@docs-reviewer please review docs/example.md
87+
```
1288

1389
## Folder Structure and Sidebar
1490

docs/templates/procedure.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)