agentleFS
vchelaruvchelaru/Gum/.claude/skills/frb-pixel-harness/SKILL.md

frb-pixel-harness

Skill659 starsChanged 2 months agoMITView on GitHub

Pixel tests that render Gum through a real FlatRedBall (FRB1) game. Triggers: premultiplied alpha, Blend/BlendState changes, render-target bake or composite, Tests/FlatRedBall.GumRendering.Tests, BlendMathTests.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run it by path, dotnet test Tests/FlatRedBall.GumRendering.Tests, or one class with pwsh Tools/fast-test.ps1 …

    line 10

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

FRB Pixel Harness

Tests/FlatRedBall.GumRendering.Tests draws Gum through FRB's own GumIdb and checks single pixels against arithmetic. It exists because MonoGameGum.IntegrationTests cannot model FRB's premultiplied pipeline (NormalBlendState == AlphaBlend). Run it after changing blend states, Sprite.Render, or the render-target bake/composite in Renderer.cs. For compile-only checks see frb-build-verification.

Run it by path, dotnet test Tests/FlatRedBall.GumRendering.Tests, or one class with pwsh Tools/fast-test.ps1 FlatRedBall.GumRendering.Tests:BlendMathTests; it is in no solution, so fast-test needs the Project: prefix. The build skips itself with a warning when ../FlatRedBall is missing.

FilePurpose
Harness/FrbGumHost.csOne real FRB Game per process; Render(...) draws elements and returns the backbuffer
BlendMathTests.csSolid colors at a known alpha, expected value computed in the test
SpriteTintTests.csSprite Red/Green/Blue/Alpha set through SetProperty, as a loaded project sets them

Gotchas

  • FrbGumHost.Initialize copies the hooks Glue generates into Game1.Initialize (GumGame1CodeGenerator.cs in the FRB repo). When Glue's generated setup changes, update the host to match.
  • FRB state is static, so there is exactly one host per process. Touch FrbGumHost.Instance before anything that uses SystemManagers.Default.
  • Sprite textures must go through TextureContentLoader.MakePremultiplied, as real FRB loads do.
  • Inside namespace FlatRedBall.*, Gum. and Sprite resolve to FRB types. Use global::Gum... and RenderingLibrary.Graphics.Sprite.
  • The FRB compile constant makes ToBlendState return the premultiplied blend states; a plain dotnet test of MonoGameGum.Tests never exercises that path.
  • Blend.Replace on a translucent texture looks darker in FRB than in the tool. FRB's texture is premultiplied and BlendState.Opaque writes it unchanged, while the tool replaces with the straight color; matching it needs a shader that un-premultiplies, so the difference is accepted and not tested.
  • A Skipped test documents a known FRB bug; remove the Skip in the same change that fixes it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.