# Hallmark's Pre‑Emit Self‑Critique Process: How It Guarantees Output Quality

> Discover Hallmark's pre-emit self-critique process. Learn how this quality check ensures high-quality output by scoring artifacts and repeating generation until thresholds are met.

- Repository: [Hassan El Mghari/hallmark](https://github.com/Nutlope/hallmark)
- Tags: deep-dive
- Published: 2026-08-16

---

**Hallmark runs a deterministic quality check immediately before emitting any output, scoring the artifact on six axes and stamping the results as a comment; if any score falls below 3, the generation loop repeats until all thresholds are met.**

Hallmark is a systematic approach to high‑quality code generation developed by Nutlope. Its **pre‑emit self‑critique process** sits at the core of the workflow, ensuring every artifact meets strict internal standards before reaching the user. This built‑in validation layer makes Hallmark distinctly different from typical prompt‑and‑respond systems.

## How the Pre‑Emit Self‑Critique Works

The mechanism operates in two tightly coupled steps defined in the project's skill definition file.

### Step 1: Score on Six Quality Axes

After content is generated but **before it is returned to the caller**, Hallmark evaluates the output across six dimensions. Each axis receives a numeric rating from **1 to 5**:

- **P** – Philosophy
- **H** – Hierarchy
- **E** – Execution
- **S** – Specificity
- **R** – Restraint
- **V** – Variety

This scoring is performed by the model itself or a downstream validator. The criteria are documented in [`skills/hallmark/SKILL.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/SKILL.md) under the "Pre‑emit self‑critique" section【SKILL.md – Pre‑emit self‑critique description】(https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/SKILL.md#L46).

### Step 2: Stamp Scores and Conditional Regeneration

The six scores are written as a comment at the very top of the file using this exact format【slop‑test.md – stamp comment example】(https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/slop-test.md#L24):

```css
/* Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5 */

```

The pattern is **`/* Hallmark · pre-emit critique: Px Hx Ex Sx Rx Vx */`**, where each "x" represents the numeric rating.

**If any axis scores below 3**, Hallmark automatically triggers a **revision pass**: the generation loop reruns, the output is re‑scored, and the process repeats until every axis meets the minimum threshold. This guarantees the final artifact aligns with Hallmark's design philosophy before emission.

## Implementation Examples

### Manual Comment Placement

You can observe the critique stamp in actual generated CSS files:

```css
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R4 V5 */
body {
  background: #fafafa;
  color: #333;
}

```

The comment always appears as the **first line** of the artifact.

### Programmatic Workflow (Conceptual)

```python
def pre_emit_critique(output):
    scores = {
        "P": evaluate_philosophy(output),
        "H": evaluate_hierarchy(output),
        "E": evaluate_execution(output),
        "S": evaluate_specificity(output),
        "R": evaluate_restraint(output),
        "V": evaluate_variety(output),
    }

    # Revision trigger: any score below 3 forces regeneration

    if any(v < 3 for v in scores.values()):
        output = regenerate_output()

    comment = "/* Hallmark · pre-emit critique: " + " ".join(
        f"{k}{v}" for k, v in scores.items()
    ) + " */\n"
    return comment + output

```

This simplified logic mirrors Hallmark's actual implementation: evaluate, validate thresholds, regenerate if needed, then annotate.

### Regeneration in Practice

A revised artifact after a failed first pass might show adjusted scores:

```text
/* Hallmark · pre-emit critique: P5 H4 E4 S5 R5 V4 */

```

Here, Hierarchy (`H4`) and Execution (`E4`) improvements triggered acceptance, though a subsequent Variety drop to `V4` could prompt another cycle depending on threshold configuration.

## Where the Pre‑Emit Self‑Critique Appears in Hallmark's Codebase

| File | Purpose | Link |
|------|---------|------|
| [`skills/hallmark/SKILL.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/SKILL.md) | Primary definition of Hallmark's workflow, including the pre‑emit self‑critique step | [SKILL.md](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/SKILL.md) |
| [`skills/hallmark/references/slop-test.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/slop-test.md) | Reference documentation showing the exact comment stamp format | [slop-test.md](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/slop-test.md) |
| [`site/examples/wayfare/style.css`](https://github.com/Nutlope/hallmark/blob/main/site/examples/wayfare/style.css) | Real‑world CSS artifact with pre‑emit critique annotation | [style.css](https://github.com/Nutlope/hallmark/blob/main/site/examples/wayfare/style.css) |
| [`site/_tests/13-alma/index.html`](https://github.com/Nutlope/hallmark/blob/main/site/_tests/13-alma/index.html) | Test output demonstrating critique metadata in HTML | [index.html](https://github.com/Nutlope/hallmark/blob/main/site/_tests/13-alma/index.html) |

These files demonstrate that the **pre‑emit self‑critique** is not merely theoretical—it is actively applied to every generated artifact in the repository.

## Why This Process Matters

The pre‑emit self‑critique serves three critical functions:

1. **Quality gate** – Prevents substandard outputs from reaching users
2. **Observability** – Makes quality criteria explicit and auditable via stamped scores
3. **Iterative improvement** – Creates a feedback loop where the system self‑corrects before final delivery

By embedding this validation directly into the emission pipeline, Hallmark transforms quality assurance from an external check into an intrinsic property of the generation process.

## Summary

- Hallmark's **pre‑emit self‑critique** runs immediately before any output is returned to the caller
- Six axes (**P**hilosophy, **H**ierarchy, **E**xecution, **S**pecificity, **R**estraint, **V**ariety) are scored 1–5
- Scores are stamped as a `/* Hallmark · pre-emit critique: ... */` comment at the file's top
- **Any score below 3 triggers automatic regeneration** until all thresholds are met
- Implementation details reside in [`skills/hallmark/SKILL.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/SKILL.md) with examples in [`skills/hallmark/references/slop-test.md`](https://github.com/Nutlope/hallmark/blob/main/skills/hallmark/references/slop-test.md)

## Frequently Asked Questions

### What happens if multiple axes score below 3?

Hallmark triggers a single revision pass regardless of how many axes fail. The entire generation loop reruns, producing fresh output that is re‑evaluated across all six axes. This continues iteratively until every axis meets the minimum threshold of 3.

### Can the minimum score threshold be customized?

The current Hallmark implementation as documented in [`SKILL.md`](https://github.com/Nutlope/hallmark/blob/main/SKILL.md) uses a fixed threshold of 3 across all axes. There is no evidence of configurable thresholds in the source files; the consistency of this value appears intentional to maintain uniform quality standards.

### Where can I see real examples of the critique stamp?

Live examples appear throughout the repository. The `site/examples/` directory contains multiple CSS files such as [`site/examples/wayfare/style.css`](https://github.com/Nutlope/hallmark/blob/main/site/examples/wayfare/style.css) with actual `/* Hallmark · pre-emit critique: ... */` comments at their openings. The `site/_tests/` directory also contains HTML outputs showing the critique metadata in production contexts.

### Is the scoring performed by the same model that generated the content?

According to the skill definition, scoring is performed either by the **generating model itself** or by a **downstream validator**. This dual‑mode design allows flexibility: the same model can self‑evaluate, or a separate evaluation layer can enforce standards—useful for audit trails or when external validation is required.