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. Full|filtered|single. Interpret pass/fail/skip + identify fails. Never `--vanilla` (renv needs `.Rprofile`). Use → post-R-edit, post-new-type, pre-commit verify, debug fail.
Independent GitHub snapshot · Automated classification · Original documentation governs
--vanilla (renv needs .Rprofile). Use → post-R-edit, post-new-type, pre-commit verify, debug fail.
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 jigsawR test suite + interpret results.
full|filtered|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 |
→ Scope chosen by workflow: full pre-commit, filtered for type work, single for debug.
If err: unsure → default full. Slower but catches cross-type regressions.
Full:
Create /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:
"$R_EXE" -e "devtools::test(filter = 'snic')"
Single:
"$R_EXE" -e "testthat::test_file('tests/testthat/test-snic-puzzles.R')"
→ Test out w/ pass/fail/skip.
If err:
--vanilla; renv needs .Rprofilerenv::restore() firstSummary line:
[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
snic)→ Summary parsed → PASS, FAIL, SKIP, WARN counts. FAIL=0 = clean.
If err: no summary → runner crashed pre-complete. Check R errs above. Output truncated → redirect: "$R_EXE" -e "devtools::test()" > test_results.txt 2>&1.
If fail:
# Run just the failing test with verbose output
"$R_EXE" -e "testthat::test_file('tests/testthat/test-failing.R', reporter = 'summary')"
→ Root cause id'd. Real regression (fix code) or env issue (dep, path).
If err: msg unclear → add browser()|print() + re-run via testthat::test_file() for interactive debug.
Skips normal when optional deps missing:
snic → skip_if_not_installed("snic")skip_on_os()skip_on_cran()Confirm legitimate, not masking real fails.
→ All skips accounted by legit reasons. None mask actual fails.
If err: skip suspicious → temp remove skip_if_*() + run → see if pass or hidden fail.
--vanilla: Breaks renv. Never w/ jigsawR.-e strings: Shell escape → Exit 5. Use script files.devtools::load_all()|document() before test if NAMESPACE changed.DESCRIPTION.testthat::test_file().generate-puzzle — gen puzzles → verify behavior matches testsadd-puzzle-type — new types need comprehensive suiteswrite-testthat-tests — general R test patternsvalidate-piles-notation — test PILES parse standalone