> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joystream.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# jstm agent conform

> Check a built agent package against the agent spec — flags, lanes, ignores, JSON schema, and exit codes.

Run conformance over a local agent package directory. It reads the package, compares it against a vendored copy of the spec, and reports every place it diverges.

```bash theme={null}
jstm agent conform ./month-end-close
```

`<package>` is the path to the agent package directory — the one containing `manifest.yaml`.

No API key and no network are required. The CLI runs the deterministic lanes only.

## Options

| Option                    | Default                             | Description                                                                                 |
| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------- |
| `PACKAGE`                 | —                                   | Required. Path to the agent package directory                                               |
| `--spec <version>`        | `v0.5`                              | Spec pack version to check against                                                          |
| `--json`                  | off                                 | Emit the full report as one line of JSON                                                    |
| `--source <lanes>`        | all                                 | Comma-separated lanes to run. Available in the CLI: `schema`, `spec_conflict`               |
| `--fail-on <error\|none>` | `error`                             | Exit-code threshold. `error` fails on error-severity flags; `none` makes all flags advisory |
| `--ignore <flag-id>`      | —                                   | Suppress specific flag ids for this run. Repeatable                                         |
| `--ignore-rule <rule-id>` | —                                   | Suppress every present flag under a rule, this run. Repeatable                              |
| `--ignore-file <path>`    | `<package>/conformance-ignore.yaml` | Path to the durable allowlist                                                               |
| `--write-baseline`        | off                                 | Snapshot all current flags into the allowlist, then exit                                    |
| `--show-ignored`          | off                                 | Include suppressed flags in the report                                                      |

`--json` is the only output-format switch. Text is the default.

## Lanes

| Lane            | Deterministic                     | Default severity                  | Runs in the CLI |
| --------------- | --------------------------------- | --------------------------------- | --------------- |
| `schema`        | Yes, authoritative                | `error`                           | Yes             |
| `spec_conflict` | Yes, flags spec residue           | `warning`, overridable to `error` | Yes             |
| `judge`         | No, semantic and needs an API key | `warning`                         | No              |

<Warning>
  `schema` and `spec_conflict` are required lanes. If you filter one out with `--source`, or it errors, the run cannot certify and exits `1` — even with zero flags. "We didn't check" is never a pass.
</Warning>

## Output

Human output, the default:

```text theme={null}
Conformance: spec v05@84aa360f…
lanes: schema=ran spec_conflict=ran
  [error] SCHEMA_NAME_REQUIRED  (manifest.name)  id=a1edffb8…
      name is missing
FAIL: schema=1 judge=0 spec_conflict=0 ignored=0 (exit 1)
```

With `--json`, one report object:

| Field         | Type   | Description                                                   |
| ------------- | ------ | ------------------------------------------------------------- |
| `spec_pack`   | string | Spec pack id, as `v05@<hash>`                                 |
| `lanes_run`   | object | `{"schema": "ran" \| "did_not_run", …}`                       |
| `flags`       | array  | Active, un-ignored flags. These count toward the verdict      |
| `ignored`     | array  | Suppressed flags. Populated with `--show-ignored`             |
| `summary`     | object | `{"schema": N, "judge": N, "spec_conflict": N, "ignored": N}` |
| `exit_code`   | int    | `0` pass, `1` fail                                            |
| `lane_errors` | object | `{"<lane>": "<ErrorType>"}` for any lane that crashed         |

Each flag object:

```json theme={null}
{
  "id": "a1edffb8…",
  "source": "schema",
  "severity": "error",
  "rule_id": "SCHEMA_NAME_REQUIRED",
  "artifact_target": "manifest.name",
  "spec_anchor": "field-reference.md#identity",
  "violation_class": "missing_required_field",
  "rationale": "name is missing",
  "related_targets": []
}
```

The `id` is `sha256(rule_id + artifact_target + violation_class)`. It is stable across runs, so `--ignore <id>` keeps working even when a rationale is rephrased.

## Exit codes

| Exit | Meaning                                                                                                                                                                |
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `0`  | Pass. No un-ignored flag at or above `--fail-on`, and all required lanes ran                                                                                           |
| `1`  | Fail. A blocking flag, or a required lane was degraded                                                                                                                 |
| `2`  | Usage or input error. Package directory not found, an invalid flag value, an unknown `--source` lane, an unreadable allowlist, or a package the engine refused to read |

The command exits with the report's own `exit_code`, so it drops straight into CI:

```bash theme={null}
jstm agent conform ./month-end-close --json --fail-on error
```

## See also

* [Agent package conformance](/features/conformance/overview) — the concept.
* [Reading the flag report](/features/conformance/flag-report) — every field.
* [Acknowledging flags](/features/conformance/ignores) — ignores, allowlists, baselines.
