---
title: Check a Repository
description: Run Validation against a discovered or explicit Repository Root, interpret complete and incomplete Check Reports, and follow recovery guidance.
---

Use this guide when you need to validate repository documentation or integrate a Check into automation.

## Choose the Repository Root

Run from inside the target repository to use nearest-ancestor discovery. Use `--root <path>` when the invocation should name one explicit Repository Root. Relative paths resolve from the current directory, and an invalid explicit root never falls back to an ancestor.

## Run the Check

Run Validation against the discovered Repository Root.

```sh
presswork check
```

For automation that names the boundary, pass the Repository Root explicitly.

```sh
presswork check --root /path/to/repository
```

Use `--json` when the consumer needs one machine-readable Check Report object followed by a newline. Use `--no-color` when human output must not contain ANSI decoration.

## Interpret the outcome

| Exit | Report state                              | Next action                                                                 |
| ---- | ----------------------------------------- | --------------------------------------------------------------------------- |
| `0`  | Complete, with no Violations.             | No report recovery is required.                                             |
| `1`  | Complete, with one or more Violations.    | Change each identified source according to its `recovery` guidance.         |
| `2`  | Incomplete, with Operational Diagnostics. | Restore each named resource or operation according to its `recovery` field. |

> **Recovery boundaries**
>
> An incomplete report can retain Violations established during completed evaluations. Address both arrays before treating the documentation as valid.
>
> If Repository Root or Presswork Configuration loading fails before a report exists, standard output is empty and standard error contains one diagnostic. Follow its `recovery` guidance, then rerun the command.

After applying the reported recovery actions, rerun the same Check command. The recovery is complete when the report has `complete: true`, `violations: []`, and `operationalDiagnostics: []`.

Use [Check Report](/check-report/) for fields and ordering, [Rules and diagnostics](/rules-and-diagnostics/) for identifiers, or [Presswork Configuration](/configuration/) to change repository policy.
