AI Slop Code RIsk Monitor

Martian-Engineering/lossless-claw

Lossless Claw — LCM (Lossless Context Management) plugin for OpenClaw

5.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for Martian-Engineering/lossless-claw, a TypeScript project with 4,903 GitHub stars. SynthScan examined 167,930 lines of code across 348 source files, recording 680 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 5.9 (Moderate 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.

5.9
Adjusted Signal
5.9
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
4.9K
Stars
TypeScript
Language
167.9K
Lines of Code
348
Files
680
Pattern Hits
2026-10-12
Scan Date
0.01
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 14.9/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.7/100 · LOW

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

Agent Over-Engineering Ratio 23.9/100 · LOW

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

PR Review Velocity Impact 25.2/100 · MEDIUM

Which changes need focused human review? 680 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 2HIGH 0MEDIUM 139LOW 539

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 680 distinct pattern matches across 9 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 Identifiers508 hits · 500 pts
SeverityFileLineSnippetContext
LOW⚡doctor-contract-api.d.ts21export function normalizeCompatibilityConfig(params: { cfg: unknown }): {CODE
LOW⚡doctor-contract-api.d.ts26export function collectLosslessRuntimeLlmModelRefs(cfg: unknown): {CODE
LOW⚡doctor-contract-api.d.ts31export function collectLosslessSubagentModelRefs(cfg: unknown): {CODE
LOWdoctor-contract-api.js47function toProviderPrefixedModelRef(provider, model) {CODE
LOWdoctor-contract-api.js81function collectLosslessRuntimeLlmModelRefs(cfg) {CODE
LOWdoctor-contract-api.js155function collectLosslessSubagentModelRefs(cfg) {CODE
LOWdoctor-contract-api.js188function collectMissingPolicyEntries(cfg) {CODE
LOWdoctor-contract-api.js203function collectMissingSubagentPolicyEntries(cfg) {CODE
LOWdoctor-contract-api.js268function cloneRootWithLosslessEntry(cfg) {CODE
LOWdoctor-contract-api.js287function applyModelOverridePolicyRepair({ policy, issues, changes, policyPath, subject }) {CODE
LOWdoctor-contract-api.js321export function normalizeCompatibilityConfig({ cfg }) {CODE
LOWtest/manifest.test.ts63function extractRegisterToolFactoryCallSites(): RegisterToolFactoryCallSite[] {CODE
LOWtest/helpers.ts131export function withProductionTranscriptRouting(deps: LcmDependencies): LcmDependencies {CODE
LOWtest/helpers.ts289export function createEngineWithDepsOverrides(overrides: Partial<LcmDependencies>): LcmContextEngine {CODE
LOWtest/helpers.ts303export function createEngineWithDepsOverridesAndDb(CODE
LOWtest/helpers.ts323export function createEngineAtDatabasePath(databasePath: string): LcmContextEngine {CODE
LOWtest/helpers.ts355export function writeLeafTranscriptMessages(sessionFile: string, messages: AgentMessage[]): void {CODE
LOWtest/helpers.ts474export function corruptSessionFilePreservingObservedStats(sessionFile: string): void {CODE
LOWtest/helpers.ts481export function estimateAssembledPayloadTokens(messages: AgentMessage[]): number {CODE
LOWtest/helpers.ts496export async function ingestAndReadStoredContent(params: {CODE
LOWtest/transcript-delta-engine.test.ts493 async function legacyConversationFromMessages(CODE
LOWtest/circuit-breaker.test.ts145function makeCircuitBreakerMessages(count: number): AgentMessage[] {CODE
LOWtest/migration.test.ts29function legacyRawMessageIdentityHash(role: string, content: string): string {CODE
LOWtest/migration.test.ts37function openClawInboundMetadataContent(params: {CODE
LOWtest/migration.test.ts63function legacyCanonicalOpenClawIdentityContentWithRecap(params: {CODE
LOWtest/engine-compaction.test.ts44function projectContextEngineHostParams(CODE
LOWtest/live-turn-structural-supersede.test.ts608function decoratedMemoryFirstMetadataFace(body: string): string {CODE
LOWtest/message-identity.test.ts332function openClawInboundMetadataContent(params: {CODE
LOWtest/prune.test.ts103 async function seedConversationWithSummary(CODE
LOWtest/bounded-assemble.test.ts86function makeHeavyToolResultMessage(index: number, payloadChars: number): AgentMessage {CODE
LOWtest/same-turn-body-collapse.test.ts26function metadataWrappedWithHistory(CODE
LOWtest/same-turn-body-collapse.test.ts73function metadataWrappedWithContextAndRecap(recap: string, body: string): string {CODE
LOWtest/same-turn-body-collapse.test.ts86function metadataWrappedWithReplyContext(replyBody: string, body: string): string {CODE
LOWtest/same-turn-body-collapse.test.ts356function metadataWrappedWithLineRecap(recap: string, body: string): string {CODE
LOWtest/same-turn-body-collapse.test.ts527function metadataWrappedWithHeaderLineRecap(CODE
LOWtest/doctor-archive-cause-skip.test.ts51async function seedConversationWithMessage(CODE
LOWtest/plugin-config-registration.test.ts170function compactionAndDefaultModelConfig(params: {CODE
LOWtest/integration-helpers.ts24export function createMockConversationStore() {CODE
LOWtest/lcm-command.test.ts77function writeOpenClawInstallRecord(params: {CODE
LOWtest/lcm-command.test.ts109async function createRolloverConversationData(CODE
LOWtest/message-signatures.test.ts146function openClawInboundMetadataContent(messageId: string, text: string): string {CODE
LOWspecs/depth-aware-prompts-and-rewrite.md62function buildCondensedSummaryPrompt(params: {CODE
LOWscripts/e2e/pending-summary-compaction-proof.ts67export async function runPendingSummaryStaleRecoveryProof(): Promise<PendingSummaryStaleRecoveryProofReport> {CODE
LOWscripts/e2e/pending-summary-compaction-proof.ts194export async function runPendingSummaryCompactionProof(): Promise<PendingSummaryCompactionProofReport> {CODE
LOWsrc/expansion-policy.ts95export function detectBroadTimeRangeIndicator(query?: string): boolean {CODE
LOWsrc/expansion-policy.ts192export function classifyExpansionTokenRisk(input: { estimatedTokens: number; tokenCap: number }): {CODE
LOWsrc/expansion-policy.ts217export function decideLcmExpansionRouting(CODE
LOWsrc/transcript-delta-sync.ts232function isTranscriptReadFenceError(error: unknown): boolean {CODE
LOWsrc/lcm-log.ts73function readRuntimeConfigCandidates(api: OpenClawPluginApi): Record<string, unknown>[] {CODE
LOWsrc/lcm-log.ts88function readOpenClawRedactionConfig(api: OpenClawPluginApi): IndependentLogRedactionConfig {CODE
LOWsrc/lcm-log.ts102function shouldWriteIndependentDebug(api: OpenClawPluginApi): boolean {CODE
LOWsrc/transaction-mutex.ts30function getOrCreateMutex(db: DatabaseSync): MutexState {CODE
LOWsrc/transaction-mutex.ts104export async function acquireTransactionLockWithTimeout(CODE
LOWsrc/lcm-file-log.ts71function resolvePreferredOpenClawTmpDir(): string {CODE
LOWsrc/lcm-file-log.ts109function isTrustedExistingOpenClawTmpDir(stat: fs.Stats, uid: number | "user"): boolean {CODE
LOWsrc/lcm-file-log.ts143function getCurrentRegularLogFileBytes(file: string): number | undefined {CODE
LOWsrc/lcm-file-log.ts223function fallbackRedactSensitiveText(CODE
LOWsrc/lcm-file-log.ts286export function createIndependentLcmFileLogger(CODE
LOWsrc/batch-dedup.ts610function storedMessageIdentityHash(stored: StoredMessage): string {CODE
LOWsrc/batch-dedup.ts625function extractExternalizedReferences(content: string): ExternalizedReference[] {CODE
448 more matches not shown…
Decorative Section Separators135 hits · 420 pts
SeverityFileLineSnippetContext
MEDIUMtest/expansion-auth.test.ts55 // ── createGrant ──────────────────────────────────────────────────────────COMMENT
MEDIUMtest/expansion-auth.test.ts102 // ── getGrant ─────────────────────────────────────────────────────────────COMMENT
MEDIUMtest/expansion-auth.test.ts146 // ── revokeGrant ──────────────────────────────────────────────────────────COMMENT
MEDIUMtest/expansion-auth.test.ts171 // ── validateExpansion ────────────────────────────────────────────────────COMMENT
MEDIUMtest/expansion-auth.test.ts342 // ── cleanup ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtest/expansion-auth.test.ts782 // ── describeAndExpand ──────────────────────────────────────────────────COMMENT
MEDIUMtest/lcm-integration-retrieval.test.ts459// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-retrieval.test.ts461// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts19// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts21// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts65// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts67// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts110// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts112// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts166// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-empty-content.test.ts168// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts33// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts35// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts183// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts185// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts279// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts281// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts596 // ─── Regression: #158 — tool call id backfill from metadata.raw ──────────COMMENT
MEDIUMtest/assembler-blocks.test.ts596 // ─── Regression: #158 — tool call id backfill from metadata.raw ──────────COMMENT
MEDIUMtest/assembler-blocks.test.ts716// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts718// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts864// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts866// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts890// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/assembler-blocks.test.ts892// ═══════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/engine-compaction.test.ts469// ── Compact token budget plumbing ───────────────────────────────────────────COMMENT
MEDIUMtest/lcm-integration-compaction.test.ts2426// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-compaction.test.ts2428// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-assemble.test.ts626// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-assemble.test.ts628// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts252// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts254// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts456// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts458// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts656// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-roundtrip.test.ts658// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-sweep-bounds.test.ts252// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-sweep-bounds.test.ts254// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-sweep-bounds.test.ts488// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/lcm-integration-sweep-bounds.test.ts490// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/engine-assemble.test.ts2828// ── #639 Mode 2 — deferred-compaction wedge regression ────────────────────────COMMENT
MEDIUMtest/engine-assemble.test.ts2828// ── #639 Mode 2 — deferred-compaction wedge regression ────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts22// ── Mock Store Factories ─────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts224 // ── Context items ───────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts367 // ── Summary CRUD ────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts416 // ── Lineage ─────────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts522 // ── Search ──────────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts560 // ── Large files ─────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts588 // ── Internal helpers for the mock ────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts604// ── Helpers ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts693// ── Default compaction config ────────────────────────────────────────────────COMMENT
MEDIUMtest/integration-helpers.ts762// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/integration-helpers.ts764// ═════════════════════════════════════════════════════════════════════════════COMMENT
MEDIUMtest/engine-lifecycle.test.ts1223// ── Ingest content extraction ───────────────────────────────────────────────COMMENT
MEDIUMtest/engine-lifecycle.test.ts1251// ── Bootstrap ───────────────────────────────────────────────────────────────COMMENT
75 more matches not shown…
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALtest/engine-foreground-compaction.test.ts288 expect(unavailable.log.info.mock.calls.flat().join("\n")).toContain("reduced=false reachedTarget=false pending=true CODE
CRITICALtest/engine-foreground-compaction.test.ts300 expect(bounded.log.info.mock.calls.flat().join("\n")).toContain("reduced=true reachedTarget=false pending=true reasoCODE
Verbosity Indicators9 hits · 14 pts
SeverityFileLineSnippetContext
LOWtui/transplant.go1115 // Step 1: Shift all existing ordinals up to make room for inserts withoutCOMMENT
LOWtui/transplant.go1139 // Step 2: Insert transplanted summaries into the free low-ordinal range.COMMENT
LOWtui/transplant.go1156 // Step 3: Move all summaries out of the final low-ordinal range beforeCOMMENT
LOWtui/transplant.go1172 // Step 4: Reorder all summary context items by depth DESC, then created_at ASC.COMMENT
LOWtui/transplant.go1194 // Step 5: Reorder message context items to follow after all summaries.COMMENT
LOWsrc/assembler.ts1506 // Step 1: Get all context items ordered by ordinalCOMMENT
LOWsrc/assembler.ts1517 // Step 2: Resolve each context item into a ResolvedItem, then apply anyCOMMENT
LOWsrc/assembler.ts1534 // Step 3: Split into evictable prefix and protected fresh tailCOMMENT
LOWsrc/assembler.ts1568 // Step 4: Budget-aware selectionCOMMENT
Structural Annotation Overuse9 hits · 14 pts
SeverityFileLineSnippetContext
LOWtui/transplant.go1115 // Step 1: Shift all existing ordinals up to make room for inserts withoutCOMMENT
LOWtui/transplant.go1139 // Step 2: Insert transplanted summaries into the free low-ordinal range.COMMENT
LOWtui/transplant.go1156 // Step 3: Move all summaries out of the final low-ordinal range beforeCOMMENT
LOWtui/transplant.go1172 // Step 4: Reorder all summary context items by depth DESC, then created_at ASC.COMMENT
LOWtui/transplant.go1194 // Step 5: Reorder message context items to follow after all summaries.COMMENT
LOWsrc/assembler.ts1506 // Step 1: Get all context items ordered by ordinalCOMMENT
LOWsrc/assembler.ts1517 // Step 2: Resolve each context item into a ResolvedItem, then apply anyCOMMENT
LOWsrc/assembler.ts1534 // Step 3: Split into evictable prefix and protected fresh tailCOMMENT
LOWsrc/assembler.ts1568 // Step 4: Budget-aware selectionCOMMENT
Over-Commented Block10 hits · 8 pts
SeverityFileLineSnippetContext
LOWtest/reasoning-half-fix.test.ts1import { describe, expect, it, vi } from "vitest";COMMENT
LOWtest/live-turn-structural-supersede.test.ts1// The live current turn (the decorated, model-facing copy OpenClaw delivers)COMMENT
LOWtest/stub-tier.test.ts301 tokenBudget: 200_000,COMMENT
LOWtest/integration-helpers.ts761COMMENT
LOWspecs/env-config-extraction.md21COMMENT
LOWsrc/retrieval.ts261 // `expandFileMaxBytes`. Files over the cap return the headCOMMENT
LOWsrc/engine.ts2321 const thresholdSweepExhaustedOverTarget =COMMENT
LOWsrc/assembler.ts621 const rawRecord = metadata.raw as Record<string, unknown>;COMMENT
LOWsrc/openclaw-inbound-metadata.ts41const OPENCLAW_INBOUND_HISTORY_RECAP_BLOCK_RE = new RegExp(COMMENT
LOWsrc/openclaw-inbound-metadata.ts61 /^[A-Za-z]{3} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \S+ /;COMMENT
Modern AI Meta-Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md1258- [#592](https://github.com/Martian-Engineering/lossless-claw/pull/592) [`e0dbd09`](https://github.com/Martian-EngineeriCODE
MEDIUMCHANGELOG.md1258- [#592](https://github.com/Martian-Engineering/lossless-claw/pull/592) [`e0dbd09`](https://github.com/Martian-EngineeriCODE
MEDIUMREADME.md573 types.ts # Core type definitions (dependency injection contracts)CODE
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippetContext
LOWopenclaw.plugin.json242 "placeholder": "Auto (at least 6000)"CODE
LOWopenclaw.plugin.json415 "placeholder": "Auto (2 × Leaf Chunk Tokens)"CODE
LOWtest/engine-ingest.test.ts644 const longBody = "lorem ipsum ".repeat(2_000);CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtui/doctor_test.go25 ('sum_new_false', 1, 'leaf', 0, '%s520 tokens] was mentioned earlier in this summary body and then the text continuedCODE