bydisentinel· 40 skills
Fix scattered/torn regions in hex-grid simulated annealing layouts that use "competitive flood-fill" (one tile per region per outer iteration). Use when: (1) regions of >20 tiles end up dispersed instead of forming compact blobs, (2) maxDist/sqrt(N) dispersion ratio is 10×+ worse than the ideal compact blob, (3) tiles assigned to one region show up in multiple disconnected fragments across the layout, (4) the visualization has a "trypophobia ring" pattern at the perimeter where some regions spill into a perimeter spiral, (5) an overflow spiral fallback exists in the layout code and frequently kicks in for large regions, (6) bigger regions look worse than smaller ones (small regions stay compact, big ones shred). Root cause: interleaved competitive flood-fill (round-robin one tile at a time across all regions) lets large regions get boxed in by neighbors before they finish growing — the unfilled remainder is dumped into the overflow spiral at the perimeter, far from the seed. Fix: replace with sequential region-by-region BFS — process regions in size-descending order, fully claim each region's N contiguous tiles before moving to the next.
$npx -y skills add disentinel/grafema --skill hex-grid-sequential-bfs-layoutInstalls into the current project.
Run `npx skills use "https://github.com/disentinel/grafema" --skill "disentinel/grafema/hex-grid-sequential-bfs-layout"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/disentinel/grafema" that are relevant to the current task. Run `npx skills add "https://github.com/disentinel/grafema"` and select the relevant skills, then follow their instructions.