Skip to main content

SENTINEL

Self-healing AI code review pipeline

License: AGPL-3.0 Python LLM Docker PyPI

19 agents. 5 swarms. Runs on every PR. Free.


sentinel scan --path ./my-project --all
┌────────────────────────────────── Summary ──────────────────────────────────┐
│  Risk level        LOW  (0.25)                                              │
│  Files reviewed    2                                                        │
│  Findings          7                                                        │
│  Bugs found        3                                                        │
│  Auto-fixes        2    ← applied automatically                             │
│  Pending fixes     1    ← needs human review                                │
└─────────────────────────────────────────────────────────────────────────────┘

Quick start

pip install zendev-sentinel
sentinel init          # saves API keys to ~/.sentinel/.env
sentinel github-setup  # wires up your GitHub webhook
sentinel serve         # start listening for PRs

Two free API keys required — takes ~2 minutes, no credit card:


What it does

🔍 Review swarm — 5 agents fire in parallel on every PR
Agent Checks
Security Injection, auth flaws, weak crypto, SSRF, XSS, eval(), hardcoded secrets
Performance N+1 queries, unbounded queries, blocking async, O(n²), missing memoization
Style Naming, bare excepts, mutable defaults, magic numbers, function length
Architecture Layering violations, circular deps, god classes, tight coupling
Lead reviewer De-duplicates and re-prioritises all findings by severity
🧪 Test swarm — writes and runs tests against your changes
  • Generates unit tests per changed file (happy path + edge cases)
  • Runs them in an isolated Docker sandbox — network_mode=none, non-root, memory-capped
  • Parses coverage output and surfaces gaps below 80%
  • Writes integration tests when multiple modules interact (medium/high risk only)

Supports Python (pytest) and TypeScript / JavaScript (jest + ts-jest).

🐛 Bug squad — reproduces, traces, and fixes failures automatically
Failing test
    │
    ▼
Reproduce  →  strip to minimal repro script
    │
    ▼
Root cause  →  identify source file + line, form hypothesis
    │
    ▼
Fix proposer  →  draft 1–3 candidate patches (unified diff)
    │
    ▼
Verifier  →  apply each patch in sandbox, pick the first green one
    │
    ▼
AUTO_MERGE or HUMAN_REQUIRED
🧠 Self-healing knowledge base — gets smarter with every review

ChromaDB + SBERT power a local vector store. Every finding and fix is stored and recalled on future PRs — so agents learn your codebase's patterns over time.

Four maintenance agents run on a schedule:

Agent Schedule What it does
Curator Nightly 02:00 UTC Removes stale, reverted, and repeatedly-rejected entries
Drift-checker Nightly 02:15 UTC Archives entries whose code has since changed
Consistency Weekly Sunday 03:00 UTC Resolves contradictions between KB entries
Consolidation Weekly Sunday 03:30 UTC Merges near-duplicate entries into patterns

No cloud. No data leaves your machine.

🔐 Trust layer — every fix is explained and gated
  • Explainability agent — attaches a plain-English rationale to every finding and fix
  • Approval gate — classifies patches as AUTO_MERGE or HUMAN_REQUIRED

Files matching auth, payment, billing, secret, credential, password, token, admin, or migrations always route to HUMAN_REQUIRED — never auto-patched.


Pipeline

PR opened / pushed
        │
        ▼
   Risk scorer  ──→  score 0.0–1.0
        │
    ┌───┴───────────────────────────────────────┐
    │ low risk          │ medium / high risk     │
    │ lightweight pass  │ full swarm             │
    └───────────────────┴───────────────────────┘
        │
        ▼
  ┌─────────────────────────────────────────────┐
  │  PARALLEL                                   │
  │  Review swarm      Test swarm               │
  │  ├── Security      ├── Module tests         │
  │  ├── Performance   ├── Coverage analysis    │
  │  ├── Style         └── Integration tests    │
  │  ├── Architecture                           │
  │  └── Lead reviewer                          │
  └─────────────────────────────────────────────┘
        │
        ▼  (on test failures)
  Bug squad  →  Reproduce → Root cause → Fix → Verify
        │
        ▼
  Trust layer  →  Explain → Gate → Post PR comment

Commands

Command What it does
sentinel init First-time setup wizard — saves keys to ~/.sentinel/.env
sentinel github-setup Generates webhook secret, walks through GitHub App creation
sentinel scan --path . --all Scan a local directory (no PR needed)
sentinel run --repo owner/repo --pr 42 Run against a specific GitHub PR
sentinel serve Start webhook server on port 8000
sentinel maintain Run KB maintenance agents manually
More scan options
sentinel scan --path . --staged      # staged git changes only
sentinel scan --path . --branch main # diff vs a branch
sentinel scan --path . --all --output report.md  # save to file

LLM providers

Set LLM_PROVIDER in ~/.sentinel/.env:

Provider Cost Notes
cascade Free Groq → HuggingFace fallback. Recommended.
groq Free Groq only
huggingface Free HuggingFace only
ollama Free Local GPU, no API key, no quota
anthropic Paid Highest quality

Supported languages

Language Review Sandbox Auto-fix
Python ✓ ✓ pytest ✓
TypeScript / JavaScript ✓ ✓ jest + ts-jest ✓
JSX / TSX ✓ ✓ jest + ts-jest ✓

Security

  • Sandbox: network_mode=none, non-root uid 1000, memory + CPU hard limits
  • Webhooks: HMAC-SHA256 verified before any payload is parsed
  • Sensitive paths: auth / payment / migrations always require human approval
  • Secrets: stored in ~/.sentinel/.env — never committed to version control
  • Pre-scan: regex secret detection on every diff before any LLM call

Self-hosted (team use)

Run on a shared server with Ollama — no API keys, no quota:

ollama pull qwen2.5-coder:7b
LLM_PROVIDER=ollama sentinel serve

Or with Docker Compose:

docker compose -f docker/docker-compose.yml up -d

License

AGPL-3.0 — free to use and self-host. If you offer SENTINEL as a hosted service, your full stack must be open-sourced under the same license.

Release files for zendev-sentinel 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zendev-sentinel 0.1.4
File Size Uploaded
zendev_sentinel-0.1.4.tar.gz 110.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zendev-sentinel 0.1.4
File Interpreter ABI Platform
zendev_sentinel-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 233.0 kB

Release files / zendev_sentinel-0.1.4.tar.gz

Download URL zendev_sentinel-0.1.4.tar.gz
Size 110.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f0b7a4430bb6d907200e75f518f3a721527ddf973530afee2ab22d387840a792
BLAKE2b-256 checksum
How to use checksums
4b1fd7219f808d918fbda2b9b58745cd239dfbea97b1fdd8e195e0f44ba2fd3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / zendev_sentinel-0.1.4-py3-none-any.whl

Download URL zendev_sentinel-0.1.4-py3-none-any.whl
Size 122.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
266f037caa3af60bb7c8088c4b78bb2d630b2364c98fee77d81afe8e5ada47da
BLAKE2b-256 checksum
How to use checksums
a899a3c10db2addca765c5391d95c5e97387eed318643b400139c5909d78dd8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page