
> Three output modes: human-readable (default), compact (for scripting), and JSON (for CI and tooling).

## Human-readable (default)

The default output is a multi-section terminal report:

```text
vary var -- Adaptive Review Loop
────────────────────────────────────────
Stage: check | Status: BLOCKED

Changes: 9 files (+3 ~5 -1)
  source: 4  test: 3  config: 2

Check: 2 errors, 1 warning
  src/app.vary:12  error: type mismatch
  src/lib.vary:45  error: undefined symbol

Blockers:
  1. Fix 2 check error(s)

Next: vary check src/app.vary src/lib.vary
```

Sections include:

| Section | Content |
|---------|---------|
| Header | Current stage and terminal classification |
| Change summary | Category breakdowns |
| Per-stage results | Check errors, test pass/fail, mutation scores |
| Blocker listing | Fix suggestions |
| No-progress warning | Shown if stuck across multiple runs |
| Next-step recommendation | Exact command to run |

### Dry-run output

With `--dry-run`, the human output shows the planned pipeline instead of results:

```text
vary var -- Dry Run
────────────────────────────────────────
Significance: HIGH (source changes in PURE_LOGIC area)

  [RUN]  discovery  9 files
  [RUN]  check      4 files
  [RUN]  test       3 files
  [SKIP] mutation   Budget capped at medium
  [SKIP] review     Not enabled
```

Add `--explain` to include per-stage rationale and scoped file lists.

## Compact (`--compact`)

Terse multi-line output for scripting and CI. One line per concern, parseable with `grep`, `cut`, or `awk`:

```text
stage=check status=blocked blockers=2
changes=+3 ~5 -1 src:4 test:3 cfg:2
check: errors=2 warnings=1
next: fix 2 check error(s)
```

| Line | Content |
|------|---------|
| 1 | Stage, status, and blocker count |
| 2 | Change summary (additions, modifications, deletions, category counts) |
| 3 | Per-stage result (one line per completed stage) |
| 4 | Next action recommendation |

## JSON (`--json`)

Machine-readable JSON output following a versioned schema. For CI integration, dashboards, or programmatic consumption.

### Schema version 1.0.0

Top-level fields (stable; not renamed or removed without a version bump):

| Field | Type | Description |
|-------|------|-------------|
| `schema_version` | String | Always `"1.0.0"` |
| `stage` | String | Current pipeline stage |
| `outcome` | String | Terminal classification: `complete`, `blocked`, `partial`, `advisory` |
| `changeSet` | Object | `{ size, files: [{ path, status, category, code_area }] }` |
| `comparison` | Object or null | Delta to previous run: fixed, new_files, newly_affected, unchanged |
| `completedSteps` | Array | Stages that have completed |
| `blockers` | Array | Current blocking issues (empty when unblocked) |
| `recommendation` | String | Human-readable next-action recommendation |
| `nextCommand` | String or null | Exact CLI command to run next |
| `confidence` | String | `"high"`, `"medium"`, or `"low"` |
| `check` | Object or null | Check results: `{ errors, warnings, details }` |
| `test` | Object or null | Test results: `{ passed, failed, skipped, details }` |
| `mutation` | Object or null | Mutation results: `{ score, threshold, details }` |
| `review` | Object or null | Review packet summary |
| `noProgress` | Boolean | True if stuck without improvement |
| `noProgressDetails` | Object or null | Runs without improvement, stuck stage, repeated blockers |

### Example

```json
{
  "schema_version": "1.0.0",
  "stage": "check",
  "outcome": "blocked",
  "changeSet": {
    "size": 9,
    "files": [
      { "path": "src/app.vary", "status": "M", "category": "SOURCE", "code_area": "PURE_LOGIC" },
      { "path": "tests/test_app.vary", "status": "M", "category": "TEST", "code_area": "TEST" }
    ]
  },
  "completedSteps": ["discovery", "check"],
  "blockers": ["2 check errors in src/app.vary, src/lib.vary"],
  "recommendation": "fix 2 check error(s)",
  "nextCommand": "vary check src/app.vary src/lib.vary",
  "confidence": "high",
  "check": { "errors": 2, "warnings": 1 },
  "noProgress": false
}
```

### Dry-run JSON

With `--dry-run --json`, the output includes a `dry_run: true` flag and replaces result fields with a `stages` array of planned actions:

```json
{
  "schema_version": "1.0.0",
  "dry_run": true,
  "significance": "high",
  "significance_rationale": "Source changes in PURE_LOGIC area",
  "stages": [
    { "stage": "check", "action": "run", "rationale": "Source files changed", "files": ["src/app.vary"] },
    { "stage": "mutation", "action": "skip", "rationale": "Budget capped at medium" }
  ]
}
```
