# 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 dashboard .                   # Full health overview
truemend analyze src/                  # Find anti-patterns (5401 patterns, 22 languages)
truemend fix src/                      # Auto-fix deterministic issues ($0, reversible)
truemend verify src/                   # Confirm improvement
```

## Analysis
```bash
truemend analyze <path> --quick         # Metrics only, <2s
truemend analyze <path> --improve       # Full pipeline: analyze + fix + validate
truemend analyze <path> --diff HEAD~1   # Changed files only
truemend analyze <path> --ci            # CI gate (exit 0/1/2)
truemend analyze <path> --json          # Machine-readable output
```

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

## Advanced
```bash
truemend compliance <path> --framework SOC2
truemend postmortem HEAD~5 HEAD
truemend slop <path>
truemend watch <path>
truemend hooks install --type pre-commit
truemend ux-audit <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)
