---
description: Diagnose and fix a failing build or CI pipeline.
argument-hint: [error-log-path]
---

# /fix-build

## Purpose

Find the root cause of a build/CI failure and fix it without masking the underlying issue.

## Required context

- The failing log, `turbo.json`, `package.json`, `dotnet/Directory.Build.props`, `.gitlab-ci.yml`

## Inputs

- `$1` — optional path to an error log; otherwise reproduce locally

## Execution steps

1. Reproduce: `pnpm build` / `dotnet build` / `pnpm validate` as relevant.
2. Read the FIRST error (later ones are often cascades).
3. Identify root cause — never suppress a warning-as-error without an ADR-worthy reason.
4. Fix, re-run, confirm green.

## Validation checklist

- [ ] Original command now passes
- [ ] No new warnings introduced
- [ ] Fix addresses cause, not symptom

## Expected output

A green build + a one-line explanation of the root cause.

## Failure handling

If the fix requires suppressing a rule, document why inline and flag it for review.
