From ad3ee0585734ff98f5f160dc961af644c5c3864d Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Mon, 2 Nov 2026 02:22:11 -0500 Subject: [PATCH] Agents: model decisions use exact geometry; a mesh is for display, export, previews and mesh bodies Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- AGENTS.md | 1 + skills/solidcraft-performance/SKILL.md | 1 + 2 files changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 0f8ea99e1..c92cf5ced 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,6 +10,7 @@ Work: ROADMAP.md, "Where help is wanted most" in CONTRIBUTING.md, issues labelle - No GPL/LGPL/AGPL code, not even reading it (OpenCASCADE, FreeCAD, SolveSpace, CadQuery, LibreCAD, QCAD): `cargo xtask licences --check`. - Every asset is original or openly licensed with a row in ATTRIBUTION.md; read `assets/AGENTS.md` before icon work: `cargo xtask assets`, `cargo xtask icons`. - Never crash: no unwrap/expect/panic/unsafe in non-test code (unsafe allowlist in crash-safety), errors are `Result`, input is hostile: clippy `-D warnings`, `hostile_params_never_panic`. +- Model decisions (what an operation does, which bodies it touches, which face or edge a point or name means, depths, nearness) use exact geometry; a mesh is for display, export, previews and mesh bodies: `skills/solidcraft-performance/SKILL.md`. - Everything is a command and programmatic calls never open dialogs: `skills/solidcraft-commands/SKILL.md`. - Layering (geom, sketch/kernel/render, doc, io, engine, ui-egui, apps); only `crates/kernel` uses truck: `cargo xtask layers`. - One outer UI container, one camera path (`navigation::handle`), colours from theme tokens: `cargo xtask ui-containers`. diff --git a/skills/solidcraft-performance/SKILL.md b/skills/solidcraft-performance/SKILL.md index b6adae42f..742208da7 100644 --- a/skills/solidcraft-performance/SKILL.md +++ b/skills/solidcraft-performance/SKILL.md @@ -14,6 +14,7 @@ description: "Use when a SolidCraft change is slow, blocks the window, runs long ## Measure before you claim a speed-up - Profile first. Time with `solidcraft-cli` from `main` and from your branch, alternating runs, after the load is low. On a shared machine check `cut -d' ' -f1 /proc/loadavg` and wait while it is over 24; build with `nice`. - Report medians with the range, the machine, and the cases. The pattern to follow is `docs/perf.md`: what was slow, why, the result, and proof that nothing changed (same bodies, volumes, areas and triangle counts). +- A speed-up never skips work on a mesh's box: decide with the exact bounds (`Body::exact_bounds`, grown by the record's tolerance as `apart` in `crates/kernel/src/ops.rs` does). A mesh is for display, export, previews and mesh bodies. - Do not rewrite kernel code for speed: the kernel is being replaced, and kernel work is paused. Report a slow case with its file under the `kernel-perf` label (CONTRIBUTING.md, "Where help is wanted most"). - Pull requests run only the tests for what they touch; geometry-heavy tests run in the merge queue. Use `cargo xtask test` with the `ci` profile locally (`skills/solidcraft-tests/SKILL.md`).