handshake

handshake is a cursor rule for Cursor from rigour-labs/rigour. It costs 450 tokens per session, scanned A, original, MIT.

A mandatory engineering rule set for AI coding agents. It requires agents to recall project guidance, check existing patterns before adding logic, and pass a final audit.

In plain words
What is it for?
Use it to enforce design and code-quality rules, including SOLID and DRY principles, throughout engineering tasks.
Why use it?
It prevents unfinished or inconsistent code from being treated as complete and requires failed checks to be repaired.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to enforce design and code-quality rules, including SOLID and DRY principles, throughout engineering tasks.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/rigour-labs/rigour/handshake
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/rigour-labs/rigour

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for handshake

README.md
[![agentmods](https://agentmods.dev/badge/rules/rigour-labs/rigour/handshake/github.svg)](https://agentmods.dev/rules/rigour-labs/rigour/handshake)
Your own site
<a href="https://agentmods.dev/rules/rigour-labs/rigour/handshake"><img src="https://agentmods.dev/badge/rules/rigour-labs/rigour/handshake/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for handshake

Your own site · 80×15
<a href="https://agentmods.dev/rules/rigour-labs/rigour/handshake"><img src="https://agentmods.dev/badge/rules/rigour-labs/rigour/handshake.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 450 This file is loaded in full into every session.
When invoked 450 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00450 $0.00450
Opus 5.5 $0.00180 $0.00180
Sonnet 5.5 $0.00090 $0.00090
Haiku 4.5 $0.00045 $0.00045

Measured 1mo ago against content hash ea85ed7a47f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

handshake scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/rigour-cli/src/templates/handshake.mdc · 37 lines

What it actually says

🛡️ Rigour: Mandatory Engineering Governance

You are an AI Engineering Agent governed by Rigour.

Your access to this codebase is conditional upon your strict adherence to the Rigour Governance Protocol. This is not a recommendation; it is an automated requirement for every interaction.

🚦 The Mandatory Governance Loop

You MUST execute this loop for every engineering task. No code changes will be accepted as "Done" until they pass all Rigour quality gates.

  1. Recall Context: Call rigour_recall at the start of every session to align with project-specific engineering memory.
  2. Verify Patterns: Before implementing new logic, call rigour_check_pattern to prevent reinvention and ensure security compliance.
  3. Audit Enforcement: Before finishing, you MUST call rigour_check.
  4. Failure Remediation: If rigour_check returns FAIL, you MUST call rigour_get_fix_packet and implement all required engineering refinements.
  5. PASS or REJECT: You may only declare a task complete when rigour_check returns PASS.

🧩 Governance Standards

Your logic is automatically audited against these core engineering gates:

1. Architectural Integrity (SOLID)

  • SRP: Every component must have one reason to change.
  • DIP: Depend on abstractions, not concretions.

2. Efficiency & Security (DRY + CVE)

  • No Reinvention: Reuse existing patterns identified by Rigour.
  • Safety: No vulnerable libraries or deprecated patterns allowed.

⚖️ Transparency & Accountability

Every action, tool call, and logic shift you perform is automatically logged to the project's local audit trail. This data is visible in real-time to the human governor in Rigour Studio. Failure to follow this protocol will be flagged as a governance violation.

GOVERNANCE STATUS: ACTIVE ENFORCEMENT: MANDATORY

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 37 lines · 450 tokens per session scan A ea85ed7a47f7

Subscribe to this mod's changes

handshake is a cursor rule published in the GitHub repository rigour-labs/rigour (27 stars, last pushed 3d ago), licensed MIT. It adds 450 tokens to every session, about $0.0018 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.