add-puzzle-type

Solid

Scaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.

AI & Automation 33 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
51
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Add Puzzle Type Scaffold a new puzzle type across all pipeline integration points in jigsawR. ## When to Use - Adding a completely new puzzle type to the package - Following the established integration checklist (CLAUDE.md 10-point pipeline) - Ensuring nothing is missed when wiring a new type end-to-end ## Inputs - **Required**: New type name (lowercase, e.g. `"triangular"`) - **Required**: Geometry description (how pieces are shaped/arranged) - **Required**: Whether the type needs external packages (add to Suggests) - **Optional**: Parameter list beyond the standard (grid, size, seed, tabsize, offset) - **Optional**: Reference implementation or algorithm source ## Procedure ### Step 1: Create Core Puzzle Module Create `R/<type>_puzzle.R` with the internal generation function: ```r #' Generate <type> puzzle pieces (internal) #' @noRd generate_<type>_pieces_internal <- function(params, seed) { # 1. Initialize RNG state # 2. Generate piece geometries # 3. Build edge paths (SVG path data) # 4. Compute adjacency # 5. Return list: pieces, edges, adjacency, metadata } ``` Follow the pattern in `R/voronoi_puzzle.R` or `R/snic_puzzle.R` for structure. **Got:** Function returns a list with `$pieces`, `$edges`, `$adjacency`, `$metadata`. **If fail:** Compare the return structure against `generate_voronoi_pieces_internal()` to identify missing list elements or incorrect types. ### Step 2: Wire into jigsawR_clean.R Edit `R/jigsawR_clean.R`: 1. Add `"<type>"` to...

Details

Author
pjt222
Repository
pjt222/agent-almanac
Created
1 years ago
Last Updated
today
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category