# get_conformance

get_conformance lists the cross-repo dependencies that break the workspace's declared dependency rules, plus every circular service dependency.

`get_conformance` checks the live architecture against the dependency
rules your team declares (for example, the frontend never depends on the
database directly) and lists circular dependencies between services. It
reads the conformance report built by `repowise update --workspace`.
Rules are declared under `conformance:` in `.repowise-workspace.yaml`, as
described in [Conformance](https://docs.repowise.dev/multi-repo/conformance).

This tool is workspace-only and off by default. Enable it with
`repowise mcp --tools +get_conformance` or persist it with
`repowise config set mcp.tools standard,+get_conformance`.
See [Tool profiles](https://docs.repowise.dev/agents/tool-profiles).

## When to call

- **Before a refactor that moves service boundaries**, to see which rules
  the current dependencies already break.
- **Auditing** whether the live architecture still matches the intended one.
- **Scoping to one repo** when reviewing a change in that repo.

## Parameters

| Name | Type | Default | Description |
|---|---|---|---|
| `repo` | string |  | Repo alias. Limits findings to violations with an endpoint in this repo and cycles that pass through it. |

## Returns

| Field | Meaning |
|---|---|
| `rules_evaluated` | Declared rules that were checked |
| `violations` | Up to 25 violations: `rule_source`, `rule_target`, `rule_description`, `source`, `source_name`, `target`, `target_name`, `edge_id`, `edge_kind`, `severity` |
| `violations_truncated` | How many violations are beyond the 25 listed |
| `cycles` | Up to 25 dependency cycles: `nodes`, `edge_ids`, `length`, `leg_kinds`, `async_legs` |
| `cycles_truncated` | How many cycles are beyond the 25 listed |
| `violation_count` | All violations in scope |
| `cycle_count` | Cycles in scope |
| `total_cycles` | Cycles in the whole workspace. With `repo`, the count for that repo |
| `total_capped` | `true` when the enumeration budget stopped the count, so `total_cycles` is a floor |
| `checked_at` | When the conformance check ran |
| `cycles_determined` | `false` when the graph's evidence cannot support a cycle verdict |
| `evidence` | The graph's evidence state and the reasons behind it |
| `summary` | One sentence with the counts |

With no rules declared, the tool still reports dependency cycles, and the
summary says so.

## Example

```python
get_conformance()

get_conformance(repo="frontend")
```

```json
{
  "rules_evaluated": 3,
  "violations": [
    {
      "rule_source": "frontend",
      "rule_target": "db",
      "rule_description": "The UI must call the API, never the database directly.",
      "source": "frontend",
      "source_name": "frontend",
      "target": "db",
      "target_name": "db",
      "edge_id": "frontend->db:package",
      "edge_kind": "package",
      "severity": "violation"
    }
  ],
  "violations_truncated": 0,
  "cycles": [],
  "cycles_truncated": 0,
  "violation_count": 1,
  "cycle_count": 0,
  "total_cycles": 0,
  "total_capped": false,
  "checked_at": "2026-11-25T09:12:00Z",
  "cycles_determined": true,
  "summary": "1 architecture rule violation(s) and 0 dependency cycle(s) from 3 declared rule(s)."
}
```

## Things worth knowing

- **Workspace mode only.** Outside a workspace the call returns an
  `invalid_args` error: `get_conformance is only available in workspace mode.`
- **Needs a report.** Before `repowise update --workspace` has run, the
  call returns a `no_index` error that names that command and the
  `conformance:` block.
- **Zero counts are never guessed.** A stored report the check never
  wrote into returns a `no_index` error, so an agent never reads empty
  counts as a clean bill.
- **Cycles not determined** (`cycles_determined: false`) means the graph
  had too little evidence; the summary names the reason.
- **Allow rules** are exceptions to deny rules, so an allowed edge never
  appears as a violation.

## Next
- [Conformance](https://docs.repowise.dev/multi-repo/conformance) shows how to declare rules and matchers.
- [get_architecture](https://docs.repowise.dev/mcp/get-architecture) rolls violations and cycles into the architecture score.
- [Workspace MCP mode](https://docs.repowise.dev/multi-repo/workspace-mcp) covers the other workspace tools.
