@redpanda-data/docs-extensions-and-macros 4.13.0 → 4.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bin/doc-tools-mcp.js +15 -3
  2. package/bin/doc-tools.js +767 -2088
  3. package/bin/mcp-tools/property-docs.js +18 -0
  4. package/bin/mcp-tools/rpcn-docs.js +28 -3
  5. package/cli-utils/antora-utils.js +53 -2
  6. package/cli-utils/dependencies.js +313 -0
  7. package/cli-utils/diff-utils.js +273 -0
  8. package/cli-utils/doc-tools-utils.js +54 -0
  9. package/extensions/algolia-indexer/generate-index.js +134 -102
  10. package/extensions/algolia-indexer/index.js +70 -38
  11. package/extensions/collect-bloblang-samples.js +2 -1
  12. package/extensions/generate-rp-connect-categories.js +126 -67
  13. package/extensions/generate-rp-connect-info.js +291 -137
  14. package/macros/rp-connect-components.js +34 -5
  15. package/mcp/CLI_INTERFACE.adoc +384 -0
  16. package/mcp/COSTS.adoc +167 -0
  17. package/mcp/DEVELOPMENT.adoc +726 -0
  18. package/mcp/README.adoc +172 -0
  19. package/mcp/USER_GUIDE.adoc +1392 -0
  20. package/mcp/WRITER_EXTENSION_GUIDE.adoc +814 -0
  21. package/mcp/prompts/README.adoc +183 -0
  22. package/mcp/prompts/property-docs-guide.md +283 -0
  23. package/mcp/prompts/review-for-style.md +128 -0
  24. package/mcp/prompts/rpcn-connector-docs-guide.md +126 -0
  25. package/mcp/prompts/write-new-guide.md +222 -0
  26. package/mcp/team-standards/style-guide.md +321 -0
  27. package/mcp/templates/README.adoc +212 -0
  28. package/mcp/templates/prompt-review-template.md +80 -0
  29. package/mcp/templates/prompt-write-template.md +110 -0
  30. package/mcp/templates/resource-template.md +76 -0
  31. package/package.json +8 -5
  32. package/tools/add-commercial-names.js +207 -0
  33. package/tools/generate-cli-docs.js +6 -2
  34. package/tools/get-console-version.js +5 -0
  35. package/tools/get-redpanda-version.js +5 -0
  36. package/tools/property-extractor/compare-properties.js +3 -3
  37. package/tools/property-extractor/generate-handlebars-docs.js +14 -14
  38. package/tools/property-extractor/generate-pr-summary.js +46 -0
  39. package/tools/property-extractor/pr-summary-formatter.js +375 -0
  40. package/tools/redpanda-connect/README.adoc +403 -38
  41. package/tools/redpanda-connect/connector-binary-analyzer.js +588 -0
  42. package/tools/redpanda-connect/generate-rpcn-connector-docs.js +97 -34
  43. package/tools/redpanda-connect/parse-csv-connectors.js +1 -1
  44. package/tools/redpanda-connect/pr-summary-formatter.js +601 -0
  45. package/tools/redpanda-connect/report-delta.js +69 -2
  46. package/tools/redpanda-connect/rpcn-connector-docs-handler.js +1180 -0
  47. package/tools/redpanda-connect/templates/connector.hbs +38 -0
  48. package/tools/redpanda-connect/templates/intro.hbs +0 -20
  49. package/tools/redpanda-connect/update-nav.js +205 -0
@@ -0,0 +1,212 @@
1
+ = MCP Extension Templates
2
+ :toc:
3
+
4
+ == Overview
5
+
6
+ This directory contains ready-to-use templates for extending the MCP server. Copy these templates and customize them for your needs.
7
+
8
+ == Available templates
9
+
10
+ [cols="1,3"]
11
+ |===
12
+ |Template |Use For
13
+
14
+ |`prompt-review-template.md`
15
+ |Creating review prompts for specific content types
16
+
17
+ |`prompt-write-template.md`
18
+ |Creating writing prompts that generate new content
19
+
20
+ |`resource-template.md`
21
+ |Creating reference resources (guides, checklists, templates)
22
+ |===
23
+
24
+ == How to use these templates
25
+
26
+ === Quick start
27
+
28
+ . Copy the template you need
29
+ . Replace `[PLACEHOLDERS]` with your content
30
+ . Add YAML frontmatter (for prompts)
31
+ . Validate with `npx doc-tools validate-mcp`
32
+ . Restart Claude Code and test
33
+
34
+ === Detailed steps
35
+
36
+ **Step 1: Choose a template**
37
+
38
+ Pick the template that matches what you're creating:
39
+ - Review prompts → `prompt-review-template.md`
40
+ - Writing prompts → `prompt-write-template.md`
41
+ - Resources → `resource-template.md`
42
+
43
+ **Step 2: Copy and rename**
44
+
45
+ [source,bash]
46
+ ----
47
+ # For a prompt
48
+ cp mcp/templates/prompt-review-template.md mcp/prompts/review-api-docs.md
49
+
50
+ # For a resource
51
+ cp mcp/templates/resource-template.md mcp/team-standards/api-guide.md
52
+ ----
53
+
54
+ **Step 3: Add frontmatter (prompts only)**
55
+
56
+ Prompts need YAML frontmatter at the top. The templates include placeholder frontmatter - customize it:
57
+
58
+ [source,yaml]
59
+ ----
60
+ ---
61
+ description: "Your prompt description"
62
+ version: "1.0.0"
63
+ arguments:
64
+ content:
65
+ description: "The content to process"
66
+ required: true
67
+ ---
68
+ ----
69
+
70
+ **Step 4: Customize the content**
71
+
72
+ Replace all `[PLACEHOLDERS]` with your specific content:
73
+
74
+ - `[CONTENT-TYPE]` → "API documentation", "troubleshooting guide", etc.
75
+ - `[First thing to check]` → Specific checks for your use case
76
+ - `[Section names]` → Appropriate section names
77
+
78
+ **Step 5: Validate**
79
+
80
+ Check your prompt or resource for errors:
81
+
82
+ [source,bash]
83
+ ----
84
+ npx doc-tools validate-mcp
85
+ ----
86
+
87
+ **Step 6: Test**
88
+
89
+ Restart Claude Code and test your new prompt or resource.
90
+
91
+ No code editing required - the MCP server auto-discovers files in `mcp/prompts/` and `mcp/team-standards/`!
92
+
93
+ == Customization tips
94
+
95
+ === For review prompts
96
+
97
+ Focus on:
98
+ - **Specific checks** relevant to the content type
99
+ - **Common mistakes** you see in reviews
100
+ - **Required elements** that must be present
101
+ - **Output format** that's easy to act on
102
+
103
+ Good checklist items:
104
+ - Concrete and testable
105
+ - Focused on one aspect
106
+ - Clear about what success looks like
107
+
108
+ === For writing prompts
109
+
110
+ Focus on:
111
+ - **Clear structure** that matches your templates
112
+ - **Specific requirements** for the content type
113
+ - **Quality standards** that must be met
114
+ - **Examples** showing what good looks like
115
+
116
+ Good requirements:
117
+ - Specific and actionable
118
+ - Based on real patterns
119
+ - Include rationale
120
+
121
+ === For resources
122
+
123
+ Focus on:
124
+ - **Practical examples** showing how to apply rules
125
+ - **Good vs bad** comparisons
126
+ - **Checklists** for quick verification
127
+ - **Clear organization** that's easy to scan
128
+
129
+ Good resources:
130
+ - Scannable with clear headings
131
+ - More examples than rules
132
+ - Actionable guidance
133
+
134
+ == Examples
135
+
136
+ === Example: Review prompt for API docs
137
+
138
+ [source,bash]
139
+ ----
140
+ # Copy template
141
+ cp mcp/templates/prompt-review-template.md mcp/prompts/review-api-docs.md
142
+
143
+ # Edit and customize
144
+ vi mcp/prompts/review-api-docs.md
145
+ ----
146
+
147
+ Key customizations:
148
+ - Replace `[CONTENT-TYPE]` with "API documentation"
149
+ - Add checks for: authentication section, request/response examples, error codes
150
+ - Add common issues: missing status codes, unclear parameter descriptions
151
+ - Define output format for API-specific feedback
152
+
153
+ === Example: Resource for code examples
154
+
155
+ [source,bash]
156
+ ----
157
+ # Copy template
158
+ cp mcp/templates/resource-template.md mcp/team-standards/code-examples-guide.md
159
+
160
+ # Edit and customize
161
+ vi mcp/team-standards/code-examples-guide.md
162
+ ----
163
+
164
+ Key customizations:
165
+ - Add language-specific guidelines (bash, Python, YAML)
166
+ - Include examples of good vs bad code formatting
167
+ - Add checklist for code review
168
+ - Show proper use of code block roles
169
+
170
+ == Template placeholders reference
171
+
172
+ Common placeholders you'll find in templates:
173
+
174
+ [cols="1,2"]
175
+ |===
176
+ |Placeholder |Replace With
177
+
178
+ |`[CONTENT-TYPE]`
179
+ |Specific type: "API docs", "tutorials", "troubleshooting guides"
180
+
181
+ |`[First thing to check]`
182
+ |Specific checks relevant to your use case
183
+
184
+ |`[Required section X]`
185
+ |Sections that must be present
186
+
187
+ |`[Resource Name]`
188
+ |Name of your resource
189
+
190
+ |`[Main Section X]`
191
+ |Appropriate section names for your content
192
+
193
+ |`[Check item X]`
194
+ |Specific checklist items
195
+ |===
196
+
197
+ == Getting help
198
+
199
+ - See link:../WRITER_EXTENSION_GUIDE.adoc[Writer Extension Guide] for complete instructions
200
+ - Check existing prompts in `mcp/prompts/` for examples
201
+ - Review existing resources in `mcp/team-standards/` for patterns
202
+ - Ask your team lead for guidance
203
+
204
+ == Contributing
205
+
206
+ When you create a great prompt or resource:
207
+
208
+ . Add it to the examples in link:../WRITER_EXTENSION_GUIDE.adoc[Writer Extension Guide]
209
+ . Share it with the team
210
+ . Consider if it should become a new template
211
+
212
+ The more prompts and resources we build, the more consistent and efficient our docs team becomes!
@@ -0,0 +1,80 @@
1
+ ---
2
+ description: "Review [CONTENT-TYPE] for [specific aspects you're checking]"
3
+ version: "1.0.0"
4
+ arguments:
5
+ content:
6
+ description: "The [CONTENT-TYPE] content to review"
7
+ required: true
8
+ ---
9
+
10
+ # Review [CONTENT-TYPE]
11
+
12
+ You are reviewing [CONTENT-TYPE] for the Redpanda documentation team.
13
+
14
+ ## Your Task
15
+
16
+ Review the provided content and check for:
17
+
18
+ 1. [First thing to check]
19
+ 2. [Second thing to check]
20
+ 3. [Third thing to check]
21
+ 4. [Additional checks...]
22
+
23
+ ## Resources to Reference
24
+
25
+ Read these resources before reviewing:
26
+ - `redpanda://style-guide` - Complete style guide
27
+ - Official glossary for terminology:
28
+ - GitHub: https://github.com/redpanda-data/docs/tree/shared/modules/terms/partials
29
+ - Published: https://docs.redpanda.com/current/reference/glossary/
30
+ - [Add other relevant resources]
31
+
32
+ ## Standards for [CONTENT-TYPE]
33
+
34
+ [Describe what makes good content of this type]
35
+
36
+ ### Required Sections
37
+
38
+ All [CONTENT-TYPE] documentation must include:
39
+ - [Required section 1]
40
+ - [Required section 2]
41
+ - [Required section 3]
42
+
43
+ ### Format Requirements
44
+
45
+ [Specific formatting rules for this content type]
46
+
47
+ ### Common Issues to Check
48
+
49
+ - [Common mistake 1]
50
+ - [Common mistake 2]
51
+ - [Common mistake 3]
52
+
53
+ ## Output Format
54
+
55
+ Provide a structured review:
56
+
57
+ ### Critical Issues (must fix)
58
+
59
+ For each critical issue:
60
+ - **Location**: [Section/paragraph reference]
61
+ - **Issue**: [What's wrong]
62
+ - **Fix**: [Specific correction]
63
+ - **Reason**: [Why it matters]
64
+
65
+ ### Suggestions (should consider)
66
+
67
+ For each suggestion:
68
+ - **Location**: [Where it appears]
69
+ - **Current**: [What it says now]
70
+ - **Suggested**: [Better alternative]
71
+ - **Reason**: [Why the suggestion helps]
72
+
73
+ ### Positive Elements
74
+
75
+ What works well:
76
+ - [Good thing 1]
77
+ - [Good thing 2]
78
+ - [Good thing 3]
79
+
80
+ ---
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: "Generate [CONTENT-TYPE] following team standards"
3
+ version: "1.0.0"
4
+ arguments:
5
+ topic:
6
+ description: "The topic to write about"
7
+ required: true
8
+ target_module:
9
+ description: "Where in Antora structure this belongs (optional)"
10
+ required: false
11
+ context:
12
+ description: "Additional context or requirements"
13
+ required: false
14
+ ---
15
+
16
+ # Write [CONTENT-TYPE]
17
+
18
+ You are writing [CONTENT-TYPE] for the Redpanda documentation team.
19
+
20
+ ## Your Task
21
+
22
+ Create [CONTENT-TYPE] that follows our team standards.
23
+
24
+ ## Resources to Read First
25
+
26
+ - `redpanda://style-guide` - Complete style guide
27
+ - Official glossary for terminology:
28
+ - GitHub: https://github.com/redpanda-data/docs/tree/shared/modules/terms/partials
29
+ - Published: https://docs.redpanda.com/current/reference/glossary/
30
+ - `redpanda://[content-type]-template` - Template for this content type (if available)
31
+ - [Add other relevant resources]
32
+
33
+ Use `get_antora_structure` tool to understand the documentation organization.
34
+
35
+ ## Standards for [CONTENT-TYPE]
36
+
37
+ ### Structure
38
+
39
+ [CONTENT-TYPE] should follow this structure:
40
+
41
+ 1. [Section 1]
42
+ - [What goes here]
43
+ 2. [Section 2]
44
+ - [What goes here]
45
+ 3. [Section 3]
46
+ - [What goes here]
47
+
48
+ ### Content Requirements
49
+
50
+ [What must be included:]
51
+ - [Requirement 1]
52
+ - [Requirement 2]
53
+ - [Requirement 3]
54
+
55
+ ### Writing Style
56
+
57
+ Follow these style guidelines:
58
+ - Present tense
59
+ - Active voice
60
+ - Second person ("you")
61
+ - Sentence case for all headings except title
62
+ - Imperative form for instructions (no gerunds)
63
+ - Avoid overuse of bold or em dashes
64
+
65
+ ### AsciiDoc Format
66
+
67
+ - All xrefs must include module name
68
+ - Use `glossterm` macro for glossary terms on first mention
69
+ - Code blocks use appropriate roles (`.no-copy` for outputs)
70
+ - Custom macros used correctly
71
+
72
+ ## Quality Checklist
73
+
74
+ Before finalizing, verify:
75
+ - [ ] Structure follows template
76
+ - [ ] All required sections included
77
+ - [ ] Code examples are realistic and tested
78
+ - [ ] Terminology uses approved terms
79
+ - [ ] Glossary terms use `glossterm` macro
80
+ - [ ] All xrefs include module names
81
+ - [ ] Voice is clear and conversational
82
+ - [ ] Headings use sentence case
83
+
84
+ ## Output Format
85
+
86
+ Provide complete [CONTENT-TYPE] in AsciiDoc format:
87
+
88
+ ```asciidoc
89
+ = Page Title
90
+ :description: Brief description
91
+
92
+ Opening content explaining what this covers.
93
+
94
+ == First section
95
+
96
+ Content here.
97
+
98
+ == Second section
99
+
100
+ More content.
101
+ ```
102
+
103
+ ---
104
+
105
+ Please provide:
106
+ 1. **Topic**: What this [CONTENT-TYPE] should cover
107
+ 2. **Target module** (optional): Where in Antora structure this belongs
108
+ 3. **[Other context]**: [Additional information needed]
109
+
110
+ I'll create complete [CONTENT-TYPE] following all team standards.
@@ -0,0 +1,76 @@
1
+ # [Resource Name]
2
+
3
+ [Brief description of what this resource provides]
4
+
5
+ ## Overview
6
+
7
+ [1-2 paragraphs explaining when and how to use this resource]
8
+
9
+ ## [Main Section 1]
10
+
11
+ [Content for this section]
12
+
13
+ ### Subsection
14
+
15
+ [Details with examples]
16
+
17
+ Example:
18
+
19
+ ```asciidoc
20
+ [Example code or content here]
21
+ ```
22
+
23
+ ## [Main Section 2]
24
+
25
+ [Content for this section]
26
+
27
+ ### Key Points
28
+
29
+ - [Important point 1]
30
+ - [Important point 2]
31
+ - [Important point 3]
32
+
33
+ ### Examples
34
+
35
+ Good:
36
+ ```
37
+ [Good example]
38
+ ```
39
+
40
+ Bad:
41
+ ```
42
+ [Bad example - what to avoid]
43
+ ```
44
+
45
+ ## [Main Section 3]
46
+
47
+ [Additional content]
48
+
49
+ ## Checklist
50
+
51
+ Use this checklist to verify compliance:
52
+
53
+ - [ ] [Check item 1]
54
+ - [ ] [Check item 2]
55
+ - [ ] [Check item 3]
56
+ - [ ] [Check item 4]
57
+
58
+ ## Common Mistakes
59
+
60
+ [List common mistakes and how to avoid them]
61
+
62
+ ### Mistake 1
63
+
64
+ Problem: [What people do wrong]
65
+ Solution: [How to do it right]
66
+
67
+ ### Mistake 2
68
+
69
+ Problem: [What people do wrong]
70
+ Solution: [How to do it right]
71
+
72
+ ## References
73
+
74
+ - [Link to related resource 1]
75
+ - [Link to related resource 2]
76
+ - [Link to external documentation]
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@redpanda-data/docs-extensions-and-macros",
3
- "version": "4.13.0",
3
+ "version": "4.13.2",
4
4
  "description": "Antora extensions and macros developed for Redpanda documentation.",
5
5
  "keywords": [
6
6
  "antora",
7
7
  "extension",
8
8
  "macro",
9
9
  "documentation",
10
- "redpanda"
10
+ "redpanda",
11
+ "mcp"
11
12
  ],
12
13
  "author": {
13
14
  "name": "Redpanda Docs Team"
@@ -27,7 +28,8 @@
27
28
  "test:mcp:integration": "jest __tests__/mcp/integration.test.js",
28
29
  "test:mcp:contract": "jest __tests__/mcp/cli-contract.test.js",
29
30
  "test:python": "./__tests__/tools/property-extractor/setup-and-test.sh",
30
- "test:all": "npm run test && npm run test:python",
31
+ "test:cgo": "node __tests__/tools/cgo-detection.test.js",
32
+ "test:all": "npm run test && npm run test:python && npm run test:cgo",
31
33
  "generate:cli-docs": "node tools/generate-cli-docs.js",
32
34
  "bundle:admin": "doc-tools generate bundle-openapi --surface admin",
33
35
  "bundle:connect": "doc-tools generate bundle-openapi --surface connect",
@@ -80,7 +82,8 @@
80
82
  "bin",
81
83
  "cli-utils",
82
84
  "tools",
83
- "docker-compose"
85
+ "docker-compose",
86
+ "mcp"
84
87
  ],
85
88
  "license": "ISC",
86
89
  "repository": {
@@ -93,7 +96,7 @@
93
96
  "@modelcontextprotocol/sdk": "^1.0.4",
94
97
  "@octokit/core": "^6.1.2",
95
98
  "@octokit/plugin-retry": "^7.1.1",
96
- "@octokit/rest": "^21.0.1",
99
+ "@octokit/rest": "^21.1.1",
97
100
  "@redocly/cli": "^2.2.0",
98
101
  "ajv": "^8.12.0",
99
102
  "algoliasearch": "^4.17.0",