# TrueMend — Code Quality Engine (Roo Code)

Use TrueMend for code quality analysis, review, and improvement.

## Primary Loop: `next` Workflow

1. `truemend next <path>` — Get the single highest-impact issue
2. Fix the issue
3. `truemend resolve <id> --status fixed` — Mark done
4. Repeat from step 1

## Quick Start
```bash
truemend next src/                     # Next highest-priority issue
truemend report health .                   # Full health overview
truemend analyze src/                  # Find anti-patterns
truemend fix src/                      # Auto-fix deterministic issues ($0, reversible)
truemend workflow verify src/                   # Confirm improvement
```

## Analysis
```bash
truemend analyze <path> --quick         # Metrics only, <2s
truemend fix <path> --apply             # Apply deterministic fixes, each re-verified
truemend audit <path> --since HEAD~1    # Only functions changed since HEAD~1
truemend analyze <path> --ci            # CI gate (exit 0/1/2)
truemend analyze <path> --json          # Machine-readable output
```

## Review and Planning
```bash
truemend audit --only review <path>                  # 20-dimension subjective review
truemend report cost <path>                    # Tech debt in dollars
truemend workflow roadmap <path> --strategy impact  # Prioritized refactoring plan
truemend audit --only coupling <path>                # Module coupling analysis
```

## Advanced
```bash
truemend report compliance <path> --framework SOC2
truemend workflow postmortem HEAD~5 HEAD
truemend audit --only slop <path>
truemend watch <path>
truemend setup hooks install --type pre-commit
truemend audit --only ux <path>
```

## Aggression Presets
```bash
truemend analyze src/ --aggression discovery      # Lenient
truemend analyze src/ --aggression recommended    # Default
truemend analyze src/ --aggression excellence     # Strict
truemend analyze src/ --aggression beast          # Very strict
truemend analyze src/ --aggression zealot         # Maximum
```

## Severity: critical > high > medium > low
## Fix Types: deterministic (auto) > cataloged_refactor (LLM) > structural_rewrite (human)
