Add R40 Artifact Control + R41 Minimal Effective Edit — clean renders and safe edits - #4
Merged
aievolutionpl merged 2 commits intoAug 24, 2026
Conversation
…uals Every rule in this skill assumed the render came back clean. This adds the layer that covers the ones that don't, reframing artifacting from bad luck into four named failure modes with four named causes, all decided at setup before any spend. R40 and references/artifact-control.md cover: - Texture dissolution — fine repeating detail (fur, knit, foliage, crumb, seeds, stone) collapsing into Voronoi cells, webbing and noise clusters. Fixed by bounding the detail: layout-specification prompting instead of atmospheric description, one sharp zone, materials rather than density adjectives, and an explicit negative-constraint block. - Style collision — two descriptors that cannot coexist render as noise because the model tries to satisfy both. One artist, one medium. - Context bleed — the in-chat editing memory ghosting earlier images into later ones. The largest single cause, and invisible in the prompt, so "one ad per generation" becomes one ad per session. - Quality tier — draft settings validate the angle, they never ship. Also covers reference anchoring for e-commerce and brand consistency (2-3 labelled references, anchor specifics not vibes), repair-vs-regenerate, and a pre-flight checklist. The high-risk subject register is mapped onto the briefs this repo actually serves: food, fashion, hotel, pets, home & garden, jewellery. Wired through SKILL.md (core rule 23, pre-flight in step 4, 100% inspection in step 5), the QA gate (new texture_artifacts / unbriefed_elements / style_coherence vision fields and the R40-texture / R40-ghosting hard fails), the prompt library, the anti-slop registry, model routing, and both the design-rules charter and the standalone core.md inject. scripts/qa.py is deliberately untouched. A deterministic artifact check was built and rejected: grain, fabric weave and Voronoi webbing are the same high-frequency energy, so every threshold strict enough to catch webbing also rejected legitimate high-ISO photography, and a structure-based variant scored the repo's own canonical layout worse than pure noise. Artifacting is called by eye at 100% in layer 2, where the distinction is decidable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HUvzQ34w8Eyc8Lw1nPUr11
…acts 5.7.0 covered artifacts you generate. This covers the ones you edit into existence, which is most of them: most commercial image work is changing an image that already exists rather than making a new one. The dominant failure there is not a dirty texture. It is the model rebuilding what nobody asked it to touch — replace the stove, get a redesigned room; change the clothing, get a different face. An edit instruction with no preservation contract reads as a licence to re-solve the whole frame. R41 establishes: every edit prompt carries EDIT INSTRUCTIONS and PRESERVE, never one without the other; a default preserve-list; one element per turn; integration as part of the instruction (scale, perspective, contact shadows, reflections); and an edit priority order in which reference accuracy outranks creative improvement. An edit that made the picture nicer while losing the room is a failed edit, not a bonus. Four new artifact modes, E-H, complete the taxonomy: reference drift, edge halo and texture bleed, duplication and warped geometry, and overload. All four are one failure at bottom — too much asked in one turn — so the meta-remedy is to make the ask smaller. Also adds copy-paste preservation blocks for scenes, faces and products; a reference-image edit template; and a symptom-to-remedy table covering all eight modes, so a dirty output is diagnosed rather than re-rolled. Corrects R40 mode C. The 5.7.0 rule "one image per fresh session" was too blunt: it forbade the legitimate case of iterating on the image you just made. The accurate rule is one concept = one image family = one session. Direct iterations stay in the session; a new concept opens a fresh one. The failure people actually hit is running a new family inside an old one. The QA gate now diffs an edit against its reference — whatever changed beyond the one requested thing is a defect — via new vision fields and the R41-drift and R41-halo hard fails. Two nuances worth keeping: use only the negatives a scene can actually produce, since every possible constraint in one prompt dilutes the ones that matter; and reduce high-frequency detail rather than banning it, since quantity is what dissolves into noise, not the element. R01-R40 untouched. check_docs.py PASS, test_qa.py 13/13. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HUvzQ34w8Eyc8Lw1nPUr11
aievolutionpl
marked this pull request as ready for review
August 24, 2026 17:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Two rules that together cover the full artifact story:
R40for artifacts you generate,R41for the ones you edit into existence.Artifacting is reframed from bad luck into eight named failure modes with eight named causes, in two families. The fixes deliberately do not transfer between modes — re-rolling a style collision will never clear it, and sharpening a prompt will never clear context bleed.
Generation artifacts (
R40)Edit artifacts (
R41)PRESERVER41— the part that matters most in productionMost commercial image work is editing, not generation. Its dominant failure is not a dirty texture — it is the model rebuilding what nobody asked it to touch:
EDIT INSTRUCTIONSandPRESERVE. An edit prompt with only the first is an open licence to redraw the frame.R40mode C, corrected in the second commitThe first pass said "one image per fresh session." That was too blunt — it forbade the legitimate case of iterating on the image you just made. The accurate rule is one concept = one image family = one session: direct iterations (angle, lighting, framing, one object, a text fix) stay in the session; a new concept, scene or campaign direction opens a fresh one.
The failure people actually hit is running a new family inside an old one — and different subject is not protection, since unrelated prompts ghost each other just as readily.
Also worth flagging
Wiring
SKILL.md— core rules 23 and 24; step 4 gains the artifact pre-flight and the edit branch; step 5 inspects at 100% and diffs edits against their reference.visual-advertising-engine.md— 39 → 41 rules.references/qa-gate.md— the vision pass inspects at full resolution and returnstexture_artifacts,unbriefed_elements,style_coherence,edge_halo_or_bleed,duplicated_or_warpedandunrequested_changes; four new hard fails (R40-texture,R40-ghosting,R41-drift,R41-halo), each routed to the mode that causes it rather than a generic "regenerate".references/prompt-library.md— a reference-image edit template built on the preservation contract, plus the anti-artifact constraint block.anti-slop-registry.md(new §1a, "the slop nobody chose"),model-routing.md,design-rules.mdandcore.md, so the standalone chat inject stays self-contained.Why
scripts/qa.pyis untouchedA deterministic artifact check was built and rejected during this work, not skipped.
Sensor grain, fabric weave and Voronoi webbing are all the same high-frequency energy to a script. A busy-block metric flagged a legitimate high-ISO photograph at 1.00 while scoring synthetic Voronoi webbing at 0.00 — an exact inversion. An autocorrelation variant scored the repo's own canonical photo+panel layout (1.00) as worse than pure noise (0.003).
Any threshold strict enough to catch webbing rejects real photography, so shipping it would have made the gate worse. Artifacting is called by eye at 100% in layer 2, where the distinction is actually decidable — and the QA gate now says so explicitly rather than leaving a silent gap.
Verification
python scripts/check_docs.py→ PASS (30 markdown files: links, §-pointers, rule IDs, frontmatter, version)python scripts/test_qa.py→ 13/13 cases passedPurely additive:
R01–R39unchanged, no rule-ID renumbering. Version 5.6.0 → 5.8.0 acrossSKILL.md, both READMEs,CHANGELOG.mdandplugin.json(which had drifted at 5.5.0 and is now realigned).Note on sources
apipass.dev— the URL in the original request — is blocked by this environment's network egress proxy, as arerewarx.comandaigcsdm.com. TheR40material was reconstructed from search-result summaries of those articles, which carried the substance (the four categories, the ghosting mechanism and its "first image is clean" pattern, the Impressionist + ultra-detailed collision example, the verbatim negative-constraint string, the layout-specification framing, the quality-tier guidance).R41comes from the skill text supplied directly in the conversation. Worth a spot-check against the original article for anyR40specific I could not read firsthand.