docs/archive/opencode/skills/bit-refactor/SKILL.md
Assess-patch-evaluate loop for refactoring the Boardgame Insert Toolkit OpenSCAD library
npx skillsauth add dppdppd/the-boardgame-insert-toolkit bit-refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Define the full assess-patch-evaluate work loop for making changes to boardgame_insert_toolkit_lib.3.scad. This skill is loaded at the start of every refactor session and governs the methodology.
Load this skill when:
Every change to the library follows this exact loop. No shortcuts.
ASSESS -> PATCH -> EVALUATE -> UPDATE DOCS -> repeat
Invoke the bit-assessor agent. It will:
CLEANUP_PLAN.md to find the next pending taskThe assessor does NOT make changes. It only produces the spec.
Invoke the bit-patcher agent with the patch spec from step 1. It will:
render_eval.shrun_tests.sh --csg-only)The patcher makes ONE logical change. Never batches multiple tasks.
Invoke the bit-evaluator agent. It will:
If FAIL: the patcher is re-invoked to fix the issue. The evaluator re-runs. If PASS: proceed to step 4.
After every successful change, update ALL of these:
CLEANUP_PLAN.md: Mark task done, update line numbers, add discoveriesAGENTS.md: If the change affects architecture, parameters, or module layoutThis step is NOT optional. A stale plan is worse than no plan.
Create a git commit with:
refactor: <what> or fix: <what> or cleanup: <what>Then return to Step 1 for the next task.
| Path | Purpose |
|------|---------|
| boardgame_insert_toolkit_lib.3.scad | The library (THE target) |
| bit_functions_lib.3.scad | Helper functions library |
| CLEANUP_PLAN.md | Phased refactor plan with task status |
| AGENTS.md | Project reference, architecture, render commands |
| tests/run_tests.sh | Full test runner (CSG + STL + 7-view PNG) |
| tests/render_eval.sh | Targeted evaluation tool |
| tests/test_*.scad | 53+ test files |
| tests/renders/ | Generated PNGs |
| tests/renders/eval/ | Ad-hoc evaluation renders |
# Fast compile check (all tests, ~15s)
./tests/run_tests.sh --csg-only
# Single test with all 7 views
./tests/run_tests.sh test_box_minimal
# Targeted evaluation with before/after naming
./tests/render_eval.sh tests/test_box_minimal.scad --views iso,top --name before
./tests/render_eval.sh tests/test_box_minimal.scad --views iso,top --name after
# Cross-section for internal geometry
./tests/render_eval.sh tests/test_box_minimal.scad --cross-section z,7
# Inline test (no file needed)
./tests/render_eval.sh --inline 'include <boardgame_insert_toolkit_lib.3.scad>;
data=[["t",[[BOX_SIZE_XYZ,[50,50,20]],
[BOX_COMPONENT,[[CMP_COMPARTMENT_SIZE_XYZ,[46,46,18]]]]]]];
MakeAll();'
| Change Type | Expected Outcome | Views to Check | |------------|-----------------|----------------| | Dead code removal | Identical geometry | iso (any test) | | Extract to file scope | Identical geometry | iso, top (pattern/label tests) | | Parameterize module | Identical geometry | iso, front (relevant feature tests) | | Bug fix | Specific change only | views showing the bug | | Magic number rename | Identical geometry | iso (any test) | | Consolidate duplicates | Identical geometry | iso, top (tests using both variants) |
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.