> ## Documentation Index
> Fetch the complete documentation index at: https://e054c49-archee-studio.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://e054c49-archee-studio.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://e054c49-archee-studio.manicule.dev/api/mcp.
> Every agent surface: https://e054c49-archee-studio.manicule.dev/.well-known/llms-manifest.json

# Diagnostics (/arc/diagnostics)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 655 · updated: 2026-12-05 -->
Related: [The .arc language](/arc/overview.md), [Syntax](/arc/syntax.md), [Units and expressions](/arc/units.md), [Parts, ports and mates](/arc/parts.md), [Citations](/arc/citations.md), [Sheets and reports](/arc/sheets.md)

> The one-line diagnostic format and every code arc check reports, with the fix for each.

Every diagnostic is one line:

```text
id rule: what → fix (@source)
```

`@source` is omitted when there is none.

```text
shaft2/tau_ok calc.check: check `tau_ok` failed → adjust design parameters so the check holds
shaft2/d_min U01: length expected, got torque → divide by tau before cbrt
shaft2/tau C01: label "Bảng 10.9" not in uploads/x/index.json → use one of: "Bảng 10.5", "Bảng 10.6"
```

The id is the path of the node: `gbox/shaft2/s1` is port `s1` of instance `shaft2` in `gbox`. In an expression, write it with dots: `shaft2.s1.d`.

## Codes

| Code           | Meaning                                          |
| -------------- | ------------------------------------------------ |
| `L01`          | A bad character or a tab                         |
| `P01`          | An unexpected token                              |
| `P02`          | An unclosed brace                                |
| `P03`          | The file is not canonical; run `arc fmt`         |
| `P04`          | A reserved member, `shape` or `pose`             |
| `U01`          | A dimension mismatch                             |
| `U02`          | An unknown unit                                  |
| `U03`          | A root of a dimension with a bad exponent        |
| `U04`          | A non-integer in an integer context              |
| `N01`          | An unknown name, including an unknown paper id   |
| `N02`          | A duplicate id                                   |
| `E01`          | A cycle in the values                            |
| `E02`          | An unbound `in`                                  |
| `E03`          | An override of an unknown field                  |
| `E04`          | Two overrides of one field                       |
| `E05`          | A variant chain that is too deep                 |
| `C01` to `C05` | Citation errors; see [Citations](/arc/citations) |
| `M01`          | A mate between ports of the wrong kind           |
| `M02`          | A missing port or library reference              |
| `A01`          | An assumed value (information)                   |
| `A02`          | A prose section whose values changed             |
| `calc.check`   | A `check` that failed                            |

## Severity

A resolution or type error fails `arc check` with exit 1. `A01` is information and does not change the exit code.

## Fix loop

1. Run `agentcad arc fmt FILE` for `P03`.
2. For every other code, read the fix after the arrow, edit the line and run `agentcad arc check DIR` again.
