brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
run-puzzle-testsRun jigsawR test suite via WSL R. Supports full suite, filtered by pattern, or single file. Interprets pass/fail/skip counts and identifies failing tests. Never use `--vanilla` (renv needs `.Rprofile` to activate). Use after R source changes, after adding a puzzle type or feature, before commits, or when debugging a specific failure.
Independent GitHub snapshot · Automated classification · Original documentation governs
--vanilla (renv needs .Rprofile to activate). Use after R source
changes, after adding a puzzle type or feature, before commits, or when
debugging a specific failure.
license: MIT
allowed-tools: Read Write Edit Bash Grep Glob
metadata:
author: Philipp Thoss
version: "1.0"
domain: jigsawr
complexity: basic
language: R
tags: jigsawr, testing, testthat, renv, wslRun the jigsawR test suite and interpret results.
full, filtered, or single)"snic", "rectangular")| Scope | Use when | Duration |
|---|---|---|
| Full | Before commits, after major changes | ~2-5 min |
| Filtered | Working on one puzzle type | ~30s |
| Single | Debugging a specific test file | ~10s |
Got: Test scope selected: full before commits, filtered for one puzzle type, single for debugging one test.
If fail: If unsure, default to full suite. Slower but catches cross-type regressions.
Full suite:
Create a script (e.g., /tmp/run_tests.R):
devtools::test()
R_EXE="/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe"
cd /mnt/d/dev/p/jigsawR && "$R_EXE" -e "devtools::test()"
Filtered by pattern:
"$R_EXE" -e "devtools::test(filter = 'snic')"
Single file:
"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"
Got: Test output with pass/fail/skip counts.
If fail:
--vanilla; renv needs .Rprofile to activaterenv::restore() firstLook for the summary line:
[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
snic)Got: Summary line parsed for PASS, FAIL, SKIP, WARN counts. FAIL = 0 for clean run.
If fail: Without summary line, the runner crashed before completing. Check for R-level errors above. If output is truncated, redirect to file: "$R_EXE" -e "devtools::test()" > test_results.txt 2>&1.
If tests fail:
# Run just the failing test with verbose output
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"
Got: Root cause of each failing test identified — regression (code fix) or environment issue (missing dep, path).
If fail: With unclear failure messages, add browser() or print() and re-run with testthat::test_file() for interactive debugging.
Skips are normal when optional dependencies are missing:
snic package tests skip with skip_if_not_installed("snic")skip_on_os()skip_on_cran()Confirm skip reasons are legitimate, not masking real failures.
Got: All skips accounted for by legitimate reasons. No skips masking failures.
If fail: If a skip seems suspicious, temporarily remove the skip_if_*() call and run the test.
--vanilla: Breaks renv activation. Never use it with jigsawR.-e strings: Shell escaping issues cause Exit code 5. Use script files.devtools::load_all() or devtools::document() before testing if NAMESPACE changed.DESCRIPTION Suggests field.testthat::test_file().generate-puzzle — generate puzzles to verify behavior matches testsadd-puzzle-type — new types need comprehensive test suiteswrite-testthat-tests — patterns for writing R testsvalidate-piles-notation — test PILES parsing independently