Krypton
FAQ

Frequently asked questions

Is Krypton a linter?

No. It measures structural weight, how hard code is to read, edit and pay for in tokens. It does not check style or correctness. Run your linter and tests too.

Does it send my code anywhere?

Not your source. The client sends a Krypton server a description of your code's structure, and krypton wire prints the exact request before anything is sent. The hosted demo is different: it reads a repository you choose. What exactly is sent, and the limits.

Which languages does it support?

JavaScript, TypeScript (including JSX and TSX) and Python.

How is the score calculated?

Krypton counts every decision in a function (a condition, loop, case, catch, boolean operator or ternary) and how deeply it is nested, plus how long the function really is and how many other files it is wired to. A function with three decisions stacked inside each other scores worse than one with three side by side. What happens to a file.

Why was my file flagged?

The review lists the reason, and hints name the block most worth extracting. Run krypton scan path/to/folder to see the heaviest functions.

Can I make it less strict while I clean up?

Yes: --level relaxed, or --base origin/main to score only what changed on your branch.

What if the gate keeps sending my agent back to the same function?

A krypton: ignore -- reason comment (# in Python, // in JavaScript) above a function waives it, and the review lists every waiver with its reason. --base scores only the lines your branch changed, and --level relaxed raises the limit for everything. Exempt functions stay visible in the review and do not count toward the score. The earlier command line also had --no-worse, which has not been rebuilt; --handoff-stalled is now krypton review.

Will it find bugs?

No. Heavy code is more likely to hide bugs, but Krypton only measures structure.

What happens to minified or generated files?

Generated and vendored paths are skipped, including minified files, bundles and copies of libraries such as bootstrap or jQuery that were committed into the repository, so they are not scored as your code. Files that are too large or have extremely long lines are not analyzed; they are left out of the score and listed, with the setting that would include them.

Does it work with my coding agent?

Any agent that can run a command can use it. See Integrations.

Can Krypton make my request worse?

Not on evidence. krypton order replays your repository's own history first and answers keep, meaning send your request unchanged, unless its order would clearly have beaten yours. See file ordering.

How much will the file ordering save me?

It depends on your repository: up to 35% cheaper in our tests, a few points of cache reuse on a typical one, and sometimes nothing. It helps when recently active files stay active. krypton order checks your own history for free; the numbers are in the case study.

Does cleaning up code make my agents cheaper?

Yes. Cleaner code is easier for an agent to understand, so every later change reads less and costs less. In our tests later changes were about 17% cheaper on average (about 6% for a typical run), after a cleanup that costs money once. The numbers.

Should I add Krypton to CI?

Yes, so your agents cannot quietly tangle your codebase. In a 20-revision test the gate held the worst function near 12 times over the limit, against about 1,900 times without it, with every revision still correct. The fix rounds add some cost (about 62% more per run in that test). The case study.

Does it work on Windows?

The client is a Rust program and builds on Windows, macOS and Linux (the easiest route is Docker, which needs nothing else installed).