Skip to content

DebugPilot AI — AI-Powered Debugging Workflow#156

Open
Yashyr190 wants to merge 8 commits into
Lamatic:mainfrom
Yashyr190:debugpilot-ai-submission
Open

DebugPilot AI — AI-Powered Debugging Workflow#156
Yashyr190 wants to merge 8 commits into
Lamatic:mainfrom
Yashyr190:debugpilot-ai-submission

Conversation

@Yashyr190
Copy link
Copy Markdown

@Yashyr190 Yashyr190 commented May 12, 2026

DebugPilot AI — AI-Powered Debugging Assistant

Contribution Type

  • Kit Contribution

Overview

DebugPilot AI is an AI-powered debugging assistant designed to help developers analyze runtime errors, deployment failures, API issues, and stack traces through structured engineering-focused workflows.

The kit provides:

  • Root cause analysis
  • Runtime error interpretation
  • Deployment failure diagnosis
  • Structured debugging reports
  • Production-safe debugging guidance
  • Confidence-scored engineering insights

Repository Structure Validation

  • Uses kits/debugpilot-ai/
  • Includes lamatic.config.ts
  • Includes README.md
  • Includes agent.md
  • Includes flows/
  • Includes constitutions/default.md
  • Includes apps/

App Structure

The kit includes a minimal Next.js application scaffold with:

  • apps/package.json
  • apps/app/page.tsx
  • apps/.env.example
  • apps/next.config.mjs
  • apps/tsconfig.json

Flow Configuration

The kit defines:

  • debugpilot-flow
  • environment binding through DEBUGPILOT_FLOW_ID

Local Validation

  • Verified required AgentKit structure
  • Verified file layout against CONTRIBUTING.md
  • Verified minimal app scaffold
  • Verified deterministic dependency versions
  • Verified markdownlint formatting fixes
  • Verified npm install completes successfully
  • Verified npm run dev starts locally
  • Verified all current GitHub Actions checks pass

Notes

This submission focuses on establishing the foundational kit structure, workflow configuration, and debugging-oriented AI experience aligned with AgentKit contribution guidelines.

Files Added

Core Kit Configuration:

  • kits/debugpilot-ai/lamatic.config.ts - Kit metadata, configuration, and step definitions (includes debugpilot-flow step with environment binding to DEBUGPILOT_FLOW_ID)
  • kits/debugpilot-ai/flows/debugpilot-flow.ts - Flow definition exporting getDebugPilotFlow() function returning basic flow metadata (id: "debugpilot-flow", name: "DebugPilot Root Cause Analysis Flow")
  • kits/debugpilot-ai/constitutions/default.md - DebugPilot AI Constitution with engineering-focused rules emphasizing actionable debugging, production-safe recommendations, and deterministic approaches

Documentation:

  • kits/debugpilot-ai/README.md - Comprehensive project documentation including problem/solution framing, core features (incident triage, severity classification, subsystem identification, root-cause analysis, next-step guidance, checklists, prevention guidance, confidence scoring), architecture overview, getting-started guide, and tech stack
  • kits/debugpilot-ai/agent.md - Agent capability documentation describing the AI-powered debugging assistant's capabilities

Next.js App Scaffold:

  • kits/debugpilot-ai/apps/package.json - App configuration with Next.js 14.2.5, React 18.2.0, TypeScript, and dev/build/start/lint scripts
  • kits/debugpilot-ai/apps/app/page.tsx - Minimal homepage component rendering "DebugPilot AI"
  • kits/debugpilot-ai/apps/next.config.mjs - Empty Next.js configuration
  • kits/debugpilot-ai/apps/tsconfig.json - TypeScript configuration with JSX set to "preserve"
  • kits/debugpilot-ai/apps/.env.example - Environment variables template (LAMATIC_API_KEY, LAMATIC_PROJECT_ID, DEBUGPILOT_FLOW_ID)

Development:

  • kits/debugpilot-ai/.gitignore - Standard ignore patterns (node_modules, .next, .env, .env.local, dist)

Flow Architecture

The flow definition is currently foundational/placeholder level. The debugpilot-flow.ts file exports a minimal configuration with only metadata (id and name) and does not include detailed node definitions or orchestration logic. No flow.json or node type specifications are present in this PR. The actual flow implementation (nodes, edges, and workflow steps for debugging analysis) appears to be deferred for future iterations.

High-Level Capability Summary

DebugPilot AI is positioned as an AI-powered debugging assistant providing:

  • Root cause analysis and runtime error interpretation
  • Deployment failure diagnosis and API issue analysis
  • Structured debugging reports with confidence scoring
  • Production-safe recommendations and engineering-focused guidance
  • Heuristic fallback when no API key is configured

The kit follows AgentKit structure with proper configuration binding, environment variable management, and a minimal Next.js application scaffold for the UI layer.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Warning

Rate limit exceeded

@Yashyr190 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 35 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0fc04124-918a-4f70-9dd6-c2deb9de09c5

📥 Commits

Reviewing files that changed from the base of the PR and between 7dd5d04 and eb06af8.

📒 Files selected for processing (1)
  • kits/debugpilot-ai/flows/debugpilot-flow.ts

Walkthrough

Adds a new DebugPilot AI kit: lamatic kit config and flow, docs and constitutions, a minimal Next.js app scaffold with env examples, and a .gitignore for dev/build artifacts.

Changes

DebugPilot AI Kit Initialization

Layer / File(s) Summary
Kit configuration and workflow definition
kits/debugpilot-ai/lamatic.config.ts, kits/debugpilot-ai/flows/debugpilot-flow.ts, kits/debugpilot-ai/.gitignore
Adds Lamatic kit config with metadata and a mandatory debugpilot-flow step bound to DEBUGPILOT_FLOW_ID; exports getDebugPilotFlow(); adds .gitignore entries for node_modules, .next, .env, .env.local, and dist.
Documentation and AI behavior guidelines
kits/debugpilot-ai/README.md, kits/debugpilot-ai/agent.md, kits/debugpilot-ai/constitutions/default.md
Adds a full README (architecture, features, workflow, setup, demo), an agent overview listing debugging capabilities, and a constitution describing deterministic, production-safe debugging rules.
Next.js scaffold and environment configuration
kits/debugpilot-ai/apps/package.json, kits/debugpilot-ai/apps/tsconfig.json, kits/debugpilot-ai/apps/.env.example, kits/debugpilot-ai/apps/app/page.tsx, kits/debugpilot-ai/apps/next.config.mjs
Creates a private Next.js app with pinned dependencies and scripts, sets jsx: "preserve" in tsconfig, provides example env vars (LAMATIC_API_KEY, LAMATIC_PROJECT_ID, DEBUGPILOT_FLOW_ID), adds a minimal landing Page component displaying "DebugPilot AI", and exports a default empty nextConfig.

Suggested reviewers

  • amanintech
  • d-pamneja

Your mission, should you choose to accept it: review the kit setup and docs, then self-destruct in 3… 2… 1.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the main change as introducing DebugPilot AI, an AI-powered debugging workflow kit, which aligns with the core objective of the PR.
Description check ✅ Passed The description addresses most required template sections including contribution type, repository structure validation, app structure, and local validation, though specific flow file details (config.json, inputs.json, meta.json) are not explicitly confirmed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@Yashyr190
Copy link
Copy Markdown
Author

Hi maintainers

This PR was submitted for the agentkit-challenge.

I don’t appear to have permission to add labels from my side, so requesting the agentkit-challenge label to enable review automation.

Thank you!

@akshatvirmani
Copy link
Copy Markdown

Hello @Yashyr190

The structure is not right. Can you please check and update?

Reference: https://github.com/Lamatic/AgentKit/blob/main/CONTRIBUTING.md#repository-layout

@coderabbitai coderabbitai Bot requested review from amanintech and d-pamneja May 15, 2026 15:35
Copy link
Copy Markdown
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: 5

🤖 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/debugpilot-ai/.gitignore`:
- Around line 1-4: The .gitignore currently lists .env.local but omits .env,
risking secret leaks; update the .gitignore by adding an entry for `.env`
(alongside the existing `.env.local`, node_modules, .next, dist) so both
environment files are ignored and secrets cannot be committed.

In `@kits/debugpilot-ai/agent.md`:
- Line 14: The file ends without a trailing newline (MD047) at the end of the
line containing "Suggested engineering fixes"; open kits/debugpilot-ai/agent.md,
go to the final line with that text, and add exactly one newline character so
the file ends with a single trailing newline while not adding any extra blank
lines.

In `@kits/debugpilot-ai/apps/package.json`:
- Around line 7-10: The dependency entries for react and react-dom use caret
ranges and must be pinned to exact versions; update the package.json
dependencies so the "react" and "react-dom" fields use exact version strings
(e.g., "18.2.0" without the ^) to satisfy the locked-version requirement and
ensure deterministic installs.

In `@kits/debugpilot-ai/constitutions/default.md`:
- Line 7: Add a single trailing newline character at the end of the file so the
last line "Prefer deterministic debugging approaches" ends with a newline
(fixing MD047); open kits/debugpilot-ai/constitutions/default.md, move to the
end of the file and ensure there is one newline character after that final line.

In `@kits/debugpilot-ai/README.md`:
- Around line 162-170: Add a blank line after each screenshot heading to satisfy
markdownlint MD022: insert an empty line between the "Landing Interface" heading
and its <img ...> tag, between the "Structured Debugging Report" heading and its
first <img ...> tag, and between the "Deployment Failure Analysis" heading and
its <img ...> tag so each heading is followed by a blank line before the image.
🪄 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: c4e2cd6f-5564-4611-8443-a16642aea684

📥 Commits

Reviewing files that changed from the base of the PR and between a4325d1 and ad8fa96.

📒 Files selected for processing (10)
  • kits/debugpilot-ai/.gitignore
  • kits/debugpilot-ai/README.md
  • kits/debugpilot-ai/agent.md
  • kits/debugpilot-ai/apps/.env.example
  • kits/debugpilot-ai/apps/app/page.tsx
  • kits/debugpilot-ai/apps/package.json
  • kits/debugpilot-ai/apps/tsconfig.json
  • kits/debugpilot-ai/constitutions/default.md
  • kits/debugpilot-ai/flows/debugpilot-flow.ts
  • kits/debugpilot-ai/lamatic.config.ts

Comment thread kits/debugpilot-ai/.gitignore
Comment thread kits/debugpilot-ai/agent.md Outdated
Comment thread kits/debugpilot-ai/apps/package.json Outdated
Comment thread kits/debugpilot-ai/constitutions/default.md Outdated
Comment thread kits/debugpilot-ai/README.md
Copy link
Copy Markdown
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

🤖 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/debugpilot-ai/apps/package.json`:
- Around line 4-6: The package.json currently only defines the "dev" script;
update the "scripts" object to add production and quality commands by adding
"build" (run Next's production compile, e.g., "next build"), "start" (run the
compiled server, e.g., "next start"), and a "lint" script (run ESLint over the
repo, e.g., "next lint" or "eslint . --ext .js,.jsx,.ts,.tsx"); edit the same
"scripts" object where "dev" is defined so CI and deploys can invoke "npm run
build", "npm run start", and "npm run lint".
- Around line 7-11: The package.json currently lists only runtime deps under
"dependencies" but is missing TypeScript tooling required for building .tsx
files; add "typescript" and appropriate type packages (e.g., "@types/react",
"@types/react-dom", and "@types/node") to the project
dependencies/devDependencies in package.json so the TypeScript compiler and type
definitions are available for the tsconfig.json-based build and editor tooling;
update the "dependencies"/"devDependencies" section accordingly and run the
install to ensure tsc and the React/Node types are present.

In `@kits/debugpilot-ai/flows/debugpilot-flow.ts`:
- Around line 1-9: The current getDebugPilotFlow() only returns metadata;
replace it with a Lamatic-style flow object containing top-level keys meta,
inputs, references, nodes, and edges to match execute-flow.ts structure; add a
trigger node named triggerNode of type graphqlNode, at least one processing node
(e.g., debugLLMNode or LLMNode) to perform analysis, create edges connecting
triggerNode -> debugLLMNode -> any output node, and populate references with
output mappings so the flow can export results to Studio; ensure the function
still exports the flow as getDebugPilotFlow.
🪄 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: 474e4ecb-5d27-4875-a36c-2e473e6192ca

📥 Commits

Reviewing files that changed from the base of the PR and between ad8fa96 and fd97f72.

📒 Files selected for processing (9)
  • kits/debugpilot-ai/.gitignore
  • kits/debugpilot-ai/README.md
  • kits/debugpilot-ai/agent.md
  • kits/debugpilot-ai/apps/app/page.tsx
  • kits/debugpilot-ai/apps/next.config.mjs
  • kits/debugpilot-ai/apps/package.json
  • kits/debugpilot-ai/constitutions/default.md
  • kits/debugpilot-ai/flows/debugpilot-flow.ts
  • kits/debugpilot-ai/lamatic.config.ts

Comment thread kits/debugpilot-ai/apps/package.json
Comment thread kits/debugpilot-ai/apps/package.json
Comment thread kits/debugpilot-ai/flows/debugpilot-flow.ts Outdated
Copy link
Copy Markdown
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.

♻️ Duplicate comments (1)
kits/debugpilot-ai/flows/debugpilot-flow.ts (1)

4-8: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

Mission-critical: this export is metadata-only, not a runnable flow definition.

Your mission, should you choose to accept it: replace this with a full Lamatic flow object (meta, inputs, references, nodes, edges). In its current form, Line 4-8 cannot execute as an actual workflow and will block the debugpilot-flow contract.

#!/bin/bash
# Read-only verification: compare this flow shape with established kit flow files.
# Expected result: this file should expose full flow keys; currently likely only id/name.
set -euo pipefail

echo "== Target flow =="
cat -n kits/debugpilot-ai/flows/debugpilot-flow.ts

echo
echo "== Compare against existing flow implementations (if present) =="
fd -t f "flow.ts" kits | xargs -I{} sh -c 'echo "--- {} ---"; rg -n "meta|inputs|references|nodes|edges" "{}" || true'
🤖 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/debugpilot-ai/flows/debugpilot-flow.ts` around lines 4 - 8, The current
export getDebugPilotFlow returns only id/name metadata and must be replaced with
a full Lamatic flow object: update the exported function getDebugPilotFlow to
return an object containing meta, inputs, references, nodes, and edges (not just
id/name) so it is a runnable flow; populate meta (id, name, description,
version), define inputs schema expected by the debugpilot kit, add references
for any external tools/services, and implement nodes and edges representing the
flow graph (use existing flow implementations as a template for node/edge shapes
and naming conventions) so the debugpilot-flow contract can execute.
🤖 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.

Duplicate comments:
In `@kits/debugpilot-ai/flows/debugpilot-flow.ts`:
- Around line 4-8: The current export getDebugPilotFlow returns only id/name
metadata and must be replaced with a full Lamatic flow object: update the
exported function getDebugPilotFlow to return an object containing meta, inputs,
references, nodes, and edges (not just id/name) so it is a runnable flow;
populate meta (id, name, description, version), define inputs schema expected by
the debugpilot kit, add references for any external tools/services, and
implement nodes and edges representing the flow graph (use existing flow
implementations as a template for node/edge shapes and naming conventions) so
the debugpilot-flow contract can execute.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9e4ed1eb-2928-47ef-ad23-388625277a3d

📥 Commits

Reviewing files that changed from the base of the PR and between fd97f72 and 7dd5d04.

📒 Files selected for processing (2)
  • kits/debugpilot-ai/apps/package.json
  • kits/debugpilot-ai/flows/debugpilot-flow.ts

@Yashyr190
Copy link
Copy Markdown
Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

✅ Actions performed

Full review triggered.

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.

2 participants