How Hallmark's Audit Verb Scores Existing Code Against AI-Slop

Hallmark's audit verb inspects HTML and CSS files through a 58-gate slop test to detect AI-generated patterns, outputting a severity-weighted score (critical/major/minor) that determines if code "ships as slop" or meets quality standards.

The audit verb in the Nutlope/hallmark repository provides a non-destructive safety net for evaluating web pages against established anti-AI-slop guidelines. Unlike the redesign or refine verbs, this tool only reports findings without modifying source files, making it ideal for CI pipelines and code reviews. When you run hallmark audit, the system parses your markup, validates it against a comprehensive slop test, and generates a detailed scorecard highlighting structural and visual tells that indicate machine-generated mediocrity.

The Four-Stage Audit Pipeline

The audit process follows a coordinated four-stage architecture defined in skills/hallmark/references/verbs/audit.md. Each stage progressively analyzes the codebase to build a complete quality assessment.

Stage 1: Input Parsing and Stamp Detection

The audit begins by reading target HTML and CSS files to extract any existing /* Hallmark · macrostructure: … */ stamps. If present, these stamps load the project-wide design.md system and establish the expected macrostructure for the page. This metadata drives genre-aware overrides later in the pipeline.

Stage 2: Structural Fingerprinting

Next, the system checks the page against known AI templates—specifically the centered hero, three-equal-column feature grid, CTA, and footer pattern. If the fingerprint matches this generic layout, the audit immediately emits a critical "structural" finding, as these arrangements are primary indicators of AI-slop according to the specification at lines 12-14 of the audit verb documentation.

Stage 3: The 58-Gate Slop Test

The core evaluation occurs in skills/hallmark/references/slop-test.md, where the audit walks through 58 distinct gates covering visual design, structural layout, micro-interactions, contrast ratios, and typography. Simultaneously, it cross-references skills/hallmark/references/anti-patterns.md for named tells. Each gate returns a severity level:

  • Critical: Fundamental violations of anti-AI principles (e.g., purple-gradient heroes, template matching)
  • Major: Significant quality issues (e.g., using Inter for both display and body text)
  • Minor: Polish items that slightly degrade perceived authenticity

Stage 4: Severity-Based Reporting

Finally, the system groups findings by severity and prints a one-line fix suggestion per anti-pattern. The report concludes with a summary line formatted as N critical · M major · K minor and a final verdict such as "ships as slop" or "close – fix the minors". No files are edited during this process.

How the Scoring Algorithm Works

The conversion of raw code into a slop-score relies on five specific validation mechanisms:

Stamp-vs-Page Verification – The extracted stamp must accurately describe the actual macrostructure. A mismatch (e.g., stamp claims Bento Grid but the page renders a centered hero) triggers an immediate critical finding.

Genre-Aware Overrides – When stamps include genre metadata like genre: atmospheric, the audit applies specific gate relaxations. For example, radial-gradient backgrounds are permitted for atmospheric genres despite normally flagging as slop in standard evaluations.

Design-System Drift Detection – If a design.md file exists, the audit verifies token usage, macrostructure family consistency, and stamp alignment. Violations here receive critical or major severity depending on the deviation magnitude.

Gate Condition Evaluation – Each of the 58 gates maps to concrete code patterns (full-viewport centered heroes, mixed icon libraries, etc.). When a gate's condition evaluates to true, the corresponding anti-pattern name is recorded with a specific one-line fix recommendation.

Final Verdict Calculation – After processing all gates, Hallmark aggregates the severity counts. The distribution of critical, major, and minor findings determines whether the page is classified as shipping-quality, requiring refinement, or fully AI-generated slop.

Running Hallmark Audit in Practice

You can invoke the audit verb via CLI or programmatically within Node.js applications.

Command-Line Usage

Run the audit against any HTML file:

hallmark audit path/to/index.html

Typical output includes specific line references and fix suggestions:


[critical] The purple-gradient hero — index.html:12
  a full-bleed purple-to-blue gradient on the hero background
  → Fix: use a single accent hue instead of a gradient

[major] Inter-everywhere — assets.css:45
  Inter is used for both display and body text
  → Fix: pair Inter with a distinct body font like Lato

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

Programmatic Integration

For CI/CD pipelines or automated testing, invoke the audit via Node.js:

import { execSync } from 'child_process';

// Run the audit verb on a file and capture the markdown report.
const report = execSync('hallmark audit ./site/examples/press-01/index.html')
  .toString();

console.log('Audit report:\n', report);

The command returns the same markdown report shown above, which can be parsed to drive automated quality gates or generate GitHub issue tickets.

Key Source Files and Architecture

Understanding the audit verb requires familiarity with these canonical files in the Hallmark repository:

File Role
skills/hallmark/references/verbs/audit.md Full specification of the audit verb, including stamp handling, genre overrides, and report format.
skills/hallmark/references/anti-patterns.md Canonical list of named "tells" (critical, major, minor) with descriptions and one-line fixes.
skills/hallmark/references/slop-test.md The 58-gate checklist that drives the audit's structural and visual evaluation.
skills/hallmark/SKILL.md High-level overview of all Hallmark verbs (audit, redesign, study, etc.) and their invocation patterns.

These files collectively define the audit pipeline, the concrete anti-patterns it detects, and the decision-making logic that converts raw code into actionable quality metrics.

Summary

  • Hallmark's audit verb performs a non-destructive analysis of HTML/CSS against 58 anti-slop gates without modifying source files.
  • The scoring system uses three severity levels (critical, major, minor) to classify AI-generated patterns like purple-gradient heroes and template-matching layouts.
  • Genre-aware overrides in slop-test.md allow contextual exceptions (e.g., atmospheric genres permitting radial gradients).
  • The final output provides actionable fix suggestions and a clear verdict line indicating whether code "ships as slop" or meets quality standards.
  • Integration supports both CLI usage and programmatic Node.js execution via child_process.

Frequently Asked Questions

How does Hallmark determine the severity level of an anti-pattern?

Hallmark assigns severity based on the specific gate triggered in the 58-gate slop test defined in skills/hallmark/references/slop-test.md. Structural matches to generic AI templates (like centered heroes with three-column grids) receive critical status, while font pairing issues or minor spacing inconsistencies typically receive major or minor classifications. Each anti-pattern in anti-patterns.md explicitly maps to one of these three severity tiers.

Can the audit verb modify my code to fix the slop it detects?

No. According to the specification in skills/hallmark/references/verbs/audit.md, the audit verb is strictly read-only and never rewrites files. It only surfaces findings and suggests fixes. To automatically apply corrections, you would use the refine or redesign verbs instead, which are designed for file mutation.

What is a "Hallmark stamp" and why does it affect scoring?

A Hallmark stamp is a CSS comment formatted as /* Hallmark · macrostructure: … */ that declares the intended design structure and genre for a page. The audit verb extracts this stamp during input parsing to load the relevant design.md system. If the actual code deviates from the stamped macrostructure (e.g., claiming a bento grid but implementing a hero), the audit flags a critical finding for design-system drift.

How can I integrate Hallmark audit into a CI/CD pipeline?

Use the programmatic Node.js invocation with child_process.execSync to run hallmark audit against your build artifacts. Parse the resulting markdown report for the summary line (N critical · M major · K minor) or specific verdict strings like "ships as slop" to fail builds or generate notifications. Since the verb returns standard output and exit codes, it integrates with GitHub Actions, GitLab CI, or any automated testing framework that can execute shell commands.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →