The wheel force-includes the uncompiled docs/skill source tree and
skillproj.toml as package resources; compilation happens at install
time on the user's machine, so no repository checkout is needed.
The compiler moves to simplecadapi.skill.compiler; tools/skillbuild.py
stays as the maintainer-side wrapper over the same code.
'sca skill install' compiles into <skills-dir>/simplecadapi (location
resolved through the existing addon config/env chain, default
~/.agents/skills; no sca init required) and refuses to overwrite
without --force, which only permits replacing a directory whose
SKILL.md declares the same skill name.
Add the drawing inspection namespace and its parser, calibration, section and
independent acceptance dependencies on the current dev architecture.
Protect input BREP during material fusion and sectioning. Bind dimensions,
annotations and visual reviews to source identities and measured geometry.
Connect the workflow and generated API docs to all seven skill build targets.
Make standalone verifier tests work with the pytest console entry point.
Validation: 186 drawing, documentation, skill-target and public API tests;
16 non-render BREP query tests; compileall and skillbuild --check.
- @scad.part/@scad.assemble anchor defaults to the builder script's own
directory: cache + interface state land beside the source, standalone
scripts run anywhere, and the pyproject.toml walk-up requirement is
gone (explicit project_root still relocates the anchor)
- file_input() paths resolve relative to the anchor; in-repo examples
rewritten to script-relative declarations
- HistCAD translator emits keyword-form sketch-family calls (corpus
self-documentation), pinned by tests; booleans stay positional by
*solids signature
- both translators emit project_root=Path(__file__).parent explicitly;
examples/histcad_demo regenerated (STEP volume reconciliation held)
- FTC convention documents @scad.part parameters and the cache contract
- version stamps 2.1.2 + bilingual update notes
All sketch-family calls emitted by the translator now pass every argument
by keyword — add_point/add_line/add_circle/add_arc, constrain_* (via a
per-kind parameter-name table), and the face/wire promotions — so the
parameter meaning is legible from the corpus itself. The only exception
is the boolean *solids varargs (union/cut/intersect), which have no
parameter names to take.
Also fixes an f-string trap the keyword pass exposed: a conversion
(`!r`) applies to the whole conditional expression, silently quoting the
numeric branch of value formatting (constrain_radius value='32.4' →
solver TypeError); formatting now goes through a helper.
New corpus pin: generated sources contain no positional sketch-family
calls. Full regeneration reconciles at the same precision as before
(washer 1.6e-16, wheel 4.6e-16, rarray 0.0; pulley 5/5 sketches riveted).
Capture previously lived per emission call site (plain profiles, sweep
paths) — the taper loft sections and countersink cones built their
SketchScripts directly and silently bypassed snapshots and constraint
recovery, which is why pulley's extrude-3 carried constraints while its
two taper blocks did not.
SketchScript.render is now the one capture point: it fires the replayer
sink (block-context stamping, snapshot collection, constraint recovery)
and appends the sink's constraint lines after the entities. Every
construction site — profiles, loft/taper sections, countersink cones,
sweep paths, and pattern seeds (whose loop-expression plane header is
supported via render(header=...)) — is captured by construction; no call
site remembers anything. emit_profile_sketch reverts to pure formatting
(sink forwarded, snapshot return removed).
Pulley now reports 5/5 sketches riveted (taper sections included) and
wheel 2 sketches (pattern seed captured; the 63-point outline still
degrades to timeout). New tests pin the invariant: the pulley taper
blocks carry section constraints, and a SketchScript sink fires exactly
once per render. Real pulley trace baked as a fixture.
Adds the auto-constraint discovery and extraction layer discussed for the
CadQuery pipeline, as a source-agnostic capability:
- every translation now writes <stem>.sketches.json: per-block planar
sketch snapshots (plane frame + typed entities in local coordinates +
closedness) — the schema-facing interface any front-end can emit.
- cqftc/constraints.py implements the recovery axioms: candidates are only
snapshot-entailed relations (P2); admission is the production SolveSpace
solver's DOF drop with redundancy-introducing candidates rejected — the
DOF counter alone is fooled by rank-deficient systems (P3); a riveted set
must also pass the perturbation basin test, a jittered rebuild converging
back onto the snapshot (P1); measured values emit verbatim (P4); ids
carry the inf<N>_<Kind> provenance prefix (P5).
- candidates run in an intent-typicality ladder (anchor, H/V, parallel/
perpendicular, tangency/equal/concentric, lengths/radii, orientation,
adjacent angles, half-grid distances) under per-tier and global solve
budgets; sketches above 24 entities recover in a subprocess worker with a
wall-clock escape hatch because SolveSpace's redundancy analysis can
explode combinatorially on large freeform outlines.
- cadquery_to_ftc.py --constraints on emits the recovered sets inline
between sketch entities and promotion; results graded riveted/partial/
timeout in the meta sidecar; --constraints off output is byte-identical
to before.
- fixtures: hexagon/washer/revolve-ring/slot sketches rivet with canonical
human-shaped sets (e.g. hexagon = fix + 2H + 2 parallel + 3 equal-length
+ length + signed dx + 60 deg) and constrained builds still reconcile at
machine precision; the 63-point wheel outline honestly degrades to
timeout. 22 tests, ty clean.
Sign-convention traps fixed along the way: distance_x value is signed
(b - a); emitting abs() pulled a rank-complete hexagon onto a mirrored
branch (caught by the coords-reconciliation gate).
Port the runtime-tracer half of PR #30 (feat/cadquery_converter) and rewrite
its emission layer to the current Feature Tree Convention, following the
tools/research/histjson four-stage pattern (trace / translate / validate /
profile + responsibility wall: the translator only translates).
- tracer/ (instrument, fingerprint, cq_runner, worker) ported near-verbatim:
runs under .venv-cq (Python 3.11 + cadquery 2.8); records resolved plane
frames, serialized args, selector strings, and geometric fingerprints of
actually-selected faces/edges plus ground-truth volume/bbox per program.
- emission rewritten for FTC: block headers with closed role vocabulary and
no positional slugs; transcribed planar profiles authored through the
sketch API (local coords, pooled points, three-point arcs via
circumcenter) annotated profile=geometry; booleans in list form over a
histjson-shaped bodies dataflow; fillet/chamfer/shell selections
synthesized as QL predicate bands from trace fingerprints with
take/exactly cardinality; through-cut depths derived from the trace
bbox; zero in-source verification; literal numbers only.
- unknown ops become untranslated notes, never silent drops; static-AST
path and exploratory scoring/edit-bench from the PR intentionally not
ported.
- directory named cadqueryftc so it can never shadow `import cadquery`.
- fixtures are real traces captured with cadquery 2.8; 13 tests pin format
contracts + volume reconciliation (all four reconcile at <=2.2e-12 rel
err) with no cadquery required in CI; full test/ suite 1516 passed.
Covers the five user questions in reading order: how to translate (single
case / batch / demos), what the output is (annotated FTC anatomy, tier
annotation semantics, constraint_id channel), coverage (structure 100% ops,
geometry channel 85.0%/76.7% pass, constraint channel 90.3%/93.0% solvable
on the standard 100-case samples), why things fail (four-way taxonomy:
unmapped forms / dataset-side constraint errors / build-level union
contract / known dataset artifacts), and how to find the non-translatable
entries (conflicts analyzer cross-tables + dump-uid, validate reports,
in-source notes, profiler). Numbers reproduce with the pinned
count/stride commands at the end.
Per user ruling: the translator unconditionally translates what the dataset
carries (constraints included, --constraints on|off, default on). The auto
mode, in-process preflight, drift gate and sidecar conflict report are gone
from the translator — auditing now lives entirely in histcad_conflicts.py,
which renders each feature's translated prefix with the same StepEmitter
and classifies the solve itself (solved / drifted >1e-3 / conflicting /
exec_error) on top of the residual + dof + halfSpace analysis.
histcad_validate.py is build + STEP volume reconciliation only.
Generated sources are unchanged in shape (single path, constraint_id tags,
pure FTC blocks); demos regenerated with full constraint sets and still
reconcile to STEP at machine precision. Purity tests updated to pin the
sharper contract: unconditional constraint translation, pooled-coincident
elision, and that the translator module never imports the SDK.
Generated sources carry the model only: the dual-path constraint fallback,
SKETCH_CONFLICTS/SKETCH_TIER_FALLBACKS audit globals and strict=False
inspection are gone from translated code. Tier decisions and conflict
auditing moved to translation time: auto mode solves each feature's
constrained sketch prefix in-process (preflight), emits sketch tier when it
solves AND reproduces the transcribed coordinates (max point move <= 1e-3,
the drift gate), otherwise transcribed geometry; diagnostics go to the
sidecar report (<case>.ftc.py.report.json).
Root causes found by the new histcad_conflicts.py residual analyzer and
fixed in the translator:
- point-pair H/V distances are directed: sign now taken from coordinates
(the stored length is a magnitude) — was the top Fusion conflict source
- Tangent on arcs needs an endpoint selector: picked as the nearest shared
junction with the other curve
- MajorRadius/MinorRadius store full axis lengths: halved to semi-axes
(solver was stretching ellipses 2x)
- Horizontal/Vertical flat line lists map each line individually
- variadic Equal chains get per-pair constraint ids (duplicate-id crash)
- Coincident entries whose refs pooled onto the same point are elided:
degenerate point-coincident equations made the solver Jacobian singular
and showed exact-geometry sketches as conflicting
SDK: constrain_concentric_rsketch now accepts ellipse targets (backend
resolves the ellipse center point).
Validation (100-case samples, constraints=auto): Fusion360 72 pass,
sketch-tier retention 77.5% (conflicts: 19 diverged + 1 conflicting);
DeepCAD 83 pass, retention 85.0% (9 diverged, 0 solver-conflicting).
Demos regenerated, volumes reconcile to STEP. Purity pinned by
test/test_histcad_translation_output.py (9 tests). Full suite 1489 passed.
The translator now emits native sketch constraints (auto mode): every
HistCAD entry maps to a constrain_* call tagged with its source identity
(constraint_id='h7_Distance'), variadic chains decompose with suffixed
ids, and value_exprs evaluate through a unit-aware expression parser
(mm/in/cm/m/ft/yd plus arithmetic and mixed-unit sums like
'61.5 in + 8ft').
Stability comes from an honest dual path per feature: entities bind to
s_geo, constraints derive s, promotion tries the constrained sketch and
falls back to the geometry prefix when the solver reports conflict. The
except branch re-inspects with strict=False and records WHICH constraint
entries failed into SKETCH_CONFLICTS — the pipeline doubles as a dataset
constraint-quality auditor (rounded coordinates vs over-determined
systems are the observed conflict source).
Sampled auto-mode results (volume still machine-exact on passes):
- DeepCAD 100: 83 pass, sketch-tier retention 92.1% (conflicts:
Length 7, Distance 6, Diameter 2, Equal 1)
- Fusion360 100: 67 pass, retention 66.2% (Distance dominates with 49 —
its halfSpace signed-offset dialect needs side semantics work)
Demo regenerated with 28 constraint calls, volume unchanged at 349.4558.
histcad_to_ftc.py: one FTC feature block per HistCAD step — plane mapping
from Euler+translation (convention Rx@Ry@Rz, calibrated exactly against
packaged STEP on mixed-angle samples), coordinate-pooled sketch entities
(arc endpoints ordered so the CCW promotion sweep passes through the
HistCAD middle point, nurbs knot compression, three-point ellipses),
containment-based outer/hole nesting with island support, per-mode
booleans, and an honest multi-body policy (disjoint NewBody/Join bodies
stay separate; BODIES exported for the harness).
histcad_validate.py: strided-sample executor comparing total solid
volume against the packaged STEP ground truth (1e-3 relative tolerance).
Streams HistCAD sequence tarballs and aggregates the feature/entity/
constraint vocabulary, sizing FTC translation coverage gaps with counts.
Scan outputs land in gitignored tools/research/out/.
Add references/workflows/engineering-drawing.md (preliminary staged
workflow: preconditions -> declare views -> declare datums/dims -> solve
and audit -> render and visual review) and references/domains/
engineering-drawing.md (capability boundary, R1-R7 solver contract, API
groups, known engine limits, failure modes). Route the new goal in
SKILL.md.
Backfill docstrings for the dxf_engine public surface (declaration
dataclasses, SheetPlan, render_plan) so auto_docs_gen can produce their
API pages under references/docs/api/ with an Engineering Drawings index
section, following the inspect/brep sub-namespace pattern.
- operators/: _support + geometry/features/boolean/transform/selection/sketch/product
- product/: semantic value model, solver, occurrence, packages, capture
- topology/: model, tagging, tracking, autotag (package re-exports model symbols)
- params/: units, expr, tolerance, frame
- recording/: graph, serializer, source_mapping
- _internal/: canonical_json, vendor_warning_filters, semantic, mesh, brep_region
Root shrinks from 46 to 7 modules. Drop the legacy geometry/boolean/transform/
selection monolith copies and the operations.py facade; unified operator
exports now live in operators/__init__ with monkeypatch mirroring preserved.
Remove the legacy evolve generators and their example/tests/docs. Import paths
for simplecadapi.topology keep working via package re-export; update all
in-repo consumers, tests, tools/auto_docs_gen source tables, and regenerate
the skill API reference docs.
* feat(skill): replace skill-pack with per-harness conditional compiler
skillbuild compiles the skill tree into per-target harness builds:
- <!-- skill:if omp,!claude --> blocks include text only for matching
targets; name-list conditions only, no else/nesting, fail-loud on
unknown targets and unpaired/nested directives
- fence-aware: directive-looking lines inside code fences are literal
- layout is the filesystem; tree root configured in skillproj.toml
- post-build assertion: zero directive residue, SKILL.md frontmatter
name check
Migration to the new model:
- docs/skill/ becomes the self-contained source root (SKILL.md,
references/, generated api/stdlib/core/guides now under
references/docs/; SDK_OVERVIEW/LICENSE/inspect are ordinary tree
files)
- auto_docs_gen output redirected into the tree (docs/api ->
docs/skill/references/docs/api, likewise stdlib)
- skills/simplecadapi/ is now the compiled omp target output;
dist/generic/simplecadapi the generic target
- dropped skill-pack entry point (plus dangling evolve/make-export
entries and their orphaned test), release workflow builds via
skillbuild + tar; README updated
First real conditional block: harness reading paths in SKILL.md
(skill:// mount on omp vs disk-relative on generic).
Verified: 59 tests pass (skillbuild 31, auto_docs_gen 19, persistence
regression 9); both targets build; outputs residue-clean; full suite
collects (1376 tests).
* refactor(tools): auto_docs_gen moves out of the installed package
tools/ scripts are repo-checkout dev scripts, not packaged CLIs:
- auto_docs_gen.py now lives in tools/ beside the other generators;
auto_tools/ package removed entirely
- path resolution simplifies: repo root = parent of tools/, fail-loud
if pyproject.toml missing; site-packages/cwd fallback branches were
dead code once the script stopped shipping in the wheel
- auto-docs-gen console script dropped from [project.scripts];
release.yml and README invoke python tools/auto_docs_gen.py
- MANIFEST.in stale src/auto_tools include removed; CadQuery-free
runtime scan no longer needs the auto_tools filter
- run_examples.py retired (user removal): README example-runner text
updated to direct examples/ scripts; dangling runner-contract test
(runpy.run_path into the deleted script) removed
Verified: 53 tests pass (auto_docs_gen + skill_build + ocp runtime
scan) and test_example_model_contract passes; regeneration from
tools/ is byte-identical (zero docs drift).
* refactor(skill): strip harness and build-tool content from the skill tree
The skill is plain harness-neutral content again:
- SKILL.md 'Reading skill files' section removed (the omp skill://
mount block and its !omp complement were the only conditional
blocks; the tree compiles identically for every target now)
- references/README.md: build-tool meta removed ('per-harness
conditional compilation', skillbuild packaging/validation claims —
link validation was never implemented, so the claim was false)
- live test now asserts the tree stays harness-neutral (zero blocks)
- skillproj.toml targets aligned with the user's output table
(omp -> skills/simplecadapi-omp, opencode -> skills/simplecadapi-opencode;
leftover 'generic' entry had no output and failed the build)
- compiled outputs are regenerable artifacts: skills/simplecadapi/
untracked from git, skills/simplecadapi-*/ gitignored, release.yml
and README build via skillbuild and tar the omp output directly
(bsdtar has no --transform; inner dir keeps its suffixed name)
Verified: 49 tests pass; both targets build 372 files with zero
conditional blocks; no omp/conditional/directive residue in the tree
or outputs.
* chore(docs): drop stale architecture review and design notes