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.
sruja agent loop --goal "..." → comprehend · plan · execute · critique · replan
Sruja runs two ways:
- Autonomous —
sruja agent loopowns 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 core product is a closed-loop agent that owns the full observe → act → verify → critique → replan cycle:
# 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.
When your editor drives the LLM, Sruja provides the grounding and verification gates:
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
# 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.
Bring durable context into the repo — design docs, ADRs, decisions:
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):
sruja lint repo.sruja
sruja sync -r .
sruja drift -r . -a repo.srujaBefore editing, get a file-scoped briefing with blast radius, dependencies, and relevant decisions:
sruja focus -r . --file path/to/file.rs # structured briefing
sruja ai -r . --task "Refactor auth boundary" # paste-ready briefAfter editing, deterministic checks confirm the result still matches structure and intent:
sruja verify-task --profile coding -r . # full verification
sruja drift -r . --structural-only # topology-only check
sruja intent check -r . # design-intent checkSruja integrates through MCP, giving your AI editor grounded context and post-edit verification.
Cursor template: .cursor/mcp.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).
| Copilot / Cursor / Windsurf | Sruja | |
|---|---|---|
| What it does | Generates code from prompts | Generates code and verifies it against repo topology |
| Grounding | File context + embeddings | Structural scan (cycles, layers, god modules) + optional reviewed intent |
| Verification | None built-in | verify-task, drift, intent check — deterministic, post-edit |
| Autonomous mode | Host-managed agent loop | sruja agent loop — owns the full observe → act → verify → critique → replan |
| Editor story | Native agent UX | MCP 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).
Everything else builds on the agent loop and deterministic gates above.
- Architecture authoring: richer
repo.srujaworkflows, proposals, author evidence - Visualization: Mermaid, Markdown, D2, GraphML, Neo4j, Obsidian exports
- Team workflows: review, drift in CI, compliance, critique, federation
- Agent ops: learnings, run snapshots, memory curation, continual learning
- Workflow orchestration: workflow and AI-DLC flows
- Analytics: dashboards, graph history, metrics, registry tooling
- Website: https://sruja.ai
- Getting started: book/src/getting-started.md
- Host/editor setup: HOST_AGENT_INTEGRATION.md
- Agent loop + continual learning: GROUNDED_HARNESS_AND_CONTINUAL_LEARNING.md
- Core vs extensions: FEATURE_TIERS.md
- MCP tools reference: mcp_tools_reference.md
Install script
curl -fsSL https://sruja.ai/install.sh | bashCargo
cargo install sruja-cli --git https://github.com/sruja-ai/srujaBuild from source
git clone https://github.com/sruja-ai/sruja.git
cd sruja
just buildnpx skills add https://github.com/sruja-ai/sruja --skill sruja-harness
npx skills add https://github.com/sruja-ai/sruja --skill sruja-architecturesruja: command not found
export PATH="$HOME/.local/bin:$PATH"AI generates invalid reviewed intent
sruja lint repo.sruja --format jsonNeed to understand what Sruja found
sruja focusbefore a changesruja aifor a paste-ready task briefsruja whyfor investigation
This project follows the all-contributors specification. Contributions of any kind are welcome!
Apache 2.0 or MIT