Skip to main content

glitch

A check that has stopped refusing things still passes. That is the failure this looks for.

On 8 September 2026, in the repository this package was extracted from, a test guarded the one chapter of a paid book that is given away free — asserting the sample stops at its cut and does not leak the rest. It was green. It was searching a page that had no book on it, for passages it therefore could never find, and passing. Nothing was broken; the redaction worked fine. The alarm had been disconnected and was still showing a green light.

Every guardrail decays that way eventually, and the decay is silent, because a guardrail that has stopped refusing looks exactly like one with nothing to refuse.

glitch installs six guardrails into your repository and then, whenever you ask, runs each one against a case it is supposed to refuse. One that no longer refuses anything fails here, loudly, instead of passing quietly.

pip install glitch-toolkit

glitch install     # put the artifacts in this repository
glitch status      # what is installed, what is not
glitch check --all # verify every step

No dependencies, no network calls, no telemetry. It writes nothing outside the directory you point it at.

What it actually checks

A step is not complete because a file is present. Every check does three things and reports which of them failed:

  1. finds the artifact
  2. runs it, and expects it to work
  3. runs it against a deliberately broken case, and expects it to refuse

Without the third, a check passes the moment you copy a file in, whether or not that file has any teeth left, and it would be green for every reader forever. tests/test_cli.py exists to prove the checker fails that case; its SABOTAGE test installs artifacts that run, exit 0 and refuse nothing.

What install will not do

It will not write your CLAUDE.md, FLEET.md, FLOOR.md or PLAN.md. Four of the six steps are checked against your own file, because for those four the file is the work: a rules file that holds, a desk table with one committer, a floor measured twice, a plan someone else approved. A command that wrote them would turn the path into "you ran an installer". The FLOOR.md and PLAN.md templates ship deliberately unpassable for the same reason.

It will not overwrite. An artifact already in your repo is left alone and reported as kept; --force is how you say otherwise.

It writes nothing outside the directory you point it at, makes no network calls, and has no dependencies outside the standard library.

Running it without installing it

cli.py is one file and stays one file. Copy it into a repository and status and check work with nothing on the path and no install step — that property is deliberate and there is a test for the search paths it uses. Only install needs the rest of the package, and it says so plainly rather than failing oddly.

The MCP server (read-only)

pip install 'glitch-toolkit[mcp]'
glitch-mcp --repo .

It offers the checks to an agent as three tools — glitch_status, glitch_check, glitch_ledger_tail — and appends every question and answer to .claude/toolkit/ledger/ledger.jsonl.

It gates nothing. It cannot pause, block, refuse or intercept any action. It has no database connection, no credential and no network call. That is the whole first version, on purpose: a server that stands between an agent and a production database is serious software, and the honest order is to run read-only first, read the ledger, and find out what it would have refused before giving it the power to refuse. A gate built before that record exists is a guess with permissions.

The checks write nothing into your repository. The server breaks that in exactly one place — it appends to the ledger — and --no-ledger turns off even that, at the cost of the only thing worth keeping.

In Claude Code, .mcp.json:

{
  "mcpServers": {
    "glitch": { "command": "glitch-mcp", "args": ["--repo", "."] }
  }
}

The ledger

Append-only JSONL. Nothing rewrites a line it did not just write; a record that is overtaken is superseded by a new one and both stay; a field nobody measured is null rather than 0; a half-written last line is skipped and counted, never repaired, because repairing it means rewriting the file.

Tests

python tests/run_all.py      # all three suites, 38 tests

The server suite skips cleanly without the [mcp] extra and the runner reports that as SKIPPED rather than passing, because a green line meaning "we did not look" is the exact failure the gate-check practice exists to catch.

Licence

Apache License 2.0 — see LICENSE and NOTICE. Chosen over MIT for the patent grant.

Everything in this repository is under it. Use it commercially, change it, redistribute it.

The links above are absolute on purpose: this README is also the package's description on PyPI, where a relative link resolves against pypi.org and returns a 404.

Where this comes from

This repository is a published mirror. The package is developed inside a private monorepo alongside the book Building Your Store Or Your SaaS With Claude, whose practices it installs and checks, and it is pushed here as a subtree. The book, the shop that sells it and the rest of that repository are not open source and are not here. Nothing is being withheld from this repository that belongs to the package.

Issues and pull requests belong here rather than there, because here is the part anyone can read.

Status

Version 0.1.1. It installs, and the practices it checks are the six the book argues for. 0.1.0 was the first release; 0.1.1 changes this description and adds continuous integration, and nothing about what the code does.

What it is not yet: it gates nothing. glitch-mcp reports and records and cannot block an agent from doing anything. That is deliberate and the reasoning is in mcp_server.py — a server that stands between an agent and a production database should earn its evidence before it earns the power to refuse.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glitch_toolkit-0.1.1.tar.gz (75.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glitch_toolkit-0.1.1-py3-none-any.whl (71.1 kB view details)

Uploaded Python 3

File details

Details for the file glitch_toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: glitch_toolkit-0.1.1.tar.gz
  • Upload date:
  • Size: 75.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for glitch_toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0a19afa6e966dee0c81b1ee86ba75217d19cf914870f2d9673a9878c39880cf4
MD5 e8e205b9b36949d9a1e9a95698a9abdd
BLAKE2b-256 3170e0af89afe4d7bcce6fdf91b74df7eb457619d6913b8f05e412f5f8e6f52f

See more details on using hashes here.

File details

Details for the file glitch_toolkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: glitch_toolkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 71.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.2

File hashes

Hashes for glitch_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4256de0b7b8089b1fbeac527e0d9089f862dbf3df2b437a05ff27999eca657ad
MD5 a62669a2860dcc79c02d2778639fceaa
BLAKE2b-256 2d17eff41a7b72b5ea72c9d2deb6fdef5d5e715ae473b08d7d02c905cc9d03e2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 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