with one click
diagnose
// Root cause analysis for a Quay bug. Traces code paths through Quay subsystems, analyzes git history, forms and tests hypotheses, and enumerates complete state space.
// Root cause analysis for a Quay bug. Traces code paths through Quay subsystems, analyzes git history, forms and tests hypotheses, and enumerates complete state space.
Understand a Quay bug report from JIRA or GitHub. Fetches ticket details, checks for existing work, classifies as UI vs backend, and proposes an investigation plan. No code changes.
Orchestrates the Quay bug-fix workflow through 9 phases with confidence-based gating. Reads confidence from phase artifacts to advance automatically, post JIRA comments, or escalate to the user.
Create comprehensive documentation for a Quay bug fix: JIRA ticket update, release notes, changelog entry, PR description, and team communication.
Systematically reproduce a Quay bug using project-specific tooling. Documents environment, reproduction steps, and observable behavior.
Critically evaluate a bug fix and its tests. Forms a verdict (inadequate / tests incomplete / solid) and recommends next steps.
Verify a bug fix with comprehensive testing using Quay's test infrastructure. Creates regression tests, runs the full suite, and documents results.
| name | diagnose |
| description | Root cause analysis for a Quay bug. Traces code paths through Quay subsystems, analyzes git history, forms and tests hypotheses, and enumerates complete state space. |
| allowed-tools | ["Bash(git log *)","Bash(git blame *)","Bash(git show *)","Bash(gh pr view *)","Read","Glob","Grep","Agent","AskUserQuestion"] |
Determine why the bug exists. This is the most critical phase — a wrong diagnosis leads to a wrong fix.
Perform thorough root cause analysis that provides clear, evidence-based conclusions. Identify the underlying issue, not just the symptom.
Read the reproduction report (artifacts/quay-bugfix/reports/reproduction.md
if it exists):
Starting from the reproduction steps, trace the execution flow through Quay's subsystems. Use the subsystem map from CLAUDE.md:
For API bugs:
Entry point in endpoints/ -> business logic in data/model/ -> database
operations in data/database.py -> query execution
For worker bugs:
Worker class in workers/ -> queue operations -> data layer -> database
For UI bugs:
React component in web/src/ -> API hook in web/src/hooks/ -> REST
endpoint in endpoints/
For auth bugs:
Auth middleware in auth/ -> permission checks -> data layer
For storage bugs:
Storage backend in storage/ -> blob operations -> configuration
Use file:line notation for every code reference (e.g.,
endpoints/api/repository.py:245).
git log --oneline -20 -- <affected-files>
git blame <file> -L <start>,<end>
Look for: recent changes that introduced the bug, related PRs, patterns of similar fixes.
List all potential root causes based on evidence:
git bisect) if the change was introduced graduallyCRITICAL: If the bug involves state-dependent logic (status fields, phase transitions, feature flags, configuration options):
Example: If a worker stops processing on "terminal" statuses, search for ALL statuses used in the codebase, not just the ones in the bug report.
Save to artifacts/quay-bugfix/analysis/root-cause.md:
# Root Cause Analysis: <TICKET>
## Root Cause
<Clear, specific explanation of why the bug exists>
## Code References
- `file:line` — <what this code does wrong>
- ...
## Evidence
- <supporting evidence from code, git history, reproduction>
## Timeline
<When the bug was introduced — commit/PR reference>
## Impact
- **Scope:** <what else is affected>
- **Risk:** <could the fix cause regressions>
- **Related patterns:** <similar code that may have the same issue>
## States/Conditions Enumerated
<Complete list of states/values found by searching, not assumed>
## Recommended Fix
<Specific approach with code locations to change>
## Alternative Approaches
<Other solutions with pros/cons>
Include this section at the end of your root cause artifact:
## Confidence Assessment
- **Level**: high | medium | low
- **Score**: <0-100 integer>
- **Score rationale**: <1-2 sentences>
- **Open questions**: <bullet list, or "None">
Confidence signals for this phase:
Report: the identified root cause, confidence level, and where the analysis was written.