# How `hallmark audit` Scores Code Against AI-Generated UI Anti-Patterns: A Complete Guide

> Learn how hallmark audit scores code against AI-generated UI anti-patterns. It scans files, detects critical tells, and generates a severity-weighted report highlighting code "slop" to improve your codebase.

- Repository: [Hassan El Mghari/hallmark](https://github.com/Nutlope/hallmark)
- Tags: how-to-guide
- Published: 2026-08-05

---

**The `hallmark audit` command loads a canonical anti-pattern catalogue, scans target files for pattern matches, and produces a severity-weighted report that flags code as "slop" when critical tells are detected.**

The `hallmark audit` verb in the [Nutlope/hallmark](https://github.com/Nutlope/hallmark) repository is a diagnostic safety tool that evaluates frontend codebases for telltale signs of AI-generated UI. According to the source code in [`skills/hallmark/references/verbs/audit.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/verbs/audit.md), the audit combines pattern matching against a curated rule set with structural fingerprint analysis to produce actionable, severity-ranked findings.

## Loading the Anti-Pattern Rule Set

Every audit begins by loading the canonical catalogue from [[`anti-patterns.md`](https://github.com/Nutlope/hallmark/blob/main/anti-patterns.md)](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/anti-patterns.md). Each entry in this file carries a **severity classification** used for scoring:

- **Critical** — patterns that immediately flag code as "slop" (e.g., purple-gradient hero, full-viewport centered hero)
- **Major** — visual tells that strongly suggest AI generation (e.g., `bounce`/`ease-elastic` animations, centered-everything layouts, italic headers)
- **Minor** — subtle taste issues (e.g., straight quotes instead of curly, `z-index: 9999`)

These classifications directly determine whether the final verdict declares a codebase as shipping "slop."

## Scanning Target Files for Pattern Matches

The audit accepts any file or directory path as its target:

```bash

# Audit an entire folder of components

hallmark audit ./src/pages

# Audit a single stylesheet

hallmark audit ./src/components/hero.css

```

For each file, the verb checks whether anti-pattern signatures appear in HTML, CSS, JavaScript, or other source files. The matching logic is defined in the verb specification at lines 14–24 of [`audit.md`](https://github.com/Nutlope/hallmark/blob/main/audit.md).

## Generating Structured Findings

Every match produces a **finding record** with four required fields:

| Field | Description | Source in Catalogue |
|-------|-------------|---------------------|
| **Tell** | Anti-pattern name | Entry title |
| **Where** | File path and line range | Detected location |
| **Severity** | Critical / Major / Minor | Entry classification |
| **Fix** | One-line concrete recommendation | "Fix" paragraph |

This structure ensures each finding is immediately actionable without requiring manual cross-referencing.

## Structural Fingerprint and Genre-Aware Checks

Beyond style tells, `hallmark audit` performs three additional architectural evaluations defined in [`audit.md`](https://github.com/Nutlope/hallmark/blob/main/audit.md):

**Stamp-vs-page verification** — Confirms that `/* Hallmark · macrostructure: <name> … */` comments match the actual page shape.

**Genre-aware audit** — Applies context-specific overrides. For example, a radial-gradient background is **critical** for *editorial* genre but **allowed** for *atmospheric* genre.

**[`design.md`](https://github.com/Nutlope/hallmark/blob/main/design.md) audit** — When a project-wide [`design.md`](https://github.com/Nutlope/hallmark/blob/main/design.md) exists, the tool checks for theme drift, macrostructure family violations, and missing or mismatched stamps.

## Grouped Output and Final Verdict

All findings are aggregated by severity and rendered in a standardized format:

```text
[critical] The purple-gradient hero — src/pages/home.html:52-54
  why it reads as AI-generated
  → pick a single anchor hue; no gradient hero

[major] Inter-everywhere — src/styles/global.css:8-10
  why it reads as AI-generated
  → pair a distinctive display face with a refined body face

[minor] Straight quotes — src/components/quote.html:23
  why it reads as AI-generated
  → use curly quotes

Summary — 1 critical · 1 major · 1 minor
Verdict — ships as slop

```

The summary line `N critical · M major · K minor` is **prescribed in [`audit.md`](https://github.com/Nutlope/hallmark/blob/main/audit.md)** and serves as a quick diagnostic scan. As implemented in [Nutlope/hallmark](https://github.com/Nutlope/hallmark), the audit verb is **purely diagnostic**—it never modifies source files.

## Why the Audit Does Not Auto-Fix

The verb specification deliberately separates detection from remediation. This design choice, documented in the source, ensures that:

- Developers review each finding in context
- Genre-specific nuances are respected
- Structural decisions (macrostructure selection) receive human judgment

The companion `hallmark redesign` verb handles automated remediation for users who want hands-off fixes.

## Summary

- The `hallmark audit` command scores code against **critical, major, and minor** anti-patterns loaded from [`anti-patterns.md`](https://github.com/Nutlope/hallmark/blob/main/anti-patterns.md)
- Each finding includes **location, severity, and a concrete fix recommendation**
- **Structural checks** verify stamp comments, genre rules, and [`design.md`](https://github.com/Nutlope/hallmark/blob/main/design.md) compliance
- Output follows a **strict format** with severity counts and a final "slop" verdict
- The tool is **read-only** by design—it reports without modifying files

## Frequently Asked Questions

### What triggers the "ships as slop" verdict in `hallmark audit`?

Any **critical** severity finding triggers this verdict. Critical patterns, such as purple-gradient heroes or full-viewport centered layouts, are defined in [`anti-patterns.md`](https://github.com/Nutlope/hallmark/blob/main/anti-patterns.md) as immediate slop indicators regardless of other scores.

### Can `hallmark audit` analyze frameworks like React or Vue?

Yes. The scan operates on the final rendered output patterns in source files—HTML templates, CSS modules, and JavaScript—so it works across frameworks. The matching logic in [`audit.md`](https://github.com/Nutlope/hallmark/blob/main/audit.md) does not require framework-specific parsers.

### How does genre awareness affect anti-pattern scoring?

Genre rules override default severity. The [`audit.md`](https://github.com/Nutlope/hallmark/blob/main/audit.md) specification includes logic where the same visual element (e.g., radial-gradient background) receives different severity depending on whether the project declares an *editorial*, *atmospheric*, or other genre in its [`design.md`](https://github.com/Nutlope/hallmark/blob/main/design.md).

### Where is the anti-pattern catalogue maintained?

The canonical list lives at [`skills/hallmark/references/anti-patterns.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/anti-patterns.md) in the repository. Each entry follows a standardized format with name, severity, description of why it reads as AI-generated, and a concrete fix recommendation.