AI Slop Code Risk Monitor

statelyai/xstate

SlopCodeMonitor badge for statelyai/xstate Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

State machines, statecharts, and actors for complex logic

0.3 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for statelyai/xstate, a TypeScript project with 30,381 GitHub stars. SynthScan examined 200,972 lines of code across 817 source files, recording 49 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 0.3 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

0.3
Adjusted Signal
0.3
Raw Pattern Score
100%
Time Factor
2026-10-29
Last Push
30.4K
Stars
TypeScript
Language
201.0K
Lines of Code
817
Files
49
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 1.2/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 45 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

Are imports declared and package/API names verified? 4 finding(s).

Agent Over-Engineering Ratio 0.7/100 · LOW

Are wrappers, guards, and repeated structures necessary? 27 finding(s).

PR Review Velocity Impact 1.3/100 · LOW

Which changes need focused human review? 49 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 2LOW 47

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 49 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers27 hits · 27 pts
SeverityFileLineSnippetContext
LOWpackages/core/test/errors.test.ts30function installGlobalOnErrorHandler(handler: (ev: ErrorEvent) => void) {CODE
LOWpackages/core/test/errors.test.ts495 error: function preventUnhandledErrorListener() {}CODE
LOWpackages/core/test/errors.test.ts531 error: function preventUnhandledErrorListener() {}CODE
LOWpackages/core/test/errors.test.ts534 error: function preventUnhandledErrorListener() {}CODE
LOWpackages/core/test/errors.test.ts567 error: function preventUnhandledErrorListener() {}CODE
LOWpackages/core/test/errors.test.ts811 error: function preventUnhandledErrorListener() {}CODE
LOWpackages/core/test/errors.test.ts985 actorRef.subscribe({ error: function preventUnhandledErrorListener() {} });CODE
LOWpackages/core/test/errors.test.ts1014 actorRef.subscribe({ error: function preventUnhandledErrorListener() {} });CODE
LOWpackages/core/test/rehydration.test.ts374 actorRef.subscribe({ error: function preventUnhandledErrorListener() {} });CODE
LOWpackages/core/test/utils.ts96 function addTrackingActionsRecursively(state: StateNode<any, any>) {CODE
LOWpackages/core/test/actorLogic.test.ts198 actorRef.subscribe({ error: function preventUnhandledErrorListener() {} });CODE
LOWpackages/core/test/actorLogic.test.ts217 actorRef2.subscribe({ error: function preventUnhandledErrorListener() {} });CODE
LOWpackages/core/src/StateMachine.ts628 function resolveHistoryReferencedState(CODE
LOWpackages/core/src/utils.ts281export function getAllOwnEventDescriptors(snapshot: AnyMachineSnapshot) {CODE
LOWpackages/core/src/stateUtils.ts550function getInitialStateNodesWithTheirAncestors(stateNode: AnyStateNode) {CODE
LOWpackages/core/src/stateUtils.ts847function removeConflictingTransitions(CODE
LOWpackages/core/src/stateUtils.ts986function areStateNodeCollectionsEqual(CODE
LOWpackages/core/src/stateUtils.ts1462function addProperAncestorStatesToEnter(CODE
LOWpackages/core/src/stateUtils.ts1557function resolveAndExecuteActionsWithContext(CODE
LOWpackages/core/src/stateUtils.ts1834function selectEventlessTransitions(CODE
LOWpackages/core/src/graph/TestModel.ts346function serializeMachineTransition(CODE
LOWpackages/core/src/graph/graph.ts110export function createDefaultLogicOptions(): TraversalOptions<any, any, any> {CODE
LOWpackages/xstate-store-react/src/index.ts58function createStoreFromDefinition(definition: AnyStoreConfig) {CODE
LOWpackages/xstate-store/src/validate.ts67function getStoreValidationErrorMessage(options: StoreValidationErrorOptions) {CODE
LOWpackages/xstate-store/src/persist.ts1046function assertBroadcastChannelAvailable(): void {CODE
LOWpackages/xstate-store/src/persist.ts1093export function subscribeToBroadcastStorage(store: {CODE
LOWpackages/xstate-store/src/store.ts118export function assertNoInternalEventTypeCollisions(CODE
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWREADME.md481});COMMENT
LOWexamples/tiles/src/App.tsx21 backgroundSize: '600% center'COMMENT
LOWpackages/core/test/scxml.test.ts161 'test192.txml',COMMENT
LOWpackages/core/test/scxml.test.ts181 // 'test230.txml', // autoForward not supported in v5COMMENT
LOWpackages/core/test/scxml.test.ts201 // 'test278.txml', // non-root datamodel with early binding not implemented yetCOMMENT
LOWpackages/core/test/scxml.test.ts221 // 'test319.txml', // SCXML has no init event, so _event stays unbound in onentry of initial stateCOMMENT
LOWpackages/core/test/scxml.test.ts281 'test445.txml',COMMENT
LOWpackages/core/test/scxml.test.ts301 // 'test506.txml', // `reenter` semantics in v5 are different from SCXML type="internal"/"external" transitions, we COMMENT
LOWpackages/core/test/scxml.test.ts321 // 'test553.txml', // namelist not implemented yet + errored send not dispatching an eventCOMMENT
LOWpackages/core/test/types.test.ts4421 it('should reject a start callback that is an async function', () => {COMMENT
LOWpackages/core/src/createActor.ts701 }COMMENT
LOWpackages/core/src/graph/deduplicatePaths.ts41 for (const i in pathWithEventSequence.eventSequence) {COMMENT
LOWpackages/xstate-store/CHANGELOG.md1121## 3.0.1COMMENT
LOWpackages/xstate-store/CHANGELOG.md1301 // DEPRECATED APICOMMENT
LOWpackages/xstate-store/CHANGELOG.md1681 // count: 1,COMMENT
LOWtemplates/svelte-ts/src/vite-env.d.ts1/// <reference types="svelte" />COMMENT
Modern AI Meta-Vocabulary2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md41- **[`xstate`](#super-quick-start)**: state machines, statecharts, actors, effects, and orchestration for complex app loCODE
MEDIUMexamples/readme.md51. In the CLI, navigate to the `/examples` folder. Start a [new Vite project](https://vitejs.dev/guide/#scaffolding-yourCODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWexamples/workflow-credit-check/main.ts141 name: 'John Doe',CODE
LOWexamples/workflow-reusing-functions/main.ts211 name: 'John Doe'CODE
LOWexamples/workflow-new-patient-onboarding/main.ts146 name: 'John Doe',CODE
LOWexamples/workflow-book-lending/main.ts278 name: 'John Doe',CODE