agentleFS
NVIDIAKnown publisherNVIDIA/Personal-AI-Router/.cursor/rules/service-contracts.mdc

Personal-AI-Router / rules

Cursor rule1.5k starsChanged 2 months agoApache-2.0View on GitHub

Verify desktop ↔ services JSON-RPC contracts and binary inventory parity

Trending

Quiet since September.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 10 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/Personal-AI-Router repository that our weekly crawl found: only 10 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about NVIDIA/Personal-AI-Router

The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 10

Talked about on GitHub, Hacker News and Bluesky (10 times).

On GitHub · 6

1 more on GitHub

On Hacker News · 2

The file

We split this service-contracts.mdc into the rules it gives an agent

11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never edit desktop/docs/services-api.md by hand.

    line 29
  2. Very specific:

    Run npm run service-contracts and review component version changes, emitted notifications, handled requests, and new binary components.

    line 55
  3. Very specific:

    Read the changed module's README.md / spec.md and the Go implementation.

    line 57
  4. Distinctive:

    Update desktop runtime inventory, broker flags, handlers, state projection, frontend contracts, and current documentation as required.

    line 58
  5. Distinctive:

    Verify every meaningful payload field, not only the method name.

    line 62
  6. Very specific:

    Run npm run service-contracts:write when Go RPC surfaces changed.

    line 63
  7. Very specific:

    Commit services/ and desktop integration edits together.

    line 66
  8. Very specific:

    Every runtime component in services/versions.json must be represented in desktop/src/shared/constants/modular-binaries.ts.

    line 84
  9. Very specific:

    Do not restate product or component versions in any doc — including the generated docs/services-api.md.

    line 86
  10. Distinctive:

    Every ignored method needs a current technical reason.

    line 90
  11. Distinctive:

    Keep parity documentation focused on what exists now.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
service-contracts.mdc
---
description: Verify desktop ↔ services JSON-RPC contracts and binary inventory parity
alwaysApply: true
---
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Service contracts

`services/` is the authoritative backend source tree in this monorepo. Edit it
directly under `services/`; there is no git submodule or external alignment pin.

`npm run build:modular-binaries` compiles shipped binaries from that tree into
`desktop/cli-bin/`.

## Contract artifacts

- `desktop/docs/service-contract-exceptions.json` — intentionally unintegrated
  JSON-RPC methods (`ignoredMethods` only; edit by hand with a reason per entry).
- `desktop/docs/services-api.md` — generated JSON-RPC method surface (do not edit
  by hand).
- `desktop/docs/services-parity.md` — concise current capability status.
- `desktop/docs/services-backend.md` — current integration and update
  procedure.
- `desktop/scripts/verify-service-contracts.ts` — drift and generation tool.

Never edit `desktop/docs/services-api.md` by hand.

## Commands

From `desktop/`:

```bash
npm run service-contracts
npm run service-contracts:write
npm run service-contracts:check
```

- `service-contracts` reports method drift, missing notification consumers, unused
  backend requests, binary inventory gaps, firewall helper parity, and any
  hardcoded product/component versions in hand-maintained docs.
- `service-contracts:write` regenerates `docs/services-api.md` from the current
  `services/` tree. It reads the component list from `services/versions.json` but
  renders no version numbers: the release bot rewrites that file after merge
  without regenerating anything, so embedding them turned the freshness gate red
  on `main` after every release.
- `service-contracts:check` fails on unhandled drift, stale generated output, or
  hardcoded versions in `services-backend.md` / `services-parity.md` (CI gate).

## Backend change workflow

1. Change `services/`.
2. Run `npm run service-contracts` and review component version changes, emitted
   notifications, handled requests, and new binary components.
3. Read the changed module's `README.md` / `spec.md` and the Go implementation.
4. Update desktop runtime inventory, broker flags, handlers, state projection,
   frontend contracts, and current documentation as required.
5. Resolve every missing notification with a consumer or an `ignoredMethods`
   entry in `service-contract-exceptions.json`.
6. Verify every meaningful payload field, not only the method name.
7. Run `npm run service-contracts:write` when Go RPC surfaces changed.
8. Run `npm run service-contracts:check`, `npm run build:modular-binaries -- --force`,
   and `npm run typecheck`.
9. Commit `services/` and desktop integration edits together.

## Version bumps are declared in the pull request

Declare bumps in the pull request `pair-release-intent:v1` block and leave
`services/versions.json` alone — `release-intent-check.yml` fails a hand edit
without `<!-- pair-release-intent-allow-owned-files -->`, and
`release-intent-apply.yml` writes the file after merge. See
`.cursor/skills/pair-github-pr/SKILL.md` and
`scripts/release-intent/README.md`.

A contributor working from a fork cannot run the apply workflow, so
`services/VERSIONING.md`, `services/readme.md` and `CONTRIBUTING.md` describe
editing `services/versions.json` by hand. Keep that path documented; reconcile
the two during review rather than asking contributors to leave the file alone.

## Rules

- Every runtime component in `services/versions.json` must be represented in
  `desktop/src/shared/constants/modular-binaries.ts`.
- Do not restate product or component versions in any doc — including the
  generated `docs/services-api.md`. They live in `services/versions.json` alone,
  so a release bump cannot leave a doc stale.
- Electron and the broker must never both launch the same worker.
- Every ignored method needs a current technical reason.
- A handled method is not sufficient evidence of payload coverage; inspect the
  backend struct's JSON fields and the complete PAIR consumer path.
- Unused backend methods are opportunities, not automatically required features.
- Keep parity documentation focused on what exists now. Git history records how
  the integration changed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.