semantic-graph finds duplicate and related tests in your test suite. It scans Playwright-style test files written with test() and test.describe(), embeds each test, groups similar tests with DBSCAN clustering and names each cluster with an LLM. The results open in a local web UI with a folder tree and a 2D similarity graph laid out with UMAP, so overlapping tests are easy to spot.
It is for developers and QA engineers who want to keep a growing suite lean and find tests that cover the same ground. Run it with npx @testchimp/semantic-graph visualize --tests-dir ./tests and an OpenAI API key, or use Anthropic Claude together with Voyage embeddings. No database is needed, since embeddings are computed in memory on each run. Maintained by TestChimp (https://testchimp.io), the QA platform for coding agents.
Features
- Scans .spec and .test files (TypeScript and JavaScript) in Playwright-style syntax
- Embeds each test and measures cosine similarity between tests
- DBSCAN clustering to group duplicate and related tests
- LLM-generated cluster names
- 2D UMAP graph and folder tree in a local browser UI
- Works with OpenAI, or Anthropic Claude plus Voyage embeddings
- Configurable embedding and LLM models through environment variables
- No database: everything runs in memory on each run
- One command via npx; reusable core library published as @testchimp/semantic-graph-core
- Open source under the MIT License