# Fix Bug

> Bug fix orchestrator — active_flow fix_bug; reads specs/bugs/BUG-*.md; chains investigate-bug, develop-tdd, validate-fix. Use when user reports a defect.

- **Type:** Skill
- **Install:** `agentstack add skill-danielvm-git-bigpowers-fix-bug`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [danielvm-git](https://agentstack.voostack.com/s/danielvm-git)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [danielvm-git](https://github.com/danielvm-git)
- **Source:** https://github.com/danielvm-git/bigpowers/tree/main/.gemini/extensions/bigpowers/skills/fix-bug
- **Website:** https://github.com/danielvm-git/bigpowers

## Install

```sh
agentstack add skill-danielvm-git-bigpowers-fix-bug
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Fix Bug

**Boundary**: Orchestrator flow — chains `investigate-bug` (entry point + RCA via `diagnose-root`) → `develop-tdd` → `validate-fix`. Does not implement RCA or write bug files directly.

Orchestrates **fix_bug** flow without mixing epic build state.

> **HARD GATE** — Set `specs/state.yaml` `active_flow: fix_bug` and `bug_cycle.current_step: 1` before starting.

## Five steps (`bug_cycle` in state.yaml)

| Step | Skill / action |
|------|----------------|
| 1 | `investigate-bug` — create BUG-*.md with RCA |
| 2 | `diagnose-root` — 4-phase root cause analysis |
| 3 | `develop-tdd` — red-green against bug file verify steps |
| 4 | `validate-fix` — re-run failing test, full suite, lint |
| 5 | `release-branch` — PR or solo land the fix |

### Checkpoint / resume

Track progress via `specs/state.yaml` `bug_cycle`:
- `bug_cycle.current_step`: current step (1–5)
- `bug_cycle.completed_steps`: completed step numbers
- `handoff.next_skill`: skill for the current step
- On resume, read `bug_cycle.current_step` and continue from there

## Process

1. **Step 1 — investigate-bug:** If no `specs/bugs/BUG-*.md`, run `investigate-bug` first — it handles history check, RCA (via `diagnose-root`), fix approach, and writes the bug file. Increment `bug_cycle.current_step` to 2 on completion.
2. **Step 2 — diagnose-root:** Run 4-phase RCA (reproduce → isolate → hypothesize → verify). Record findings in the bug file. Increment to step 3.
3. **Step 3 — develop-tdd:** `develop-tdd` against the bug file's verify steps. Increment to step 4 on all-green.
4. **Step 4 — validate-fix:** `validate-fix` — re-run failing test, full suite, typecheck, lint. Increment to step 5.
5. **Step 5 — release-branch:** Land the fix via `release-branch`. Clear `bug_cycle` and `active_flow` when done.

## Bug file SoT

One markdown file per bug with frontmatter:

```yaml
bug_id: BUG-001
status: open
severity: high
scope: api
title: Short title
```

## Verify

→ verify: `test -d specs/bugs && bash scripts/sync-bugs-registry.sh`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [danielvm-git](https://github.com/danielvm-git)
- **Source:** [danielvm-git/bigpowers](https://github.com/danielvm-git/bigpowers)
- **License:** MIT
- **Homepage:** https://github.com/danielvm-git/bigpowers

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-danielvm-git-bigpowers-fix-bug
- Seller: https://agentstack.voostack.com/s/danielvm-git
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
