Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sruja — context engineering for software changes

Capture knowledge, retrieve context, verify changes. Sruja scans code, links decision context, reports structural drift, and plugs into Cursor and other agents via MCP. Optional repo.sruja is reviewed intent in Git, not the primary product.

Why Sruja?

The Problem

Most architecture tools make you choose:

  • Visual-only tools (Draw.io) – no code, no version control, hard to maintain
  • Code-only tools (Mermaid, PlantUML) – no validation, manual diagram updates
  • Stale diagrams – architecture drifts from reality, documentation gets outdated

Our Solution

Sruja gives AI assistants and humans evidence-backed context for software changes:

FeatureWhat you get
Structural scanCycles, layer violations, god modules — file-level evidence
Task contextfocus, ai, and MCP for targeted retrieval
Built-in gatesDrift, verification, CI-friendly outputs
Optional reviewed intentrepo.sruja when teams want durable intent in Git
Derived outputsMarkdown, Mermaid, and other exports when communication needs them

Who It's For

  • Engineering teams who want shared knowledge and safer AI-assisted changes
  • Tech leads who want decisions to stay visible at change time
  • Platform engineers building guardrails for distributed teams
  • AI agents that need grounded repo context before editing

The Core Loop

  1. Install CLIcurl -fsSL https://sruja.ai/install.sh | bash
  2. Scansruja start -r . then sruja drift -r . --structural-only --advisory
  3. Retrieve contextfocus, ai, or MCP before edits
  4. Verifyverify-task after edits
  5. Optional — reviewed intent in Git with repo.sruja

We're ultra simple – minimal surface area, no unnecessary apps or frameworks – and highly functional – what we ship works reliably for its scope.

Stack

  • Rust – CLI, engine, LSP, WASM (single language for core)
  • VS Code extension – Editor integration (briefing, validation, diagnostics)
  • Docs – This book (mdBook, Rust-based; no TypeScript/Node)

New here? Quick start: install CLI, scan current structure, retrieve context, and verify changes. Add reviewed intent only when you want repo.sruja in Git. Optional learning lives separately under Navigate; press / or S to search.

Sruja "Show diagram" in code blocks: Run just wasm (or make wasm) from the repo root once, then run just book-serve (or make book-serve, or ./serve.sh from the book directory) so the WASM files are copied into the book output.