Krypton

Keep the reins on your code.

AI writes more of your code every day, and the companies selling it grade their own work. Krypton puts the grading back in your hands. Running locally on your machine, it scores how easy every change is for the next agent to edit, blocks messy merges, and cuts your AI coding bill by up to 35% through higher code quality and smarter prompt caching.

Scroll

A real codebaseAI writes code faster than anyone can read it.This is garth, an open-source project we used to test how AI agents tangle code. Each of its 41 files is drawn as a tree of points, one per piece of code structure: 17,767 in all.

What it scoresKrypton scores how easy your code is for the next agent to edit and understand.It only looks at how the code is built. Before anything leaves your computer, every name is swapped for a keyed hash. The key is made fresh for every scan and never leaves your machine.

Hard to changeIt lights up where the next agent will struggle.Eleven functions are too tangled to change safely. The darker and bigger the cluster, the worse it is. The worst is 46.2 times over the limit.

The fixYour agent untangles them until the code passes.On garth the score rose from 62 to 81 with all 163 tests still passing, so the next change starts from cleaner code. The animation is an illustration.See the savings

  • Tested ongarth
  • Score62 81
  • Source uploaded0 bytes
Score 62 / 100

What you get

Set your rules in a local dashboard

Run krypton setup on your machine. It maps your codebase and shows its score today. Then set your target score, cap how many times the agent can retry, and choose whether it carries on by itself or pauses for your review before opening a pull request. Answer each question in the terminal, or open the link it gives you and click your settings on a local dashboard.

Krypton suggests a target a step above where you are: if your codebase scores 56, it suggests 70, and you can pick your own. Only new tickets are held to it, so the code they touch gets cleaner while old code never blocks a merge. Run setup again as the score climbs and the suggestion climbs with it.

Target score
Max tries
When stuck
Example review · fix discount roundingTarget 70Max tries 3Purity 71 71
checkout.py · apply_discount()
Stuck after 3 runs · best only 7% better

    One GitHub Action for the whole team 

    Scaling to a larger team? krypton setup writes the GitHub workflow for you. Pick the gate, never worse or a target for the code each pull request changes, commit one file, and every pull request gets a purity check. Each developer keeps full control of their own local limits and agent loops, and old code never blocks anyone.

    Smaller AI bills for the agents you build

    Building your own agent? Run one command before you assemble its prompts. Krypton replays your git history against several file orders and picks the one that reuses the most of the prompt cache, or leaves yours alone.

    $ krypton order

    Clean code is cheaper to change

    Once the code is cleaned up, an agent’s later changes to it cost less.

    17%average saving per later change, six runs
    6%the typical run
    Measured on garth. The cleanup costs money once; savings vary by repo.

    See which model writes your best code

    The same check runs on every change, whoever or whatever wrote it, so you can compare the models you use on your own code. The choice is back in your hands, not an AI company’s benchmark.

    $ krypton scan . --base origin/main
    # scores only what this branch changed
    $ krypton wire src/app.py
    # prints exactly what would be sent

    Start saving on your AI bills today.

    Start clean from day one, or untangle legacy AI code incrementally without stopping to refactor.

    Visualize your code with your GitHub repo

    Continue with GitHub
    • Read-only access
    • Scored in memory, never stored
    • Access ends with your visit