# .cursorrules Snippet for GitScope

Add this to your repo's `.cursorrules` to enable GitScope in Cursor.

## One-liner (recommended)

```
Before reviewing diffs or PRs, run `gitscope review <base>..HEAD` and address any findings.
```

## Expanded config

```
## Code Review with GitScope

When reviewing changes or PRs, first run:

    gitscope review <base>..HEAD

This analyzes the diff structurally and reports signature changes, breaking APIs, and caller impact.

- Exit 0 = nothing noteworthy (stay silent on structural issues)
- Exit 1 = findings to address (read and act on each)
- Use `gitscope review <base>..HEAD --format json` for structured output
```

## Example output

```
⚠ GitScope: 1 change needs review

1. DEFAULT VALUE CHANGED: connect(host, port=5432) → connect(host, port=3306)
   File: src/db/client.py:28
   Impact: 4 callers rely on the default:
     app.py:15  `connect("localhost")`
     worker.py:8  `connect(db_host)`
   Review: Verify callers expect the new default value
```
