@redpanda-data/docs-extensions-and-macros 4.13.0 → 4.13.1
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.
- package/mcp/CLI_INTERFACE.adoc +384 -0
- package/mcp/COSTS.adoc +167 -0
- package/mcp/DEVELOPMENT.adoc +726 -0
- package/mcp/README.adoc +172 -0
- package/mcp/USER_GUIDE.adoc +1392 -0
- package/mcp/WRITER_EXTENSION_GUIDE.adoc +814 -0
- package/mcp/prompts/README.adoc +183 -0
- package/mcp/prompts/property-docs-guide.md +283 -0
- package/mcp/prompts/review-for-style.md +128 -0
- package/mcp/prompts/rpcn-connector-docs-guide.md +126 -0
- package/mcp/prompts/write-new-guide.md +222 -0
- package/mcp/team-standards/style-guide.md +321 -0
- package/mcp/templates/README.adoc +212 -0
- package/mcp/templates/prompt-review-template.md +80 -0
- package/mcp/templates/prompt-write-template.md +110 -0
- package/mcp/templates/resource-template.md +76 -0
- package/package.json +5 -3
|
@@ -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.
|
|
3
|
+
"version": "4.13.1",
|
|
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"
|
|
@@ -80,7 +81,8 @@
|
|
|
80
81
|
"bin",
|
|
81
82
|
"cli-utils",
|
|
82
83
|
"tools",
|
|
83
|
-
"docker-compose"
|
|
84
|
+
"docker-compose",
|
|
85
|
+
"mcp"
|
|
84
86
|
],
|
|
85
87
|
"license": "ISC",
|
|
86
88
|
"repository": {
|