Skip to content

new runbooks prompt #829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

new runbooks prompt #829

wants to merge 5 commits into from

Conversation

mainred
Copy link
Collaborator

@mainred mainred commented Aug 12, 2025

This PR provides a prompt for the user the generate the runbook. The prompt defined the Goal, Workflow , Synthesize and Remediation of a runbook.
I did not automate the generating the runbook by extending the holmes CLI to have holmes runbook gnerate considering runbook generation might requires multiple iterations and runbook source is dynamic.

@mainred mainred force-pushed the runbook-format-prompt branch from dfaddcd to 55c49ab Compare August 12, 2025 12:10
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Walkthrough

Adds documentation under holmes/plugins/runbooks: updates README.md with a “Generating Runbooks” section and adds CLAUDE.md, a machine-readable runbook template plus catalog registration and file-naming guidance. No code, API, or exported/public-entity changes.

Changes

Cohort / File(s) Summary
Runbooks documentation
holmes/plugins/runbooks/README.md, holmes/plugins/runbooks/CLAUDE.md
README.md: adds "Generating Runbooks" describing a standardized runbook prompt and structure (Goal, Workflow, Synthesize Findings, Recommended Remediation Steps) with example usage. CLAUDE.md: new file defining a machine-readable runbook template, step/verification structure, file/folder naming conventions, and instructions to register entries in holmes/plugins/runbooks/catalog.json. Documentation-only; no code or API changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • arikalon1
  • moshemorad

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bd9ab3 and 45185a1.

📒 Files selected for processing (1)
  • holmes/plugins/runbooks/CLAUDE.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • holmes/plugins/runbooks/CLAUDE.md
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch runbook-format-prompt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
holmes/plugins/runbooks/runbook-format.prompt.md (1)

1-37: Location and format violate prompt placement conventions. Move under prompts/ as a .jinja2 template.

Org standard: “Prompts must be located at holmes/plugins/prompts/{name}.jinja2.” This file lives under runbooks/ and uses .prompt.md. If this is meant for programmatic use, relocate and convert to .jinja2. If it’s pure documentation, clarify that in README and consider keeping a canonical .jinja2 copy for tooling.

Proposed actions:

  • Move to holmes/plugins/prompts/runbook-format.jinja2 and keep a documentation-friendly copy or a link from runbooks/.
  • Update README references accordingly.

Would you like me to generate the .jinja2 version with placeholders and a minimal include-able schema?

🧹 Nitpick comments (4)
holmes/plugins/runbooks/runbook-format.prompt.md (1)

5-10: Add prerequisites/assumptions to the Goal section.

Call out access requirements, environment preconditions, and safety boundaries upfront for safer runs.

Apply this diff:

 ## Goal
 - **Primary Objective:** Clearly define the specific category of issues this runbook addresses (e.g., "diagnose network connectivity problems", "troubleshoot pod startup failures", "investigate performance degradation").
 - **Scope:** Specify the environment, technology stack, or system components covered by this runbook.
 - **Agent Mandate:** Explicitly state that the AI agent must follow the workflow steps sequentially and systematically without deviation to ensure consistent, thorough troubleshooting.
 - **Expected Outcome:** Define what successful completion of this runbook should achieve (root cause identification, issue resolution, or escalation criteria).
+- **Prerequisites & Assumptions:** Enumerate access credentials, permissions, cluster contexts, and any non-destructive constraints.
holmes/plugins/runbooks/README.md (3)

24-27: Align references with prompt placement convention.

If you adopt the prompts/ .jinja2 standard, update this link to point to holmes/plugins/prompts/runbook-format.jinja2. If you keep this file as documentation, state that the canonical template for automation resides under prompts/.

Suggested edit after relocating:

-## Generating Runbooks
+## Generating Runbooks
@@
-To ensure all runbooks follow a consistent format and improve troubleshooting accuracy, contributors should use the standardized [runbook format prompt](runbook-format.prompt.md) when creating new runbooks.
+To ensure all runbooks follow a consistent format and improve troubleshooting accuracy, contributors should use the standardized [runbook format prompt](../prompts/runbook-format.jinja2) when creating new runbooks. A documentation copy is available at [runbook-format.prompt.md](runbook-format.prompt.md).

30-31: Fix filename reference: use the actual template name.

The file is named runbook-format.prompt.md (or runbook-format.jinja2 after relocation), not prompt.md.

Apply this diff:

-1. **Start with the Template**: Use `prompt.md` as your guide when creating new runbooks
+1. **Start with the Template**: Use `runbook-format.prompt.md` (or `runbook-format.jinja2` if using the canonical template) as your guide when creating new runbooks

46-46: Clarify where generated runbooks should be stored and how to test them.

Provide concrete next steps to integrate new runbooks into the project.

Apply this diff:

-When creating a runbook for a new issue category (e.g., storage problems, authentication failures), provide the issue description to an LLM along with the prompt template to generate a properly formatted runbook that follows the established patterns.
+When creating a runbook for a new issue category (e.g., storage problems, authentication failures), provide the issue description to an LLM along with the prompt template to generate a properly formatted runbook that follows the established patterns. After generation:
+1) Store structured runbooks under this directory following existing naming conventions, or add markdown runbooks to the catalog and update `catalog.json`.
+2) Validate the YAML schema and step fields.
+3) Test with `holmes investigate` to ensure the agent can execute the steps end-to-end.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0608ca and 55c49ab.

📒 Files selected for processing (2)
  • holmes/plugins/runbooks/README.md (1 hunks)
  • holmes/plugins/runbooks/runbook-format.prompt.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-10T06:02:54.321Z
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-10T06:02:54.321Z
Learning: Applies to holmes/plugins/prompts/**/*.jinja2 : Prompts must be located at holmes/plugins/prompts/{name}.jinja2

Applied to files:

  • holmes/plugins/runbooks/runbook-format.prompt.md
🔇 Additional comments (1)
holmes/plugins/runbooks/README.md (1)

37-43: Benefits section looks good and aligns with goals.

Clear articulation of consistency, agent compatibility, and maintainability benefits.

@nilo19
Copy link
Contributor

nilo19 commented Aug 13, 2025

may add a reference to claude.md as well.

@mainred
Copy link
Collaborator Author

mainred commented Aug 13, 2025

may add a reference to claude.md as well.

Thanks. Since claude prompt is already used in holmegpt repo, so instead of a making a generic prompt markdown for different coding agent, I use claude.md instead.

@mainred mainred force-pushed the runbook-format-prompt branch from 9bd9ab3 to 45185a1 Compare August 13, 2025 09:57
Copy link
Contributor

Results of HolmesGPT evals

  • ask_holmes: 22/40 test cases were successful, 0 regressions, 2 skipped, 16 mock failures
Test suite Test case Status
ask 01_how_many_pods
ask 02_what_is_wrong_with_pod 🔧
ask 03_what_is_the_command_to_port_forward 🔧
ask 04_related_k8s_events ↪️
ask 05_image_version 🔧
ask 09_crashpod
ask 10_image_pull_backoff 🔧
ask 11_init_containers
ask 14_pending_resources
ask 15_failed_readiness_probe 🔧
ask 17_oom_kill
ask 18_crash_looping_v2
ask 19_detect_missing_app_details 🔧
ask 20_long_log_file_search 🔧
ask 24_misconfigured_pvc 🔧
ask 28_permissions_error
ask 29_events_from_alert_manager ↪️
ask 39_failed_toolset 🔧
ask 41_setup_argo
ask 42_dns_issues_steps_new_tools 🔧
ask 43_current_datetime_from_prompt
ask 45_fetch_deployment_logs_simple
ask 51_logs_summarize_errors 🔧
ask 53_logs_find_term
ask 54_not_truncated_when_getting_pods 🔧
ask 59_label_based_counting
ask 60_count_less_than 🔧
ask 61_exact_match_counting
ask 63_fetch_error_logs_no_errors
ask 79_configmap_mount_issue 🔧
ask 83_secret_not_found 🔧
ask 86_configmap_like_but_secret 🔧
ask 89_runbook_missing_cloudwatch
ask 93_calling_datadog
ask 93_calling_datadog
ask 93_calling_datadog
ask 97_logs_clarification_needed
ask 110_k8s_events_image_pull 🔧
ask 24a_misconfigured_pvc_basic 🔧
ask 13a_pending_node_selector_basic 🔧

Legend

  • ✅ the test was successful
  • ↪️ the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🔧 the test failed due to mock data issues (not a code regression)
  • ❌ the test failed and should be fixed before merging the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants