Catch the bug that type-checks and never updates.
pyreon doctor runs up to ten gates over your app and returns one score from 0 to 100, with the fix printed under each finding. Behind it: 144 lint rules that know what a signal is, a test kit that can assert an effect did not re-run, and a DevTools panel for the reactive graph.
bun add -D @pyreon/cli @pyreon/lint @pyreon/testing - doctor
- 15 gates · 0–100 score10 check any app; 5 audit the Pyreon repo itself and skip in yours
- lint
- 144 rules · 26 categories99 on in
recommended; 32 more inbest-practices - testing
- Testing Library API + graph matchers
notToReRunWhen,toHaveRecomputedTimes, leak checks - output
- terminal · JSON · GitHub annotations
--cifails the job on errors only


- 144 lint rules in 26 categories, from reactivity and JSX to SSR, routing, forms and security.allRules in packages/tools/lint/src/rules/index.ts, counted 13 Nov 2026 with #4479, +4 since (consistent-signal-read, prefer-style-modifier, no-raw-css-string, no-theme-props-in-style);
pyreon-lint --listprints "144 rules in 11 groups" - 10 doctor gates that check any app, feeding one 0–100 score. Unmeasured categories are left out, not counted as 100.GateName in packages/tools/cli/src/doctor/gate-names.ts (15 gates); distribution, doc-claims, audit-leak-classes, audit-types and bundle-budgets skip outside the Pyreon repo (their gates/*.ts skipReason); score.ts (mean of included categories)
- 7 test-kit subpaths that set up form, router, store, i18n, query, toast and theme for you.packages/tools/testing/package.json exports ./form ./ui ./router ./store ./i18n ./toast ./query
synthetic · author-run · M3 Max · record of 2026-11-05
Every result, including where we lose →Tooling that knows how Pyreon breaks.
It knows the framework
Generic linters see valid TypeScript.
pyreon/no-props-destructuresees({ title }) =>and flags it: a destructured prop is read once and breaks reactive prop tracking.A score you can gate on
pyreon doctor --ciexits 1 on error findings only. Warnings cost points, advisory best-practice findings never block, and a gate that scanned nothing says so instead of passing.Findings on the exact line
--ghaprints GitHub Actions annotations with file, line and column, so each finding sits on the diff in "Files changed".Tests that can say "did not"
expectEffect(e).notToReRunWhen(() => theme.set('dark'))asserts an unrelated write left an effect alone. A render-counting test cannot express that.
Valid TypeScript. Dead UI.
Type-checks with tsc, compiles, renders once. When the parent changes title, the heading never updates.
import { signal } from '@pyreon/reactivity'
type Message = { id: string; subject: string }
export function Inbox({ title, messages }: { title: string; messages: Message[] }) {
const open = signal(false)
return (
<section>
<h2 onClick={() => open.set(!open())}>{title}</h2>
<ul>{messages.map((m) => <li>{m.subject}</li>)}</ul>
</section>
)
}pyreon lint names the line and the rule. The fix reads props where they are used and keys the list.
$ pyreon lint src
/app/src/Inbox.tsx
5:22 error Destructured props in component function — breaks reactive prop tracking. Use `props.x` pattern for reactive prop access. pyreon/no-props-destructure
10:11 warning `.map()` in JSX — use `<For>` for reactive list rendering instead. pyreon/no-map-in-jsx
✗ 1 error, 1 warning
// fixed
export function Inbox(props: { title: string; messages: Message[] }) {
const open = signal(false)
return (
<section>
<h2 onClick={() => open.set(!open())}>{props.title}</h2>
<ul>
<For each={props.messages} by={(m) => m.id}>
{(m) => <li>{m.subject}</li>}
</For>
</ul>
</section>
)
}Every tool, and when you'd reach for it.
Project health in one command
Gates run in parallel and isolate failures. One 0–100 score with a letter grade, a bar per category, and a fix under each finding.
pyreon doctor --ci --gha
The pre-commit scan
Runs the compiler's detectors over the files you changed since HEAD, prints each finding with its fix, and exits 1 if anything is left.
pyreon check
144 rules that know the framework
Five presets, two readable layers, a config file with a JSON schema, watch mode, --why-off to explain a disabled rule, and an LSP server for your editor.
pyreon lint --watch
Testing Library, plus the reactive graph
render, screen, fireEvent and every query as you know them, plus matchers for fire counts, effect re-runs and leaks.
expectSignal · expectEffect · expectNoReactiveLeak
See the reactive graph
A Chrome DevTools panel with six tabs. Click a component to highlight it on the page. Built from the repo and loaded unpacked.
Components · Graph · Signals · Effects · Profiler · Console
An overlay in every dev build
Built into the runtime, tree-shaken from production: orphan signals, the latest updates with their cause chain, and Pick to inspect bound text.
$p.reactivity() · $p.pick()
Keep versions in line
info lists every installed @pyreon/* version and flags skew. upgrade aligns them to one version, as a dry run until you pass --write.
pyreon upgrade --write
Start and grow a project
new scaffolds a web app, or iOS and Android too with --native (experimental). add installs a package and prints how to wire it in.
pyreon add @pyreon/form
What doctor checks.
Gates that audit the Pyreon repo itself skip in your app and say why. They never count against your score.
| gate | category | catches |
|---|---|---|
| react-patterns | correctness | React habits: useState, useEffect, className, React imports |
| pyreon-patterns | correctness | For without by, destructured props, a signal written as a call |
| lint | per rule | Every configured @pyreon/lint rule |
| islands-audit | architecture | Duplicate, dead, nested or unregistered islands |
| ssg-audit | architecture | 404 placement, dynamic routes without getStaticPaths, non-literal revalidate |
| content-audit | architecture | Missing titles, broken internal links, orphaned pages |
| native-audit | architecture | Web-only imports and declarations the native build drops, in files that import @pyreon/primitives (needs @pyreon/native-compiler) |
| check-dedup | architecture | Two versions of one @pyreon/* package in the lockfile |
| dependency-fabric | architecture | Phantom deps, version drift, cycles (runs when @pyreon/loom is installed) |
| audit-tests | testing | Tests that build fake vnodes instead of rendering through h() |
| distribution | architecture | Package hygiene for libraries laid out like the Pyreon repo |
| doc-claims | documentation | Numbers in the Pyreon docs that disagree with the source (Pyreon repo only) |
| audit-leak-classes | best practices | Memory-leak heuristics; advisory, never graded (Pyreon repo only) |
| audit-types | architecture | Typed but never-read public fields (--full, Pyreon repo only) |
| bundle-budgets | performance | Gzipped entry size against locked budgets (--full, Pyreon repo only) |
Coming from eslint-plugin-react-hooks, React Testing Library or React DevTools?
No dependency arrays, so no exhaustive-deps. The rules cover what goes wrong instead.
// eslint.config.js
import tseslint from 'typescript-eslint'
import reactHooks from 'eslint-plugin-react-hooks'
export default [
{
files: ['src/**/*.{ts,tsx}'],
languageOptions: { parser: tseslint.parser },
plugins: { 'react-hooks': reactHooks },
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
},
]Save it as .pyreonlintrc.json and run pyreon lint --watch. effect() tracks what it reads, so there is no array to keep in sync. The app preset turns on 96 of the 144 rules, among them destructured props, count(x) used as a write, .map() in JSX, and window read during SSR.
{
"$schema": "./node_modules/@pyreon/lint/schema/pyreonlintrc.schema.json",
"preset": "app",
"include": ["src/"]
}Same queries, same events. The render comes from @pyreon/testing.
import { useState } from 'react'
import { render, screen, fireEvent } from '@testing-library/react'
function Cart() {
const [qty, setQty] = useState(1)
return (
<div>
<button onClick={() => setQty((n) => n + 1)}>Add one</button>
<output>Total: {qty * 12}</output>
</div>
)
}
test('adds to the total', () => {
render(<Cart />)
fireEvent.click(screen.getByRole('button', { name: 'Add one' }))
expect(screen.getByText('Total: 24')).toBeInTheDocument()
})The queries are re-exported from @testing-library/dom, the package under React Testing Library. Add @pyreon/testing/vitest to setupFiles for cleanup between tests and the jest-dom matchers.
import { signal, computed } from '@pyreon/reactivity'
import { render, screen, fireEvent } from '@pyreon/testing'
function Cart() {
const qty = signal(1)
const total = computed(() => qty() * 12)
return (
<div>
<button onClick={() => qty.update((n) => n + 1)}>Add one</button>
<output>Total: {total()}</output>
</div>
)
}
test('adds to the total', () => {
render(<Cart />)
fireEvent.click(screen.getByRole('button', { name: 'Add one' }))
expect(screen.getByText('Total: 24')).toBeInTheDocument()
})From "what re-rendered?" to "which effect re-ran?", asserted in a test.
import { useState } from 'react'
import { render, screen, fireEvent } from '@testing-library/react'
let totalRenders = 0
function Total({ qty }: { qty: number }) {
totalRenders++
return <output>Total: {qty * 12}</output>
}
function Shop() {
const [qty] = useState(1)
const [dark, setDark] = useState(false)
return (
<div className={dark ? 'dark' : 'light'}>
<button onClick={() => setDark((d) => !d)}>Dark mode</button>
<Total qty={qty} />
</div>
)
}
test('dark mode re-renders Total', () => {
render(<Shop />)
const before = totalRenders
fireEvent.click(screen.getByRole('button', { name: 'Dark mode' }))
expect(totalRenders).toBe(before + 1) // memo() would stop it
})Components run once, so there is no render to count. In the browser, the DevTools panel's Effects and Profiler tabs and the Ctrl+Shift+R overlay show what fired and why.
import { signal, effect } from '@pyreon/reactivity'
import { expectEffect } from '@pyreon/testing'
test('dark mode does not re-run the total', () => {
const qty = signal(1)
const dark = signal(false)
const total = effect(() => {
document.title = `Total: ${qty() * 12}`
})
expectEffect(total).toReRunWhen(() => qty.set(2))
expectEffect(total).notToReRunWhen(() => dark.set(true))
})Run doctor.
Four real pyreon doctor runs on a small app, replayed: one planted mistake, three fixes, and the score climbing from 67 to 96.
import { signal } from '@pyreon/reactivity'
interface ColumnStatsProps {
title: string
tags: string[]
}
export default function ColumnStats({ title, tags }: ColumnStatsProps) {
const views = signal(0)
return (
<section className="column-stats">
<h3>{title}</h3>
<button onClick={() => views(views() + 1)}>Viewed {views()} times</button>
<ul>{tags.map((tag) => <li>{tag}</li>)}</ul>
</section>
)
}The other findings are the kanban example's own; doctor reports them too.
What ships in the box.
- pyreon doctor 15 gates (10 for any app), a 0–100 score with a letter grade,
--only/--skipto pick gates,--fixfor lint and React-pattern fixes. - pyreon check scans git-changed files (or the paths you pass), prints each fix,
--jsonfor tools. - Five lint presets
recommended,strict,app,libandbest-practices; per-rule overrides in.pyreonlintrc.json. pyreon-lint --why-off <rule>says whether a rule will run, and which config line turns it off.- Editor support
pyreon-lint --lspserves diagnostics and inlay hints; a VS Code extension ships in the repo. - Parallel linting runs of 200 files or more spread across a worker pool; results are sorted so CI diffs stay stable.
- Reactive-graph matchers
expectSignal(s).toHaveChangedTimes(n),expectEffect(e).toReRunWhen(fn)and.notToReRunWhen(fn). - Leak matchers
expectNoReactiveLeakchecks that mount plus unmount leaves no graph growth;expectGarbageCollectedreplaces the WeakRef dance. - DevTools panel Components, Graph, Signals, Effects, Profiler and Console tabs, with click-to-highlight on the page.
- pyreon info and upgrade find version skew before it trips the duplicate-instance guard, then align every
@pyreon/*dependency.
Things to build with it.
One job prints annotations on the diff and fails when an error finding is left. Warnings still lower the score but do not fail the job.
# .github/workflows/health.yml
name: Health
on: [pull_request]
jobs:
doctor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bunx pyreon doctor --gha --ciWith no paths, pyreon check scans files changed since HEAD plus untracked ones and exits 1 on any finding. Silence a line you mean with // pyreon-lint-ignore <code>.
#!/bin/sh
# .githooks/pre-commit (git config core.hooksPath .githooks)
exec bunx pyreon checkAssertions on the reactive graph itself: what re-ran, and how often. Run them through @pyreon/vite-plugin with @pyreon/testing/vitest in setupFiles.
import { expectEffect, expectSignal } from '@pyreon/testing'
import { signal, computed, effect } from '@pyreon/reactivity'
test('a theme switch does not re-run the cart log', () => {
const qty = signal(1)
const theme = signal('light')
const log = effect(() => { qty() })
expectEffect(log).toReRunWhen(() => qty.set(2))
expectEffect(log).notToReRunWhen(() => theme.set('dark'))
})
test('total recomputes once per change', () => {
const qty = signal(1)
const total = computed(() => qty() * 12)
total() // first computation counts as 1
qty.set(3)
expectSignal(total).toHaveRecomputedTimes(2)
})Commands and exports.
Every export has a reference page with its signature, an example and the mistakes people make with it.
- doctor
- check
- lint
- plain
- add
- new
- info
- upgrade
- context
- mcp
- atlas
- loom
- lathe
- --ci
- --gha
- --json
- --fix
- --full
- --only
- --skip
- --roots
- --audit-min-risk
- --preset
- --fix
- --watch
- --lsp
- --format
- --rule
- --rule-options
- --why-off
- --init
- --list
- render
- renderHook
- cleanup
- screen
- fireEvent
- waitFor
- within
- expectSignal
- expectEffect
- expectGarbageCollected
- expectNoReactiveLeak
- /vitest
- /matchers
- /form
- /router
- /store
- /i18n
- /query
- /toast
- /ui
Good to know before you start.
Add --ci to gate a build
Plain pyreon doctor always exits 0 so it can run as a report. --ci exits 1 when an error finding is left.
check and lint are different engines
pyreon check runs the compiler's detectors on changed files. The lint rules (99 on in recommended) run under pyreon lint. pyreon doctor runs both.
Review --fix on React code
The React fixes turn useState into signal(), but setter calls like setCount(n) stay as written. Rewrite them as count.set(n) before you commit.
Compile tests the way you compile the app
Put @pyreon/vite-plugin in your vitest config. Without the Pyreon compiler, {total()} in JSX renders once and a DOM assertion after a click fails.
Graph matchers need a dev or test build
Production builds drop the reactive graph, so the matchers throw a clear error there. The leak matchers also need --expose-gc.
Two extensions install from the repo
The DevTools panel is built and loaded unpacked; the VS Code extension is linked from packages/tools/lint/vscode. Neither is in a store yet.
What people ask first.
Does doctor work outside the Pyreon monorepo?
Yes. Ten gates check any app. The five that audit the Pyreon repo itself (distribution, doc-claims, audit-leak-classes, and the --full gates audit-types and bundle-budgets) skip in your app with the reason printed, and a category no gate measured is left out of the score rather than counted as 100.
Will a warning fail my build?
No. --ci exits 1 only when an error finding is left. Warnings and info lower the score; findings in the advisory best-practices category are shown but never graded and never fail --ci.
Do I need check, lint and doctor?
Use pyreon check in a pre-commit hook (changed files, compiler detectors), pyreon lint --watch while you write (the lint rules), and pyreon doctor --ci in CI (both of those plus the project gates).
Where do I get the DevTools extension?
Build it from the repo (bun run --filter='@pyreon/devtools' build), then load packages/tools/devtools/dist/ unpacked from chrome://extensions. The Ctrl+Shift+R overlay needs nothing: it is in every dev build.
Which vitest does @pyreon/testing need?
Vitest 5 (^5.0.0 peer). It runs in happy-dom for structure; interaction and layout tests belong in a real browser through @vitest/browser.
Your app gets a grade. Unlike school, the answers are printed underneath.
bun add -D @pyreon/cli @pyreon/lint @pyreon/testing