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

# explain

> Look up a Charter rule by ID and print its catalog metadata.

`charter explain <RULE-ID>` is the rule lookup command. It prints catalog metadata for a single rule: ID, name, category, severity, description, and docs URL.

## Usage

<CodeGroup>
  ```bash Text output theme={null}
  charter explain AE-CTX-001
  ```

  ```bash JSON output theme={null}
  charter explain AE-MCP-001 --format json
  ```
</CodeGroup>

<Frame caption="charter explain AE-CTX-001 — rule catalog metadata in the terminal">
  <img src="https://mintcdn.com/tashfiq/0jvz8Cxy5tEjU5em/images/screenshots/explain-output.webp?fit=max&auto=format&n=0jvz8Cxy5tEjU5em&q=85&s=de311e8f7e631dcca0b737d6d30eec7f" alt="charter explain output showing rule metadata" width="1728" height="810" data-path="images/screenshots/explain-output.webp" />
</Frame>

## Flags

<ResponseField name="--format" type="text | json">
  Output format. Defaults to `text`.
</ResponseField>

## Example Output

```text theme={null}
Rule:        AE-CTX-001
Name:        AgentContextFilePresent
Category:    Context
Severity:    Blocker
Description: Agent context file must exist, be meaningful, and fit budget.
Docs:        https://use-charter.dev/rules/AE-CTX-001
```

## When to Use It

Use `charter explain` when you already have a rule ID — from `charter doctor` output, `charter report` findings, CI logs, or a GitHub Code Scanning result — and want the fastest explanation without leaving the terminal. Follow the linked docs URL for the full rationale and remediation guidance.

<Tip>
  Every rule reference page on this site corresponds to `charter explain <RULE-ID>` — same data, richer presentation with full rationale, remediation guidance, and OWASP mapping.
</Tip>

## Exit codes

| Code | Meaning | When                                                                 |
| ---- | ------- | -------------------------------------------------------------------- |
| `0`  | Pass    | The rule was found and rendered successfully                         |
| `2`  | Error   | Unknown rule ID, an invalid `--format` value, or another usage error |

## Related

<CardGroup cols={2}>
  <Card title="Rules overview" icon="list" href="/rules/overview">
    The full catalog of Charter rules and categories.
  </Card>

  <Card title="doctor" icon="stethoscope" href="/cli/doctor">
    The scan that surfaces the rule IDs you look up here.
  </Card>
</CardGroup>
