بنقرة واحدة
bit-refactor
Assess-patch-evaluate loop for refactoring the Boardgame Insert Toolkit OpenSCAD library
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Assess-patch-evaluate loop for refactoring the Boardgame Insert Toolkit OpenSCAD library
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | bit-refactor |
| description | Assess-patch-evaluate loop for refactoring the Boardgame Insert Toolkit OpenSCAD library |
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) |