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 the jigsawR test suite via WSL R execution. Supports full suite, filtered by pattern, or single file. Interprets pass/fail/skip counts and identifies failing tests. Never uses --vanilla flag (renv needs .Rprofile for activation). Use after modifying any R source code, after adding a new puzzle type or feature, before committing changes to verify nothing…
Independent GitHub snapshot · Automated classification · Original documentation governs
Run jigsawR test suite. Read 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 |
Got: Scope selected by workflow: full before commits, filtered for one type, single for one debug.
If fail: Unsure? Default to full. Slower but catches cross-type regressions.
Full suite.
Make 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 flag; renv needs .Rprofile to activaterenv::restore() firstLook for summary line.
[ FAIL 0 | WARN 0 | SKIP 7 | PASS 2042 ]
snic)Got: Summary line parsed for PASS, FAIL, SKIP, WARN. FAIL = 0 = clean run.
If fail: Summary not visible? Runner crashed before completing. Check R-level errors above. Output 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. Failure = real regression (fix code) or test env issue (missing dep, path).
If fail: Failure msg unclear? Add browser() or print() to test, re-run with testthat::test_file() for interactive debug.
Skipped tests normal when optional deps missing.
snic package tests skip with skip_if_not_installed("snic")skip_on_os()skip_on_cran()Confirm skip reasons legitimate, not masking real failures.
Got: All skips accounted for by legitimate reasons (optional dep, platform skip, CRAN-only). No skips masking actual failures.
If fail: Skip suspicious? Temporarily remove skip_if_*() and run test to see pass or hidden failure.
--vanilla: Breaks renv activation. Never with jigsawR.-e strings: Shell escaping = Exit 5. Use script files.devtools::load_all() or devtools::document() before testing if NAMESPACE-affecting code changed.DESCRIPTION Suggests.testthat::test_file().generate-puzzle — generate puzzles to verify behavior matches testsadd-puzzle-type — new types need comprehensive test suiteswrite-testthat-tests — general patterns for writing R testsvalidate-piles-notation — test PILES parsing independently