Skip to content

DSado88/greptar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greptar

The mutant dinosaur that hunts your bugs

grep + Reptar = Greptar. Find the mutations before they find you.

version rust license MCP


Greptar is a mutation-based code verification server that speaks MCP. It hunts bugs by injecting mutations into your code and measuring whether your tests and reviews catch them.

Two modes, one scoring matrix:

  • Semantic mutations — AI-crafted realistic bugs a human might actually write
  • Mechanical mutations — automated operator swaps via cargo-mutants for breadth

What survives is what you should worry about.

How it works

                    ┌─────────────────────────────────┐
                    │         Scoring Matrix           │
                    ├──────────────┬───────────────────┤
                    │              │ Review catches it? │
                    │              ├────────┬──────────┤
                    │              │  Yes   │    No    │
                    ├──────────────┼────────┼──────────┤
                    │ Tests   Yes  │ Strong │ReviewGap │
                    │ catch   No   │TestGap │BlindSpot │
                    │ it?         │        │          │
                    └──────────────┴────────┴──────────┘
  • Strong — both tests and review catch it. You're covered.
  • TestGap — review catches it but tests don't. Write a test.
  • ReviewGap — tests catch it but review missed it. Sharpen your eye.
  • BlindSpot — nobody catches it. Highest priority.

Quick start

Prerequisites

  • Rust (2024 edition)
  • ripgrep (rg) — for the scan tool
  • cargo-mutants — for the mutants tool (optional)

Build

cargo build --release

Configure your MCP client

Add to your MCP client config (e.g. Claude Code's settings.json):

{
  "mcpServers": {
    "greptar": {
      "command": "/path/to/greptar/target/release/greptar",
      "args": []
    }
  }
}

Workflows

Semantic (depth — AI-crafted realistic bugs)

scan → read context → generate plan → plan → execute_plan → score
  1. scan — discover mutation targets with ripgrep
  2. Read surrounding context for each target
  3. Generate a mutation plan (realistic bugs a human might write)
  4. plan — load the mutation plan
  5. execute_plan — run all mutations in one call (recommended) — or use the interactive loop: injecttestrecordrevert
  6. score — view the detection matrix

Mechanical (breadth — cargo-mutants operator swaps)

mutants → score
  1. mutants — run cargo-mutants on specific files
  2. score — view results (merged with any semantic results)

Both workflows feed the same scoring matrix. Run them together for depth + breadth.

Tools

Tool Purpose Phase
scan Discover mutation targets via ripgrep Idle → Scanned
plan Load a mutation plan Scanned → Planned
inject Apply a mutation to the codebase Planned → Injected
test Run tests against injected mutation Injected
record Record test/review outcome Injected
revert Undo injected mutation via git Injected → Planned
execute_plan Batch-run all mutations automatically Planned → Planned
mutants Run cargo-mutants for mechanical mutations Any* → Planned
score View the detection matrix Any
status Check current phase Any
reset Clear state and start over Any (not Injected)

State machine

Idle → (scan) → Scanned → (plan) → Planned → (inject) → Injected → (revert) → Planned
                                        ↑                                          │
                                        └──────────────────────────────────────────┘

The name

Reptar is a fictional mutant dinosaur from Rugrats — a radioactive T-Rex that's equal parts terrifying and beloved. Greptar is grep + Reptar: it greps through your code to find where mutations can hide, then stomps on the ones your tests miss.

Mutation testing is about finding what survives. Greptar makes sure nothing does.

License

MIT

About

The mutant dinosaur that hunts your bugs. Mutation-based code verification MCP server.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages