Srujaのロゴ

Sruja

組織
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.

公開者sruja-ai
リポジトリsruja
言語Rust
フォーク
2
スター
24
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Srujaは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには24件のスターと2件のフォークがあります。

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

インストール

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

SrujaのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Srujaに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Srujaをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. SrujaのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "sruja": {
      "command": "npx",
      "args": [
        "-y",
        "sruja-e2e"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてSrujaのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. SrujaのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Srujaを使ってこのタスクを手伝ってもらえますか?
Sruja
はい、読みました。
Srujaで調べた結果をお伝えします。

よくある質問

Sruja MCPサーバーは何に使いますか?

Srujaは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでSruja MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでSrujaを利用できます。

TypingMindでSruja MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Srujaを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Sruja MCPをTypingMindに接続するにはどうすればよいですか?

SrujaはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでSruja MCPのどのようなツールを利用できますか?

SrujaはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Sruja MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Srujaで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇