Summary
Build an end-to-end automated bug fixing pipeline: a bug report form in the app that creates a GitHub issue and immediately spawns a Claude Code agent to investigate and resolve it.
User Flow
- User fills out a bug report form in the app (title, description, steps to reproduce, severity)
- On submit, a server action creates a GitHub issue via the GitHub API
- The server action triggers a Claude Code agent (via the Claude API with tool use) assigned to that issue
- The agent investigates the codebase, implements a fix, and opens a PR linked to the issue
- The user can see the status of the fix in the app (issue created → agent working → PR opened)
Implementation Scope
Bug Report Form (/bugs or modal accessible from any page)
- Fields: title, description, steps to reproduce, severity (low / medium / high / critical)
- Server action submits the report
GitHub Issue Creation
- Use the GitHub REST API (
POST /repos/{owner}/{repo}/issues) from the server action
- Label the issue with
bug and the severity level
- Store the created issue number in the database (
BugReport model)
Agent Trigger
- After the issue is created, invoke the Claude API with a prompt containing the issue details and codebase context
- The agent should have access to tools: file read, bash, GitHub PR creation
- This can be a fire-and-forget background job (no need to await completion)
- Consider using a queue or webhook for long-running agent work
Status Tracking
BugReport model: id, title, description, stepsToReproduce, severity, githubIssueNumber, status (pending / in_progress / pr_opened / resolved), prNumber, createdAt, updatedAt
- Poll or webhook to update status when the agent opens a PR or closes the issue
Bug Reports List (/bugs)
- Table showing all bug reports with status badges, GitHub issue links, and PR links
Prisma Schema
model BugReport {
id String @id @default(cuid())
title String
description String
stepsToReproduce String?
severity BugSeverity
githubIssueNumber Int?
prNumber Int?
status BugStatus @default(PENDING)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
enum BugSeverity {
LOW
MEDIUM
HIGH
CRITICAL
}
enum BugStatus {
PENDING
IN_PROGRESS
PR_OPENED
RESOLVED
}
Open Questions
- How should the agent be invoked? Options: direct Claude API call from server action, GitHub Actions workflow triggered by issue label, or a separate worker service
- Should the agent run synchronously (user waits) or asynchronously (fire and forget with status polling)?
- What level of codebase access should the agent have?
Blocked By
None — new feature, can start immediately.
Part of ongoing platform automation work.
Summary
Build an end-to-end automated bug fixing pipeline: a bug report form in the app that creates a GitHub issue and immediately spawns a Claude Code agent to investigate and resolve it.
User Flow
Implementation Scope
Bug Report Form (
/bugsor modal accessible from any page)GitHub Issue Creation
POST /repos/{owner}/{repo}/issues) from the server actionbugand the severity levelBugReportmodel)Agent Trigger
Status Tracking
BugReportmodel:id,title,description,stepsToReproduce,severity,githubIssueNumber,status(pending / in_progress / pr_opened / resolved),prNumber,createdAt,updatedAtBug Reports List (
/bugs)Prisma Schema
Open Questions
Blocked By
None — new feature, can start immediately.
Part of ongoing platform automation work.