# /ce-debug: Root-cause debugging with a full causal chain before fixing

Source: https://trendhub.net/skills/everyinc-compound-engineering-plugin/ce-debug
Skill folder: https://github.com/EveryInc/compound-engineering-plugin/tree/main/skills/ce-debug
Pack: Compound Engineering (https://trendhub.net/skills/everyinc-compound-engineering-plugin)
Works with: Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, Kimi Code CLI, Grok Build CLI, Devin CLI, Factory Droid, Qwen Code, Pi, Antigravity CLI, Cline

ce-debug runs five fixed phases: triage, investigate, root cause, fix and handoff. The agent must explain every step from trigger to symptom with file and line evidence before proposing a change, then asks whether to fix, stop at diagnosis or rethink the design. Fixes are test-first and committed without sweeping in your other edits.

## When to use it

- Something fails, throws or runs slowly and the cause is not obvious.
- A ticket or issue describes a bug you want diagnosed and fixed with a regression test.
- Several attempted fixes have not held.

## How it works

1. **Triage and investigate**: It fetches any issue of record, reproduces the failure, traces backwards and searches earlier tickets and PRs.
2. **Close the causal chain**: It does not move on until the chain from trigger to symptom has no gaps, testing one hypothesis at a time.
3. **Present, then ask**: It shows the cause, proposed fix and test plan, then asks whether to fix now, stop at diagnosis or rethink the design.
4. **Fix test-first**: On the fix path it branches off the default branch if needed and records which files the fix owns.
5. **Hand off safely**: It commits only fix-owned files and opens a PR only when the branch is clean and a PR-capable remote exists; otherwise it commits locally.

## What it steers the agent away from

- Changing several things at once to see what helps
- Opening tickets to manufacture a record for a bug
- Leaking secrets from logs or traces into output or commits

## What it can touch

Reads code, logs and issue trackers, runs reproduction and test commands, edits code and tests on a feature branch, and may commit, push and open a PR through other skills.

## Pairs well with

- `/ce-bakeoff`
- `/ce-commit-push-pr`
- `/ce-compound`

## Questions

### What if the hypotheses run out?

After two or three unconfirmed hypotheses or three failed fixes, it stops retrying and investigates why the approach is failing.

### Can it run unattended?

Yes. In pipeline or return-to-caller mode it applies only fixes that do not reverse a deliberate decision and returns a fixed status value.
