feat(v0.2-finish): faceLabels API + FaceQuery polish + retroactive demos#64
Merged
feat(v0.2-finish): faceLabels API + FaceQuery polish + retroactive demos#64
Conversation
…tolerance comment
…sweep/loft Adds `faceLabels` to the six creating ops (box, cylinder, extrudeRect, extrudeCircle, extrudePolygon, extrudeRoundedRect, revolveRect via api.ts; Sketch.extrude, Sketch.revolve, Sketch.sweep, Sketch.loft via sketch.ts). Sphere rejects faceLabels with feature.label.unsupported-on-shape. Validation helper validateFaceLabels lives in src/capture/faceLabels.ts to avoid a circular dep (captureSession.ts ↔ sketch.ts). captureSession.ts re-exports it. Errors: capture.faceLabels.invalid-shape / invalid-key / invalid-value. FaceQuery values pass through unvalidated to resolution time. 22 unit tests (4 pre-existing + 18 new) in captureSession.test.ts.
…ketch fallback
Adds findFaceLabelInMetadata + resolveFromMetadataHit helpers to edgeSelection.ts.
Both pickEdges (fillet/chamfer) and resolveLabeledFace (shell/pickFace) now check
upstream feature.metadata.faceLabels before falling through to the sketch-segment
path, enabling box(..., { faceLabels: { lid: 'top' } }).fillet({ face: 'lid' }).
New diagnostic codes feature.label.collision and feature.label.query-no-match added
to HINTS and SKILL.md; seven integration tests (A–G) cover the new path.
Extend listApi.ts GLOBALS signatures and descriptions for all seven accepting primitives (box, cylinder, extrudeRect, extrudeCircle, extrudePolygon, extrudeRoundedRect, revolveRect) to advertise opts.faceLabels. Add FeatureKindFaceLabels to ListApiOutput returned by list_api, listing accepting kinds and the canonical-name/FaceQuery value schema. Update add_feature and list_api tool descriptions in server.ts. Sphere explicitly excluded. Tests added to listApi.test.ts; all 115 tests pass, typecheck clean.
Add faceLabels? to per-op signatures for box, cylinder, extrudeRect, extrudeCircle, extrudePolygon, extrudeRoundedRect, and revolveRect; insert Labels subsection after Face refs through operations with canonical-alias and query-based examples, lineage rules, sphere caveat, and list_face_labels reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes workstream #1 (v0.2 finish) per
docs/superpowers/specs/2026-05-04-v0.2-finish-design.md. Cuts the v0.2 chapter complete: tracked face/edge refs already on develop (PR #53) + new `faceLabels` API for user-named refs at creating ops + minor `FaceQuery` polish + retroactive demo set under `docs/demos/v0.2/`. No npm publish.What ships
Headline kernel work
Agent-facing surface
Quality + demo
Discipline notes
Stats
Test plan