TrueMend
Technical Audit Report
Acme / Checkout

Your codebase has issues. Most of them cost nothing to fix.

72
Health score
/ 100

TrueMend analyzed 5 files and 5 functions. 6 quality issues found; 33% can be fixed automatically at zero cost.

Analyzed/home/al/Projects/checkout
Before · PayButton.tsx
1// before: console.log + try/catch rethrow
2function PayButton({ amount }) {
3 console.log("pay", amount);
4 try {
5 return <button onClick={() => charge(amount)}>Pay</button>
6 } catch (err) {
7 throw err;
8 }
9}
After · $0 deterministic fix
1// after: deterministic, $0
2function PayButton({ amount }: { amount: number }) {
3 return <button onClick={() => charge(amount)}>Pay</button>
4}
Score details · 5 files
High
33
Medium
33
Low
17
Info
17
08/31/2026
truemend.ai
TrueMend

Contents

What this report contains

Jump to a section, or print the whole document.

DET Deterministic: automatic, $0CAT Cataloged: guided refactorSTR Structural: human decision

Health Score on the cover is the mechanical composite /100. Subjective quality lives on its own page when a review ran.

TrueMend

Executive Overview

Code Quality Assessment: Checkout

TrueMend performed an automated code quality audit of 5 source files containing 5 functions across 62 lines of code. This report summarizes the findings and quantifies the engineering effort required to address them.

Issue severity

High33%Medium33%Low17%Info17%6issues

Fix type

$0 fix33%Cataloged50%Structural17%33%$0 fixes
Open issues, 90 days
8 fewer
Shrinking. 14 open at the start of the window, 6 today.
Cleared from day 1
24
Issues TrueMend has applied since 12 Mar 2026.
Hours this audit saves
5
54% of the manual estimate
TrueMend

Industry Benchmark

This project versus the industry

The health score on the cover is mechanical. These marks show where that score sits relative to published industry averages, not a second scoring system.

Health score vs industry

+10 vs average
72
Industry avg: 62
Top quartile: 78
Project: 72
Average: industry median
Pattern density
96.8 / 1k LOC
+84.3 vs industry avg (12.5)
Codebase size
62 LOC
5 files, 5 functions
TrueMend

Financial Impact

Cost of Inaction vs Remediation

Technical debt compounds. Industry research shows unaddressed code quality issues grow at approximately 23% annually as surrounding code adapts to work around problems, making them progressively harder to resolve.

Current remediation
$1,750
At blended rate of $125/hr
In 6 months
$1,951
+$201 if you wait
In 12 months
$2,152
+$402 if you wait

Remediation cost trajectory

Fix Now
1,750
In 6 Months
1,951
In 12 Months
2,152
TrueMend

Remediation Effort

Engineering time and fix mix

Manual remediation is priced at the full effort. TrueMend keeps only the hours that still need a person: cataloged procedures and structural rewrites.

Engineering time: manual vs TrueMend

Manual
9
With TrueMend
4
Manual effort
0.2 weeks
9 engineering hours
With TrueMend
0.1 weeks
4 engineering hours

Remediation by fix type

Deterministic
2
Cataloged
3
Structural
1

2 deterministic fixes. Automated AST transforms applied instantly at zero cost.

3 cataloged refactors. Constrained procedures: 5 minutes each vs 90 minutes manually.

1 structural rewrite. These require human architectural judgment and stay flagged for review.

TrueMend

Return on Investment

TrueMend ROI Analysis

The following breakdown compares the engineering cost of manual remediation against TrueMend-assisted remediation for each fix category. Waiting does not freeze the bill: the same debt costs more as surrounding code adapts around it.

Cost if you wait

1,750
Fix now
1,951
Wait 6 months
2,152
Wait 12 months

Fixing now costs $1,750. Waiting 12 months raises that to $2,152 (+$402) before TrueMend has still not run.

What waiting adds

Pay now81%If you wait19%$402extra in 12 mo
Fix TypeCountManual (per fix)TrueMend (per fix)Manual TotalTrueMend TotalSavings
Deterministic225 min0 min1 hrs0 hrs1 hrs
Cataloged Refactor390 min5 min4 hrs0 hrs4 hrs
Structural Rewrite14 hrs4 hrs4 hrs4 hrs0 hrs
Total69 hrs4 hrs5 hrs
$953
Estimated Cost Savings
Manual: $1,750 → TrueMend: $797
5
Engineering Hours Saved
0.2 weeks → 0.1 weeks
33%
Issues Auto-Fixed
2 instant, zero-cost fixes
Bottom Line: TrueMend reduces remediation time from 0.2 developer-weeks to 0.1 weeks, a 54% reduction. The 2 deterministic fixes alone eliminate 1 hours of manual work at zero cost and zero risk. Deferring action increases the total cost by $402 within 12 months.
TrueMend

Methodology

Assessment methodology

Every TrueMend audit follows a standardized, reproducible process. Findings are generated by deterministic AST analysis, regex line-scan, and semantic Python analysis, not opinion.

Analysis Engine

Detection

4,808 anti-patterns across 146 spec files using ast-grep (Rust AST), regex line-scan, and semantic Python analysis. 26 language grammars.

Scoring

Mechanical health score (0-100) computed from anti-pattern density, severity weights, and function-level metrics. Optional LLM-powered subjective review across 40 dimensions with blind review mode.

Classification

Three-tier fix classification ensures every finding has a clear, cost-appropriate remediation path.

Structural Analysis

8 project-level detectors: naming consistency, flat directories, orphaned files, dead code blocks, single-use abstractions, signature variance, passthrough files, duplicate clusters.

Production Readiness

13-check assessment with PASS/FAIL/WARN verdicts and blocker identification.

Team Quality

Per-author attribution from git history: commits, debt introduced/fixed, test discipline, commit message quality.

Cost Model

Technical debt in CAD at $125/hr blended consulting rate with empirical calibration from actual fix times.

Quality Dimensions

Readability (0-100)
How easy the code is to read and follow.
Simplicity (0-100)
Whether the code avoids unnecessary complexity.
Design Coherence (0-100)
How well components fit together.
Convention Adherence (0-100)
Consistency with project conventions.
Error Handling (0-100)
Robustness of error detection and recovery.
Naming Quality (0-100)
Clarity and descriptiveness of identifiers.
Type Safety (0-100)
Strength and correctness of type annotations.
API Surface (0-100)
Clarity and minimality of public interfaces.
Test Strategy (0-100)
Coverage, isolation, and quality of tests.
Abstraction Fitness (0-100)
Whether abstractions match the domain.
Logic Clarity (0-100)
How straightforward the control flow is.
Security (0-100)
Resistance to common vulnerability patterns.
40 mechanical + subjective dimensions available. Subjective dimensions scored via LLM review handoff (prepare → score → ingest).

Fix Classification

deterministicAutomatic AST transforms applied without human input. Free: no LLM cost.
cataloged refactorA known refactoring procedure with bounded scope and predictable cost.
structural rewriteA design-level decision that requires discussion before implementation.

Confidentiality Notice

This report was prepared exclusively for Acme in connection with the Checkout engagement. It contains proprietary analysis and recommendations. Distribution, reproduction, or disclosure to third parties without written authorization is prohibited.

© 2026 TrueMend™. All rights reserved.
TrueMend

Executive Summary

6 anti-patterns across 5 files, 2 fixable at zero cost.

TrueMend analyzed 5 source files containing 5 functions. The majority of findings are deterministic fixes that can be applied automatically with no risk.


5
Files analyzed
5
Functions analyzed
6
Anti-patterns found
2
Deterministic fixes

Severity Distribution

Critical · 0
High · 2
Medium · 2
Low · 1
Info · 1

Fix Type Distribution

2
Deterministic: automatic, zero-cost AST transforms
3
Cataloged refactor: constrained LLM-guided fixes
1
Structural rewrite: flagged for human decision
33%
of issues fixable at $0 cost. 2 deterministic fixes, zero risk.

Worst Files by Anti-Pattern Density

1
PayButton.tsx
3 findings
2
CheckoutForm.tsx
1 findings
3
CheckoutPage.tsx
1 findings
4
api.ts
1 findings
TrueMend

Detailed Findings

6 anti-patterns across 4 files

Each row is one pattern in one file, collapsed across functions. Open Finding Details for evidence, recommended fix, and the files this finding can reach.

By severity

High33%Medium33%Low17%Info17%6total

By fix type

Deterministic33%Cataloged50%Structural17%2$0
components/PayButton.tsx
Health: 58.0  ·  14 lines
FindingCtSeverityFixLines
try/catch that only rethrows
js-try-catch-rethrow
1HIGHDET8
PayButton props are untyped
react-untyped-props
1HIGHCAT3
console.log left in production UI
js-console-log
1MEDIUMDET4
TrueMend

Detailed Findings

components/CheckoutForm.tsx
Health: 71.0  ·  16 lines
FindingCtSeverityFixLines
Magic number 42 used as cart total
cq-magic-number
1INFOCAT6
pages/CheckoutPage.tsx
Health: 80.0  ·  14 lines
FindingCtSeverityFixLines
PayButton rendered twice on the same page
react-duplicate-cta
1LOWSTR9
lib/api.ts
Health: 88.0  ·  10 lines
FindingCtSeverityFixLines
fetch has no timeout or abort
js-fetch-no-timeout
1MEDIUMCAT2
TrueMend

Finding Details

Most critical findings in detail

Each finding includes function metrics, evidence, recommended remediation, and the files this change can reach.

#1   PayButton  ·  components/PayButton.tsx:8
HIGH
deterministic fix
try/catch that only rethrows
Why it mattersThe catch adds no handling and hides the real failure site.
Evidencecatch (err) { throw err; }
4
Complexity
2
Nesting
10
Lines
3
Patterns
Recommended:
Delete the try/catch; let the error surface.
Blast radius
imports thisthis importsPayButton.tsxCheckoutForm.tsxCheckoutPage.tsxapi.ts
#2   PayButton  ·  components/PayButton.tsx:3
HIGH
cataloged refactor
PayButton props are untyped
Why it mattersCall sites can pass a string amount and charge the wrong value.
Evidencefunction PayButton({ amount })
4
Complexity
2
Nesting
10
Lines
3
Patterns
Recommended:
Type the props object: { amount: number }.
Blast radius
imports thisthis importsPayButton.tsxCheckoutForm.tsxCheckoutPage.tsxapi.ts
TrueMend

Finding Details

#3   PayButton  ·  components/PayButton.tsx:4
MEDIUM
deterministic fix
console.log left in production UI
Why it mattersCheckout logs card amounts to the browser console.
Evidenceconsole.log("pay", amount)
4
Complexity
2
Nesting
10
Lines
3
Patterns
Recommended:
Remove the console.log.
Blast radius
imports thisthis importsPayButton.tsxCheckoutForm.tsxCheckoutPage.tsxapi.ts
#4   charge  ·  lib/api.ts:2
MEDIUM
cataloged refactor
fetch has no timeout or abort
Why it mattersA hung charge request leaves the button spinning.
Evidenceawait fetch("/api/charge", ...)
2
Complexity
1
Nesting
8
Lines
1
Patterns
Recommended:
Pass an AbortSignal with a timeout.
Blast radius
imports or callsapi.tsPayButton.tsxuseCart.ts
TrueMend

Finding Details

#5   CheckoutPage  ·  pages/CheckoutPage.tsx:9
LOW
structural rewrite
PayButton rendered twice on the same page
Why it mattersTwo charge buttons on one screen confuse the payment path.
Evidence<CheckoutForm /> and <PayButton amount={12} />
3
Complexity
2
Nesting
12
Lines
1
Patterns
Recommended:
Keep a single pay action owned by CheckoutForm.
Blast radius
this importsCheckoutPage.tsxCheckoutForm.tsxPayButton.tsx
#6   CheckoutForm  ·  components/CheckoutForm.tsx:6
INFO
cataloged refactor
Magic number 42 used as cart total
Why it mattersThe checkout total is a literal, not the cart.
Evidenceconst total = 42
3
Complexity
2
Nesting
12
Lines
1
Patterns
Recommended:
Read the total from cart state.
Blast radius
imports thisthis importsCheckoutForm.tsxCheckoutPage.tsxPayButton.tsxuseCart.ts
TrueMend

Improvement Roadmap

Three-phase improvement roadmap

Fixes are classified into three tiers by execution method. Phase 1 is immediate and automated. Phase 2 requires constrained LLM assistance. Phase 3 requires human architectural judgment. Large audits use one full page per phase so the plan stays readable end to end.

Applying all Phase 1 fixes immediately removes 2 anti-patterns: with zero risk and zero cost.
Phase 1: Deterministic Fixes
2 fixes · Automated · $0 cost
Js try catch rethrow
try/catch that only rethrows
1 file
Js console log
console.log left in production UI
1 file
Phase 2: Cataloged Refactors
3 fixes · LLM-guided
React untyped props
PayButton props are untyped
1 file
Magic number
Magic number 42 used as cart total
1 file
Js fetch no timeout
fetch has no timeout or abort
1 file
Phase 3: Structural Review
1 findings · Human decision required
React duplicate cta
PayButton rendered twice on the same page
1 file
TrueMend

Confidential — Proprietary & Restricted

INTELLECTUAL PROPERTY NOTICE
This document and the technology described within are the exclusive intellectual property of TrueMend.
Trademark & Brand
The TrueMend name, wordmark, logo, and associated branding are trademarked. Unauthorized use of any TrueMend marks in any medium — digital, print, or otherwise — is strictly prohibited and will be pursued.
Proprietary Technology
The three-tier fix classification system, deterministic AST transform engine, anti-pattern detection library, and AI authorship confidence scoring methodology are proprietary trade secrets protected under applicable intellectual property law.
Confidentiality & Reproduction
This document is provided in confidence to the named recipient only. Reproduction, distribution, reverse engineering, or derivation of any product, service, or methodology substantially similar to those described herein will be treated as misappropriation of trade secrets and pursued accordingly.
Any attempt to replicate, circumvent, or commercially exploit the methods, systems, or tooling described in this document without express written authorization from TrueMend constitutes a violation of trade secret law and will result in legal action seeking injunctive relief and damages.
© 2026 TrueMend™. All rights reserved. TrueMend™ is a trademark. Unauthorized use is prohibited.