Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

coograph-debug

/coograph-debug

Znajduje przyczynę błędu lub awarii builda przy minimalnym dochodzeniu i wprowadza najmniejszą poprawkę: reprodukcja, zebranie dowodów, naprawa i weryfikacja, z bezpiecznikiem po 3 próbach.

Repozytorium
coograph ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Znajduje przyczynę błędu lub awarii builda przy minimalnym dochodzeniu i wprowadza najmniejszą poprawkę: reprodukcja, zebranie dowodów, naprawa i weryfikacja, z bezpiecznikiem po 3 próbach.

Oryginalny opis (EN)

Root-cause a bug or build error with minimal investigation, then apply the smallest fix. Reproduce, gather evidence, fix, verify, with a 3-attempt circuit breaker. Use for failing builds, tests, or runtime errors.

Jak działa

  1. Phase 0 — Orient with Code-Graph (MANDATORY — non-negotiable)
  2. Protocol
  3. Circuit Breaker
  4. Rules
  5. Output Format
  6. Failure Modes to Avoid
  7. Models
Sekcje z nagłówków SKILL.md, w oryginale · 103 linii, 834 słów
Podgląd SKILL.md
---
name: coograph-debug
description: Root-cause a bug or build error with minimal investigation, then apply the smallest fix. Reproduce, gather evidence, fix, verify, with a 3-attempt circuit breaker. Use for failing builds, tests, or runtime errors.
---

Diagnose the bug or build error below. Find the root cause with minimal investigation, then apply the smallest possible fix.

## Phase 0 — Orient with Code-Graph (MANDATORY — non-negotiable)

**Before reading any file or running any search**, this is the HARD RULE — code-graph first, no exceptions:
1. Call `get_minimal_context(task="debug <symptom>")` then `detect_changes()`. ALWAYS start here. Use `detect_changes()` risk scores first — recent high-risk changes are the most likely culprit. Use the returned file list to focus investigation.
2. Fall back to `sqlite3 .code-graph/graph.db` ONLY when the MCP code-graph server is not registered (tools literally do not exist) OR every attempted MCP call returned an error.
3. Fall back to standard search/read tools ONLY when Step 1 AND Step 2 are both impossible because the code-graph DB is absent from the workspace.

"Slow", "unwieldy", "it's a simple bug" are NOT valid reasons to bypass. When tracing call chains use `query_graph("callers_of", fn)` and `query_graph("callees_of", fn)` before reading files. Validate every hypothesis directly in source regardless of graph output.

## Protocol

### For Runtime Bugs

1. **REPRODUCE**: Can you trigger it reliably? What is the minimal reproduction? Consistent or intermittent?
2. **GATHER EVIDENCE** (parallel when possible):
   - Read full error messages and stack traces — every word, not just the first line.
   - Check recent changes: `git log --oneline -10`, `git blame` on suspect lines.
   - Find working examples of similar code in the codebase.
   - Read the actual code at error locations.
3. **HYPOTHESIZE**: Compare broken vs working code. Trace data flow from input to error. Document one hypothesis before investigating further. Identify what test would prove/disprove it.
4. **FIX**: Apply ONE change. Predict the test that proves the fix. Check for the same pattern elsewhere.
5. **VERIFY**: Run the failing test/build to confirm the fix works. Verify no regressions.

### For Build/Compilation Errors

1. Detect project type from manifest files (package.json, pom.xml, Cargo.toml, go.mod, pyproject.toml).
2. Collect ALL errors — run the full build command, not just the first file.
3. Categorize: type inference, missing definitions, import/export, configuration.
4. Fix each error with the minimal change. Verify after each.
5. Final verification: full build exits 0. Report "X/Y errors fixed" after each fix.

## Circuit Breaker

After 3 failed hypotheses, **STOP**. Report what was tried and ask for direction. Do not keep trying variations of the same approach.

## Rules

- Reproduce BEFORE investigating. If you cannot reproduce, find the conditions first.
- One hypothesis at a time. Do not bundle multiple fixes.
- No speculation — "seems like" and "probably" are not findings. Show evidence or drop the claim.
- Fix with minimal diff. Do not refactor, rename, optimize, or redesign while fixing.
- **Scope check after every fix**: review your diff before declaring done. Revert any change not directly related to the root cause.
- Follow all rules and conventions in `AGENTS.md` § Hard rules and `.github/copilot-instructions.md` (when `AGENTS.md` has no Hard rules section, `.github/copilot-instructions.md` holds them all).

## Output Format

### Runtime Bug:
```
## Bug Report
**Symptom**: [What the user sees]
**Root Cause**: [The actual issue at file:line]
**Reproduction**: [Minimal steps to trigger]
**Fix**: [Minimal code change applied]
**Verification**: [How it was proven fixed]
**Similar Issues**: [Other places this pattern might exist]
**Gotcha candidate**: [none, or a GOTCHAS.md entry when the root cause was a trap the code does not show]
```

**Gotcha candidate.** When the root cause was environmental or non-obvious (a tool that ignores the shell environment, a deploy setting, an error message that points the wrong way), draft a `GOTCHAS.md` entry in the format in `.github/layout/README.md`: `Symptom` with the exact error text, `Cause`, `Fix / rule`, `paths:` globs for where it bites, `commands:` if a command triggers it, `confirmed:` today. Show it and ask before writing it to `GOTCHAS.md`. A bug that was just a bug gets `none`.

### Build Error:
```
## Build Error Resolution
**Initial Errors**: X
**Errors Fixed**: Y
**Build Status**: PASSING / FAILING

### Errors Fixed
1. src/file.ts:45 — [error message] — Fix: [what was changed]

### Verification
- Build command: [command] → exit code 0
- No new errors introduced: confirmed
```

## Failure Modes to Avoid

- Symptom fixing: adding null checks everywhere instead of asking "why is it null?"
- Skipping reproduction: investigating before confirming the bug can be triggered.
- Hypothesis stacking: trying 3 fixes at once instead of one at a time.
- Refactoring while fixing: "while I'm fixing this, let me also rename…" — no.
- Infinite loop: same failed approach after 3 attempts. Stop and ask.

$ARGUMENTS

## Models

Read the `models` block in `openspec/config.yaml` before delegating. When `mode` is
`preset` or `per-task`, pass that agent's model on the Agent call; when it is `off`
or `unset`, pass nothing and let the agent inherit the session model.

End your report with one line naming what ran where, so the setting is visible
without reading config:

```
models: reviewer=opus (mapping), explore=haiku (mapping)
```

Print the footer in every mode. In `off` and `unset` it reads `(inherited)`.

Wersje

W bazie nie ma innych skilli o nazwie coograph-debug.

Migawka bazy z 13.11.2026 · wersja paczki 6d77408224e3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100sdlc-debug
    Szuka przyczyny błędu z dowodami, pisze test regresyjny i wprowadza najmniejszą poprawkę.
  • 95pstack-bug-fix
    Prowadzi naprawę błędu według metody pstack: odtwarza usterkę, znajduje przyczynę, dodaje nieprzechodzący test i weryfikuje poprawkę.
  • 90investigate-bug
    Czyta zgłoszenie błędu, zbiera dowody, odtwarza problem i wskazuje przyczynę oraz najmniejszą proponowaną poprawkę.
  • 100debug
    Odtwarza błąd, test, build lub crash, znajduje przyczynę źródłową przed propozycją poprawki, potwierdza ją najmniejszym możliwym sprawdzeniem i dodaje test regresyjny.
  • 100verify-and-fix
    Diagnozuje zgłoszony błąd lub nieoczekiwane zachowanie i prowadzi przez zebranie kontekstu aż do poprawki.
  • 100debugging-playbook
    Debuguje zgłoszony błąd krok po kroku: odtwarza go, zawęża przyczynę logami i bisekcją, stosuje najmniejszą poprawkę i dodaje test regresji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.