> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oktolabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bug fix workflow

> An end-to-end Pulse workflow for diagnosing, fixing, validating, and remembering a bug.

# Bug fix workflow

You can use Pulse to make a bug fix traceable from failing evidence to validated completion and KG learning. The goal is not just to close the card; it is to make the failure reusable context.

## Create a bug card

Create a `bug` card with severity, reproduction steps, expected behavior, actual behavior, suspected area, and the failing evidence that proves the defect.

```text theme={null}
okto_pulse_create_card(card_type="bug", severity="major", ...)
```

## Assign to an agent

Assign implementation to an Executor. Keep the Validator separate so the fix is reviewed independently.

## Root cause investigation

Before editing, query the KG for prior decisions, contradictions, and lessons:

```text theme={null}
okto_pulse_kg_get_learning_from_bugs
okto_pulse_kg_find_contradictions
okto_pulse_kg_find_similar_decisions
```

## Fix and task validation

The Executor implements the fix, records a conclusion, and moves the card to `validation`. The Validator submits task validation with confidence, completeness, drift, and justification.

```text theme={null}
okto_pulse_submit_task_validation
```

## Record the learning

Closed bug cards can emit `Learning` nodes through consolidation. Write the root cause and prevention note clearly so the KG can retrieve it later.

## Search for similar bugs later

Use natural KG query or the bug-learning tool before starting related work.

```text theme={null}
okto_pulse_kg_query_natural(query="similar past bugs in auth redirect handling")
```

## Related pages

* [Cards](/concepts/card)
* [Knowledge Graph](/concepts/knowledge-graph)
* [Sprints and cards tools](/reference/mcp/sprints-cards)
* [KG queries](/reference/mcp/kg/queries)
