Repository Analysis

unicity-sphere/sphere

A Web3 wallet and agent platform for the Unicity network - dual-layer crypto wallet, DMs, group chat, and marketplace.

3.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of unicity-sphere/sphere, a TypeScript project with 9,322 GitHub stars. SynthScan v2.0 examined 51,255 lines of code across 306 source files, recording 81 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.8
Adjusted Score
3.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.3K
Stars
TypeScript
Language
51.3K
Lines of Code
306
Files
81
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 50LOW 31

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 81 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators50 hits · 160 pts
SeverityFileLineSnippetContext
MEDIUMrun-sphere.sh17# ── App identity ─────────────────────────────────────────────────────────────COMMENT
MEDIUMrun-sphere.sh22# ── App networking ───────────────────────────────────────────────────────────COMMENT
MEDIUMrun-sphere.sh31# ── Source ssl-manager run library ───────────────────────────────────────────COMMENT
MEDIUMrun-sphere.sh41# ── App hooks ────────────────────────────────────────────────────────────────COMMENT
MEDIUMdeploy/runtime-config.sh46# ── Fail-closed (#351) ───────────────────────────────────────────────────────COMMENT
MEDIUMdeploy/runtime-config.sh71# ── Subscription flag sanity ─────────────────────────────────────────────────COMMENT
MEDIUMdeploy/runtime-config.sh84# ── AGGREGATOR_API_KEY requirement (conditional on subscriptions) ─────────────COMMENT
MEDIUMdeploy/runtime-config.sh101# ── Build the substitution program ───────────────────────────────────────────COMMENT
MEDIUMdeploy/runtime-config.sh116# ── Runtime config global (window.__SPHERE_RUNTIME_CONFIG__) ────────────────COMMENT
MEDIUMdeploy/runtime-config.sh158# ── Apply over the built JS (one sed program, all files) ─────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh4# ── Export env so ssl-setup inherits our defaults ────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh8# ── Normalize SSL_REQUIRED (fail closed on unknown values) ───────────────────COMMENT
MEDIUMdeploy/entrypoint.sh23# ── Validate env vars before use in nginx config ────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh53# ── SSL setup (certs + HAProxy registration) ─────────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh90# ── Generate nginx config ────────────────────────────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh178# ── Graceful shutdown ────────────────────────────────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh210# ── Runtime public config ────────────────────────────────────────────────────COMMENT
MEDIUMdeploy/entrypoint.sh217# ── Start nginx ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts229 // ── Onboard both profiles (A funds itself via open minting) ───────────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts234 // ── A reloads (F5): minted balance must survive the full pull ─────────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts237 // ── A sends 10 UCT to @B (mailbox delivery + B's claim/handoff) ───────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts254 // ── B reloads (F5): received balance must survive the full pull ───────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts257 // ── B requests 5 UCT from @A (§16 payment request) ────────────────────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts272 // ── A pays it (payPaymentRequest: send + linked 'paid' respond) ───────COMMENT
MEDIUMtests/e2e/two-profile-smoke.spec.ts278 // ── Convergence: B holds 15 UCT, A holds 85 ───────────────────────────COMMENT
MEDIUMsrc/components/desktop/DesktopShortcuts.tsx30// ── Sortable wrappers ──────────────────────────────────────────────────COMMENT
MEDIUMsrc/hooks/useInstalledProjects.ts19// ── Local (offline / unauthenticated) cache of slugs ──────────────────COMMENT
MEDIUMsrc/hooks/useInstalledProjects.ts54// ── Hook ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/hooks/useInstalledProjects.ts117 // ── Mutations ───────────────────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ExplorePage.tsx12// ─── Constants ────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ExplorePage.tsx16// ─── Drag-scrollable Featured Carousel ────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ExplorePage.tsx78// ─── Hero stat ────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ExplorePage.tsx100// ─── ExplorePage ──────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ProjectPage.tsx14// ── Helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/pages/ProjectPage.tsx23// ── Drag-scrollable media strip ──────────────────────────────────────COMMENT
MEDIUMsrc/pages/ProjectPage.tsx96// ── Lightbox with keyboard + thumbnails ───────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts13// ── Types ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts49// ── JWT storage ───────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts63// ── Sign-in ───────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts115// ── Authenticated fetch ───────────────────────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts145// ── Installed-apps endpoints ──────────────────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts181// ── Ratings: recommend / helpful voting / replies ────────────────────COMMENT
MEDIUMsrc/services/userApi.ts217// ── Helpful voting on a specific rating ──────────────────────────────COMMENT
MEDIUMsrc/services/userApi.ts234// ── Replies (Telegram-style comments on a review) ────────────────────COMMENT
MEDIUMsrc/services/marketplaceApi.ts3// ── Types ─────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/marketplaceApi.ts68// ── Fetch helpers ─────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/marketplaceApi.ts88// ── API functions ─────────────────────────────────────────────────────COMMENT
MEDIUMsrc/services/marketplaceApi.ts130// ── Public project metrics (live user/install/completion counts) ──────COMMENT
MEDIUMsrc/services/marketplaceApi.ts165// ── Public project ratings (Steam-style reviews) ──────────────────────COMMENT
MEDIUMsrc/services/marketplaceApi.ts199// ── Public reply thread for a single rating ───────────────────────────COMMENT
Over-Commented Block15 hits · 15 pts
SeverityFileLineSnippetContext
LOWrun-sphere.sh1#!/bin/bashCOMMENT
LOWdocker-compose.yml21 # Subscriptions (SGW) ship dormant; set exactly "true" to turn on.COMMENT
LOWdeploy/runtime-config.sh1#!/bin/shCOMMENT
LOWdeploy/runtime-config.sh21# SPHERE_API_URL quest-api base (marketplace / user / maintenance)COMMENT
LOWtests/unit/sdk/gatewayErrors.test.ts81COMMENT
LOWpublic/runtime-config.js1// Default runtime config for dev / GitHub Pages builds: empty, so valuesCOMMENT
LOW.github/workflows/docker-build.yml41 push: trueCOMMENT
LOW.github/workflows/deploy-pages-branch.yml21# just-merged deploy was silently cancelled and staging kept the old bundle.COMMENT
LOW.github/workflows/deploy-pages-branch.yml101 run: npm run buildCOMMENT
LOWsrc/utils/sentryScrub.ts21// 64+ hex chars: the shape of a raw private key (also matches sha256/txids —COMMENT
LOWsrc/utils/sentryScrub.ts121COMMENT
LOW…omponents/wallet/onboarding/hooks/useOnboardingFlow.ts621 // like a provisioning error would.COMMENT
LOWsrc/sdk/SphereProvider.tsx201 const [isDiscoveringAddresses, setIsDiscoveringAddresses] = useState(false);COMMENT
LOWsrc/sdk/SphereProvider.tsx241 [],COMMENT
LOWsrc/sdk/hooks/payments/useTransfer.ts121 // #631/#633: a POSSIBLY-CERTIFIED send rejects with ProofUnconfirmedErrorCOMMENT
Hyper-Verbose Identifiers12 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/sphere-sdk-browser.d.ts73 export function createUnicityAggregatorProvider(CODE
LOWsrc/config/storageKeys.ts76export function getOrCreateWalletApiDeviceId(): string {CODE
LOWsrc/config/storageKeys.ts76export function getOrCreateWalletApiDeviceId(): string {CODE
LOWsrc/config/subscription.ts58function resolveSubscriptionApiUrl(): string {CODE
LOWsrc/components/chat/utils/groupChatHelpers.ts26export function getGroupFormattedLastMessageTime(group: GroupData): string {CODE
LOWsrc/components/chat/utils/groupChatHelpers.ts65export function getMessageSenderDisplayName(message: GroupMessageData): string {CODE
LOWsrc/components/layout/WalletApiSessionIndicator.tsx18export function WalletApiSessionIndicator() {CODE
LOW…llet/onboarding/hooks/useOnboardingConnectionStatus.ts23export function useOnboardingConnectionStatus() {CODE
LOWsrc/components/connect/PaymentRequestIntentModal.tsx32export function PaymentRequestIntentModal({CODE
LOWsrc/sdk/errors.ts67function isJsonRpcNetworkErrorShape(CODE
LOWsrc/sdk/hooks/payments/useTransfer.ts22function disambiguateGatewayAuthError(openUpgrade: (reason?: UpgradeReason) => void): void {CODE
LOWsrc/hooks/useKeyboardScrollIntoView.ts13export function useKeyboardScrollIntoView(_inputRef: RefObject<HTMLElement | null>) {CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWrun-sphere.sh5# Usage:COMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…omponents/wallet/onboarding/hooks/useOnboardingFlow.ts523 // Step 1: Check nametag availability via Nostr (no wallet needed)COMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…omponents/wallet/onboarding/hooks/useOnboardingFlow.ts523 // Step 1: Check nametag availability via Nostr (no wallet needed)COMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/unit/utils/sentryScrub.test.ts51 expect(scrubText('Auth failed for user@example.com')).not.toContain('user@example.com');CODE