AI Slop Code Risk Monitor

unicity-sphere/sphere-sdk

SlopCodeMonitor badge for unicity-sphere/sphere-sdk Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

The SDK for autonomous economic agents. Give an agent an identity, a wallet, and the ability to find, negotiate with, and settle with other agents - peer-to-peer, with perfect privacy and ultra-fast finality

3.6 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for unicity-sphere/sphere-sdk, a TypeScript project with 5,387 GitHub stars. SynthScan examined 142,694 lines of code across 406 source files, recording 226 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 3.6 (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.

3.6
Adjusted Signal
3.6
Raw Pattern Score
100%
Time Factor
2026-10-26
Last Push
5.4K
Stars
TypeScript
Language
142.7K
Lines of Code
406
Files
226
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 3.5/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.1/100 · LOW

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

Agent Over-Engineering Ratio 14.3/100 · LOW

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

PR Review Velocity Impact 16.1/100 · LOW

Which changes need focused human review? 226 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 138LOW 88

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 226 distinct pattern matches across 8 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.

Decorative Section Separators136 hits · 404 pts
SeverityFileLineSnippetContext
MEDIUMeslint.config.js11 // ── Code budget ─────────────────────────────────────────────────────────────COMMENT
MEDIUMeslint.config.js43 // ── token-engine boundary ───────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/mailbox.ts161 // ── deliver ────────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/mailbox.ts250 // ── incoming ───────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/mailbox.ts310 // ── ack ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/mailbox.ts397 // ── seen-set (S7) ──────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/session.ts180 // ── lifecycle ─────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/session.ts203 // ── auth cell (F8/F14) ────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/session.ts283 // ── epoch latch (F12) ─────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/session.ts323 // ── streams ───────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/session.ts352 // ── wake socket ───────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts194 // ── auth ─────────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts212 // ── inventory / blobs ────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts274 // ── intents ──────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts323 // ── mailbox ──────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts355 // ── history ──────────────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts372 // ── payment requests ─────────────────────────────────────────────────────COMMENT
MEDIUMimpl/wallet-api-v2/client.ts399 // ── realtime ─────────────────────────────────────────────────────────────COMMENT
MEDIUMoracle/oracle-provider.ts30 // ── v2 token-engine config surface ─────────────────────────────────────────COMMENT
MEDIUMtests/unit/token-engine/nft-payload.test.ts89// ── content fixtures ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/token-engine/nft-payload.test.ts144// ── signing fixtures ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/token-engine/FakeTokenEngine.ts322 // ── internals ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/machine-resume.test.ts486// ── #835: the converger ensures a parked intent before anything else ────────COMMENT
MEDIUMtests/unit/payments-v2/machine-resume.test.ts486// ── #835: the converger ensures a parked intent before anything else ────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts62// ── wire failures a PUT /v1/intents can end in without proving "no row" ─────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts188// ── observation helpers ──────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts407// ── engines ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts489// ── (a) PUT fails before the server stores the intent ───────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts524// ── (b) PUT stored, response lost ───────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts563// ── (c) the same PUT failure through requests.pay() ─────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts604// ── (d) a later leg fails with an ordinary coded error, no PUT failure ──────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts642// ── (e) the in-process convergence path fails AFTER delivery ────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts690// ── (f) mixed direct + split, PUT fails before the row is stored ────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts724// ── (g) the PUT is refused before any write, on every attempt ───────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts815// ── (h) every PUT answer is ambiguous: the send is HELD ─────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1106// ── (i) an epoch reseed while the PUT is in flight ──────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1139// ── (j)–(l) once a leg certified, no failure is clean ───────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1326// ── (m) whole-token sends go through the same gate ──────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1406// ── (n)–(p) a clean leg failure is clean only when it can be fenced ─────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1577// ── (q) a pass that cannot read the backstop reconciles nothing ─────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1609// ── (r) a settled partial whose close fails ─────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1639// ── (s) a convergence pass that overlaps a send or a payment ────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts1943// ── (t) a §5.1 reseed already running when the send starts ──────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2019// ── (u) a listener's throw never reaches a money-path outcome ───────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2079// ── (v) a remainder attempt that is being cancelled holds the remainder ─────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2138// ── (x) after a partial, the re-plan attempt is held ───────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2409// ── (z) a 2xx whose ack write fails ─────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2448// ── (y) a cancel the server confirms with 404 ──────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2478// ── (w) a converged hold is forgotten ───────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2528// ── #842: SENT history beside the apply ─────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/send-intent-unknown.test.ts2528// ── #842: SENT history beside the apply ─────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/providers.test.ts78// ── contract harnesses ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/providers.test.ts125// ── targeted: storage fan-out ─────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/providers.test.ts220// ── targeted: delivery ────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/providers.test.ts393// ── targeted: checkpoints ─────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/fakes/fake-client.ts105 // ── auth (not modeled by FakeWalletApi) ──────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/fakes/fake-client.ts127 // ── inventory / blobs ────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/fakes/fake-client.ts204 // ── intents ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/fakes/fake-client.ts245 // ── mailbox ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/unit/payments-v2/fakes/fake-client.ts298 // ── history ──────────────────────────────────────────────────────────────COMMENT
76 more matches not shown…
Hyper-Verbose Identifiers37 hits · 37 pts
SeverityFileLineSnippetContext
LOWconstants.ts121export function isNetworkScopedAddressKey(key: string): boolean {CODE
LOWimpl/nodejs/transport/index.ts29export function createNodeWebSocketFactory(): WebSocketFactory {CODE
LOWimpl/nodejs/transport/index.ts42export function createNostrTransportProvider(CODE
LOWimpl/nodejs/oracle/index.ts77export function createNodeTrustBaseLoader(CODE
LOWimpl/nodejs/oracle/index.ts91export function createUnicityAggregatorProvider(CODE
LOWimpl/nodejs/storage/FileStorageProvider.ts341export function createFileStorageProvider(config: FileStorageProviderConfig | string): FileStorageProvider {CODE
LOWimpl/browser/transport/index.ts43export function createNostrTransportProvider(CODE
LOWimpl/browser/oracle/index.ts77export function createBrowserTrustBaseLoader(CODE
LOWimpl/browser/oracle/index.ts91export function createUnicityAggregatorProvider(CODE
LOWimpl/browser/storage/IndexedDBStorageProvider.ts448export function createIndexedDBStorageProvider(CODE
LOWimpl/browser/storage/LocalStorageProvider.ts341export function createLocalStorageProvider(CODE
LOWimpl/browser/connect/ExtensionTransport.ts35export function isExtensionConnectEnvelope(data: unknown): data is ExtensionConnectEnvelope {CODE
LOWcore/errors.ts262export function isPossiblyCommittedSendOutcome(err: unknown): boolean {CODE
LOWcore/crypto.ts437export function generateAddressFromMasterKey(CODE
LOWcore/crypto.ts567export function recoverPubkeyFromSignature(message: string, signature: string): string {CODE
LOWcore/delivery-envelope.ts67export function deriveDeliveryEncryptionKey(privKeyHex: string, peerPubkeyHex: string): Uint8Array {CODE
LOWcore/transport-resolver.ts70export function createTransportAddressResolver(CODE
LOWserialization/wallet-text.ts162export function serializeEncryptedWalletToText(params: {CODE
LOWserialization/wallet-text.ts317export function parseAndDecryptWalletText(CODE
LOW…/unit/transport/NostrTransportProvider.nametag.test.ts20function deriveNametagEncryptionKey(privateKeyHex: string): Uint8Array {CODE
LOWtests/unit/transport/NostrTransportProvider.test.ts546 function createProviderWithStorage(storage: { get: ReturnType<typeof vi.fn>; set: ReturnType<typeof vi.fn> }) {CODE
LOWtests/unit/core/Sphere.nametag-sync.test.ts307 function createMockTransportWithRecovery(options: {CODE
LOW…s/unit/storage/contracts/tracked-addresses.contract.ts55export function describeTrackedAddressesContract(CODE
LOW…/unit/registry/TokenRegistry.networkResolution.test.ts102async function configureWithFailingFetch(remoteUrl: string): Promise<void> {CODE
LOWtests/unit/payments-v2/pinned-balance.test.ts271async function restartOverUnreadableIntent(): Promise<{ world: World; nft: string; valued: string }> {CODE
LOW…s/unit/payments-v2/contracts/delivery-port.contract.ts66export function describeDeliveryPortContract(CODE
LOW…ts/unit/payments-v2/contracts/storage-port.contract.ts55export function describeStoragePortContract(CODE
LOWtests/integration/wallet-clear-indexeddb.test.ts90function simulateStrictModeLeakedConnection(dbName: string): Promise<IDBDatabase> {CODE
LOWtests/e2e/sphere-paymentsv2-wiring.staging.e2e.test.ts211async function sendConvergedThroughThrottle(CODE
LOWdocs/API.md1656function isPossiblyCommittedSendOutcome(err: unknown): boolean;CODE
LOWdocs/INTEGRATION.md1240export async function saveTrackedAddressesMerging(CODE
LOWtoken-engine/value-envelope.ts101function selfDescribedBodyCarriesValue(body: Uint8Array): boolean {CODE
LOWtoken-engine/factory.ts204export function createWorkerTokenVerifier(config: VerificationWorkerConfig): CancellableTokenVerifier {CODE
LOWmodules/communications/CommunicationsModule.ts813export function createCommunicationsModule(CODE
LOWmodules/payments-v2/mint-custom.ts50export async function runCustomMintUnderJournal(CODE
LOWmodules/payments-v2/recipient.ts27export async function requireSameNetworkRecipient(CODE
LOWmodules/payments-v2/compose.ts42export function supportsDeterministicMint(CODE
Over-Commented Block32 hits · 32 pts
SeverityFileLineSnippetContext
LOWtsup.config.ts1import { defineConfig } from 'tsup';COMMENT
LOWtsup.shared.js1// Shared tsup build configuration (sphere-sdk#548).COMMENT
LOWtsup.shared.js161 noExternal: [/^@noble\//],COMMENT
LOWtsup.shared.js181 // (esbuild groups code by the set of entries that reach it), soCOMMENT
LOWtsup.shared.js221 // Sphere Connect — CJS: deliberately still one unsplit bundle per entry,COMMENT
LOWindex.ts181 AggregatorEventCallback,COMMENT
LOWindex.ts301COMMENT
LOWCLAUDE.md181// 6. Send tokens (L3). Recipient must have a PUBLISHED chain pubkeyCOMMENT
LOWCLAUDE.md201// and payments.pendingTransfers() lists what is still converging. A PartialSendConflictErrorCOMMENT
LOWCLAUDE.md221// MintResult: { success, tokenId?, error? } — one flat interface, so `success` does not narrowCOMMENT
LOWtransport/MultiAddressTransportMux.ts161 private eventCallbacks: Set<TransportEventCallback> = new Set();COMMENT
LOWtransport/NostrTransportProvider.ts261COMMENT
LOWcore/Sphere.ts2561COMMENT
LOWcore/Sphere.ts2601 // re-run initializeAddressModules, so leaving it behind means `_tokenEngine`COMMENT
LOW…sts/unit/impl/browser/IndexedDBStorageProvider.test.ts181 });COMMENT
LOW…ransport/MultiAddressTransportMux.sharedClient.test.ts281 // must not run — the sub-call counter stays where it was.COMMENT
LOW…ransport/MultiAddressTransportMux.sharedClient.test.ts441 // Across both layers: exactly one NostrClient was constructed (byCOMMENT
LOWtests/unit/transport/identity-binding-quests.test.ts1// #847 keeps exactly one DIRECT:// job: the wallet's Sphere Quests account id.COMMENT
LOWtests/unit/payments-v2/send-intent-unknown.test.ts1// #835: a send whose durable intent the server may NOT hold. When PUT /v1/intentsCOMMENT
LOW…s/unit/payments-v2/recipient-network.transport.test.ts1// §5.6 cross-network recipient gate, driven from the RELAY (#733/#734).COMMENT
LOWtests/integration/kv-network-isolation-extra.test.ts181 // enumeration — getFullKey('') resolves to the bare base prefix ('sphere_'),COMMENT
LOWtests/integration/wallet-password.test.ts201 transport: createMockTransport(),COMMENT
LOWtests/aggregator/docker/docker-compose.yml1# The local aggregator stack the `test:aggregator` suite runs against.COMMENT
LOWdocs/QUICKSTART-NODEJS.md801 if (err.remainingAmount === '0') {COMMENT
LOWdocs/API.md41 dmSince: Math.floor(Date.now() / 1000) - 86400, // Optional DM history fallback (unix seconds);COMMENT
LOWdocs/API.md1541COMMENT
LOWdocs/CONNECT.md401 // Asked when the handshake failed the NETWORK check, and only then: never for a protocol orCOMMENT
LOWdocs/CONNECT.md441COMMENT
LOWdocs/CONNECT.md881COMMENT
LOWtoken-engine/SphereTokenEngine.ts381 // 1. Resolve the burnt token: from a durable checkpoint on resume, else burn now and persistCOMMENT
LOWtoken-engine/SphereTokenEngine.ts401 ...(await Promise.allSettled(COMMENT
LOWtoken-engine/SphereTokenEngine.ts421 // re-runs ALL legs idempotently from the burn checkpoint (HKDF-deterministic stateId → theCOMMENT
Structural Annotation Overuse15 hits · 26 pts
SeverityFileLineSnippetContext
LOWdocs/QUICKSTART-NODEJS.md188// Step 1: Create base providersCOMMENT
LOWdocs/QUICKSTART-NODEJS.md227// Step 2: Attach the wallet-api transport config (required for money)COMMENT
LOWdocs/QUICKSTART-NODEJS.md234// Step 3: InitializeCOMMENT
LOWdocs/INTEGRATION.md132### Step 1: Create Base ProvidersCOMMENT
LOWdocs/INTEGRATION.md275### Step 2: Attach the Wallet-Api Transport ConfigCOMMENT
LOWdocs/INTEGRATION.md316### Step 3: Initialize the WalletCOMMENT
LOW⚡docs/INTEGRATION.md378// Step 1: Base providersCOMMENT
LOW⚡docs/INTEGRATION.md385// Step 2: Attach the wallet-api transport configCOMMENT
LOW⚡docs/INTEGRATION.md392// Step 3: Initialize walletCOMMENT
LOW⚡docs/INTEGRATION.md399// Step 4: Use payments (sender-driven, certified on-chain, delivered via mailbox).COMMENT
LOWdocs/QUICKSTART-BROWSER.md367// Step 1: Base providers (storage, transport, oracle)COMMENT
LOWdocs/QUICKSTART-BROWSER.md401// Step 2: Attach the wallet-api transport config (REQUIRED for money)COMMENT
LOWdocs/QUICKSTART-BROWSER.md408// Step 3: Initialize wallet with the composed providersCOMMENT
LOWregistry/TokenRegistry.ts307 // Step 1: the cache read applyConfig started (none without storage)COMMENT
LOWregistry/TokenRegistry.ts318 // Step 2: Cache miss — wait for first remote fetch (only when auto-refresh is enabled)COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtransport/NostrTransportProvider.ts262 // Create NostrClient with robust connection handling:COMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWregistry/TokenRegistry.ts307 // Step 1: the cache read applyConfig started (none without storage)COMMENT
LOWregistry/TokenRegistry.ts318 // Step 2: Cache miss — wait for first remote fetch (only when auto-refresh is enabled)COMMENT
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/unit/core/utils.test.ts222 expect(extractFromText(text, pattern)).toBe('John Doe');CODE
LOWtests/unit/token-engine/FakeTokenEngine.ts406// fake-token state: CBOR array[ tokenId, stateId, owner, genesisData?, transferMemo?, genesisOwner, tokenType, justificCOMMENT
Modern AI Meta-Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMCLAUDE.md454│ │ ├── PaymentsFacade.ts # Facade: lifecycle, send/mint/receive orchestrationCODE