Skip to content

feat: Add devops-log-troubleshooter template [agentkit-challenge]#274

Open
Adar5 wants to merge 4 commits into
Lamatic:mainfrom
Adar5:feat/devops-log-troubleshooter
Open

feat: Add devops-log-troubleshooter template [agentkit-challenge]#274
Adar5 wants to merge 4 commits into
Lamatic:mainfrom
Adar5:feat/devops-log-troubleshooter

Conversation

@Adar5

@Adar5 Adar5 commented Jul 20, 2026

Copy link
Copy Markdown

Description

This PR introduces the devops-log-troubleshooter template, a RAG-powered agent designed to ingest CI/CD error logs and generate structured Markdown troubleshooting runbooks.

Motivation / Use Case:
Diagnosing complex container orchestration and deployment failures can be time-consuming. This agent automates the process by vectorizing raw backend server logs and retrieving the correct documentation. It is highly effective for debugging deployment architectures involving Docker containers and Nginx reverse proxies, instantly translating upstream resolution failures into actionable Kubernetes service fixes.

Changes Included

  • Added lamatic.config.ts with template metadata and repository links.
  • Exported the self-contained flow into flows/abrasive-lighter.ts.
  • Externalized system and user prompts into the prompts/ directory via @reference paths.
  • Included agent.md, README.md, and constitutions/default.md for setup and identity guidelines.

Verification

  • Folder is uniquely named kits/devops-log-troubleshooter/
  • No sensitive API keys or real credentials are committed.
  • All @reference paths correctly resolve to the generated files.
  • Added kits/devops-log-troubleshooter/ kit template, including:
    • lamatic.config.ts: kit metadata and a single required step (devops-log-troubleshooter) with placeholder deploy/github links.
    • flows/devops-log-troubleshooter.ts: end-to-end flow wiring trigger → RAG retrieval → LLM generation → API response.
    • prompts/:
      • abrasive-lighter_llmnode-716_system_0.md, abrasive-lighter_llmnode-716_user_1.md (strict Markdown runbook structure + safety/untrusted-log handling).
      • abrasive-lighter_ragnode-258_system_0.md, abrasive-lighter_ragnode-258_user_1.md (RAG-side instruction + <untrusted_logs> rendering).
    • model-configs/:
      • abrasive-lighter_llmnode-716_generative-model-name.ts (Gemini text generation config).
      • abrasive-lighter_ragnode-258_embedding-model-name.ts (Gemini embeddings config).
      • abrasive-lighter_ragnode-258_generative-model-name.ts (Gemini generator config for the RAG node).
    • agent.md: agent overview/purpose, flow description, and guardrails (no destructive commands, treat logs as adversarial, etc.).
    • constitutions/default.md: safety/data-handling constitution (PII handling, prompt-injection refusal, refusal to fabricate when uncertain, tone rules).
    • README.md: setup + usage instructions for submitting CI/CD logs and receiving a troubleshooting runbook.
    • .gitignore: ignores Lamatic .lamatic/, node_modules/, and .env / .env.local.
  • Flow high-level behavior (flows/devops-log-troubleshooter.ts):
    • Trigger node (triggerNode_1, type: triggerNode): accepts API request fields build_logs and environment via advance_schema.
    • RAG retrieval node (RAGNode_258, type: dynamicNode): queries devopsTroubleshootingDb using {{triggerNode_1.output.build_logs}} with the selected embedding/generative model configs and the RAG prompt templates.
    • LLM generation node (LLMNode_716, type: dynamicNode): generates the final response using the LLM system/user prompt templates and the selected generative model config.
    • Response node (responseNode_triggerNode_1, type: responseNode): returns JSON with status: "success" and runbook mapped from {{LLMNode_716.output.generatedResponse}}.
    • Edges: defaultEdge connects trigger → RAG → LLM, and responseEdge connects trigger → response.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Adar5, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45719929-5c1b-44d8-9826-2f7909d004c0

📥 Commits

Reviewing files that changed from the base of the PR and between 952a2be and 3b92014.

📒 Files selected for processing (1)
  • kits/devops-log-troubleshooter/README.md

Walkthrough

Changes

Adds the DevOps Log Troubleshooter Lamatic kit, including metadata, safety guidance, Gemini model configurations, prompt templates, and a trigger-to-RAG-to-LLM response flow for CI/CD logs.

DevOps Log Troubleshooter Kit

Layer / File(s) Summary
Kit metadata and operating rules
kits/devops-log-troubleshooter/lamatic.config.ts, kits/devops-log-troubleshooter/constitutions/default.md, kits/devops-log-troubleshooter/README.md, kits/devops-log-troubleshooter/agent.md, kits/devops-log-troubleshooter/.gitignore
Defines kit metadata, constitution rules, setup and usage documentation, agent behavior, and ignored local files.
Model and prompt assets
kits/devops-log-troubleshooter/model-configs/*, kits/devops-log-troubleshooter/prompts/*
Configures Gemini embedding and generation models and supplies retrieval and troubleshooting prompt templates.
Troubleshooting flow orchestration
kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts
Defines flow inputs, references, trigger/RAG/LLM/response nodes, graph edges, and the default export.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the feature, but it does not follow the required PR Checklist template or include several required checklist items. Rewrite the PR description in the checklist format and add the missing sections for contribution type, file structure, validation, README coverage, and unrelated-file confirmation.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and clearly identifies the new devops-log-troubleshooter template.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/devops-log-troubleshooter

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass
Flow asset references valid ✅ Pass

⚠️ Warnings

  • lamatic.config.ts in kits/devops-log-troubleshooter — links.github should point to kits/devops-log-troubleshooter

🎉 All checks passed! This contribution follows the AgentKit structure.

@github-actions

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-20T07:35:21Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/devops-log-troubleshooter/agent.md`:
- Line 3: Replace the TODO in the agent.md content with the LLM-generated agent
identity and capability documentation, including the agent overview, purpose,
operational flow descriptions, guardrails, and integration reference. Use the
existing agent’s role and capabilities as the source of truth, and remove the
placeholder once all required sections are documented.

In `@kits/devops-log-troubleshooter/flows/abrasive-lighter.ts`:
- Line 169: Update the response node’s outputMapping in the flow containing the
API response step so it interpolates and returns the LLM-generated
troubleshooting runbook payload instead of the hardcoded success object. Use the
existing LLM output symbol and Studio-compatible interpolation format,
preserving safe transmission of the generated Markdown content.

In
`@kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_system_0.md`:
- Around line 1-9: Establish a single untrusted-input boundary across the
troubleshooting pipeline: in
kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_system_0.md
lines 1-9, instruct the model to treat embedded log/context instructions as
non-authoritative and constrain copy-pasteable commands to safe, explicitly
supported remediation; in
kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_user_1.md
lines 1-2, clearly delimit environment and build logs as untrusted evidence
without adding executable instructions; and in
kits/devops-log-troubleshooter/prompts/abrasive-lighter_llmnode-716_system_0.md
lines 1-9, apply the same untrusted-input and command-safety rules to final
output generation.

In `@kits/devops-log-troubleshooter/README.md`:
- Around line 3-4: Replace the TODOs in the README with a complete
human-readable description of the devops-log-troubleshooter AgentKit, plus setup
instructions covering prerequisites and installation/configuration, and usage
examples showing how to run it. Keep the guidance specific to this kit and
remove both TODO placeholders.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 91f6597c-88b0-4b0a-8d7c-8e3f1b10b476

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada432 and df50e09.

📒 Files selected for processing (13)
  • kits/devops-log-troubleshooter/.gitignore
  • kits/devops-log-troubleshooter/README.md
  • kits/devops-log-troubleshooter/agent.md
  • kits/devops-log-troubleshooter/constitutions/default.md
  • kits/devops-log-troubleshooter/flows/abrasive-lighter.ts
  • kits/devops-log-troubleshooter/lamatic.config.ts
  • kits/devops-log-troubleshooter/model-configs/abrasive-lighter_llmnode-716_generative-model-name.ts
  • kits/devops-log-troubleshooter/model-configs/abrasive-lighter_ragnode-258_embedding-model-name.ts
  • kits/devops-log-troubleshooter/model-configs/abrasive-lighter_ragnode-258_generative-model-name.ts
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_llmnode-716_system_0.md
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_llmnode-716_user_1.md
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_system_0.md
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_user_1.md

Comment thread kits/devops-log-troubleshooter/agent.md Outdated
"nodeName": "API Response",
"webhookUrl": "",
"retry_delay": "0",
"outputMapping": "{\n \"status\": \"success\"\n}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

Extract the intelligence payload in the response.

Agent, we have a critical flaw in the extraction phase. The API response node is currently returning a hardcoded success status, leaving the generated troubleshooting runbook behind enemy lines. The primary objective of this operative is to deliver the Markdown runbooks back to headquarters.

You need to map the LLM's output into the response payload. Based on learnings regarding Studio output mappings, ensure the interpolation is properly formatted so the data is safely transmitted.

🛠️ Proposed extraction coordinates
-        "outputMapping": "{\n  \"status\": \"success\"\n}"
+        "outputMapping": "{\n  \"status\": \"success\",\n  \"runbook\": \"{{LLMNode_716.output.generatedResponse}}\"\n}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"outputMapping": "{\n \"status\": \"success\"\n}"
"outputMapping": "{\n \"status\": \"success\",\n \"runbook\": \"{{LLMNode_716.output.generatedResponse}}\"\n}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/devops-log-troubleshooter/flows/abrasive-lighter.ts` at line 169, Update
the response node’s outputMapping in the flow containing the API response step
so it interpolates and returns the LLM-generated troubleshooting runbook payload
instead of the hardcoded success object. Use the existing LLM output symbol and
Studio-compatible interpolation format, preserving safe transmission of the
generated Markdown content.

Source: Learnings

Comment thread kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_system_0.md Outdated
Comment thread kits/devops-log-troubleshooter/README.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Adar5! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/devops-log-troubleshooter/lamatic.config.ts (1)

17-20: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Populate the template links before release. The deploy and github entries are still empty, so this kit ships with unusable metadata. Fill them with the canonical deployment target and repository URL.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/devops-log-troubleshooter/lamatic.config.ts` around lines 17 - 20,
Update the links configuration entries deploy and github with the canonical
deployment target and repository URL, replacing both empty strings before
release. Preserve the existing links structure and key names.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts`:
- Line 169: Update the outputMapping configuration to quote the LLM
interpolation and reference the generated response field via
LLMNode_716.output.generatedResponse, while preserving the existing status and
runbook structure.

In `@kits/devops-log-troubleshooter/README.md`:
- Around line 8-17: Update the README setup instructions to reference the flow’s
actual vector database, devopsTroubleshootingDb, instead of SchemaLogsRaw. Amend
the Usage Example request body to include the required environment field, and
close the JSON code fence after the example.

---

Outside diff comments:
In `@kits/devops-log-troubleshooter/lamatic.config.ts`:
- Around line 17-20: Update the links configuration entries deploy and github
with the canonical deployment target and repository URL, replacing both empty
strings before release. Preserve the existing links structure and key names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9ede78c6-4d6a-4c8f-89f4-619d8aef4906

📥 Commits

Reviewing files that changed from the base of the PR and between df50e09 and 7698ee1.

📒 Files selected for processing (7)
  • kits/devops-log-troubleshooter/README.md
  • kits/devops-log-troubleshooter/agent.md
  • kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts
  • kits/devops-log-troubleshooter/lamatic.config.ts
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_llmnode-716_system_0.md
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_system_0.md
  • kits/devops-log-troubleshooter/prompts/abrasive-lighter_ragnode-258_user_1.md

Comment thread kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts Outdated
Comment thread kits/devops-log-troubleshooter/README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts (1)

4-11: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Populate the kit metadata before release.

The description and repository/documentation URLs are empty, so the template provides no purpose or support links despite the PR objective promising metadata and repository links. Add meaningful values and tags.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts` around
lines 4 - 11, Populate the exported meta object with a meaningful description,
relevant tags, and valid GitHub repository and documentation URLs for the DevOps
Log Troubleshooter kit. Replace the empty metadata fields while preserving the
existing name and other configuration values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/devops-log-troubleshooter/README.md`:
- Around line 14-18: Close the unterminated JSON code fence immediately after
the example object in the README, preserving the existing JSON content and
surrounding documentation formatting.
- Line 12: Update the README instruction to direct users to POST their raw
deployment logs and target environment to the deployed webhook URL generated
during deployment, referencing triggerNode_1 as the API Request trigger rather
than the API Response node.

---

Outside diff comments:
In `@kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts`:
- Around line 4-11: Populate the exported meta object with a meaningful
description, relevant tags, and valid GitHub repository and documentation URLs
for the DevOps Log Troubleshooter kit. Replace the empty metadata fields while
preserving the existing name and other configuration values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 586329c8-d45d-43b4-b8e6-b4dfb99aa4f0

📥 Commits

Reviewing files that changed from the base of the PR and between 7698ee1 and 952a2be.

📒 Files selected for processing (2)
  • kits/devops-log-troubleshooter/README.md
  • kits/devops-log-troubleshooter/flows/devops-log-troubleshooter.ts

Comment thread kits/devops-log-troubleshooter/README.md Outdated
Comment thread kits/devops-log-troubleshooter/README.md Outdated
@Adar5

Adar5 commented Jul 20, 2026

Copy link
Copy Markdown
Author

@amanintech @d-pamneja All CodeRabbit automated review comments have been resolved! 🚀
Note: The CI pipeline is currently failing on the actions/checkout@v4 step with a pull_request_target security error. This appears to be a repository-level workflow configuration issue regarding fork checkouts. Let me know if you need anything else from my end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant