3.0 KiB
name, description
| name | description |
|---|---|
| align-linuxcnc | Use this skill for this CNC Web/WASM simulator whenever evaluating progress or changing LinuxCNC G-code behavior, RS274 source integration, kinematics, M428/M429/M430 remaps, tool data, modal state, parameters, tests, fixtures, build scripts, or bridge code. |
Align LinuxCNC
Mission
Advance the simulator only by aligning it with LinuxCNC source behavior. The project goal is a LinuxCNC-source-backed Web/WASM CNC simulator, not a from-scratch compatible interpreter.
Hard Constraints
- Port-first: prefer direct LinuxCNC source porting, trimming, wrapping, or platform adaptation over project-authored replacements.
- Do not write independent functional CNC behavior.
- Do not use intuition or documentation as the final behavioral source.
- Before any functional change, locate LinuxCNC source in
../linuxcnc/srcor../linuxcnc/configs. - Allowed code: LinuxCNC source port/wrap/trim/adaptation, platform shims, thin wasm/API/event bridges, generated fixtures, tests, build scripts, docs.
- Temporary smoke paths may be tested, but should shrink over time.
- Browser-side WASM filesystem access must use OPFS-backed storage.
Work Directory
cd /home/cnc/桌面/cnc/wasm-simulator
git status --short
Related roots:
- Project root:
/home/cnc/桌面/cnc - LinuxCNC source:
/home/cnc/桌面/cnc/linuxcncor$LINUXCNC_ROOT - LinuxCNC unit tests:
/home/cnc/桌面/cnc/linuxcnc/unit_tests
Required Checks
For code or generated fixture changes, run:
./test-native.sh
./test-linuxcnc-source-link.sh
For switchkins/remap table changes, also run:
./check-linuxcnc-switchkins-remap-table.sh linuxcnc-kinematics-source-files.txt
Fast Loop
- Pick one tiny gap.
- Find the LinuxCNC source/config/remap.
- Add or update a source-backed test/fixture.
- Implement only bridge/shim/wrapper/generator changes.
- Run required tests.
- Report percent complete, source basis, changed files, and tests.
Source Pointers
- RS274:
../linuxcnc/src/emc/rs274ngc/ - Kinematics:
../linuxcnc/src/emc/kinematics/ - Tooldata:
../linuxcnc/src/emc/tooldata/ - Canon:
../linuxcnc/src/emc/nml_intf/canon.hh - Sim remaps/configs:
../linuxcnc/configs/sim/
Useful project docs:
docs/linuxcnc-source-policy.mddocs/linuxcnc-porting.mddocs/linuxcnc-rs274-source-map.mdlinuxcnc-rs274-source-files.txtlinuxcnc-rs274-wasm-source-files.txtlinuxcnc-kinematics-source-files.txt
Current Baseline
Completion estimate: about 72%.
Strong areas: source manifests, native/source-linked RS274 runners, broad G-code regression corpus, generated M428/M429/M430 switchkins remap fixtures, Node/browser WASM smoke coverage.
Main remaining risks: smoke parser removal, Python/Boost.Python remap replacement, dynamic loading shims, tooldata/HAL/filesystem assumptions, continued source-backed expansion of kinematics/RTCP coverage, and real browser verification that WASM file reads/writes persist through OPFS.