---
name: step-06-resolve
description: Fix BLOCKING findings from adversarial review
model: opus
prev_step: steps/step-05-deep-review.md
next_step: steps/step-07-tests.md
---

# Step 6: Resolve (if BLOCKING findings)

**Goal:** Fix all BLOCKING findings from Deep Review (step-05). Re-validate after fixes.

---

## 0. Task Progress

### Progress Tracker Update
```
TaskUpdate(taskId: progress_tracker_id,
  description: "Module: {module_code}. Current: step-06 (Resolve)",
  activeForm: "Fixing findings")
```

---

## 1. Create Finding Tasks

For each BLOCKING finding from step-05:

```
TaskCreate(subject: "Fix: {F01} — {short description}",
  description: "File: {path}:{line}\nIssue: {description}\nFix: {approach}",
  activeForm: "Fixing {F01}",
  metadata: { finding_id: "F01", severity: "BLOCKING", source_file: "{path}" })
```

Then process each finding by updating task status:

```
TaskUpdate(taskId: finding_task_id, status: "in_progress")
... apply fix ...
TaskUpdate(taskId: finding_task_id, status: "completed")
```

**Fixing rules:**
- Use the SAME skill/MCP that created the original code
- If the finding is in a controller, use /controller or MCP scaffold_extension
- If the finding is in seed data, use MCP generate_permissions
- If the finding is in frontend, use /ui-components or MCP scaffold_routes
- Do not fix by writing raw SmartStack code

---

## 2. Apply Fixes

For each finding:

```
1. Read the file to understand current state
2. Apply fix via appropriate skill/MCP
3. Verify fix addresses the finding
4. Mark finding as RESOLVED
```

---

## 3. Re-Validate

After all findings are fixed:

```
1. MCP validate_conventions → 0 errors
2. dotnet build --no-restore → PASS
3. npm run typecheck → PASS (if frontend)
```

---

## 4. Commit Fixes

```
fix({module}): resolve review findings {F01, F02, ...}
```

---

## 5. Resolution Summary

```
**APEX SmartStack - Resolve Complete**

**Findings:** {count}
**Resolved:** {count}
**Remaining:** {count} (should be 0)

| Finding | Status | Fix Applied |
|---------|--------|-------------|
| F01 | RESOLVED | {description} |
| F02 | RESOLVED | {description} |
```

---

## 6. Save Output (if save_mode)

Write to `{output_dir}/06-resolve.md` with resolution log.

---

## 7. Route to Next Step

```
IF remaining findings > 0:
  → Loop: fix remaining, re-validate (max 3 iterations)
  → If stuck, ask user before continuing

→ Load steps/step-07-tests.md — required, do not skip
```

After resolving all findings, proceed to step-07 immediately.
