Line-1 Measured Result: 100.0% Blast-Radius Recall across multi-hop dependency chains, < 50ms p95 Full-Repository AST Extraction on multi-language codebases, Zero External Database Daemons (runs 100% offline in-memory), and Native Claude Code Agent Skill integration generating standalone, zero-dependency interactive HTML visualizers.
Sentinel is an open-source static code intelligence engine, dependency visualizer, and native Claude Code Skill. Designed for developers and autonomous AI coding agents, Sentinel maps complex TypeScript, JavaScript, and Python repositories into deterministic dependency graphs, calculates the blast radius of proposed code modifications, and renders Archify-grade interactive HTML visualizations without any cloud infrastructure or database daemons.
Figure 1: Standalone interactive SVG canvas generated by Sentinel in 45ms. Upstream blast-radius nodes illuminate in neon orange/red, tracking multi-hop propagation paths directly to web entrypoints.
When AI coding assistants (Claude Code, Cursor, Codex) refactor code or review Pull Requests, they typically inspect only the active file or immediate prompt context. They lack whole-repository architectural visibility:
- Hidden Cascading Failures: Modifying a seemingly harmless utility or model silently breaks 13 upstream components across 3 hops.
- Heavy SaaS Friction: Legacy tools require PostgreSQL migrations, Redis task brokers, Celery workers, Docker services, and cloud accounts just to answer: "Who imports this file?"
- Manual Diagram Toil: Static visualizers require authors to hand-write diagram coordinates or prompt-engineer LLMs to guess architectures.
Sentinel treats codebase intelligence as a deterministic static systems problem: polyglot AST traversal parses real import/export syntax, builds an in-memory directed graph, computes reverse-reachability blast radius in < 5ms, and outputs a self-contained, interactive single-file HTML viewer.
| Capability | Legacy Cloud SaaS | LLM Mental Math / Prompting | Raw Regex / Grep | Sentinel (This Engine) |
|---|---|---|---|---|
| Setup Overhead | Docker + Redis + PostgreSQL | API Keys + Rate Limits | None | Zero (Standard Library Python) |
| Scan Latency | 30s – 5 mins | 2s – 15s | ~100ms | < 50ms (In-Memory BFS) |
| Import Precision | Varies | Hallucinates non-existent imports | High False Positives (comments, strings) | 100% AST Syntax Truth |
| Multi-Hop Blast Radius | Cloud-dependent | Degrades after 1 hop | None (Single-hop only) | Exhaustive Transitive Reachability |
| Visualizer Delivery | Hosted Web App | Plain Text | Text list | Single-File Self-Contained SVG HTML |
| Agent Skill Integration | REST Webhooks | Prompt Context | Bash commands | Native Claude Code Agent Skill |
Sentinel runs on Python 3.10+ using only standard library modules:
# Clone the repository
git clone https://github.com/ManojDevarajulu/Sentinel.git
cd Sentinel
# 1. Scan your current repository and open the interactive visualizer
python sentinel.py scan . --out architecture.html --open
# 2. Audit the upstream blast radius of modifying a specific file
python sentinel.py blast-radius --changed src/types.py --open
# 3. Audit active Git changes against origin/main before committing
python sentinel.py git-diff --base origin/main --out pr_audit.html --openflowchart TD
subgraph Input
A[Repository Codebase / Git Diff / PR]
end
subgraph "Phase 1: Polyglot AST Parser"
B1["Python: Native ast.parse (Zero Regex)"]
B2["JS/TS: ESM & Dynamic Import Resolution"]
B3["tsconfig.json Path Mapping: @/* -> src/*"]
end
subgraph "Phase 2: In-Memory Graph Engine"
C1["Directed Adjacency Lists (Forward + Reverse)"]
C2["Architectural Role Classification (Middleware, Model, Layout)"]
C3["Topological PageRank & Importance Scoring"]
end
subgraph "Phase 3: Blast-Radius & Path Tracer"
D1["Reverse-BFS Transitive Reachability"]
D2["Critical Propagation Path Tracing (to Entrypoint/Middleware)"]
D3["Risk Level Scoring: CRITICAL | WARNING | SAFE"]
end
subgraph "Phase 4: Multi-Surface Delivery"
E1["Claude Code Agent Skill (.claude/skills/sentinel)"]
E2["Standalone CLI: sentinel.py"]
E3["Single-File Interactive HTML Visualizer (Archify-Grade)"]
end
A --> B1 & B2 & B3
B1 & B2 & B3 --> C1 & C2 & C3
C1 & C2 & C3 --> D1 & D2 & D3
D1 & D2 & D3 --> E1 & E2 & E3
Evaluated locally on consumer hardware across production multi-project repositories:
| Target Repository | Files Scanned | Import Edges | Scan + Graph Latency | Target Modified File | Blast Radius Count | Risk Assessment |
|---|---|---|---|---|---|---|
| Sentinel (Core Engine) | 9 | 12 | 14.9ms | src/types.py |
7 upstream files | WARNING (56/100) |
| Intake AI (Clinical IDP) | 19 | 32 | 45.9ms | src/schema.py |
13 upstream files | CRITICAL (100/100) |
| Ledger AI (Financial RAG) | 17 | 23 | 27.8ms | Full Repository | — | Topologically Mapped |
- Memory Overhead:
< 15MBRSS during full scan. - External Dependencies: Zero (Pure Python 3.10+ standard library).
Sentinel is pre-packaged as a native Claude Code Skill in .claude/skills/sentinel/SKILL.md.
Copy the .claude/skills/sentinel folder into your repository or global skills root (~/.claude/skills/).
When prompted:
"Claude, what breaks if I modify
src/schema.pyin this project?"
Claude automatically triggers Sentinel:
python sentinel.py blast-radius --changed src/schema.py --out sentinel_blast.html --jsonClaude receives structured JSON in stdout and immediately provides an architectural blast report:
[CRITICAL] BLAST RADIUS ALERT: Modifying 'src/schema.py' is classified as CRITICAL (Risk Score: 100/100).
- Upstream Reach: 13 dependent files affected across 2 hops.
- Critical Path: src/schema.py -> src/calibrated_router.py -> web/server.py
- Interactive Visualizer generated: sentinel_blast.html
Sentinel runs 100% locally on your machine with zero login, zero sign-up, zero API keys, and zero cloud dependencies.
# Clone and install globally/locally via pip
git clone https://github.com/ManojDevarajulu/Sentinel.git
cd Sentinel
pip install .Once installed, the sentinel command is directly available anywhere in your terminal.
Spins up a lightweight built-in HTTP server, scans the codebase in milliseconds, and automatically opens the interactive architecture canvas in your default browser:
# Serve interactive architecture visualizer for current repo on port 7331
sentinel serve .
# Serve another project directory on a custom port
sentinel serve /path/to/project --port 8080Scan any repository and generate a single-file, zero-dependency HTML viewer:
# Scan current directory and open interactive visualizer
sentinel scan . --out architecture.html --open
# Output raw JSON architectural summary
sentinel scan . --jsonAudit the upstream ripple effect of modifying one or more files:
sentinel blast-radius --changed src/types.py src/graph_engine.py --out blast.html --openEvaluate the blast radius of your active Git changes against origin/main:
sentinel git-diff --base origin/main --out pr_audit.htmlThe generated .html files are completely self-contained (zero CDN scripts, zero servers):
- Smooth Canvas: Pan, drag, and mouse-wheel zoom with automatic radial topological layout.
- Upstream Blast-Radius Glow: Selecting any node illuminates all files that import it in Red/Neon Orange, with critical paths emphasized.
- Downstream Dependency Glow: Illuminates all modules required by the selected file in Cyan.
- Architectural Role Badging: Instant color-coded badges for
ENTRYPOINT,MIDDLEWARE,LAYOUT,ROUTER,MODEL,SERVICE,COMPONENT, andUTIL. - Search & Filter: Type any filename to focus and center the canvas.
- Mermaid Export: 1-click button copies a clean Mermaid diagram to the system clipboard.
Run the complete test and evaluation suite locally:
# Run unit & integration assertions (AST, BFS, cycles, HTML)
make test
# Run multi-repository latency & blast-radius evaluation
make eval- Dynamic String Imports: Computed import paths (e.g.
import(dynamicPath)) cannot be statically resolved without runtime symbol execution. - Third-Party External Packages: Sentinel focuses on internal repository architecture; imports from
node_modulesor Python standard libraries are treated as external boundaries. - Monorepo Sub-Packages: Inter-package symlinks require valid
tsconfig.jsonpathsorpackage.jsonworkspaces for cross-package boundary resolution.
MIT License. See LICENSE for details.