Repository Analysis

CortexReach/memory-lancedb-pro

Enhanced LanceDB memory plugin for OpenClaw — Hybrid Retrieval (Vector + BM25), Cross-Encoder Rerank, Multi-Scope Isolation, Management CLI

5.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of CortexReach/memory-lancedb-pro, a JavaScript project with 4,462 GitHub stars. SynthScan v2.0 examined 57,171 lines of code across 98 source files, recording 278 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 5.0 places this repository in the Low AI signal 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).

5.0
Adjusted Score
5.0
Raw Score
100%
Time Factor
2026-08-25
Last Push
4.5K
Stars
JavaScript
Language
57.2K
Lines of Code
98
Files
278
Pattern Hits
2026-08-29
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 1LOW 277

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 278 distinct pattern matches across 9 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.

Hyper-Verbose Identifiers200 hits · 198 pts
SeverityFileLineSnippetContext
LOWcli.ts88function resolveOpenClawConfigPath(explicit?: string): string {CODE
LOWcli.ts118function resolveConfiguredOauthPath(configPath: string, rawPath: unknown): string {CODE
LOWcli.ts151function extractRestorableApiKeyLlmConfig(value: unknown): RestorableApiKeyLlmConfig {CODE
LOWcli.ts175function extractOauthSafeLlmConfig(value: unknown): RestorableApiKeyLlmConfig {CODE
LOWcli.ts190function hasRestorableApiKeyLlmConfig(value: RestorableApiKeyLlmConfig): boolean {CODE
LOWcli.ts194function buildLogoutFallbackLlmConfig(value: unknown): RestorableApiKeyLlmConfig {CODE
LOWcli.ts261async function promptOauthProviderSelection(CODE
LOWcli.ts359async function resolveOauthProviderSelection(CODE
LOWcli.ts510function formatRetrievalDiagnosticsLines(diagnostics: {CODE
LOWindex.ts560function getEffectiveAutoRecallMaxItems(config: PluginConfig): number {CODE
LOWindex.ts566function getAutoRecallRetrieveLimit(autoRecallMaxItems: number): number {CODE
LOWindex.ts570function getAutoRecallRerankInputLimit(retrieveLimit: number): number {CODE
LOWindex.ts574function getAutoRecallRerankTimeoutMs(CODE
LOWindex.ts2406function isSessionBoundaryReflectionAction(action: unknown): boolean {CODE
LOWindex.ts2413function getReflectionEmptyEventGuardMap(): Map<string, ReflectionEmptyEventGuardEntry> {CODE
LOWindex.ts2419function pruneReflectionEmptyEventGuard(now = Date.now()): void {CODE
LOWindex.ts398function resolveWorkspaceDirFromContext(context: Record<string, unknown> | undefined): string {CODE
LOWindex.ts420function isSupportedSecretRefSource(value: unknown): value is SecretRefSource {CODE
LOWindex.ts470function resolveSecretCredentialArray(CODE
LOWindex.ts492function resolveOptionalPathWithEnv(CODE
LOWindex.ts589export function buildAutoRecallRerankCostWarning(CODE
LOWindex.ts664function resolveSourceFromSessionKey(sessionKey: string | undefined): string {CODE
LOWindex.ts671function summarizeAgentEndMessages(messages: unknown[]): string {CODE
LOWindex.ts855export function getExtensionApiImportSpecifiers(CODE
LOWindex.ts982function extractJsonObjectFromOutput(stdout: string): Record<string, unknown> {CODE
LOWindex.ts1000function extractReflectionTextFromCliResult(resultObj: Record<string, unknown>): string | null {CODE
LOWindex.ts1111export function buildReflectionCliSpawnCommand(CODE
LOWindex.ts1127async function loadSelfImprovementReminderContent(workspaceDir?: string): Promise<string> {CODE
LOWindex.ts1141function resolveAgentPrimaryModelRef(cfg: unknown, agentId: string): string | undefined {CODE
LOWindex.ts1221function isInternalReflectionSessionKey(sessionKey: unknown): boolean {CODE
LOWindex.ts1280function shouldSkipReflectionMessage(role: string, text: string): boolean {CODE
LOWindex.ts1314function isSubstantiveUserReferent(turn: ConversationTurn): boolean {CODE
LOWindex.ts1340function isExplicitRememberCommand(text: string): boolean {CODE
LOWindex.ts1345export function buildAutoCaptureConversationKeyFromIngress(CODE
LOWindex.ts1364function autoCaptureRetainedTextCap(minMessages: number): number {CODE
LOWindex.ts1368function buildAutoCaptureConversationKeyFromSessionKey(sessionKey: string): string | null {CODE
LOWindex.ts1439function extractTextFromToolResult(result: unknown): string {CODE
LOWindex.ts1469function summarizeRecentConversationMessages(CODE
LOWindex.ts1499async function readSessionConversationForReflection(filePath: string, messageCount: number, format: ConversationTranscriCODE
LOWindex.ts1520export async function readSessionConversationWithResetFallback(sessionFilePath: string, messageCount: number, format: CoCODE
LOWindex.ts1555function trimTranscriptToTagBoundary(transcript: string, maxChars: number): string {CODE
LOWindex.ts1717function buildReflectionFallbackText(): string {CODE
LOWindex.ts1815async function generateReflectionTextUnbounded(CODE
LOWindex.ts2282function createAdmissionRejectionAuditWriter(CODE
LOWindex.ts2433async function getReflectionEmptyEventGuardKey(params: {CODE
LOWindex.ts2887function isPluginExplicitlyDisabled(config: Record<string, unknown>, pluginName: string): boolean {CODE
LOWindex.ts2897export function warnForDisabledChannelPlugin(CODE
LOWindex.ts6538 function scheduleNextDreamingSweep() {CODE
LOWsrc/workspace-boundary.ts44export function resolveUserMdExclusiveConfig(CODE
LOWsrc/workspace-boundary.ts58export function shouldFilterUserMdExclusiveRecall(CODE
LOWsrc/batch-dedup.ts140export function createExtractionCostStats(): ExtractionCostStats {CODE
LOWsrc/auto-capture-cleanup.ts28function stripLeadingInboundMetadata(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts47function stripAutoCaptureSessionResetPrefix(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts65function stripAutoCaptureAddressingPrefix(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts69function stripRuntimeWrapperBoilerplate(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts90function stripLeadingRuntimeWrappers(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts123export function stripAutoCaptureInjectedPrefix(role: string, text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts270export function neutralizeSpeakerTagSpoof(text: string): string {CODE
LOWsrc/auto-capture-cleanup.ts318export function formatConversationTranscript(CODE
LOWsrc/auto-capture-cleanup.ts348export function buildBoundedTranscriptWithStats(CODE
140 more matches not shown…
Fake / Example Data32 hits · 37 pts
SeverityFileLineSnippetContext
LOWopenclaw.plugin.json1757 "placeholder": "sk-proj-... or [\"key1\", \"key2\"] for rotation",CODE
LOWopenclaw.plugin.json1762 "placeholder": "text-embedding-3-small",CODE
LOWopenclaw.plugin.json1767 "placeholder": "https://api.openai.com/v1",CODE
LOWopenclaw.plugin.json1773 "placeholder": "auto-detected from model",CODE
LOWopenclaw.plugin.json1779 "placeholder": "omit by default",CODE
LOWopenclaw.plugin.json1845 "placeholder": "24",CODE
LOWopenclaw.plugin.json1851 "placeholder": "7",CODE
LOWopenclaw.plugin.json1857 "placeholder": "300000",CODE
LOWopenclaw.plugin.json1863 "placeholder": "0",CODE
LOWopenclaw.plugin.json1869 "placeholder": "redis://localhost:6379",CODE
LOWopenclaw.plugin.json1881 "placeholder": "redis://localhost:6379",CODE
LOWopenclaw.plugin.json1888 "placeholder": "memory-lancedb-pro:write-lock",CODE
LOWopenclaw.plugin.json1894 "placeholder": "60000",CODE
LOWopenclaw.plugin.json1900 "placeholder": "5000",CODE
LOWopenclaw.plugin.json1906 "placeholder": "50",CODE
LOWopenclaw.plugin.json1912 "placeholder": "1000",CODE
LOWopenclaw.plugin.json1923 "placeholder": "sk-... or ${GROQ_API_KEY}",CODE
LOWopenclaw.plugin.json1928 "placeholder": "openai/gpt-oss-120b",CODE
LOWopenclaw.plugin.json1933 "placeholder": "https://api.groq.com/openai/v1",CODE
LOWopenclaw.plugin.json2088 "placeholder": "jina_... / sk-... / pcsk_...",CODE
LOWopenclaw.plugin.json2094 "placeholder": "jina-reranker-v3",CODE
LOWopenclaw.plugin.json2100 "placeholder": "https://api.jina.ai/v1/rerank",CODE
LOWopenclaw.plugin.json2106 "placeholder": "5000",CODE
LOWopenclaw.plugin.json1790 "placeholder": "retrieval.query",CODE
LOWopenclaw.plugin.json1796 "placeholder": "retrieval.passage",CODE
LOWopenclaw.plugin.json1807 "placeholder": "model-specific default",CODE
LOWopenclaw.plugin.json1828 "placeholder": "30000",CODE
LOWopenclaw.plugin.json1834 "placeholder": "~/.openclaw/memory/lancedb-pro",CODE
LOWopenclaw.plugin.json2261 "placeholder": "anthropic/claude-sonnet-4-6",CODE
LOWopenclaw.plugin.json2378 "placeholder": "30000",CODE
LOWopenclaw.plugin.json2417 "placeholder": "0 3 * * *",CODE
LOWopenclaw.plugin.json2422 "placeholder": "anthropic/claude-sonnet-4-6",CODE
Over-Commented Block26 hits · 20 pts
SeverityFileLineSnippetContext
LOWindex.ts3261COMMENT
LOWindex.ts3541 // ========================================================================COMMENT
LOWindex.ts4041 if (config.autoCapture !== false) {COMMENT
LOWindex.ts4081 // announce a successor, so successor presence alone cannotCOMMENT
LOWindex.ts4341 // all as user turns.COMMENT
LOWindex.ts4381 }COMMENT
LOWindex.ts4641 hasExplicitRememberReferentCOMMENT
LOWindex.ts4701 return;COMMENT
LOWindex.ts4741 // delivers the whole session each turn) the same counter isCOMMENT
LOWindex.ts5081 // Test-synchronization seam only: flush coordination readsCOMMENT
LOWindex.ts5121 return awaitSessionCaptureRuns(flushSessionKey);COMMENT
LOW.github/workflows/claude.yml41 actions: readCOMMENT
LOWsrc/corpus-indexer.ts581 staleDeleted: 0,COMMENT
LOWsrc/auto-recall-tier1.ts1import type { SmartMemoryMetadata } from "./smart-metadata.ts";COMMENT
LOWsrc/tools.ts1421 const temporalType = classifyTemporal(stripped);COMMENT
LOWsrc/tools.ts1561 }COMMENT
LOWsrc/reflection-store.ts541 // below, which now requires an exact owner match (no more universal main fallback)COMMENT
LOWsrc/store.ts161 // reverse-DNS lookups for every network interface, synchronously on theCOMMENT
LOWsrc/store.ts1641 // 透過 await flushLock 確保排隊中的 doFlush 都結束COMMENT
LOWsrc/store.ts3141 try {COMMENT
LOWsrc/smart-extractor.ts201 * - Standalone JSON blocks containing message_id/sender_id fieldsCOMMENT
LOWsrc/smart-extractor.ts1801 this.debugLog(COMMENT
LOWsrc/smart-extractor.ts1821 // beside constructed siblings. Its per-item verdict is FINAL and replacesCOMMENT
LOWsrc/smart-extractor.ts1941 );COMMENT
LOWsrc/smart-extractor.ts2001 ) {COMMENT
LOWsrc/smart-extractor.ts2101 // Option C: scope policy restricts extraction to episodic-only,COMMENT
Verbosity Indicators7 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/memory-upgrader.ts491 // Step 1: Reverse-map categoryCOMMENT
LOWsrc/memory-upgrader.ts494 // Step 2: Generate L0/L1/L2COMMENT
LOWsrc/memory-upgrader.ts543 // Step 3: Build enriched metadataCOMMENT
LOWsrc/smart-extractor.ts722 // Step 1: LLM extractionCOMMENT
LOWsrc/smart-extractor.ts779 // Step 2: Process each surviving candidate through dedup pipeline.COMMENT
LOWsrc/smart-extractor.ts1697 // Step 1: LLM ExtractionCOMMENT
LOWsrc/smart-extractor.ts2226 // Step 2: Dedup + PersistCOMMENT
Structural Annotation Overuse7 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/memory-upgrader.ts491 // Step 1: Reverse-map categoryCOMMENT
LOWsrc/memory-upgrader.ts494 // Step 2: Generate L0/L1/L2COMMENT
LOWsrc/memory-upgrader.ts543 // Step 3: Build enriched metadataCOMMENT
LOWsrc/smart-extractor.ts722 // Step 1: LLM extractionCOMMENT
LOWsrc/smart-extractor.ts779 // Step 2: Process each surviving candidate through dedup pipeline.COMMENT
LOWsrc/smart-extractor.ts1697 // Step 1: LLM ExtractionCOMMENT
LOWsrc/smart-extractor.ts2226 // Step 2: Dedup + PersistCOMMENT
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMcli.ts969 // ── Deduplication check (scope-aware exact match) ───────────────────COMMENT
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/jsonl_distill.py312 except Exception:CODE
LOWscripts/jsonl_distill.py436 except Exception:CODE
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/jsonl_distill.py17CODE
LOWscripts/jsonl_distill.py24CODE
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/jsonl_distill.py98CODE