> ## 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.

# Rules Overview

> Charter evaluates 18 rules across context, safety, operability, and governance to score AI-agent readiness.

Charter's v1 rule set evaluates whether a repository is safe, understandable, and runnable for coding agents. 18 rules across 9 categories — each one targeting a failure mode that causes agents to make confident mistakes, leak credentials, or become impossible to verify.

## Rule Categories

<CardGroup cols={3}>
  <Card title="Context" icon="file-text" href="/rules/AE-CTX-001">
    4 rules — agent instructions exist, stay current, and avoid noise. Agents that start with no orientation guess at the stack and edit files they shouldn't.
  </Card>

  <Card title="Secrets" icon="lock" href="/rules/AE-SEC-001">
    2 rules — raw credentials never reach agent-visible locations. Exposure at commit time means rotation is already required.
  </Card>

  <Card title="MCP Safety" icon="shield" href="/rules/AE-MCP-001">
    3 rules — MCP servers are pinned to exact versions, sourced from trusted origins, and protected by declared auth.
  </Card>

  <Card title="Agent Config" icon="robot" href="/rules/AE-CC-001">
    2 rules — hook configurations are safe, and the agent edit scope is explicit so agents know what they can and cannot touch.
  </Card>

  <Card title="Environment" icon="tool" href="/rules/AE-ENV-001">
    1 rule — a reproducible toolchain so an agent installs the right runtime and self-verifies against it.
  </Card>

  <Card title="CI" icon="git-pull-request" href="/rules/AE-CI-002">
    1 rule — Charter runs in CI so every pull request gets scored automatically and regressions surface immediately.
  </Card>

  <Card title="Testing" icon="flask" href="/rules/AE-TEST-001">
    1 rule — every active language in the repo has automated tests the agent can run to verify its own changes.
  </Card>

  <Card title="Autonomy" icon="route" href="/rules/AE-AUTO-001">
    1 rule — a discoverable verification command lets agents confirm their work without needing human guidance.
  </Card>

  <Card title="Governance" icon="scale" href="/rules/AE-SUPPRESS-001">
    3 rules — suppressions are reasoned, bounded, and carry an approver so the score stays meaningful over time.
  </Card>
</CardGroup>

## Score Formula

<Note>
  **Score formula:** `score = max(0, 100 − B×20 − H×10 − M×4 − L×1)` where B = Blocker findings, H = High, M = Medium, L = Low.

  **Hard caps:** Any raw-secret finding holds the final score at ≤49. Any Blocker finding holds the final score at ≤59. Caps are reserved for raw-secret and Blocker findings only, and apply after the base formula.

  Full model: [Scoring and caps](/docs/concepts/scoring-and-caps).
</Note>

## All 18 Rules

| Rule                                      | Name                            | Category     | Severity      | Auto-fixable    |
| ----------------------------------------- | ------------------------------- | ------------ | ------------- | --------------- |
| [AE-CTX-001](/rules/AE-CTX-001)           | AgentContextFilePresent         | Context      | Blocker       | ✅ Yes           |
| [AE-CTX-002](/rules/AE-CTX-002)           | AgentContextConsistency         | Context      | Medium        | ❌ No            |
| [AE-CTX-004](/rules/AE-CTX-004)           | AgentArtifactsGitignored        | Context      | Medium        | ✅ Yes           |
| [AE-CTX-006](/rules/AE-CTX-006)           | ContextOverEmphasis             | Context      | Informational | ❌ No            |
| [AE-SEC-001](/rules/AE-SEC-001)           | NoSecretsInAgentContext         | Secrets      | Blocker       | ❌ No            |
| [AE-SEC-002](/rules/AE-SEC-002)           | NoSecretsInMCPConfig            | Secrets      | Blocker       | ❌ No            |
| [AE-MCP-001](/rules/AE-MCP-001)           | MCPServerPinned                 | MCP Safety   | High          | ✅ Yes (partial) |
| [AE-MCP-002](/rules/AE-MCP-002)           | MCPRemoteTrusted                | MCP Safety   | High          | ❌ No            |
| [AE-MCP-003](/rules/AE-MCP-003)           | MCPAuthDeclared                 | MCP Safety   | High          | ❌ No            |
| [AE-CC-001](/rules/AE-CC-001)             | NoDangerousHookCommands         | Agent Config | Blocker       | ❌ No            |
| [AE-CC-002](/rules/AE-CC-002)             | AgentEditScopeDeclared          | Agent Config | High          | ❌ No            |
| [AE-ENV-001](/rules/AE-ENV-001)           | ReproducibleToolchain           | Environment  | Medium        | ❌ No            |
| [AE-CI-002](/rules/AE-CI-002)             | CharterInCI                     | CI           | Low           | ✅ Yes           |
| [AE-TEST-001](/rules/AE-TEST-001)         | TestsPresent                    | Testing      | High          | ❌ No            |
| [AE-AUTO-001](/rules/AE-AUTO-001)         | AutomationCommandDiscoverable   | Autonomy     | Medium        | ❌ No            |
| [AE-SUPPRESS-001](/rules/AE-SUPPRESS-001) | SuppressionHasReason            | Governance   | Medium        | ❌ No            |
| [AE-SUPPRESS-002](/rules/AE-SUPPRESS-002) | PermanentSuppressionHasApprover | Governance   | High          | ❌ No            |
| [AE-SUPPRESS-003](/rules/AE-SUPPRESS-003) | HighSuppressionRate             | Governance   | Informational | ❌ No            |

<Tip>
  Every rule has a dedicated page at `/rules/AE-*`. Use `charter explain <RULE-ID>` for a quick CLI lookup without leaving your terminal.
</Tip>

## Severity Reference

<AccordionGroup>
  <Accordion title="Blocker — −20 per finding, score capped at ≤59">
    The most severe class. A Blocker means the repo is not safe or understandable enough for autonomous agent work. Active Blockers hold the final score below 60 regardless of other findings. Rules: AE-CTX-001, AE-SEC-001, AE-SEC-002, AE-CC-001.
  </Accordion>

  <Accordion title="High — −10 per finding">
    Significant gaps that materially impair agent safety or reliability. No hard cap, but multiple High findings rapidly pull the score below useful thresholds. Rules: AE-MCP-001, AE-MCP-002, AE-MCP-003, AE-CC-002, AE-TEST-001, AE-SUPPRESS-002.
  </Accordion>

  <Accordion title="Medium — −4 per finding">
    Friction that degrades agent quality without being immediately dangerous. Rules: AE-CTX-002, AE-CTX-004, AE-ENV-001, AE-AUTO-001, AE-SUPPRESS-001.
  </Accordion>

  <Accordion title="Low — −1 per finding">
    Minor issues and hygiene gaps. Rules: AE-CI-002.
  </Accordion>

  <Accordion title="Informational — 0 points deducted">
    Surfaces signal worth reviewing but does not affect the score. Rules: AE-CTX-006, AE-SUPPRESS-003.
  </Accordion>
</AccordionGroup>
