AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻译准备中
开源软件为开发者和代码代理提供:源情报、实时测试检查、测试选择与简化、UI 分析以及变更验证。
AI 翻译
Open-source tools for developers and coding agents: source intelligence, live test inspection, test selection and reduction, UI analysis, and change verification.
开发工具TypeScript · RustGitHub @Variance-Authority在线运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证可组合的代码变更软件工具
AI 翻译
Composable tools for code that changes
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
Understand the code. Investigate the behavior. Check the work.
Variance Authority keeps fine-grained evidence of what your code did — across
hundreds of thousands of files and tests, over time — so that a question is
answered from that record instead of by running the whole suite again to find
out. The record has several readings, and none of them is the centre the others
depend on.查看完整 README ↗Understand the code. Investigate the behavior. Check the work.
Variance Authority keeps fine-grained evidence of what your code did — across hundreds of thousands of files and tests, over time — so that a question is answered from that record instead of by running the whole suite again to find out. The record has several readings, and none of them is the centre the others depend on.
Find the names a workspace already publishes. Inspect a test while it runs. Trace a changed interface back to its source. Select the tests an edit reaches. Give your coding agent the same material to work from. Nothing is hosted; compute, storage, browser capacity, credentials, and deployment stay yours.
Start with the question costing you time. Each path states the evidence it needs and where its answer stops; take one on its own, or connect more of them as the investigation grows.
| What do you need to do? | Start here |
|---|---|
| Find where to start in an unfamiliar codebase | Choose an orientation route: exact text, exported names inside one import neighbourhood, or a captured UI subject you can describe. |
| Use a library the way this project already does | Ask what the file can import: the packages its workspace declares, the installed signature of a name, and the agent skills a package ships, all read from node_modules. |
| Find out why this test is stuck | Hold a Playwright test at a line you chose and inspect the page and announced work while that exact test is still running. |
| Run the tests this edit needs | Set one variable on the Vitest or Jest run you already call and it leaves out every test file that never executed the code you changed, nearest tests first if you ask. A test with no complete recording always runs. |
| Make one test smaller | Find the modules loaded and components rendered that the test never used, try one substitution, and confirm it with the same test. |
| Understand an interface | Measure grouping, spacing, alignment, emphasis, and repetition on the live page, make an edit, and measure again. |
| Explain what changed | Keep text, accessibility, layout, styles, and pixels separate, then trace a changed region to its component and source location. |
| Check whether the work did what you intended | Compare the intentions declared before an edit with its observed effects: what landed, what did not, and what changed outside the declared scope. |
Your agent keeps its editor, shell, and test runner. Variance supplies the source facts and observations it reads, through the interfaces it already has.
Point your coding agent at llms.txt.
| Before | After | Diff |
|---|---|---|
The report names the cause and the source location:
1 root(s): 0 authorized, 1 to review, 0 violation(s).
[needs-review] Button — Button
undeclared component change: `Button` (token/paint) reached 1 subject(s)
examples/readme-case/src/Button.js:9
That is not a hand-written sample. It is
examples/readme-case/artifacts/report.txt,
committed beside the three PNGs above, and
examples/readme-case regenerates all four. From a
checkout of this repository, after yarn install:
yarn workspace @variance-authority/example-readme-case generate
A cause that reaches several screens is decided once: accept a matching change across the states it reached, and states carrying additional differences stay open. Other examples cover source selection, structural changes, and flake diagnosis. The external cases exercise the packages against real hosts and runners.
The fastest way in is a test that already gets the app into the UI state you care about. Two installs, one call, one assertion:
npm install --save-dev @variance-authority/playwright-test @playwright/test
npx playwright install chromium
import { test } from '@playwright/test';
import { assertUnchanged, observe } from '@variance-authority/playwright-test';
test('the cart survives an empty basket', async ({ page }, testInfo) => {
await page.goto('https://example.test/cart');
await page.getByRole('button', { name: 'Clear' }).click();
const observation = await observe(page, page.getByTestId('cart'), testInfo, {
subjectId: 'cart/empty',
});
assertUnchanged(observation);
});
cart/empty is a subject id. A subject is one named UI state you asked for
and can ask for again — one Storybook story, one route at one viewport, one
component mounted in a test — captured and compared under an id you choose. The
first run reports new, because no baseline has been approved for that id yet;
promote that image with npx playwright test --update-snapshots=all and the next
run reports unchanged. Nothing accepts a first baseline on your behalf.
The test keeps its own runner, navigation, fixtures, and existing assertions.
@variance-authority/playwright-test
has the rest.
| Your UI is already ready in | Integration recipe |
|---|---|
| A Playwright test | @variance-authority/playwright-test: add an observation |
| A Jest or Vitest jsdom test | @variance-authority/unit-test: capture now, render later |
| A Vitest browser-mode component test | @variance-authority/vitest-browser: observe without leaving the test body |
| A built or served Storybook | @variance-authority/storybook-collector: integrate a Storybook |
| A running application or static build | @variance-authority/route-collector: integrate a route list |
| A custom renderer, store, or pipeline | @variance-authority/observe: choose the entrypoint |
These packages add observation to the environment you already own. They do not replace its test runner, fixtures, routing, or mounting.
To drive the whole loop from a config file instead of from inside a test, use
@variance-authority/cli:
npm install --save-dev @variance-authority/cli
npx variance run --config variance.config.json
npx variance accept --config variance.config.json cart/empty
npx variance run --config variance.config.json
The first durable run exits 1 because its subjects are new. Accept the
subject ids you meant, then rerun; an unchanged run exits 0.
Once a run records what it rendered and what it executed, and the source index records what the source declares, the questions below are answerable from the same material. None of them sits under another, and none requires the rest; take the one you need.
| What do you need to know? | Start here |
|---|---|
| How is information grouped, aligned, repeated, and emphasized in one live interface? | @variance-authority/presentation measures the rendered boxes — spacing, alignment, prominence, repetition — and hands back numbers you assert on. It has no baseline and gives no design score. |
| At which step of a test did two runs stop agreeing? | @variance-authority/scenario records the Arrange–Act–Assert steps a run actually took as a state machine, then compares two of them. |
| Which components and tests could — or did — a source change reach? | @variance-authority/sense joins what the source imports with what a recorded run actually executed, and selects tests from it. It reads more than JavaScript. |
| What public API does a workspace expose, and who consumes it? | @variance-authority/package reads every entrypoint a manifest opens and what it exports; @variance-authority/help answers questions about those names, their import sites and the module relations around them over MCP. |
| What did a running system decide, and where did one execution go? | @variance-authority/event lets code announce a decision so a test waits for it instead of guessing; keeps one execution identity attached across processes; makes a suite in flight something you can query rather than wait for. |
Each row has its own requirements — a browser, a live DOM, a filesystem, a socket, a readable checkout — and none of them is imposed on the others.
The scan that answers what can this change reach is not limited to the language the tool is written in. JavaScript and TypeScript in every dialect, stylesheets, Python, Rust, Java, Kotlin and Swift are read into one graph, and a diff that spans several of them is answered in one walk.
npx variance reach --since origin/main
That prints the files the change reaches, one per line, so you can hand them to whatever runs them:
npx variance reach --since origin/main | grep '_test\.py$' | xargs pytest
There is no framework integration behind this and none is implied: the answer is
a list of paths on stdout, and what you do with it is yours. Because a run list
that comes back empty would look like a green build, reach never exits 0 with
an empty list — an empty answer is an error, not a pass.
How different languages are handled states what the graph
covers and what it leaves out.
A package is cut around what its consumer must supply, which is why there are many of them rather than one dependency graph you take whole.
The packages above are built from smaller ones you can also use directly:
@variance-authority/core, @variance-authority/dom,
@variance-authority/react, @variance-authority/jsx-source,
@variance-authority/raster, @variance-authority/png,
@variance-authority/png-sharp, @variance-authority/session,
@variance-authority/playwright, @variance-authority/storybook,
@variance-authority/store, @variance-authority/report, and
@variance-authority/remote. These are supported entrypoints, not internals. A
custom integration can:
The architecture package map names what every package requires and what contract it owns. The information map shows how visual, source, runtime, scenario, presentation, history, and review evidence remain separate and meet only on identities their producers emitted.
The adoption gates state where the tool fits Playwright, Storybook, Jest, and Vitest — under jsdom and in browser mode. The product comparison states what Percy, Chromatic, Argos, and Applitools provide that this project does not.
The full documentation is published at
variance-authority.dev, and its source is the
docs/ directory of this repository. The
documentation index routes by question rather than by package;
use it to find the contract, measurement, or limitation behind any of the paths
above.
Two questions meet in this repository — what did this change look like and what did this change reach — and each has its own prior art.
--changedSince, Vitest --changed, Playwright --only-changed —
selection from the import graph, which needs no recording and cannot see a
route the graph does not include. They walk it from every file a diff touched;
variance reach walks
it from what the edit changed, so an edit to a comment or a type selects
nothing, and a file that imports only an unchanged export of a changed file is
left out. Over sixty commits of TanStack Query, that is 441 test files where
the file graph selects 1,470; over sixty of Zod, whose tests import it through
one namespace, 4,142 where it selects 4,531. What a record shows that no
graph can is where a
record's answer differs from any graph's.MIT — see LICENSE. Copyright (c) 2026 Machine Garden. GitHub.
@variance-authority/wire| How often has a cause recurred, drifted, or proved unstable? | @variance-authority/history defines those answers over retained observations; @variance-authority/server is the self-hosted HTTP service that retains them. |
| How does a person or agent inspect and decide on the evidence? | @variance-authority/mcp exposes retained evidence to an MCP client; @variance-authority/tribunal is the self-hosted service where baselines and per-subject decisions are reviewed and approved. |
variance reach has.