> ## Documentation Index
> Fetch the complete documentation index at: https://78bb1dc-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://78bb1dc-archee-studio.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://78bb1dc-archee-studio.manicule.dev/api/mcp.
> Every agent surface: https://78bb1dc-archee-studio.manicule.dev/.well-known/llms-manifest.json

# The .arc language (/arc/overview)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 608 · updated: 2026-12-05 -->
Related: [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), [Diagnostics](/arc/diagnostics.md)

> What a .arc file is, how files fit together, and the two commands that format and check them.

`.arc` is the source language of a design record. Units, parts, ports, mates, calculations and citations are syntax, so one fact graph serves the design, the drawing and the report, and [ARQL](/arql/overview) can query it.

## The model

* One `.arc` file is one part. An assembly is a part whose body places child parts, in a tree.
* A standard part is a library reference, never a file.
* A drawing is derived. Sheets and views are declared over parts, so views align by construction.
* Every value has a unit and a dimension. The compiler checks them.
* Every value can name its source, and the compiler resolves it.
* Values behave like a spreadsheet: change one and its dependents follow, in dependency order.

## A first file

```text
arc 0.1
use T1 = uploads/giao-trinh-ctm.pdf
use standards = lib archee.standards

part shaft2 kind shaft {
  in T: torque
  in n: speed
  let tau: stress = T1."Bảng 10.5"["C45"].tau
  let d_min: length = cbrt(16 * T / (pi * tau)) to mm
  let d1: length = up(d_min, standards.d)
  port s1: cyl(d = d1 k6, len = 40 mm, at = 0 mm)
  check tau_ok: 16 * T / (pi * d1^3) <= tau
}
```

The shaft takes a torque and a speed. It reads the allowable stress from a cited table, computes the minimum diameter, rounds up to a preferred size and declares a cylinder port with a `k6` fit. When the limit fails, `arc check` reports `calc.check` on that line.

## Lay out a record

```text
rec/
  req.arc  gbox.arc  shaft2.arc  wheel2.arc  report.arc
  uploads/
    giao-trinh-ctm.pdf
    giao-trinh-ctm/index.json
```

`use` names another file, an upload or a library. Files may use each other in any order; the compiler resolves them.

## Format and check

```bash
agentcad arc fmt rec/shaft2.arc
agentcad arc check rec/
```

* `arc fmt` rewrites a file into canonical order and layout. With `--check`, it reports files that differ and leaves them alone.
* `arc check` parses, type-checks, evaluates and verifies every `.arc` file in the folder. It prints one diagnostic per line, or `ok (N files checked)`, and exits 0 on success and 1 on error. Add `--json` for a record.

See [Diagnostics](/arc/diagnostics) for every code.

## Read next

* [Syntax](/arc/syntax)
* [Units and expressions](/arc/units)
* [Parts, ports and mates](/arc/parts)
* [Citations](/arc/citations)
* [Sheets and reports](/arc/sheets)
