FOUR AGENTS. ONE WORKFLOW.
Each agent has a defined role and a defined boundary. They hand off to each other through a structured context object that carries the full state of the bug resolution from first intake to final PR. No agent acts outside its boundary. No agent proceeds without the previous agent completing its job.
INTAKE
Bug Intake Agent
Monitors the ClickUp workspace continuously for new bug reports entering the engineering queue. When a bug is created or reaches the defined trigger status, the Intake Agent reads the ticket, classifies the bug by severity and type, and initiates the analysis workflow by passing a structured context object to the next agent.
No engineer manually triages the queue. Every ticket is read, classified, and routed — automatically, as soon as it arrives.
What it handles:
- Continuous ClickUp monitoring for new bug tickets
- Severity classification: critical, high, medium, low
- Type categorisation: logic error, UI defect, performance regression, configuration, integration
- Context packaging: bug description, reproduction steps, affected area — structured for the next agent
- Workflow initiation: passes to Code Analysis + Fix Proposal Agent
ANALYSIS + PROPOSAL
Code Analysis and Fix Proposal Agent
This is the most technically demanding agent in the system. It receives the bug context from the Intake Agent, connects to the GitHub repository, and does the work a senior engineer would normally spend an hour on: locating the relevant code, tracing the execution path, identifying the root cause, and designing a fix.
Critically — the same agent that analyses the bug is the one that proposes the fix. This is intentional. The context built during analysis does not need to be handed off and re-established. The agent reasons from understanding to proposal in a single pass, which produces more coherent and consistent fix recommendations than splitting these responsibilities across separate agents.
The proposal is posted back to the ClickUp ticket as a structured comment. The developer is notified. Their job is to read an analysis and decide whether they agree — not to start the investigation from scratch.
What it produces:
- File and function location of the probable root cause
- Execution path trace showing how the bug manifests
- Adjacent code risk assessment
- Specific code change recommendation with rationale
- Edge cases the fix accounts for
- Explicit questions for the developer where confidence is partial
- Clear approval prompt posted to ClickUp
Developer touchpoint:
This is the first human gate. The developer reads the analysis, reviews the proposed fix, and either approves or rejects with notes. Approval triggers the Implementation step. Rejection returns to this agent with the developer's feedback as additional context for re-analysis.
REVIEW
Automated Code Review Agent
Most systems like this go from fix implementation directly to PR. We inserted a code review agent between them — and this is the architectural decision that most distinguishes this system from simpler implementations.
After the approved fix has been implemented, the Code Review Agent examines the code changes before the PR is raised. It checks the implementation against three criteria: correctness (does the change actually address the root cause as proposed), pattern consistency (does the new code follow the established conventions of the existing codebase), and regression risk (could this change affect adjacent functionality).
The result: the PR that reaches the developer for final review has already been checked by an agent. The developer is not reviewing raw code for basic quality issues — they are reviewing code that has passed an automated review gate. Their attention goes to the judgement call, not the checklist.
What it checks:
- Implementation matches the approved proposal exactly
- Code follows project naming and structural conventions
- Error handling is consistent with existing patterns
- No obvious regression risk in adjacent functions
- Logging and observability patterns maintained
- Passes or flags — no partial states
If the review flags an issue, the fix goes back for revision before the PR is raised. A developer never sees a PR that failed the code review gate.
PR
Pull Request Agent
The final agent in the chain. Activates only after the Code Review Agent has cleared the implementation.
Creates a named branch following the project's established conventions, applies the reviewed code changes, and raises a pull request against the main branch. The PR description is structured — not auto-generated boilerplate. It contains the ClickUp ticket reference, a summary of what changed and why, what was tested by the code review agent, and specific guidance for the human reviewer.
The developer reviews the PR, verifies the diff is consistent with what they approved, and merges. The PR agent does not merge. Final merge is always a human action.
What it produces:
- Named branch following project conventions
- Clean commit with the approved code changes
- PR with structured description:
- — ClickUp ticket reference and bug summary
- — What changed and the rationale
- — Code review agent findings
- — What the human reviewer should verify
- — Any open questions
- Reviewer notification