* 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
6.2 KiB
SimpleCADAPI 2.0.4b2 Update Notes
Beta release notice: These changes are being validated before the final 2.0.4 release. Review reconstructed geometry and generated CAD documents before using them in production.
SimpleCADAPI 2.0.4b2 adds an Agent-oriented STEP/BREP reconstruction workflow. The release turns the existing inspection and strict-comparison utilities into a focused, framework-neutral tool surface for iterative reconstruction. It also adds replayable interpolated B-spline profiles for freeform and periodic input.
1. Indexed STEP/BREP Inspection
simplecadapi.inverse_engineer.brep now builds a bounded, cached BRepModel
for each STEP input. Bodies, Faces, Edges, and Vertices receive deterministic
zero-based identifiers such as body:0, face:12, and edge:4, allowing an
Agent to carry local topology references across inspection calls.
The model summary reports validity, material-body counts, bounds, volume, surface area, centroid, topology counts, and analytic surface/curve statistics. Optional bounded groups expose repeated carrier parameters, canonical axes, and adjacency signatures as evidence for a hypothesis; these groups do not infer a pattern by themselves.
Entity inspection reports geometry parameters, bounds, adjacency, endpoint differentials, and optional exact B-spline or Bezier definitions. Surface definitions remain explicitly separated from trim-loop evidence so an untrimmed carrier cannot be mistaken for a complete Face.
2. Framework-Neutral Agent Tools
The new agent_tool_schemas() registry exposes 17 JSON-Schema-validated tools,
and call_agent_tool(...) dispatches them without depending on a particular
Agent framework:
get_model_summary inspect_entity
get_topology_neighborhood measure_relation
make_section extract_face_boundaries
probe_point render_region
compare_global_properties compare_boundary_distance
compute_material_difference compare_sections
build_difference_regions find_nearby_entities
compare_entities evaluate_result
compare_brep_strict
The simplecad-brep tools command prints the schemas. simplecad-brep tool
invokes one tool with an inline JSON object or an --arguments-file, so the same
contract is available to shell-driven Agents and external orchestrators.
3. Targeted Diagnosis and Acceptance Gates
Local query tools can expand a bounded topology neighborhood, measure supported parallel/coplanar/coaxial/concentric/perpendicular/touching/tangent relations, cut physical sections, extract ordered Face loops, and find the nearest indexed entities to a point. Compact section and boundary modes preserve structural evidence while omitting large sampled arrays.
Candidate diagnostics now include:
- global body, bounds, volume, area, centroid, and topology deltas;
- bidirectional sampled-boundary-to-exact-boundary distances;
- strict missing/excess material components from directional Boolean cuts;
- target/candidate section comparison on the same physical plane;
- ranked material or boundary difference regions and nearby entity lookup;
- local entity parameter and adjacency comparison.
evaluate_result(...) applies replay, BREP validity, material, bounds, volume,
area, and boundary gates in one report. Strict geometry-labelled incidence
comparison remains opt-in. Fuzzy Boolean results are diagnostic only and cannot
claim strict material equality.
4. Region Rendering Without Geometry Side Effects
render_region(...) renders selected stable entities and an optional topology
neighborhood over a translucent context model. Existing full-model
render_step_views(...) output remains available for synchronized isometric and
orthographic inspection.
Rendering now meshes a detached BREP copy. OpenCascade triangulation therefore cannot alter the cached model's measured bounds or influence a later Agent evaluation in the same process.
5. Replayable Interpolated B-Splines
The public modeling API adds:
make_interpolated_spline_redge(...)
make_interpolated_spline_rwire(...)
make_periodic_spline_rwire(...)
Open and periodic curves interpolate their input points through the OCP kernel, validate minimum point counts and duplicate-point tolerances, and retain their construction data in graph metadata. Canonical model JSON records and strictly replays interpolated edges, including expression-valued points. Periodic profiles can be promoted into replayable Faces and Loft workflows.
6. Reconstruction Agent Workflow
The new reconstruction specification defines three explicit operating modes:
- inspection-only reconstruction restricts access to exact control arrays;
- report-assisted reconstruction permits targeted exact curve/surface data;
- exact BREP transcription permits complete carrier, trim, and topology evidence while requiring the result to be labelled as transcription.
The workflow requires isolated inputs and outputs, a written feature hypothesis, Sketch-first planar profiles unless a documented exception applies, fresh-process model replay, valid BREP output, and measured final classification. Expensive Boolean, dense boundary, and strict-topology checks are delayed until cheaper evidence shows that a candidate is close enough to justify them.
7. Verification
Regression coverage includes stable entity identifiers, bounded schemas, compact sections and boundary definitions, cross-model relation semantics, material-difference strictness, difference-region reuse, evaluation gates, region-rendering side effects, interpolated-curve replay, expression retention, and periodic-profile Loft replay.
A real STEP round trip was also exercised with a replayable drilled solid. The target and replayed STEP passed strict material, boundary, validity, and geometry-labelled incidence gates after both full-model and highlighted-region rendering.