@redpanda-data/docs-extensions-and-macros 4.13.5 → 4.14.0
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/bin/doc-tools-mcp.js +84 -131
- package/bin/doc-tools.js +105 -192
- package/bin/mcp-tools/generated-docs-review.js +11 -158
- package/bin/mcp-tools/index.js +0 -4
- package/bin/mcp-tools/mcp-validation.js +44 -149
- package/cli-utils/github-token.js +6 -2
- package/mcp/COSTS.adoc +7 -17
- package/mcp/DEVELOPMENT.adoc +2 -175
- package/mcp/README.adoc +27 -61
- package/mcp/WRITER_EXTENSION_GUIDE.adoc +128 -738
- package/package.json +1 -1
- package/tools/redpanda-connect/rpcn-connector-docs-handler.js +60 -60
- package/bin/mcp-tools/content-review.js +0 -196
- package/bin/mcp-tools/frontmatter.js +0 -138
- package/bin/mcp-tools/prompt-discovery.js +0 -283
- package/mcp/prompts/README.adoc +0 -183
- package/mcp/prompts/property-docs-guide.md +0 -283
- package/mcp/prompts/review-for-style.md +0 -128
- package/mcp/prompts/rpcn-connector-docs-guide.md +0 -126
- package/mcp/prompts/write-new-guide.md +0 -222
- package/mcp/team-standards/style-guide.md +0 -321
- package/mcp/templates/README.adoc +0 -212
- package/mcp/templates/prompt-review-template.md +0 -80
- package/mcp/templates/prompt-write-template.md +0 -110
- package/mcp/templates/resource-template.md +0 -76
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Comprehensive guide for updating Redpanda property documentation using the override system. Explains how to work with auto-generated property files and the property-overrides.json system.
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Property documentation update guide for LLMs
|
|
7
|
-
|
|
8
|
-
This guide explains how to update Redpanda property documentation when all property reference pages are auto-generated.
|
|
9
|
-
|
|
10
|
-
Critical rule: Never directly edit files in `/modules/reference/partials/properties/` - they are auto-generated and will be overwritten.
|
|
11
|
-
|
|
12
|
-
## The auto-generation system
|
|
13
|
-
|
|
14
|
-
All property documentation files are automatically generated from source code metadata.
|
|
15
|
-
|
|
16
|
-
Generated files (do not edit):
|
|
17
|
-
- `/modules/reference/partials/properties/broker-properties.adoc`
|
|
18
|
-
- `/modules/reference/partials/properties/cluster-properties.adoc`
|
|
19
|
-
- `/modules/reference/partials/properties/object-storage-properties.adoc`
|
|
20
|
-
- `/modules/reference/partials/properties/topic-properties.adoc`
|
|
21
|
-
|
|
22
|
-
Override file (edit this):
|
|
23
|
-
- `/docs-data/property-overrides.json`
|
|
24
|
-
|
|
25
|
-
## Why this matters
|
|
26
|
-
|
|
27
|
-
When a user asks you to:
|
|
28
|
-
- "Improve the description of cleanup.policy"
|
|
29
|
-
- "Add an example for kafka_qdc_enable"
|
|
30
|
-
- "Fix the documentation for compression.type"
|
|
31
|
-
- "Add related topics to retention.ms"
|
|
32
|
-
|
|
33
|
-
You must:
|
|
34
|
-
1. Update `/docs-data/property-overrides.json`
|
|
35
|
-
2. Run the doc-tools CLI to regenerate
|
|
36
|
-
3. Do not edit the generated `.adoc` files directly
|
|
37
|
-
|
|
38
|
-
## The override system
|
|
39
|
-
|
|
40
|
-
The override file provides human-curated content that supplements or replaces auto-generated content.
|
|
41
|
-
|
|
42
|
-
## File structure
|
|
43
|
-
|
|
44
|
-
Location: `docs-data/property-overrides.json`
|
|
45
|
-
|
|
46
|
-
Basic structure:
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"properties": {
|
|
50
|
-
"property_name": {
|
|
51
|
-
"description": "Enhanced description text",
|
|
52
|
-
"config_scope": "broker|cluster|topic",
|
|
53
|
-
"category": "category-name",
|
|
54
|
-
"example": [
|
|
55
|
-
"Line 1 of example",
|
|
56
|
-
"Line 2 of example"
|
|
57
|
-
],
|
|
58
|
-
"related_topics": [
|
|
59
|
-
"xref:path/to/doc.adoc[Link Text]",
|
|
60
|
-
"xref:another/doc.adoc#anchor[Another Link]"
|
|
61
|
-
],
|
|
62
|
-
"exclude_from_docs": false
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## What can be overridden
|
|
69
|
-
|
|
70
|
-
Fields you can override:
|
|
71
|
-
- `description` - Enhance or replace property description
|
|
72
|
-
- `config_scope` - Specify broker/cluster/topic scope
|
|
73
|
-
- `category` - Categorize property
|
|
74
|
-
- `example` - Add YAML configuration examples (array of strings)
|
|
75
|
-
- `related_topics` - Add cross-references (array of AsciiDoc xref links)
|
|
76
|
-
- `exclude_from_docs` - Hide internal/deprecated properties
|
|
77
|
-
- `type` - Override detected type
|
|
78
|
-
- `default` - Override default value
|
|
79
|
-
- `accepted_values` - Override accepted values
|
|
80
|
-
|
|
81
|
-
## How to update overrides
|
|
82
|
-
|
|
83
|
-
### Step 1: Read the current override file
|
|
84
|
-
Always read the file first to preserve existing overrides.
|
|
85
|
-
|
|
86
|
-
### Step 2: Add or update property overrides
|
|
87
|
-
Modify the properties object.
|
|
88
|
-
|
|
89
|
-
### Step 3: Write back to file
|
|
90
|
-
Save the updated JSON.
|
|
91
|
-
|
|
92
|
-
### Step 4: Verify JSON is valid
|
|
93
|
-
Run: `python -c "import json; json.load(open('docs-data/property-overrides.json'))"`
|
|
94
|
-
|
|
95
|
-
## Regenerating documentation
|
|
96
|
-
|
|
97
|
-
### Prerequisites
|
|
98
|
-
Before running doc-tools, you must have:
|
|
99
|
-
1. A valid GitHub token with repo access to cloudv2 in the redpandadata organization
|
|
100
|
-
2. The token set as the GITHUB_TOKEN environment variable
|
|
101
|
-
|
|
102
|
-
### The doc-tools CLI
|
|
103
|
-
After updating overrides, regenerate documentation:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npx doc-tools generate property-docs \
|
|
107
|
-
--tag "<redpanda-version>" \
|
|
108
|
-
--generate-partials \
|
|
109
|
-
--cloud-support \
|
|
110
|
-
--overrides docs-data/property-overrides.json
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Important notes:
|
|
114
|
-
- Always use `npx doc-tools` (not just `doc-tools`)
|
|
115
|
-
- The `--tag` flag specifies which Redpanda version to generate docs for
|
|
116
|
-
- The `--generate-partials` flag generates files in the partials directory
|
|
117
|
-
- The `--cloud-support` flag must ALWAYS be included - never exclude it
|
|
118
|
-
- The `--overrides` flag points to the property overrides JSON file
|
|
119
|
-
|
|
120
|
-
## Property description rules (mandatory)
|
|
121
|
-
|
|
122
|
-
### Never add enterprise license includes
|
|
123
|
-
Do not include enterprise license markers in descriptions.
|
|
124
|
-
|
|
125
|
-
Wrong:
|
|
126
|
-
```
|
|
127
|
-
Enable shadow linking for disaster recovery.
|
|
128
|
-
|
|
129
|
-
include::reference:partial$enterprise-licensed-property.adoc[]
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Right:
|
|
133
|
-
```
|
|
134
|
-
Enable shadow linking for disaster recovery.
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Reason: Enterprise licensing information is displayed in the metadata table.
|
|
138
|
-
|
|
139
|
-
### Never add descriptions for deprecated properties
|
|
140
|
-
Do not add or update descriptions for properties marked as deprecated.
|
|
141
|
-
|
|
142
|
-
Process:
|
|
143
|
-
1. Check if the property is deprecated
|
|
144
|
-
2. If deprecated, remove any existing override
|
|
145
|
-
3. Never add new overrides for deprecated properties
|
|
146
|
-
|
|
147
|
-
### Keep descriptions focused
|
|
148
|
-
Descriptions should explain:
|
|
149
|
-
- What the property does
|
|
150
|
-
- When to use it
|
|
151
|
-
- How it relates to other properties
|
|
152
|
-
- Important behavioral details
|
|
153
|
-
|
|
154
|
-
Descriptions should NOT include:
|
|
155
|
-
- Version availability (metadata)
|
|
156
|
-
- Cloud availability (metadata)
|
|
157
|
-
- Enterprise license requirements (metadata)
|
|
158
|
-
- Requires restart (metadata)
|
|
159
|
-
- Default values (metadata)
|
|
160
|
-
- Type information (metadata)
|
|
161
|
-
|
|
162
|
-
### Use consistent formatting
|
|
163
|
-
Use AsciiDoc formatting in descriptions:
|
|
164
|
-
- `` `property_name` `` for property names
|
|
165
|
-
- `xref:module:path/to/doc.adoc[Link Text]` for cross-references (always use full resource IDs with module prefix)
|
|
166
|
-
- `<<anchor,text>>` for internal document references
|
|
167
|
-
- `\n\n` for paragraph breaks
|
|
168
|
-
|
|
169
|
-
Important: Always use full Antora resource IDs with module prefixes in xref links, never relative paths.
|
|
170
|
-
|
|
171
|
-
Wrong:
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"description": "When `segment.bytes` is set, it overrides xref:./cluster-properties.adoc#log_segment_size[`log_segment_size`]."
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Right:
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"description": "When `segment.bytes` is set, it overrides xref:reference:properties/cluster-properties.adoc#log_segment_size[`log_segment_size`]."
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Common module prefixes:
|
|
186
|
-
- `reference:` for reference documentation
|
|
187
|
-
- `manage:` for management documentation
|
|
188
|
-
- `deploy:` for deployment documentation
|
|
189
|
-
- `get-started:` for getting started guides
|
|
190
|
-
|
|
191
|
-
### Prefix self-managed-only links
|
|
192
|
-
Some documentation pages only exist in self-managed deployments. Prefix these with `self-managed-only:`.
|
|
193
|
-
|
|
194
|
-
Example:
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"kafka_connections_max": {
|
|
198
|
-
"related_topics": [
|
|
199
|
-
"self-managed-only:xref:manage:cluster-maintenance/configure-client-connections.adoc[Limit client connections]"
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Remove duplicate links
|
|
206
|
-
Always remove duplicates from related_topics lists.
|
|
207
|
-
|
|
208
|
-
### Normalize xref links to full resource IDs
|
|
209
|
-
After updating overrides, normalize all xref links to use full Antora resource IDs.
|
|
210
|
-
|
|
211
|
-
## Common scenarios
|
|
212
|
-
|
|
213
|
-
### Improve a property description
|
|
214
|
-
1. Read the override file
|
|
215
|
-
2. Update the description field
|
|
216
|
-
3. Write back to override file
|
|
217
|
-
4. Use the `generate_property_docs` MCP tool to regenerate the documentation
|
|
218
|
-
5. If that tool is not available, tell the user to run:
|
|
219
|
-
`npx doc-tools generate property-docs --tag "<version>" --generate-partials --cloud-support --overrides docs-data/property-overrides.json`
|
|
220
|
-
|
|
221
|
-
### Add an example
|
|
222
|
-
1. Add an `example` array with YAML lines to the property override
|
|
223
|
-
2. Use the `generate_property_docs` MCP tool to regenerate
|
|
224
|
-
|
|
225
|
-
### Add related topics
|
|
226
|
-
1. Add `related_topics` array with AsciiDoc xref links
|
|
227
|
-
2. Use the `generate_property_docs` MCP tool to regenerate
|
|
228
|
-
|
|
229
|
-
### Fix incorrect metadata
|
|
230
|
-
1. Override specific fields like `default` or `type`
|
|
231
|
-
2. Use the `generate_property_docs` MCP tool to regenerate
|
|
232
|
-
|
|
233
|
-
### Hide internal properties
|
|
234
|
-
1. Set `exclude_from_docs: true`
|
|
235
|
-
2. Use the `generate_property_docs` MCP tool to regenerate
|
|
236
|
-
|
|
237
|
-
## Validation
|
|
238
|
-
|
|
239
|
-
After updating overrides:
|
|
240
|
-
1. Validate JSON syntax
|
|
241
|
-
2. Check for common mistakes (example/related_topics are arrays, xref format)
|
|
242
|
-
3. Verify after regeneration
|
|
243
|
-
|
|
244
|
-
## Summary for LLMs
|
|
245
|
-
|
|
246
|
-
When asked to update property documentation:
|
|
247
|
-
|
|
248
|
-
1. Update `/docs-data/property-overrides.json`
|
|
249
|
-
2. Run the doc-tools CLI with the correct command (including all required flags)
|
|
250
|
-
3. Never edit `/modules/reference/partials/properties/*.adoc` directly
|
|
251
|
-
|
|
252
|
-
Critical requirements:
|
|
253
|
-
- Must have GITHUB_TOKEN environment variable set
|
|
254
|
-
- Must ALWAYS include `--cloud-support` flag
|
|
255
|
-
- Must use `npx doc-tools`
|
|
256
|
-
- Must include all flags: `--tag`, `--generate-partials`, `--cloud-support`, `--overrides`
|
|
257
|
-
|
|
258
|
-
Property description rules (mandatory):
|
|
259
|
-
- Never add enterprise license includes
|
|
260
|
-
- Never add descriptions for deprecated properties
|
|
261
|
-
- Keep descriptions focused on behavior, not metadata
|
|
262
|
-
- Use AsciiDoc formatting
|
|
263
|
-
- Always use full Antora resource IDs with module prefixes in xref links
|
|
264
|
-
- Prefix self-managed-only links with `self-managed-only:`
|
|
265
|
-
- Remove duplicate links
|
|
266
|
-
|
|
267
|
-
Your workflow:
|
|
268
|
-
1. Always read the override file first to preserve existing overrides
|
|
269
|
-
2. Make your changes to the property overrides
|
|
270
|
-
3. Validate JSON syntax after changes
|
|
271
|
-
4. Use the `generate_property_docs` MCP tool to regenerate the documentation
|
|
272
|
-
- Set version parameter to the Redpanda version
|
|
273
|
-
- Set generate_partials to true
|
|
274
|
-
5. If the tool is not available, provide the user with the command:
|
|
275
|
-
`npx doc-tools generate property-docs --tag "<version>" --generate-partials --cloud-support --overrides docs-data/property-overrides.json`
|
|
276
|
-
6. Explain what was changed and what files will be regenerated
|
|
277
|
-
7. If generation fails, remind the user they need GITHUB_TOKEN set with cloudv2 repo access
|
|
278
|
-
|
|
279
|
-
Quality checks you must perform:
|
|
280
|
-
- Clean up any inappropriate content from descriptions (no enterprise includes, no cloud conditionals)
|
|
281
|
-
- Remove any overrides for deprecated properties
|
|
282
|
-
- Normalize all xref links to full Antora resource IDs with module prefixes
|
|
283
|
-
- Remove duplicate links from related_topics arrays
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Review documentation content for style guide compliance, terminology consistency, and voice/tone. Provides detailed, actionable feedback based on team standards.
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
arguments:
|
|
5
|
-
- name: content
|
|
6
|
-
description: The documentation content to review (can be a file path or raw content)
|
|
7
|
-
required: true
|
|
8
|
-
argumentFormat: content-append
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Style Review Prompt
|
|
12
|
-
|
|
13
|
-
You are reviewing documentation for the Redpanda documentation team.
|
|
14
|
-
|
|
15
|
-
## Your task
|
|
16
|
-
|
|
17
|
-
Review the provided content against our style guide and provide detailed, actionable feedback on:
|
|
18
|
-
|
|
19
|
-
1. **Style violations** with specific line/section references
|
|
20
|
-
2. **Terminology issues** (incorrect terms, inconsistent usage, deprecated terms)
|
|
21
|
-
3. **Voice and tone** feedback (too formal, too casual, inconsistent)
|
|
22
|
-
4. **Structural issues** (missing sections, poor organization, heading hierarchy)
|
|
23
|
-
5. **Formatting issues** (overuse of bold, em dashes, code formatting)
|
|
24
|
-
6. **Accessibility issues** (missing alt text, poor heading structure)
|
|
25
|
-
7. **Actionable fixes** for each issue found
|
|
26
|
-
|
|
27
|
-
## IMPORTANT: Fetch the style guide first
|
|
28
|
-
|
|
29
|
-
**Before you begin your review**, you MUST fetch the style guide resource:
|
|
30
|
-
|
|
31
|
-
1. Use the MCP `ReadResourceTool` or equivalent to read: `redpanda://style-guide`
|
|
32
|
-
2. This contains the complete Redpanda documentation style guide
|
|
33
|
-
3. You cannot properly review without referencing this resource
|
|
34
|
-
|
|
35
|
-
**If you cannot access the style guide resource, inform the user immediately.**
|
|
36
|
-
|
|
37
|
-
**Terminology sources:**
|
|
38
|
-
- GitHub: https://github.com/redpanda-data/docs/tree/shared/modules/terms/partials
|
|
39
|
-
- Published glossary: https://docs.redpanda.com/current/reference/glossary/
|
|
40
|
-
|
|
41
|
-
**Important**: Read the style guide before starting your review. Reference the official glossary for term definitions and usage.
|
|
42
|
-
|
|
43
|
-
## Key style principles to check
|
|
44
|
-
|
|
45
|
-
Based on Google Developer Documentation Style Guide:
|
|
46
|
-
- Present tense for describing how things work
|
|
47
|
-
- Active voice (not passive)
|
|
48
|
-
- Second person ("you" not "the user")
|
|
49
|
-
- **Sentence case for ALL headings except the title (H1)**
|
|
50
|
-
- Check that H2, H3, H4 only capitalize first word and proper nouns
|
|
51
|
-
- Example: "Configure TLS encryption" not "Configure TLS Encryption"
|
|
52
|
-
- Clear, conversational tone
|
|
53
|
-
|
|
54
|
-
Redpanda-specific preferences:
|
|
55
|
-
- Avoid overuse of bold text (only for UI elements and important warnings)
|
|
56
|
-
- Avoid em dashes (use parentheses or commas instead)
|
|
57
|
-
- Use realistic examples (not foo/bar placeholders)
|
|
58
|
-
- Proper product name capitalization (Redpanda, not RedPanda)
|
|
59
|
-
|
|
60
|
-
## Terminology to verify
|
|
61
|
-
|
|
62
|
-
Check for:
|
|
63
|
-
- Correct product names (Redpanda, Redpanda Cloud, Redpanda Console, Redpanda Connect)
|
|
64
|
-
- Lowercase concepts (topic, partition, broker, cluster, consumer, producer)
|
|
65
|
-
- Deprecated terms (master/slave, whitelist/blacklist, SSL)
|
|
66
|
-
- Consistent terminology throughout
|
|
67
|
-
|
|
68
|
-
## Output format
|
|
69
|
-
|
|
70
|
-
Provide your review in this structure:
|
|
71
|
-
|
|
72
|
-
### Critical issues (must fix before publishing)
|
|
73
|
-
|
|
74
|
-
For each critical issue:
|
|
75
|
-
- **Location**: [Section/heading or line reference]
|
|
76
|
-
- **Issue**: [What's wrong]
|
|
77
|
-
- **Fix**: [Specific correction to make]
|
|
78
|
-
- **Reason**: [Why it matters]
|
|
79
|
-
|
|
80
|
-
### Style suggestions (should consider)
|
|
81
|
-
|
|
82
|
-
For each suggestion:
|
|
83
|
-
- **Location**: [Section/heading or line reference]
|
|
84
|
-
- **Current**: [What it says now]
|
|
85
|
-
- **Suggested**: [Better way to phrase it]
|
|
86
|
-
- **Reason**: [Why the suggestion improves the content]
|
|
87
|
-
|
|
88
|
-
### Terminology issues
|
|
89
|
-
|
|
90
|
-
List all terminology problems:
|
|
91
|
-
- **Incorrect term**: [What was used]
|
|
92
|
-
- **Correct term**: [What should be used]
|
|
93
|
-
- **Location**: [Where it appears]
|
|
94
|
-
|
|
95
|
-
### Positive elements
|
|
96
|
-
|
|
97
|
-
What works well in this content:
|
|
98
|
-
- [List 2-3 things the author did well]
|
|
99
|
-
- [Acknowledge good examples, clear explanations, proper structure, etc.]
|
|
100
|
-
|
|
101
|
-
## Review guidelines
|
|
102
|
-
|
|
103
|
-
- Be constructive and specific
|
|
104
|
-
- Focus on high-impact improvements first
|
|
105
|
-
- Acknowledge what's working well
|
|
106
|
-
- Provide clear examples of fixes
|
|
107
|
-
- Reference specific style guide sections when relevant
|
|
108
|
-
- Don't just point out problems; explain why they matter
|
|
109
|
-
- Consider the reader's experience
|
|
110
|
-
|
|
111
|
-
## Example of good feedback
|
|
112
|
-
|
|
113
|
-
- Poor feedback: "This section has style issues."
|
|
114
|
-
|
|
115
|
-
- Good feedback:
|
|
116
|
-
**Location**: Introduction, paragraph 2
|
|
117
|
-
**Issue**: Uses passive voice - "Data is encrypted by Redpanda"
|
|
118
|
-
**Fix**: "Redpanda encrypts data at rest"
|
|
119
|
-
**Reason**: Active voice is clearer and more direct. Per our style guide, always prefer active voice for describing what software does.
|
|
120
|
-
|
|
121
|
-
**Location**: Section heading
|
|
122
|
-
**Issue**: Title case used for H2 heading - "Configure TLS Encryption"
|
|
123
|
-
**Fix**: "Configure TLS encryption"
|
|
124
|
-
**Reason**: All headings except the page title (H1) must use sentence case. Only capitalize the first word and proper nouns.
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
Please provide the content you'd like me to review.
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Comprehensive guide for updating Redpanda Connect connector reference documentation using the overrides system with $ref syntax. Explains the DRY approach for connector documentation.
|
|
3
|
-
version: 1.0.0
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Redpanda Connect Reference Documentation: LLM Prompt Guide
|
|
7
|
-
|
|
8
|
-
Redpanda Connect reference documentation is generated using a combination of:
|
|
9
|
-
|
|
10
|
-
- **Autogenerated content**: Produced from source code and schemas, providing a baseline of all available fields, types, and options.
|
|
11
|
-
- **Overrides**: A JSON file (`overrides.json`) that allows technical writers to override, deduplicate, clarify, and cross-reference field descriptions using a DRY (Don't Repeat Yourself) approach.
|
|
12
|
-
|
|
13
|
-
## Repository folder structure
|
|
14
|
-
|
|
15
|
-
- `/docs`: Built documentation site (HTML, assets, and static files for all Redpanda Connect docs versions)
|
|
16
|
-
- `/docs-data`: Source data for reference docs, including `overrides.json` and autogenerated JSON files
|
|
17
|
-
- `/modules`: Modular AsciiDoc content for guides, cookbooks, and reference topics
|
|
18
|
-
- `/package.json`, `README.adoc`, `antora.yml`: Project configuration and metadata
|
|
19
|
-
- `/.github`: GitHub workflows and Copilot custom instructions
|
|
20
|
-
|
|
21
|
-
## `$ref` syntax
|
|
22
|
-
|
|
23
|
-
- The `$ref` syntax is used in the overrides file to avoid repeating identical or similar descriptions for fields that appear in multiple places.
|
|
24
|
-
- Instead of duplicating a description, a field can reference a central definition using:
|
|
25
|
-
|
|
26
|
-
```json
|
|
27
|
-
"$ref": "#/definitions/field_name"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
- The referenced definition is found in the `definitions` section at the top of `overrides.json`.
|
|
31
|
-
- This approach ensures consistency, simplifies updates, and enables cross-referencing between related fields.
|
|
32
|
-
|
|
33
|
-
## How reference docs are structured
|
|
34
|
-
|
|
35
|
-
- **Autogenerated files** (such as `.adoc` or `.json`): List all fields, types, options, and sometimes examples, but may lack clarity, deduplication, or cross-references.
|
|
36
|
-
- **Overrides file** (`overrides.json`):
|
|
37
|
-
- Contains a `definitions` section for reusable field descriptions.
|
|
38
|
-
- Uses `$ref` to point fields in the autogenerated structure to these definitions.
|
|
39
|
-
- Allows for cross-references between related fields (such as "see also", "must be used with", etc.).
|
|
40
|
-
- Supports enhancements for clarity, user-friendliness, and technical accuracy.
|
|
41
|
-
|
|
42
|
-
## Example
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
"definitions": {
|
|
46
|
-
"client_certs": {
|
|
47
|
-
"description": "A list of client certificates for mutual TLS (mTLS) authentication. ... (full description here)"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"inputs": [
|
|
51
|
-
{
|
|
52
|
-
"name": "amqp_0_9",
|
|
53
|
-
"config": {
|
|
54
|
-
"children": [
|
|
55
|
-
{
|
|
56
|
-
"name": "tls",
|
|
57
|
-
"$ref": "#/definitions/tls",
|
|
58
|
-
"children": [
|
|
59
|
-
{
|
|
60
|
-
"name": "client_certs",
|
|
61
|
-
"$ref": "#/definitions/client_certs"
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Your workflow
|
|
72
|
-
|
|
73
|
-
When asked to improve or work with Redpanda Connect reference documentation:
|
|
74
|
-
|
|
75
|
-
1. **Read the overrides file**: Always start by reading `docs-data/overrides.json` to understand the current structure and definitions.
|
|
76
|
-
|
|
77
|
-
2. **Understand the `$ref` system**: Do not duplicate descriptions; suggest improvements to central definitions and update references as needed.
|
|
78
|
-
|
|
79
|
-
3. **Make improvements**:
|
|
80
|
-
- Suggest improvements for clarity, consistency, and user experience, especially in the `definitions` section
|
|
81
|
-
- Identify opportunities for new or improved cross-references between related fields
|
|
82
|
-
- Create new definition objects for missing references or enhance existing ones
|
|
83
|
-
- Recommend deduplication: If you find repeated inline descriptions, propose moving them to a definition and referencing them with `$ref`
|
|
84
|
-
|
|
85
|
-
4. **Update the overrides file**: Use the Edit or Write tool to update `docs-data/overrides.json` with your changes.
|
|
86
|
-
|
|
87
|
-
5. **Regenerate documentation**: Use the `generate_rpcn_connector_docs` MCP tool to regenerate the documentation with your changes.
|
|
88
|
-
- Default branch is "main"
|
|
89
|
-
- Can specify a different branch if needed
|
|
90
|
-
|
|
91
|
-
6. **Explain your changes**: Provide a clear explanation of what you changed and why.
|
|
92
|
-
|
|
93
|
-
## Quality checks you must perform
|
|
94
|
-
|
|
95
|
-
- **Preserve technical accuracy**: Ensure that all field descriptions are correct, actionable, and user-friendly
|
|
96
|
-
- **Maintain DRY principles**: Avoid unnecessary repetition in the documentation
|
|
97
|
-
- **Validate JSON syntax**: Ensure the overrides file remains valid JSON after your changes
|
|
98
|
-
- **Check $ref references**: Ensure all `$ref` references point to valid definitions
|
|
99
|
-
- **Maintain consistency**: Use consistent terminology and formatting across all descriptions
|
|
100
|
-
|
|
101
|
-
## Output expectations
|
|
102
|
-
|
|
103
|
-
When asked for improvements, your output should include:
|
|
104
|
-
|
|
105
|
-
- Suggested changes to the `definitions` section
|
|
106
|
-
- Proposed new or updated `$ref` references
|
|
107
|
-
- Rationale for changes (clarity, deduplication, cross-linking, etc.)
|
|
108
|
-
- Any additional user experience or technical writing enhancements
|
|
109
|
-
- Summary of what will be regenerated
|
|
110
|
-
|
|
111
|
-
## Summary for LLMs
|
|
112
|
-
|
|
113
|
-
When working with Redpanda Connect reference documentation:
|
|
114
|
-
|
|
115
|
-
1. Read `docs-data/overrides.json` first to understand the current structure
|
|
116
|
-
2. Make your improvements to the definitions and $ref references
|
|
117
|
-
3. Update the overrides file using Edit or Write tool
|
|
118
|
-
4. Use the `generate_rpcn_connector_docs` MCP tool to regenerate documentation
|
|
119
|
-
5. Explain what was changed and why
|
|
120
|
-
|
|
121
|
-
Critical requirements:
|
|
122
|
-
- Always respect the `$ref` system - don't duplicate descriptions
|
|
123
|
-
- Maintain DRY principles throughout
|
|
124
|
-
- Validate JSON syntax after changes
|
|
125
|
-
- Preserve technical accuracy
|
|
126
|
-
- Ensure all `$ref` references are valid
|