sruja-pre-merge-review

sruja-pre-merge-review is a command for Claude Code, Cursor from sruja-ai/sruja. It costs 0 tokens per session (569 once invoked), scanned A, original, Apache-2.0.

A structured review workflow for changes before they are merged into a codebase. It checks the proposed work against architecture rules, declared intent, and signs of new design drift.

In plain words
What is it for?
Run it to review changes, check whether they match the intended design, detect architectural drift, and classify findings as blockers, suggestions, or optional fixes.
Why use it?
It helps identify blocking problems, suggestions, and minor issues before code is combined with the main project.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: mentions AGENTS.md.

Good fit Run it to review changes, check whether they match the intended design, detect architectural drift, and classify findings as blockers, suggestions, or optional fixes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sruja-ai/sruja/sruja-pre-merge-review
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/sruja-ai/sruja

Made for: Claude Code, 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 sruja-pre-merge-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/sruja-ai/sruja/sruja-pre-merge-review/github.svg)](https://agentmods.dev/commands/sruja-ai/sruja/sruja-pre-merge-review)
Your own site
<a href="https://agentmods.dev/commands/sruja-ai/sruja/sruja-pre-merge-review"><img src="https://agentmods.dev/badge/commands/sruja-ai/sruja/sruja-pre-merge-review/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 sruja-pre-merge-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/sruja-ai/sruja/sruja-pre-merge-review"><img src="https://agentmods.dev/badge/commands/sruja-ai/sruja/sruja-pre-merge-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 569 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00569
Opus 5 $0.00000 $0.00284
Sonnet 5 $0.00000 $0.00114
Haiku 4.5 $0.00000 $0.00057

Measured 12d ago against content hash f70ed87ee7e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sruja-pre-merge-review 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 12d 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.

.cursor/commands/sruja-pre-merge-review.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sruja: Pre-Merge Review

Structured review workflow before merging changes. Produces actionable feedback with architecture grounding.

Related: plan-featureimplement-from-planverify-taskreflect-on-run

Steps

  1. Run review with JSON output

    sruja review -r . -f json
    

    This produces structured suggestions, violations, and health score.

  2. Run intent check

    sruja intent check -r . -f json
    

    Verify changes match declared architectural intent.

  3. Run drift check

    sruja drift -r . -f json
    

    Check for new architectural drift.

  4. Or use the combined verify-task review profile

    sruja verify-task --profile review -r . -f json
    
  5. Parse and categorize findings

    Output the review results in this structured format:

    ## Blockers (must fix before merge)
    - [ ] <severity> <finding>: <description>
    
    ## Suggestions (should fix)
    - [ ] <finding>: <description>
    
    ## Nits (optional)
    - [ ] <finding>: <description>
    

    Blockers include:

    • Lint errors in repo.sruja
    • New drift violations
    • Intent mismatches
    • Failed tests

    Suggestions include:

    • Review recommendations from sruja review
    • Architecture improvements
    • Missing documentation

    Nits include:

    • Style issues
    • Minor refactoring opportunities
  6. If blockers exist:

    • Do not merge
    • Fix blockers
    • Re-run review
  7. If no blockers:

    • Review suggestions and nits
    • Decide which to address now vs defer
    • Proceed with merge

Example Output

## Blockers
- [ ] drift: New violation in AuthContainer -> Database (missing relationship)

## Suggestions
- [ ] Consider splitting AuthContainer into AuthAPI and AuthWorker
- [ ] Add description to new PaymentService component

## Nits
- [ ] Format: run `sruja fmt repo.sruja`

Read the full file on GitHub · 90 lines

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. 12d ago First seen · 90 lines · 0 tokens per session scan A f70ed87ee7e1

Subscribe to this mod's changes

sruja-pre-merge-review is a command published in the GitHub repository sruja-ai/sruja (24 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 569 tokens. 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.