---
description: Run test suite and fix issues
argument-hint: "[issues]"
---

## Reported Issues:

<issues>$ARGUMENTS</issues>

## Workflow:

1. Use `build` agent to compile the code and fix all syntax errors if any.
2. Then use `build` agent to run the tests.
3. If there are issues or failed tests, use `build` agent with debugging skills to find the root cause.
4. For complex issues (≥3 phases), delegate to `plan` agent to create an implementation plan:
   - Create backlog task: `backlog_task_create(title="Test Fix: <issue>")`
   - Update @.opencode/memory/memory.md with approach
   - Follow progressive disclosure structure
5. Then implement the plan step by step.
6. Use `code-auditor` agent to run tests after implementing the plan, ensure quality and security.
7. If there are critical issues, `build` agent will improve the code and test everything again.
8. Repeat this process until all tests pass and no more errors are reported.

**Agent Delegation:**

- Primary: `build` (handles compilation, testing, debugging, implementation)
- Complex Planning: `plan` (for multi-phase issues)
- Quality Gate: `code-auditor` (testing + security + review)

**IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
