- @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
The hand-written guide at references/docs/guides/ql-selection-playbook.md
sat inside the generated-docs mirror directory under a title identical to
the verified playbook, so agents entering via SKILL.md saw only the older
unpinned copy. Merge its unique content (selection loop, predicate
vocabulary, shared-boundary failure signatures, bore->rim chamfer and
face->datum recipes, lineage routes, facts printing) into
references/ql-playbook.md and retire the guide.
Recipe snippets were re-executed against dev @ 94e3e3e (11/11) before
merging; two session-path corrections came out of that run and are now
documented in Ground rule 2: apply_tag_rselection targets must be a
resolved list, and tags must land before the next operation consumes the
shape.
Codify the FTC coding standard as references/discipline/
feature-tree-convention.md:
- the block paradigm sketch -> basic body op -> bool -> modifier as
explicit dataflow (body = op(body, tools)), one application call
per block, no accumulator state
- mandatory boundary comments '# ---- feature: <slug> (<role>) ----'
with closed role vocabulary (build|add|subtract|intersect|modify|
pattern|annotate) and tier annotations profile=/path=; slugs are
stable identities, never sequence numbers
- tier rules: closed planar profiles and planar sweep paths are sketch
API only (tangency is a constraint, not hand-computed coordinates;
open-chain promotion is legal, closedness is a consumer contract);
geometry tier is restricted to non-planar 3D curves, transcribed
geometry with unknown constraints, and tool bodies whose shape is
completely contained in a primitive form — primitives are never a
shortcut for a profiled feature
- modify blocks select via QL predicates + exactly(n) cardinality;
parameter guards stay in source, geometric verification stays
external; block ordering defers to feature-ordering.md
Wire it as required reading into every workflow on this branch (all
six): single-part (standing discipline + Role 4 reading), sketch-
feature (required_domains + build step), assembly-product (per-part
authoring step), step-reconstruction (build step, geometry-tier
honesty), standard-part-assembly (custom parts step), export-and-
translation (source edits while making a package current). SKILL.md
global rule 3 points at the convention for part-source form. Mirrors
rebuilt via tools/skillbuild.py.
Plural topology getters (get_edges/get_faces/get_wires/get_vertices/
get_solids/get_inner_wires/get_edge_occurrences and the Compound
variants) now accept ONLY an index. The no-argument list form raises a
SimpleCADError with migration guidance (enumerate via
ql.<kind>().resolve(shape), pick via get_X(index)). This closes the
selection channel that escapes the graph: Python loops over bare lists
lose the predicate, capture kernel artifacts (the periodic-face seam
edges that broke FCStd translation), and leave no cardinality contract.
- each shape class keeps its enumeration logic as private _iter_<kind>();
indexed picks record geo-select nodes as before (contract test added);
Compound getters gain the same indexed recording they lacked
- _TopologySelectionList (the __getitem__ recording vehicle, which also
made get_X()[i] a silent escape hatch) is retired
- all 109 internal call sites, 165 test call sites, and 31 example call
sites migrated: SDK/tests use the private channel, user-facing
examples use ql.<kind>().resolve(...)
- QL _resolve_scope_items switches to the private channel; scene
contract profile descriptions synced; error strings recommending
bracket indexing rewritten
- skill docs: strict prohibition added to SKILL.md global rules (new
rule 6), core README contract statement rewritten, solid/wire/face/
shell/tagged_mixin pages re-exemplified with QL, geometric-validation
anti-pattern section updated; mirrors rebuilt via tools/skillbuild.py
Gates: full suite 1418 passed / 5 skipped; translator suites 133 passed;
u_link stage verifiers + render check ALL PASS; scadpkg->FCStd
retranslation verified (5 visible deliverables, 167-object editable
tree).
Dedicated topic page for QL selection, every snippet executed against
the SDK before landing:
- the selection loop: probe -> card -> read -> exactly(n)
- predicate vocabulary (geometry / naming / lineage) with the two
verified gotchas: coordinates take ranges (float noise), one property
is never enough after booleans or blends
- root-blend recipe via shared_boundary with a failure-signature table:
tangency (axis-to-wall distance == radius) splits the card into two
arcs and crashes TopOpeBRepDS at any radius; overhang yields half/extra
arcs and aborts; generalize by comparing card shape with the imagined
intersection curve and hunting the singular point
- tagged-bore chamfer recipe absorbing incident_to seam edges,
scope-scoped apply_tag_rselection ownership, single-GraphSession
- face -> sketch datum plane derivation (make_sketch_rsketch takes a
plane mapping, never a Face) plus largest-face ordering pattern
- lineage routes: generated_faces_tag vs output_role (kernel-proven
generated) vs op() touched-set superset
Wired from the edge-selection defaults in geometric-validation.md and
the SKILL.md references list; no new routing targets.
skillbuild: omp/opencode now ship 373 files each.
Rewrite SKILL.md in the routed-authority register (mandatory numbered
load order, hard rules, routing-discipline table): deterministic route
selection, forbidden route-choice menus, one pre-scripted discriminator
question for ambiguous requests, authority precedence, and an
execution-discipline section that binds every gate to a named artifact.
Apply S1-S8 from design-docs/skill-solution.md plus five deeper
patterns from session-audit-01a02469 evidence:
- S1 Ask-or-Record gate + mounting/load brief fields; S6 companion line
- S2 selection-evidence gate before fillet/chamfer (card + cardinality
assertion + highlight render), anti-patterns named
- S3 edge-selection defaults: shared_boundary first, index getters only
for intentional picks; wired into the workflow step
- S4 check-definition protocol (posture vs path, verification vs design
geometry, feedback-to-predicate)
- S5 fastener envelopes precede geometry as brief inputs
- S6 visual acceptance minimum replaces 'Visual plausibility'
- S7 reading-an-API-page contract + external-dependency boundary
- S8 a run analysis ends in a verdict
Deeper audit patterns folded in: acceptance set before geometry,
own-the-methods/ask-the-requirements split, assumptions as brief fields
with derivation tracking, enumeration-is-not-repair, and
discriminating-evidence selection.
* 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