Change C: new primitives + curated examples - #25
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…s 14-17) Four new grid-cell primitives derived from samples/new 4/, appended to PRIMITIVE_REGISTRY. Each is a pure straight-line path builder mapped through transformPathSegment, emitting no SVG transform=. Pinned-index tests and per-primitive geometry/rotation/invert tests added; render.test unknown-type probe bumped 14 -> 18. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diamond Lattice, Cube Corner, Ribbon Rows, Bar Plaid, Faceted Bloom, Gabled Diamond — each exercises a new primitive; all decode, round-trip and render (test/library/index.test.ts). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Adds four grid-cell primitives derived from
samples/new 4/, appended toPRIMITIVE_REGISTRYat indices 14–17:diamond(14) — square on its point, vertices at the edge midpoints (sample 1; centre of sample 5).parallelogram(15) — full-height quad, top edge sheared right bycellSize/2; invert → backslash slant (samples 3–4).bar(16) — centred axis-aligned band, full width, half-cell thick; the axis-aligned sibling ofdiagonal-band(sample 2).gable(17) — triangle, base on one edge, apex at the opposite edge midpoint; straight sibling ofcap, two form adiamond.Each primitive: one pure
(cellSize, rotation, invert) => PathSegment[]builder, straight-line segments only, no SVGtransform=, coordinates mapped throughtransformPathSegment. Registry +primitives/index.tsare append-only; pinned-index tests added for all four, and the "exactly N registered primitives" assertion bumped to eighteen.render.testunknown-type probe moved 14 → 18.Also:
src/library/catalog.json(Diamond Lattice, Cube Corner, Ribbon Rows, Bar Plaid, Faceted Bloom, Gabled Diamond) — each exercises a new primitive; all decode, round-trip and render (test/library/index.test.ts).docs/architecture.mdanddocs/primitive-survey.mdupdated.docs/superpowers/specs/2026-09-07-bitshaper-new-primitives-design.md; plan:docs/superpowers/plans/2026-09-07-bitshaper-new-primitives.md.Verification
npm test— 427 passingnpx biome check .— cleannpm run build— okDoes not touch
web/. Please review — not merging.🤖 Generated with Claude Code