Set up suss in this repository. suss reads the code and reports where the two sides of a boundary disagree, such as a route and the client that calls it. Run the commands below as written. For a flag that is not here, look in `npx @suss/cli --help` instead of guessing, and for anything else read https://github.com/nimbuscloud-ai/suss/blob/main/AGENTS.md.

1. Install the CLI as a dev dependency with the project's package manager, for npm `npm install --save-dev @suss/cli`. Skip this when the repository has no package.json, since `npx @suss/cli` fetches it.

2. Run `npx @suss/cli init --write`. It prints the packs suss found here and writes them to `suss.json` at the root, with a config file beside it for each pack that takes one, so later runs and the MCP server read the same packs. If a `suss.json` is already there, init leaves it alone and says so; keep it, and tell me it was already there. If init says it left a pack out, tell me which one and what it needs.

3. Run `npx @suss/cli check --json` at the repository root. If `pairs` in its output is empty, stop here and tell me that nothing paired, quoting any entry under `run` and what suss printed about the files it read. A report with no findings looks the same whether both sides agreed or nothing was compared, so never report an empty one as a pass. Otherwise run `npx @suss/cli map` and tell me the path of the page it wrote, which I can open in a browser.

Step 4 depends on which coding agent you are. Follow the section for your agent and skip the others. If none of them is yours, follow the last one.

## Claude Code

4. Install the suss plugin for Claude Code, which adds the suss MCP server, hooks that check each edit you make, and its skills. Run `claude plugin marketplace add nimbuscloud-ai/suss --sparse .claude-plugin plugins && claude plugin install suss@suss`, and tell me to run `/reload-plugins` so the plugin loads.

## Cursor

4. Add the suss MCP server to `.cursor/mcp.json` at the repository root, keeping any servers already in the file:

~~~json
{
  "mcpServers": {
    "suss": {
      "command": "npx",
      "args": ["-y", "@suss/mcp", "${workspaceFolder}"]
    }
  }
}
~~~

Then write `.cursor/rules/suss.mdc` with the content below, and tell me to check that the suss server is turned on in Cursor's MCP settings.

~~~md
---
alwaysApply: true
---

## suss

suss checks both sides of each boundary in this repository, such as a route and the code that calls it, or a table and the code that reads and writes it.

- Before changing a route, a table, a queue or a function signature, ask the suss MCP server what reads, writes or calls it with `suss_ask`.
- After an edit that crosses a boundary, run `suss_check`. Fix what it reports, or tell the developer why a finding should stay.
- A `suss_check` with no findings means the two sides agreed only when `suss_boundaries` lists a boundary with both sides present.
~~~

## Codex

4. Add the suss MCP server to `.codex/config.toml` at the repository root:

~~~toml
[mcp_servers.suss]
command = "npx"
args = ["-y", "@suss/mcp"]
~~~

Given no path, the server reads the directory Codex starts in, so tell me to start Codex at the repository root. Codex reads a project's `.codex/config.toml` only once the project is trusted. Then add the section below to `AGENTS.md` at the repository root, creating the file if there is none, and tell me to restart Codex so it starts the server.

~~~md
## suss

suss checks both sides of each boundary in this repository, such as a route and the code that calls it, or a table and the code that reads and writes it.

- Before changing a route, a table, a queue or a function signature, ask the suss MCP server what reads, writes or calls it with `suss_ask`.
- After an edit that crosses a boundary, run `suss_check`. Fix what it reports, or tell the developer why a finding should stay.
- A `suss_check` with no findings means the two sides agreed only when `suss_boundaries` lists a boundary with both sides present.
~~~

## Windsurf (Devin Desktop)

4. Add the suss MCP server to `.devin/mcp_config.local.json` at the repository root, keeping any servers already in the file. Windsurf is now called Devin Desktop, and it reads MCP servers from the `.devin` folder. Add `.devin/mcp_config.local.json` to `.gitignore` if it is not listed there, since the path in it is only right on this machine.

~~~json
{
  "mcpServers": {
    "suss": {
      "command": "npx",
      "args": ["-y", "@suss/mcp", "<the absolute path of this repository>"]
    }
  }
}
~~~

Then add the section below to `AGENTS.md` at the repository root, creating the file if there is none, and tell me to refresh the server list under MCP servers in Devin Desktop's settings and check that suss is turned on.

~~~md
## suss

suss checks both sides of each boundary in this repository, such as a route and the code that calls it, or a table and the code that reads and writes it.

- Before changing a route, a table, a queue or a function signature, ask the suss MCP server what reads, writes or calls it with `suss_ask`.
- After an edit that crosses a boundary, run `suss_check`. Fix what it reports, or tell the developer why a finding should stay.
- A `suss_check` with no findings means the two sides agreed only when `suss_boundaries` lists a boundary with both sides present.
~~~

## Any other agent

4. Add the suss MCP server to the MCP configuration your host reads, as a stdio server whose command is `npx` with the arguments `-y`, `@suss/mcp` and the absolute path of this repository. Then add the section below to the instructions file your host reads, such as `AGENTS.md` at the repository root. If you do not know where your host keeps either one, ask me instead of guessing. Tell me to restart the host so it starts the server.

~~~md
## suss

suss checks both sides of each boundary in this repository, such as a route and the code that calls it, or a table and the code that reads and writes it.

- Before changing a route, a table, a queue or a function signature, ask the suss MCP server what reads, writes or calls it with `suss_ask`.
- After an edit that crosses a boundary, run `suss_check`. Fix what it reports, or tell the developer why a finding should stay.
- A `suss_check` with no findings means the two sides agreed only when `suss_boundaries` lists a boundary with both sides present.
~~~

## Every agent

5. If the repository has a `.github/workflows` folder, add `.github/workflows/suss.yml` below, so each pull request gets a comment saying what it changes about the routes, tables and queues it touches. Put the repository's default branch in place of `main`, and the project's own install command in place of `npm ci`, or drop that step when nothing installs from npm. If the repository does not use GitHub Actions, skip this step and say so.

~~~yaml
name: suss

on:
  pull_request:
  push:
    branches: [main]

jobs:
  behavior-diff:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - uses: nimbuscloud-ai/suss/.github/actions/inspect-diff@v0.40.1
~~~

6. Finish with a short report: the packs suss found, which boundaries paired (`pairs`), which had only one side (`unmatched`), each entry under `findings` and `run`, every file you created or changed to set suss up, and what I still have to do. End it by telling me how to check that it worked: after the restart, asking you to call `suss_status` should show the commands the server ran with none failed, and `suss_boundaries` should list the boundaries that paired above. If you added the workflow, the next pull request should get a comment from suss.
