Software built around real problems.
Independent thinking. Connected systems.

Work / Open-source developer tool / Python package

A local CLI that turns recurring AI coding failures into tested rules and regression tests for the next session.

Build a related system
Architecture diagram of Immunize capturing a failure, matching and testing a known pattern, then creating reusable guardrailsProduct architecture diagram based on the published Immunize documentation; not an application screenshot.
01 / Overview

The system at a glance.

System
Open-source developer tool / Python package
Focus
Platforms
Status
Published package
02 / Challenge

The challenge.

AI coding assistants can repeat the same runtime mistake in a later session. A correction in one conversation does not become a tested rule for the next one.

03 / System architecture

How the parts connect.

The runtime stays local: capture a failure, match it against a curated pattern, verify its fixture with pytest, and inject the resulting project files. Pattern matching does not call an LLM or require an API key.

01CaptureA failed command or Claude Code tool call.
02MatchA curated pattern identifies the failure class.
03Verifypytest checks the candidate fix against a fixture.
04RememberRules and a regression test join the project.
Architecture diagram based on the published package.
04 / Core modules

What it handles.

01
Failure capture

Capture a failed command or Claude Code tool failure locally, including the error text needed for matching.

02
Pattern matching

A curated library uses deterministic regular expressions and heuristics to identify a known failure class.

03
Local verification

The matched pattern runs its pytest fixture in a subprocess before any guardrail is written.

04
Guardrail injection

A successful verification generates a Claude Code skill, Cursor rule and pytest regression template.

05
Claude Code hook

A PostToolUseFailure hook can feed failed tool calls into the same local pipeline.

06
Shell wrapper

The `immunize run` command wraps a shell command and captures a non-zero exit for analysis.

07
Project memory

Local SQLite records captures and injections; generated files can be reviewed and committed with the project.

05 / User experience

How developers use it.

Use a Claude Code hook, wrap a command with immunize run, or capture a failure manually. Review the generated files before committing them for the team.

06 / Key workflows

The work, end to end.

  1. 01Failed command
  2. 02Curated pattern match
  3. 03pytest verification
  1. 01Verified pattern
  2. 02Claude Code skill
  3. 03Cursor rule
  1. 01Verified pattern
  2. 02Regression template
  3. 03Project commit
07 / Technology

Engineering focus.

Python 3.10+ / Typer / Pydantic / PyYAML / pytest / SQLite

09 / Outcome

What we delivered.

An Apache-2.0 Python package published on PyPI, with source and documentation available on GitHub. It prevents known failure classes from being forgotten; it does not automatically repair the current failing program.

Next system

Operations, aligned.

Enterprise / Academic Management System↗
A short path to the right place

Ask Vismit.

Explore with a question