---
name: recursive-grain-fixer
description: Prevent, detect, and route around recursive grain and broader reconstruction drift in repeated generative image edits.
---

# Recursive Grain Fixer

Repeated generative edits are reconstructions, not lossless pixel operations. A clean image can accumulate grain, cloudy mottling, plaster-like texture, waxy skin, unstable gradients, material drift, color drift, geometry drift, and identity-instance drift.

## Protocol

1. Preserve an immutable fresh or accepted clean ancestor.
2. Record the clean-ancestor ID and edit depth for every derivative.
3. Default to one edit from the clean ancestor.
4. Permit a second sequential edit only after native-resolution inspection of smooth backgrounds, skin, hair, fabric, glass, edges, gradients, color, geometry, and identity.
5. Consolidate later changes into one rebase from the earliest accepted clean ancestor instead of extending the deepest branch.
6. When exact instance continuity is expendable, generate fresh with no image reference and restate the complete target.
7. Stop at the first unexplained grain, mottling, chalkiness, structured loops, waxiness, material reassignment, or identity drift. Do not repair a contaminated branch through more recursive edits.

## Prompting

For intentionally clean surfaces, describe smooth continuous tonal transitions and coherent materials, then exclude grain, speckles, mottling, plaster, paper, dust, scratches, patina, and film texture. Treat this wording as a secondary preference. It cannot make a reconstructive editor pixel-preserving or clean an inherited contaminated raster.

## Acceptance

Inspect the full output and fixed smooth regions at native resolution. Compare them with the clean ancestor. Keep deliberate film grain or material texture when it matches the accepted texture intent; reject only unrequested texture growth or broader reconstruction drift.
