Sruja logo

Sruja

Organization
sruja-ai

A CLI-first autonomous coding agent where the actor never grades itself. Every edit is grounded in your repo's real topology and verified by an independent deterministic grader (drift, lint, verify-task, intent) before it ships. Closed-loop: comprehend → plan → execute → critique → replan. Also a passive MCP harness.

Publishersruja-ai
Repositorysruja
LanguageRust
Forks
2
Stars
24
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Sruja exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    24 stars and 2 forks from the linked repository.

Sruja

Coverage

Sruja is a CLI-first autonomous coding agent where the actor never grades itself. It scans your repo, grounds every edit in real topology, and verifies the result with an independent deterministic grader before you ship.

text
sruja agent loop --goal "..."   →   comprehend · plan · execute · critique · replan

Sruja runs two ways:

  • Autonomous — sruja agent loop owns the full observe → act → verify → critique → replan loop, bounded by budget, iterations, and file guards.
  • Passive harness — inside any editor (Cursor, Copilot, Claude, Windsurf) via MCP; same deterministic gates, your LLM drives.

The deterministic layer (drift, lint, verify-task, intent check) is the independent grader — the model that wrote the code never judges it.


The agent loop

The core product is a closed-loop agent that owns the full observe → act → verify → critique → replan cycle:

bash
# Autonomous — Sruja plans, edits, verifies, critiques, and replans
sruja agent loop --goal "Refactor auth boundary without breaking tests"

Sruja's deterministic layer (drift, lint, verify-task, intent check) is the independent grader — the actor never grades itself.

Editor-hosted loop (MCP)

When your editor drives the LLM, Sruja provides the grounding and verification gates:

text
1. MCP: focus / drift state / boundary context
2. Host LLM edits code
3. sruja verify-task --profile coding -r .
4. (optional) sruja agent record -c "…" on failure

Quick Start

bash
# 1. Install
curl -fsSL https://sruja.ai/install.sh | bash

# 2. Scan your repo
sruja start -r .
sruja drift -r . --structural-only --advisory

# 3. Brief a change (paste into your agent)
sruja focus -r . --file path/to/file.rs

# 4. Verify after edits
sruja verify-task --profile coding -r .

No repo.sruja required on day one.


How it works

1. Capture knowledge (optional)

Bring durable context into the repo — design docs, ADRs, decisions:

bash
sruja ingest <path>
sruja decision add --title "Use async for I/O" --rationale "..."

Reviewed intent in Git (optional, for teams that want CI-enforced boundaries):

bash
sruja lint repo.sruja
sruja sync -r .
sruja drift -r . -a repo.sruja

2. Retrieve task context

Before editing, get a file-scoped briefing with blast radius, dependencies, and relevant decisions:

bash
sruja focus -r . --file path/to/file.rs    # structured briefing
sruja ai -r . --task "Refactor auth boundary"  # paste-ready brief

3. Verify alignment

After editing, deterministic checks confirm the result still matches structure and intent:

bash
sruja verify-task --profile coding -r .   # full verification
sruja drift -r . --structural-only        # topology-only check
sruja intent check -r .                   # design-intent check

Editor integration

Sruja integrates through MCP, giving your AI editor grounded context and post-edit verification.

Cursor template: .cursor/mcp.json

json
{
  "mcpServers": {
    "sruja": {
      "command": "sruja",
      "args": ["mcp", "-r", "."],
      "env": {
        "SRUJA_MCP_TOOL_PROFILE": "coding",
        "SRUJA_MCP_READONLY": "1"
      }
    }
  }
}

Use the default coding profile (15 tools: focus, drift, verify, memory search, hybrid query, critique, and more).


How Sruja compares

Copilot / Cursor / WindsurfSruja
What it doesGenerates code from promptsGenerates code and verifies it against repo topology
GroundingFile context + embeddingsStructural scan (cycles, layers, god modules) + optional reviewed intent
VerificationNone built-inverify-task, drift, intent check — deterministic, post-edit
Autonomous modeHost-managed agent loopsruja agent loop — owns the full observe → act → verify → critique → replan
Editor storyNative agent UXMCP coding profile — same gates, any editor

One line: AI coding agents generate; Sruja generates and gates — before and after.

Honest limits: See KNOWN_LIMITATIONS.md — dynamic imports, reflection/DI, heuristic layers, orphan false positives on greenfield (use drift --advisory).


Extensions

Everything else builds on the agent loop and deterministic gates above.

Core-adjacent

  • Architecture authoring: richer repo.sruja workflows, proposals, author evidence
  • Visualization: Mermaid, Markdown, D2, GraphML, Neo4j, Obsidian exports
  • Team workflows: review, drift in CI, compliance, critique, federation

Advanced

  • Agent ops: learnings, run snapshots, memory curation, continual learning
  • Workflow orchestration: workflow and AI-DLC flows
  • Analytics: dashboards, graph history, metrics, registry tooling

Docs


Installation

Install script

bash
curl -fsSL https://sruja.ai/install.sh | bash

Cargo

bash
cargo install sruja-cli --git https://github.com/sruja-ai/sruja

Build from source

bash
git clone https://github.com/sruja-ai/sruja.git
cd sruja
just build

Optional skills

bash
npx skills add https://github.com/sruja-ai/sruja --skill sruja-harness
npx skills add https://github.com/sruja-ai/sruja --skill sruja-architecture

Troubleshooting

sruja: command not found

bash
export PATH="$HOME/.local/bin:$PATH"

AI generates invalid reviewed intent

bash
sruja lint repo.sruja --format json

Need to understand what Sruja found

  • sruja focus before a change
  • sruja ai for a paste-ready task brief
  • sruja why for investigation

Contributing

Contributors

This project follows the all-contributors specification. Contributions of any kind are welcome!

License

Apache 2.0 or MIT

Installation

TypingMind
{
  "mcpServers": {
    "sruja": {
      "command": "sruja",
      "args": [
        "mcp",
        "-r",
        "."
      ]
    }
  }
}

Use Sruja MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Sruja is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Sruja as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Sruja MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "sruja": {
      "command": "npx",
      "args": [
        "-y",
        "sruja-e2e"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Sruja MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Sruja MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sruja to help me with this task?
Sruja
Sure. I read it.
Here is what I found using Sruja.

Frequently asked questions

What is the Sruja MCP server used for?

Sruja is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Sruja MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Sruja with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Sruja MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Sruja connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Sruja MCP to TypingMind?

Sruja runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Sruja MCP provide in TypingMind?

Sruja exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Sruja MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Sruja requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇