@redpanda-data/docs-extensions-and-macros 4.12.6 → 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.
Files changed (77) hide show
  1. package/README.adoc +33 -1064
  2. package/bin/doc-tools-mcp.js +720 -0
  3. package/bin/doc-tools.js +1050 -50
  4. package/bin/mcp-tools/antora.js +153 -0
  5. package/bin/mcp-tools/cache.js +89 -0
  6. package/bin/mcp-tools/cloud-regions.js +127 -0
  7. package/bin/mcp-tools/content-review.js +196 -0
  8. package/bin/mcp-tools/crd-docs.js +153 -0
  9. package/bin/mcp-tools/frontmatter.js +138 -0
  10. package/bin/mcp-tools/generated-docs-review.js +887 -0
  11. package/bin/mcp-tools/helm-docs.js +152 -0
  12. package/bin/mcp-tools/index.js +245 -0
  13. package/bin/mcp-tools/job-queue.js +468 -0
  14. package/bin/mcp-tools/mcp-validation.js +266 -0
  15. package/bin/mcp-tools/metrics-docs.js +146 -0
  16. package/bin/mcp-tools/openapi.js +174 -0
  17. package/bin/mcp-tools/prompt-discovery.js +283 -0
  18. package/bin/mcp-tools/property-docs.js +157 -0
  19. package/bin/mcp-tools/rpcn-docs.js +113 -0
  20. package/bin/mcp-tools/rpk-docs.js +141 -0
  21. package/bin/mcp-tools/telemetry.js +211 -0
  22. package/bin/mcp-tools/utils.js +131 -0
  23. package/bin/mcp-tools/versions.js +168 -0
  24. package/cli-utils/convert-doc-links.js +1 -1
  25. package/cli-utils/github-token.js +58 -0
  26. package/cli-utils/self-managed-docs-branch.js +2 -2
  27. package/cli-utils/setup-mcp.js +313 -0
  28. package/docker-compose/25.1/transactions.md +1 -1
  29. package/docker-compose/transactions.md +1 -1
  30. package/extensions/DEVELOPMENT.adoc +464 -0
  31. package/extensions/README.adoc +124 -0
  32. package/extensions/REFERENCE.adoc +768 -0
  33. package/extensions/USER_GUIDE.adoc +339 -0
  34. package/extensions/generate-rp-connect-info.js +3 -4
  35. package/extensions/version-fetcher/get-latest-console-version.js +38 -27
  36. package/extensions/version-fetcher/get-latest-redpanda-version.js +65 -54
  37. package/extensions/version-fetcher/retry-util.js +88 -0
  38. package/extensions/version-fetcher/set-latest-version.js +6 -3
  39. package/macros/DEVELOPMENT.adoc +377 -0
  40. package/macros/README.adoc +105 -0
  41. package/macros/REFERENCE.adoc +222 -0
  42. package/macros/USER_GUIDE.adoc +220 -0
  43. package/macros/rp-connect-components.js +6 -6
  44. package/mcp/CLI_INTERFACE.adoc +384 -0
  45. package/mcp/COSTS.adoc +167 -0
  46. package/mcp/DEVELOPMENT.adoc +726 -0
  47. package/mcp/README.adoc +172 -0
  48. package/mcp/USER_GUIDE.adoc +1392 -0
  49. package/mcp/WRITER_EXTENSION_GUIDE.adoc +814 -0
  50. package/mcp/prompts/README.adoc +183 -0
  51. package/mcp/prompts/property-docs-guide.md +283 -0
  52. package/mcp/prompts/review-for-style.md +128 -0
  53. package/mcp/prompts/rpcn-connector-docs-guide.md +126 -0
  54. package/mcp/prompts/write-new-guide.md +222 -0
  55. package/mcp/team-standards/style-guide.md +321 -0
  56. package/mcp/templates/README.adoc +212 -0
  57. package/mcp/templates/prompt-review-template.md +80 -0
  58. package/mcp/templates/prompt-write-template.md +110 -0
  59. package/mcp/templates/resource-template.md +76 -0
  60. package/package.json +16 -5
  61. package/tools/bundle-openapi.js +20 -10
  62. package/tools/cloud-regions/generate-cloud-regions.js +1 -1
  63. package/tools/fetch-from-github.js +18 -4
  64. package/tools/gen-rpk-ascii.py +3 -1
  65. package/tools/generate-cli-docs.js +325 -0
  66. package/tools/get-console-version.js +4 -2
  67. package/tools/get-redpanda-version.js +4 -2
  68. package/tools/metrics/metrics.py +19 -7
  69. package/tools/property-extractor/Makefile +7 -1
  70. package/tools/property-extractor/cloud_config.py +4 -4
  71. package/tools/property-extractor/constant_resolver.py +11 -11
  72. package/tools/property-extractor/property_extractor.py +18 -16
  73. package/tools/property-extractor/topic_property_extractor.py +2 -2
  74. package/tools/property-extractor/transformers.py +7 -7
  75. package/tools/property-extractor/type_definition_extractor.py +4 -4
  76. package/tools/redpanda-connect/README.adoc +1 -1
  77. package/tools/redpanda-connect/generate-rpcn-connector-docs.js +5 -3
package/mcp/COSTS.adoc ADDED
@@ -0,0 +1,167 @@
1
+ = MCP Tool Costs
2
+ :description: Cost reference for Redpanda documentation MCP server tools
3
+
4
+ The typical cost range is $0.017 - $0.190 per operation.
5
+
6
+ Most operations cost between $0.03 - $0.08. Content review operations range from $0.017 (simple terminology checks) to $0.19 (comprehensive generated docs reviews).
7
+
8
+ == Cost factors
9
+
10
+ You control costs through:
11
+
12
+ * *Model selection*: Choose the appropriate model when starting Claude Code (Haiku for simple tasks, Sonnet for most work, Opus for complex reasoning)
13
+ * *Prompt caching*: The MCP server caches style guides and frequently-used content, reducing costs for repeated operations
14
+ * *Content size*: Larger documents and more comprehensive reviews increase costs proportionally
15
+
16
+ == Cost by tool
17
+
18
+ [cols="2m,4a,1a"]
19
+ |===
20
+ |Tool |Prompt |Cost (USD)
21
+
22
+ |get_antora_structure
23
+ |Get the Antora structure
24
+ |0.055
25
+
26
+ |get_redpanda_version
27
+ |Get the latest Redpanda version
28
+ |0.033
29
+
30
+ |get_console_version
31
+ |Get the latest Redpanda Console version
32
+ |0.033
33
+
34
+ |generate_property_docs
35
+ |Generate property docs for tag v25.3.1
36
+ |0.076
37
+
38
+ |generate_metrics_docs
39
+ |Generate metrics docs for tag v25.3.1
40
+ |0.072
41
+
42
+ |generate_rpk_docs
43
+ |Generate RPK docs for tag v25.3.1
44
+ |0.034
45
+
46
+ |generate_rpcn_connector_docs
47
+ |Generate Redpanda Connect connector docs
48
+ |0.072
49
+
50
+ |generate_helm_docs
51
+ |Generate Helm docs for tag v25.1.2
52
+ |0.052
53
+
54
+ |generate_crd_docs
55
+ |Generate CRD docs for tag operator/v25.3.1
56
+ |0.084
57
+
58
+ |generate_bundle_openapi
59
+ |Bundle OpenAPI for tag v25.3.1
60
+ |0.068
61
+
62
+ |generate_cloud_regions
63
+ |Generate cloud regions table
64
+ |0.051
65
+
66
+ |review_generated_docs
67
+ |Review the autogenerated metrics docs
68
+ |0.104 - 0.190
69
+
70
+ |review_content (terminology)
71
+ |Check terminology in a sentence
72
+ |0.017
73
+
74
+ |review_content (style)
75
+ |Review content for style guide compliance
76
+ |0.065
77
+
78
+ |review_content (comprehensive)
79
+ |Comprehensive content review
80
+ |0.062
81
+ |===
82
+
83
+ == How to measure costs
84
+
85
+ To track costs during testing:
86
+
87
+ . Run a single MCP tool operation.
88
+ . Use the `/cost` command to view accumulated costs.
89
+ . Record the cost for that operation.
90
+ . Restart Claude Code to reset costs for the next measurement.
91
+
92
+ Example:
93
+
94
+ [source,bash]
95
+ ----
96
+ # In Claude Code CLI
97
+ > Get the latest Redpanda version
98
+ > /cost
99
+ ----
100
+
101
+ The `/cost` command shows:
102
+
103
+ * Total cost for the session
104
+ * Duration (API time and wall time)
105
+ * Code changes made
106
+ * Usage breakdown by model (input/output tokens, cache usage)
107
+
108
+ === API time and wall time
109
+
110
+ *API time (API duration)*:: The total time the Claude API spent actively processing and generating responses. This is what you're billed for.
111
+
112
+ *Wall time (wall clock time)*:: The total elapsed time from start to finish of your session. This includes API processing time, network latency, time between requests, and time spent reading/thinking.
113
+
114
+ For example:
115
+ ----
116
+ Total duration (API): 52s
117
+ Total duration (wall): 3m 31s
118
+ ----
119
+
120
+ In this case:
121
+
122
+ * API used 52 seconds of compute time (billable)
123
+ * The session took 3 minutes 31 seconds total (user experience)
124
+ * The 159-second difference includes network time, reading responses, and pauses between operations
125
+
126
+ == Choosing the right model
127
+
128
+ The model you use significantly affects costs. Start Claude Code with the appropriate model for your work:
129
+
130
+ [source,bash]
131
+ ----
132
+ # Haiku - Fast and cheap (best for simple tasks)
133
+ claude --model haiku
134
+
135
+ # Sonnet - Balanced (default, good for most work)
136
+ claude --model sonnet
137
+
138
+ # Opus - Most capable (use for complex reasoning)
139
+ claude --model opus
140
+ ----
141
+
142
+ === Model recommendations by task
143
+
144
+ *Use Haiku for:*
145
+
146
+ * Generating documentation from structured data (properties, metrics, RPK commands)
147
+ * Simple content reviews focused on terminology or style
148
+ * Quick operations that don't require deep reasoning
149
+
150
+ *Use Sonnet for:*
151
+
152
+ * Comprehensive content reviews
153
+ * Working on complex documentation tasks
154
+ * Most day-to-day documentation work
155
+
156
+ *Use Opus for:*
157
+
158
+ * Extremely complex reasoning tasks
159
+ * Architectural decisions about documentation structure
160
+ * Currently not needed for most documentation tasks
161
+
162
+ == Cost optimization tips
163
+
164
+ * *Choose the right model*: Use Haiku for simple generation tasks, Sonnet for most work
165
+ * *Leverage caching*: The MCP server caches style guides and prompts - repeated operations in the same session are cheaper
166
+ * *Batch similar work*: Do multiple reviews or generations in one session to maximize cache benefits
167
+ * *Use focused reviews*: For content review, use `focus: "terminology"` or `focus: "style"` instead of `focus: "comprehensive"` when you only need specific feedback