원클릭으로
bug-fix
Evidence-driven bug investigation and fix pipeline. Use when something is broken, not working, or the root cause is ambiguous.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Evidence-driven bug investigation and fix pipeline. Use when something is broken, not working, or the root cause is ambiguous.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Build Flutter APK/IPA, generate changelog, update buildlog, and commit version bump. Handles platform selection, build mode, and artifact renaming.
Build Unity APK/IPA on macOS with Unity 6.x — pre-flight checks, version bump, iOS signing params, post-build verification, buildlog, and commit.
Two independent reviewers must both approve high-stakes output before it ships, breaking the single-reviewer blind-spot problem.
Team-orchestrated feature development with parallel specialist agents. Use when building a feature that benefits from multiple agents working concurrently. You act as Product Director coordinating the team.
Interactive agent picker for composing and dispatching parallel teams. Browse available agents across domains, pick a roster, dispatch in parallel.
ASO optimization pipeline for an app store listing. Use when optimizing an App Store or Play Store listing.
| name | bug-fix |
| description | Evidence-driven bug investigation and fix pipeline. Use when something is broken, not working, or the root cause is ambiguous. |
| user-invocable | true |
| allowed-tools | Agent AskUserQuestion Read Glob Grep Bash Edit Write Skill |
Evidence-driven bug investigation pipeline. Generates competing hypotheses,
gathers evidence in parallel, runs a rebuttal round, implements the minimal fix,
then runs through review, cleanup, and documentation — a full lifecycle like
/feature-dev but optimized for diagnosis-first bug work.
Inspired by scientific method: observe, hypothesize, test, conclude.
Assess if the bug report has enough detail to investigate.
Passes (has concrete signals):
Fails (too vague to investigate):
On failure: Ask targeted clarifying questions via AskUserQuestion:
Do NOT invoke /clarify for bugs — bugs need targeted diagnostic questions,
not a full Socratic interview. Ask 1-3 focused questions, then proceed.
{{ARGUMENTS}} and clarifying answersgit log --oneline -20 on relevant paths)docs/tasks.md for known bugs section,
docs/spec/ for the feature's expected behaviorPresent the observation summary to the user for confirmation before proceeding.
Generate 3 deliberately different hypotheses. Do NOT generate 3 variations of the same idea.
Default hypothesis lanes (use unless the bug strongly suggests a different partition):
| Lane | Focus | Example |
|---|---|---|
| H1: Code-path / implementation | Logic error, wrong condition, missing case, state mutation, race condition | "The provider doesn't reset state when navigating back, causing stale data" |
| H2: Data / config / environment | Wrong data shape, missing field, config mismatch, env-specific behavior | "The Supabase RLS policy blocks the query for non-owner users" |
| H3: Assumption / integration mismatch | API contract changed, version mismatch, timing assumption wrong | "The widget rebuilds before the async operation completes, reading null" |
For each hypothesis, state:
Spawn 3 Explore agents in parallel (model: haiku, one per hypothesis lane). Each agent:
Each agent returns a structured report:
## Lane: {H1/H2/H3}
### Hypothesis
{one sentence}
### Evidence For
- {evidence} — strength: {strong/moderate/weak} — source: {file:line / log / config}
### Evidence Against
- {evidence} — strength: {strong/moderate/weak}
### Critical Unknown
{what's missing}
### Best Discriminating Probe
{specific action to confirm or kill this hypothesis}
### Confidence: {high / medium / low}
After all 3 agents return:
Present the synthesis:
## Bug Investigation Summary
### Observation
{what happened vs what was expected}
### Ranked Hypotheses
| Rank | Hypothesis | Confidence | Evidence Strength | Key Evidence |
|------|------------|------------|-------------------|--------------|
| 1 | ... | High | Strong | file:line shows... |
| 2 | ... | Medium | Moderate | ... |
| 3 | ... | Low | Weak | ... |
### Rebuttal Round
- Best rebuttal to leader: {argument}
- Leader's response: {evidence-backed answer}
- Outcome: {leader held / leader weakened / re-ranked}
### Root Cause (Most Likely)
{clear statement of the root cause with evidence citations}
### Critical Unknown (if any)
{what would confirm this with certainty}
Ask the user: "This is my diagnosis. How should I proceed?"
Options:
Once the user approves (or if confidence is high and the fix is low-risk):
Plan the fix — state exactly what changes are needed and where
Implement the fix — make the minimal change that addresses the root cause
Verify the fix:
flutter analyze or project equivalent — must be zero errorsIf verification fails → fix and re-verify, but count your attempts:
The 3-fix rule (from obra/Superpowers
systematic-debugging): when each fix reveals a new problem in a different place, requires "massive refactoring," or creates new symptoms elsewhere, that is not a failed hypothesis — it is a wrong architecture. Ask: is this pattern fundamentally sound, or are we sticking with it through inertia? Surface this to the user and discuss refactoring vs. continuing to patch symptoms before any further fix. An architectural change is a separate, explicitly-approved decision.
Spawn a code-reviewer agent (use nextc-ecc:code-reviewer):
Handle review results:
For fixes touching auth, payments, or user data, also spawn
nextc-ecc:security-reviewer in parallel.
If the fix touched 3+ files or introduced helper functions:
Invoke /cleanup on the files changed during this fix:
/cleanup {list of files changed}
After cleanup:
Skip cleanup if the fix was a 1-2 line change in a single file — cleanup overhead isn't justified for surgical fixes.
Spawn doc-keeper agent in the background to update:
docs/tasks.md — remove from known bugs section (or add if newly discovered)docs/spec/{feature}.md — update if the fix changes documented behaviordocs/changelog.md — add bug fix entrydocs/qc/{feature}.md — add regression test case for the fixed bugCLAUDE.md — update only if the fix changes architecture or project statusPresent the final report:
## Bug Fix Report
### Root Cause
{one-sentence summary}
### Evidence
{key evidence that confirmed the diagnosis — cite file:line}
### Fix Applied
| File | Change |
|------|--------|
| {file:line} | {what changed} |
### Verification
- Analyzer: passed (0 errors)
- Build: passed
- Symptom check: {resolved / needs manual verification}
### Review
- Code review: {passed / issues fixed}
- Security review: {passed / N/A}
### Hypotheses Eliminated
| Hypothesis | Why Eliminated |
|------------|----------------|
| {H2} | {contradicted by evidence X} |
| {H3} | {evidence insufficient, leader explains all symptoms} |
### Remaining Risk (if any)
{anything the fix doesn't cover, edge cases to watch}
┌────────────────────────────────────────────────────────────┐
│ Gate 0: Clarity Check │
│ Too vague? → ask 1-3 targeted questions │
└──────────────────────┬─────────────────────────────────────┘
│
┌──────────────────────▼─────────────────────────────────────┐
│ Phase 1: Observe │
│ Restate symptom, gather codebase context, check docs │
└──────────────────────┬─────────────────────────────────────┘
│
┌──────────────────────▼─────────────────────────────────────┐
│ Phase 2: Hypothesize │
│ 3 deliberately different hypotheses │
└──────────────────────┬─────────────────────────────────────┘
│
┌──────────────────────▼─────────────────────────────────────┐
│ Phase 3: Investigate (Parallel) │
│ 3 Explore agents — evidence FOR and AGAINST each lane │
└──────────────────────┬─────────────────────────────────────┘
│
┌──────────────────────▼─────────────────────────────────────┐
│ Phase 4: Synthesize & Rebuttal │
│ Rank → rebuttal round → user approves diagnosis │
└──────────────────────┬─────────────────────────────────────┘
│
┌────────▼─────────┐
│ Phase 5: Fix │
│ Minimal change │
│ Verify (3 max) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Phase 6: Review │
│ Code reviewer │
│ Security (opt) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ Phase 7: Cleanup │
│ If 3+ files │
│ Re-verify after│
└────────┬─────────┘
│
┌────────▼─────────┐
│ Phase 8: Docs │
│ doc-keeper (bg)│
└────────┬─────────┘
│
┌────────▼─────────┐
│ Phase 9: Report │
└──────────────────┘
docs/qc/ so the same bug doesn't re-enter undetectedtesting-policy rule — verify via analyzer and manual checks, not by writing tests (update existing tests only when your fix touches code they already cover)| Tier | Type | Example |
|---|---|---|
| 1 (strongest) | Direct reproduction | "Reproduced: tapping Back on quest detail shows stale data every time" |
| 2 | Primary source artifact | "quest_feed_provider.dart:142 — state not cleared in dispose()" |
| 3 | Multiple sources converging | "Both the provider and the repository show the same missing null check" |
| 4 | Single-source inference | "The widget tree rebuilds suggest the state is stale" |
| 5 | Circumstantial | "Similar bug was fixed in tale_provider last month" |
| 6 (weakest) | Speculation | "Might be a timing issue" |
Explicitly down-rank hypotheses that depend on tier 5-6 evidence when stronger contradictory evidence exists.
| Phase | Skill / Agent | Model | When |
|---|---|---|---|
| Phase 1 | Explore agent | haiku | Gather codebase context |
| Phase 3 | Explore agents (parallel) | haiku | One per hypothesis lane — evidence gathering |
| Phase 6 | nextc-ecc:code-reviewer | sonnet | Always |
| Phase 6 | nextc-ecc:security-reviewer | sonnet | Auth/payments/user data |
| Phase 7 | /cleanup skill | — | Fix touched 3+ files |
| Phase 8 | doc-keeper agent | haiku | Always (background) |
Task: {{ARGUMENTS}}