Skip to content

SnehalRaj/vibe-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The vibes were off. Now you know where.

License Stars Claude Code


You derived something. Implemented it. Code ran fine. Two weeks later: the sign was wrong.

vibe-check is a Claude Code agent for catching that. It makes you declare conventions before deriving anything, tags results with confidence levels, and writes PyTorch snippets to verify the algebra numerically. When it doesn't know a sign convention, it says so.

Works across math in general. Knows quantum computing, linear algebra, representation theory, and Lie algebras well.


What it does

Checks derivations step by step. Convention declarations up front, numerical sanity checks at the end. Catches notation conflicts between papers (same symbol, different meaning in each). Translates math into runnable PyTorch with unitarity checks and gradient verification against finite differences. Flags claims that go beyond what's actually been proven. Constructs exact matrices in reduced subspaces where basis ordering quietly breaks things. Computes Lie algebra generators, commutators, dimension checks. Builds compound matrices C^(k)(O) with exterior power representations.

Won't plan your experiments. Won't brainstorm. Wrong tool for that.


Install

# Marketplace (recommended)
/plugin marketplace add SnehalRaj/vibe-check
/plugin install vibe-check@vibe-check

# Or add directly
claude plugin add SnehalRaj/vibe-check

# Or clone
git clone https://github.com/SnehalRaj/vibe-check.git ~/.claude/plugins/vibe-check

How it works

Conventions first

Before any derivation, the agent states conventions: Hilbert space, basis ordering, tensor convention, parameterization, what the matrix acts on. Ambiguous convention? It picks one and marks it [UNCERTAIN].

Convention Declaration:
- Space: HW=3 subspace of 6 qubits, dim = C(6,3) = 20
- Basis: lexicographic ordering of weight-3 bitstrings
- Tensor convention: qubit 0 is leftmost
- Parameterization: R(theta) = exp(-i theta G/2)
- Matrix acts on: reduced subspace basis vectors

Confidence tags

Every result gets tagged. No bare assertions.

Tag Meaning
[EXACT] Proven under stated conventions
[APPROX: regime] Valid in a specified regime
[ASYMPTOTIC] Leading-order behavior
[CONJECTURE] Plausible but unproven
[UNCERTAIN] Convention-dependent or unverified

Verification protocol

Derivations longer than three steps follow a fixed protocol:

  1. Setup (symbols, spaces, basis, assumptions)
  2. Strategy (2-4 lines max)
  3. Step-by-step derivation (each equality justified)
  4. Boxed result
  5. Sanity checks (dimensions, symmetry, limiting cases)
  6. PyTorch snippet that actually runs
  7. Ambiguity report (convention-sensitive steps flagged)

You can skip the numerical check, but you have to say so.


Example

You: "I derived the gradient of tr(A exp(tB)) but finite differences don't match."

The agent declares conventions, gives the correct derivative, lists common sign errors (exp(tB) vs exp(-itB), missing factors of i), writes verification code, and tells you your step size is probably too large or you mixed up transpose with conjugate-transpose.


Domains

Domain Coverage
Linear algebra Decompositions, subspace projections, eigenvalue perturbation, Kronecker products
Lie algebras Generator listing, commutator verification, DLA dimension, su(d) generation claims
Representation theory Compound matrices, exterior powers, irreducible decompositions, Schur-Weyl duality
Quantum circuits Hamming weight subspaces, RBS/matchgate disambiguation, FLO simulatability
Optimization Gradient verification, Hessian structure, parameter-shift vs finite differences
Statistics Estimator bias/variance, sample complexity, concentration inequalities
PyTorch Reduced-basis assembly, batched operations, autograd verification

What the agent refuses to do

Give generic overviews. Use overloaded terms without defining them. Skip derivation steps. Present code without tests. Make algebra claims without checking small cases. Guess at paper statements from memory. Switch conventions without telling you. Say "polynomial" without specifying in what.



Why

LLMs are confidently wrong about math. They'll produce a derivation with the wrong sign or a convention that doesn't match the paper they cite. It compiles. Tests pass. Sign was still wrong.

This agent won't skip steps, won't guess conventions, and checks numerically when it can.


Contributing

PRs welcome. Agent definition is in agents/vibe-check.md. If your subfield has its own notation problems, adding domain instructions helps.

MIT License


Works with Claude Code and any agent framework that reads markdown prompts

About

Your derivation is wrong. Here's where. Precision math verification agent for Claude Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors