Skip to content

Commit 8dcb557

Browse files
committed
Add CodeRabbit documentation review prompts for docs, sdk_users, and sdk_developers
- General docs guidance with correctness, clarity, completeness, consistency, and navigation priorities - SDK users guidance focused on runnable examples, step-by-step clarity, and zero assumptions - SDK developers guidance emphasizing workflow accuracy, edge cases, and training progression - Edge case checks: external link versioning, deprecated patterns, audience signposts, platform gotchas, and standalone training modules - Audience alignment and explicit next steps for mixed-audience pages and training Resolves #1236 Signed-off-by: Mounil <mounilkankhara@gmail.com>
1 parent e53acb1 commit 8dcb557

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed

.coderabbit.yaml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,149 @@ reviews:
168168
- When tests fail in CI, developers should immediately understand what broke.
169169
- Redundant setup code should be refactored, but clarity trumps abstraction.
170170
171+
# --- DOCUMENTATION REVIEW INSTRUCTIONS ---
172+
- path: "docs/**"
173+
instructions: |
174+
You are reviewing documentation for the Hiero Python SDK. These pages serve both SDK users and SDK developers.
175+
176+
Priority 1 - Correctness (code, commands, links, facts)
177+
1. Verify code snippets conceptually run and match the current SDK API, patterns, and file layout.
178+
2. Check shell commands, config examples, and workflow steps against the actual project tooling and CI setup.
179+
3. Validate URLs and cross-references where possible; flag clearly broken or misleading links.
180+
4. For external links, ensure they remain relevant and don't introduce version mismatches with our SDK.
181+
5. Flag references to deprecated SDK patterns without noting the modern alternative.
182+
183+
Priority 2 - Clarity and comprehensibility
184+
1. Ensure each page states its purpose and expected outcome early.
185+
2. Prefer concrete, step-wise explanations over vague descriptions.
186+
3. Highlight missing pre-requisites or hidden assumptions that would block a reader.
187+
188+
Priority 3 - Completeness and usefulness
189+
1. Identify critical gaps that prevent a reader from completing the described task.
190+
2. For larger missing sections or conceptual overviews, suggest filing a follow-up issue instead of blocking the PR.
191+
3. Encourage adding minimal examples or links when they would unlock understanding.
192+
193+
Priority 4 - Consistency with existing docs
194+
1. Encourage consistent terminology with the SDK, examples, and tests (e.g. operator, client, network, transaction lifecycle).
195+
2. Suggest aligning naming and structure with existing docs when inconsistencies could confuse readers.
196+
3. Avoid bikeshedding tone or style when meaning is already clear.
197+
198+
Priority 5 - Accessibility and navigation
199+
1. Check headings and sections form a logical reading path.
200+
2. Encourage scannable sections, short paragraphs, and descriptive headings where it materially aids navigation.
201+
202+
Audience alignment
203+
- Confirm each page makes clear which audience it serves (SDK user, SDK developer, or both) and stays focused on their goals.
204+
- Flag mixed guidance that lacks transitions or pointers to the audience-specific sections.
205+
- For pages serving both audiences, suggest clear signposts (e.g., "if you're an SDK user, skip to X; if you're a developer, continue here").
206+
207+
PHILOSOPHY
208+
- Treat documentation as work-in-progress: optimize for correctness and clarity over perfection.
209+
- Prefer incremental improvements and follow-up issues for bigger restructures or training gaps.
210+
- Keep feedback concise, action-oriented, and focused on what most improves reader success.
211+
212+
CRITICAL PRINCIPLES
213+
- Flag incorrect or outdated code, commands, or links.
214+
- Flag steps that cannot be followed successfully as written.
215+
- Do not request large-scale restructures unless current structure actively blocks understanding.
216+
217+
AVOID
218+
- Avoid lint-style feedback on Markdown formatting or minor wording when meaning is already clear.
219+
- Avoid proposing new conventions without clear benefit or alignment with existing docs.
220+
- Avoid turning every high-level gap into a blocker; prefer suggesting an issue instead.
221+
222+
- path: "docs/sdk_users/**"
223+
instructions: |
224+
These documents are for SDK users who want to USE the Hiero Python SDK quickly and correctly, not learn internals or project workflow.
225+
226+
Priority 1 - Code snippet correctness and completeness
227+
1. Ensure examples are copy-pasteable and complete enough to run (imports, client/operator setup, core logic).
228+
2. Verify import paths and APIs follow current patterns, e.g. `from hiero_sdk_python... import ...`, and agree with `examples/`.
229+
3. Encourage minimal, realistic error handling where it prevents user confusion, without overwhelming the reader.
230+
4. Highlight platform-specific gotchas (Windows vs POSIX, Python version constraints, virtual environment steps) that could block users.
231+
232+
Priority 2 - Step-by-step clarity
233+
1. Check that instructions form an explicit, ordered sequence from setup to successful result.
234+
2. Flag vague phrases (e.g. "just configure X") and suggest concrete, actionable steps or links.
235+
3. Ensure required environment variables, keys, and network choices are clearly stated or linked.
236+
4. Verify prerequisites (e.g., `NETWORK`, operator credentials, .env defaults) align with our current quick-start guidance.
237+
5. Highlight edge cases that could cause confusion or errors, such as handling multiple accounts or tokens.
238+
239+
Priority 3 - No hidden assumptions about SDK knowledge
240+
1. Assume zero prior knowledge of this SDK and minimal Hedera background.
241+
2. Avoid requiring knowledge of repository layout, tests, or contribution workflow.
242+
3. Encourage brief explanations of key concepts only as needed to complete the task.
243+
244+
Priority 4 - Actionable, unambiguous instructions
245+
1. Prefer specific commands, parameters, and expected outputs over high-level advice.
246+
2. Flag ambiguous wording that could lead to multiple interpretations or errors.
247+
3. Suggest adding small clarifications instead of large rewrites when only a step or sentence is missing.
248+
249+
Priority 5 - Real-world applicability
250+
1. Encourage examples that reflect realistic use cases (transfers, tokens, contracts), not only trivial snippets.
251+
2. Suggest cross-linking to `examples/` where it directly helps the user achieve a goal.
252+
253+
PHILOSOPHY
254+
- Time-to-first-success is the main metric: make it easy for a new user to send a working transaction.
255+
- Keep explanations concrete, self-contained, and immediately actionable.
256+
- Prefer small, focused improvements that make the happy path smoother.
257+
258+
CRITICAL PRINCIPLES
259+
- Do not assume any knowledge of how the SDK is implemented or how this repo is structured.
260+
- Flag incomplete examples (missing imports, initialization, or essential parameters).
261+
- Ensure examples match the current API and example patterns in this repository.
262+
263+
AVOID
264+
- Avoid introducing contribution, CI, or workflow details; link to developer docs instead if truly needed.
265+
- Avoid overloading user-facing docs with deep architectural discussion.
266+
- Avoid suggesting structural changes that do not materially improve the user's ability to complete tasks.
267+
268+
- path: "docs/sdk_developers/**"
269+
instructions: |
270+
These documents are for SDK developers and contributors, including `docs/sdk_developers/training/**`. Assume mixed experience: some readers are new to the codebase, others are experienced.
271+
272+
Priority 1 - Accuracy of workflows and commands
273+
1. Ensure contribution, branching, rebasing, signing (DCO, GPG), CI, linting, and testing instructions match the actual repo configuration.
274+
2. Verify `git` and GitHub flows agree with CONTRIBUTING.md and current project practice.
275+
3. Flag outdated references to scripts, make targets, directories, or configuration files.
276+
4. Ensure automation references (assignment guards, dry-run toggles, required permissions) match the latest workflow behavior.
277+
278+
Priority 2 - Coverage of edge cases and gotchas
279+
1. Encourage documentation of common pitfalls (merge conflicts, flaky tests, environment issues) when they affect contributors often.
280+
2. Suggest referencing real examples (PRs, tests, workflows) when they clarify tricky behavior.
281+
3. Keep warnings concrete and actionable rather than generic.
282+
283+
Priority 3 - Alignment with codebase conventions
284+
1. Check terminology, naming, and patterns (e.g. transaction lifecycle, Executable usage, retry logic) against the actual code.
285+
2. Encourage examples that reflect how the SDK is structured and tested today.
286+
3. Flag inconsistencies between docs, examples, and tests that could mislead contributors.
287+
288+
Priority 4 - Progressive learning flow (especially training/)
289+
1. For training docs, ensure a logical progression from setup → small change → tests → advanced topics.
290+
2. Check that numbering, cross-links, and prerequisites between training files are coherent.
291+
3. Highlight gaps where a new contributor would not know what to do next.
292+
4. Encourage explicit "next steps" or pointers to subsequent modules when a lesson ends.
293+
5. For each training module, confirm whether it can stand alone or silently assumes knowledge from earlier modules.
294+
295+
Priority 5 - References to source code and examples
296+
1. Encourage deep links to relevant modules, tests, and examples when they serve as canonical patterns.
297+
2. Ensure file paths and symbol names referenced in docs actually exist and are up-to-date.
298+
299+
PHILOSOPHY
300+
- Treat these docs as a training ground for future maintainers and regular contributors.
301+
- Help readers move from “I cloned the repo” to “I can safely extend and debug the SDK”.
302+
- Balance approachability for beginners with enough depth for experts looking for specific architectural details.
303+
304+
CRITICAL PRINCIPLES
305+
- Verify that all workflow and tooling instructions reflect the current CI, linting, testing, and release practices.
306+
- Flag inaccurate references to internal architecture or modules (e.g. Executable, transaction pipeline, retry behavior).
307+
- Ensure training materials are not misleading or internally contradictory.
308+
309+
AVOID
310+
- Avoid demanding large structural rewrites of the training program in a single PR; prefer suggesting follow-up issues.
311+
- Avoid generic documentation advice that does not consider this repository's actual patterns.
312+
- Avoid blocking changes for minor stylistic issues when the technical guidance is sound.
313+
171314
# --- CUSTOM INSTRUCTIONS FOR .GITHUB DIRECTORY ---
172315
- path: ".github/workflows/**/*"
173316
instructions: |

0 commit comments

Comments
 (0)