Commit 7c7311b15b

7c7311b15b03fe8bcd445f044f4d81ac5efc5420

parent: 5e0fe5ad34

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-20 03:48 UTC

Plan and spec: batch D rulings and the cup's layer count

Record per-step readStep, cycle-only loop solving, rejecting clockwise
patterns, the coincident-axis guard, the faceOrders output form, the pop
record defaults and popMalformed, which layer opens, the popped starting
guess, layerMotionDefects and the CompileError cases. The cup stacks eight
layers in the centre. Carry open items into Tasks 10 and 15.

Closes #4

Layout: unified · split

docs/superpowers/plans/2026-10-19-fold.md +14 −8
@@ -1068,14 +1068,14 @@ git commit -m "Facet interpenetration checker"
1068 - `func compile(_ script: FoldScript, pattern: FoldFile) throws -> FoldFile` 1068 - `func compile(_ script: FoldScript, pattern: FoldFile) throws -> FoldFile`
1069 - `func guessFaceOrders(previous: FoldFrame, next: FoldFrame, step: StepRecord, file: FoldFile) -> [[Int]]` 1069 - `func guessFaceOrders(previous: FoldFrame, next: FoldFrame, step: StepRecord, file: FoldFile) -> [[Int]]`
1070 - `func applyOrderOverrides(_ overrides: [OrderOverride], to orders: [[Int]], frame: FoldFrame, viewpoint: Viewpoint, file: FoldFile) throws -> [[Int]]` 1070 - `func applyOrderOverrides(_ overrides: [OrderOverride], to orders: [[Int]], frame: FoldFrame, viewpoint: Viewpoint, file: FoldFile) throws -> [[Int]]`
1071 - `enum CompileError: Error, Equatable, Sendable { case unresolvedCrease(step: Int); case unresolvedMovingSide(step: Int); case unresolvedFace(step: Int, point: SIMD2<Double>); case stepFailed(step: Int, defects: [FoldDefect]); case interpenetration(step: Int, [Intersection]); case assignmentDisagreesWithPattern(edge: Int); case noRigidMotion(step: Int); case curveTooCoarse(step: Int) }` 1071 - `enum CompileError: Error, Equatable, Sendable { case unresolvedCrease(step: Int, crease: CreaseRef); case noCreases(step: Int); case unresolvedMovingSide(step: Int); case unresolvedFace(step: Int, point: SIMD2<Double>); case stepFailed(step: Int, defects: [FoldDefect]); case interpenetration(step: Int, [Intersection]); case assignmentDisagreesWithPattern(edge: Int); case noRigidMotion(step: Int); case curveTooCoarse(step: Int); case clockwiseFace(face: Int); case missingAngle(step: Int, crease: CreaseRef); case creaseListMismatch(step: Int); case solvedAxisWindowConflict(step: Int, edge: Int); case coincidentAxisAngle(step: Int, edge: Int) }` — Task 7b adds `popTooStrained`, `missingSpine` and `invalidSpine`
1072 - `foldc <script.foldscript> -o <model.fold>` — exits 0 on success, 1 naming the first failing step and its defects 1072 - `foldc <script.foldscript> -o <model.fold>` — exits 0 on success, 1 naming the first failing step and its defects
1073 1073
1074**This task is the reason the project is buildable.** No existing FOLD tool authors a multi-frame sequence with folded coordinates, per-frame layer order and per-step moving sets; hand-writing them is hundreds of exact numbers per frame. `foldc` takes a crease pattern exported from an existing editor plus a short script that names each step's creases (by the points they run between), which side moves (by a point inside it), and the step kind, and **computes** every frame by applying the rotations in order. It guesses `faceOrders`, applies the script's overrides, and runs the Task 2 validator and the Task 6 checker after each step (Task 7b's mesh checker for a non-rigid step). 1074**This task is the reason the project is buildable.** No existing FOLD tool authors a multi-frame sequence with folded coordinates, per-frame layer order and per-step moving sets; hand-writing them is hundreds of exact numbers per frame. `foldc` takes a crease pattern exported from an existing editor plus a short script that names each step's creases (by the points they run between), which side moves (by a point inside it), and the step kind, and **computes** every frame by applying the rotations in order. It guesses `faceOrders`, applies the script's overrides, and runs the Task 2 validator and the Task 6 checker after each step (Task 7b's mesh checker for a non-rigid step).
1075 1075
1076Defaults: `angles` are each crease's end fold angle, ±180 by the pattern's assignment; `viewpoint` is the previous step's, or `[0, 0, 1]` / `[0, 1, 0]` for step 1; `technique` is `plain`; `driver` is the first crease; `windows` are all `[0, 1]`. 1076Defaults: `angles` are each crease's end fold angle, ±180 by the pattern's assignment; `viewpoint` is the previous step's, or `[0, 0, 1]` / `[0, 1, 0]` for step 1; `technique` is `plain`; `driver` is the first crease; `windows` are all `[0, 1]`.
1077 1077
1078**Coupled steps (decision 0001).** The step's creases cut the sheet into regions, each connected across edges this step does not fold. The fixed region is the one no `movingSide` point lies in. A spanning tree of regions, grown from the fixed region across the step's creases, gives each moving region its axis and each axis its parent. A step crease left off that tree closes a loop. If there is none, every axis is linear on its window. If there are some, `foldc` holds the driver linear on its window and solves the other tree axes as the spike does: damped Gauss–Newton on the gap between vertex copies, continued along *t*. It writes each solved axis's curve at 257 points. A solved angle that is linear to within 1e-9° is written without a curve. Each curve is checked at four times its sample density; if the gap exceeds 1e-6 × the sheet's size between samples, the step fails with `curveTooCoarse` (257 samples is fixed, and decision 0001 measured it sufficient). Regions are grown in the order the script lists the step's creases, driver first, so which crease closes a loop is determined by the script. A loop that does not close (the solver's gap stays above the tolerance) fails the step with `noRigidMotion`. The step then needs a decision (decision 0002); a solver that does not converge is not proof that no rigid motion exists, so check the script first. Reverse folds and sinks never reach this: they name a `spine` and are compiled by Task 7b. The last sample of every step is set to the end frame exactly. 1078**Coupled steps (decision 0001).** The step's creases cut the sheet into regions, each connected across edges this step does not fold. The fixed region is the one no `movingSide` point lies in. A spanning tree of regions, grown from the fixed region across the step's creases, gives each moving region its axis and each axis its parent. A step crease left off that tree closes a loop. If there is none, every axis is linear on its window. If there are some, `foldc` holds the driver linear on its window and solves the tree axes on some loop's cycle (the tree path between the two regions a loop crease joins), excluding the driver, as the spike does: damped Gauss–Newton on the gap between vertex copies, continued along *t*. Every other axis stays linear on its scripted window. A solved axis whose scripted window differs from the driver's is rejected rather than ignored. It writes each solved axis's curve at 257 points. A solved angle that is linear to within 1e-9° is written without a curve. Each curve is checked at four times its sample density; if the gap exceeds 1e-6 × the sheet's size between samples, the step fails with `curveTooCoarse` (257 samples is fixed, and decision 0001 measured it sufficient). Regions are grown in the order the script lists the step's creases, driver first, so which crease closes a loop is determined by the script. A loop that does not close (the solver's gap stays above the tolerance) fails the step with `noRigidMotion`. The step then needs a decision (decision 0002); a solver that does not converge is not proof that no rigid motion exists, so check the script first. Reverse folds and sinks never reach this: they name a `spine` and are compiled by Task 7b. The last sample of every step is set to the end frame exactly.
1079 1079
1080Layer-order corrections are `faceOrders` overrides **in the script**. The generated file is never edited; Task 8 checks that recompiling reproduces it. 1080Layer-order corrections are `faceOrders` overrides **in the script**. The generated file is never edited; Task 8 checks that recompiling reproduces it.
1081 1081
@@ -1137,7 +1137,7 @@ func compilingASyntheticScriptReproducesItsHandWrittenFixture(_ name: String) th
1137} 1137}
1138 1138
1139@Test func anUnresolvedCreaseNamesItsStep() { 1139@Test func anUnresolvedCreaseNamesItsStep() {
1140 #expect(throws: CompileError.unresolvedCrease(step: 2)) { 1140 #expect(throws: CompileError.unresolvedCrease(step: 2, crease: .betweenVertices(SIMD2(0, 1), SIMD2(1, 1)))) {
1141 try compile(FoldScript(contentsOf: fixture("unresolved-crease.foldscript")), 1141 try compile(FoldScript(contentsOf: fixture("unresolved-crease.foldscript")),
1142 pattern: FoldFile(contentsOf: fixture("half-cp.fold"))) 1142 pattern: FoldFile(contentsOf: fixture("half-cp.fold")))
1143 } 1143 }
@@ -1164,7 +1164,7 @@ Expected: FAIL.
1164 1164
1165- [ ] **Step 3: Implement `FoldScript`, `compile`, `guessFaceOrders`, `applyOrderOverrides` and the `foldc` entry point** 1165- [ ] **Step 3: Implement `FoldScript`, `compile`, `guessFaceOrders`, `applyOrderOverrides` and the `foldc` entry point**
1166 1166
1167Every face of the crease pattern must be counterclockwise with the sheet's top side up; rewind clockwise faces, or reject a pattern exported y-down, so that valley and mountain keep their meaning. Every solved curve has exactly 257 samples. Resolve each `CreaseRef` to an edge by nearest-endpoint match in crease-pattern coordinates with a 1e-6 tolerance. Resolve `movingSide` to a face by point-in-polygon in the crease pattern, then grow it to its connected component across edges that are not folded this step; the axis edge must lie on that set's boundary. A crease through several layers: every edge that lies on the axis line in the start frame and bounds the moving set is part of the fold, and each gets its own resulting fold angle and assignment. Produce each step's end frame by building the step and calling `FoldInterpolator.positions(at: 1)` on it, so vertex ownership, carried axes and reorientation have one implementation; this needs a per-step axis reader that does not require a fully validated file. Add a validator rule: a moving face may not have an overlapping still face on the side it departs toward in frame n − 1, or on the side it arrives from in frame n (a flap leaving from under a layer that covers its hinge, which the interpenetration checker cannot see). Guess layer order by placing the moving set on the side of the existing stack it arrived from, its own layers reversed because it has turned over; this is right for plain valley and mountain folds and wrong for anything tucked between layers, which the script corrects with overrides — and the validator's consistency rules (Task 2) report the cases it gets wrong. For a `foldAndUnfold`, compute the order at the peak the same way and write it to `krz:faceOrders_midFold`. After the last step, every crease folded in the last frame must carry the crease pattern's assignment; a mismatch means the script folded something the wrong way. Write JSON with sorted keys so regenerated files diff cleanly. 1167Every face of the crease pattern must be counterclockwise with the sheet's top side up; reject a pattern with a clockwise face (`clockwiseFace`) rather than rewinding it, since rewinding a y-down export also swaps which side is up and so swaps valley and mountain. Every solved curve has exactly 257 samples. Resolve each `CreaseRef` to an edge by nearest-endpoint match in crease-pattern coordinates with a 1e-6 tolerance. Resolve `movingSide` to a face by point-in-polygon in the crease pattern, then grow it to its connected component across edges that are not folded this step; the axis edge must lie on that set's boundary. A crease through several layers: every edge that lies on the axis line in the start frame and bounds the moving set is part of the fold, and each gets its own resulting fold angle and assignment. Produce each step's end frame by building the step and calling `FoldInterpolator.positions(at: 1)` on it, so vertex ownership, carried axes and reorientation have one implementation; Folding's `readStep(_ n: Int, in file: FoldFile) throws -> FoldStep` reads one step from frames 0…n and `readSteps` calls it for each n. The departure/arrival rule (a moving face may not have an overlapping still face on the side it departs toward in frame n − 1, or on the side it arrives from in frame n) needs the interpolator, so it is Folding's `layerMotionDefects`, built in Task 8; `foldc` runs it per step from then on. A crease found on a named crease's line through another layer takes its angle from the pattern's assignment, so `foldc` rejects such an edge (`coincidentAxisAngle`) when it becomes an axis while the named crease's scripted angle is not ±180; deriving its angle is left until a model needs it. Guess layer order by placing the moving set on the side of the existing stack it arrived from, its own layers reversed because it has turned over; this is right for plain valley and mountain folds and wrong for anything tucked between layers, which the script corrects with overrides — and the validator's consistency rules (Task 2) report the cases it gets wrong. For a `foldAndUnfold`, compute the order at the peak the same way and write it to `krz:faceOrders_midFold`. Write `faceOrders` and the mid-fold order as every overlapping pair once, `[f, g, s]` with `f < g`, as the fixtures do. After the last step, every crease folded in the last frame must carry the crease pattern's assignment; a mismatch means the script folded something the wrong way. Write JSON with sorted keys so regenerated files diff cleanly.
1168 1168
1169- [ ] **Step 4: Run tests to verify they pass** 1169- [ ] **Step 4: Run tests to verify they pass**
1170 1170
@@ -1202,20 +1202,21 @@ git commit -m "foldc: compile a fold script and crease pattern into a FOLD seque
1202 - `func strain(_ positions: [SIMD3<Double>], mesh: RenderMesh) -> Double` — the largest relative change in a mesh edge's length 1202 - `func strain(_ positions: [SIMD3<Double>], mesh: RenderMesh) -> Double` — the largest relative change in a mesh edge's length
1203 - `func meshInterpenetrations(_ interpolator: FoldInterpolator, samples: Int) -> [Intersection]` — Task 6's test on mesh triangles, reporting FOLD faces; used for non-rigid steps, whose faces bend 1203 - `func meshInterpenetrations(_ interpolator: FoldInterpolator, samples: Int) -> [Intersection]` — Task 6's test on mesh triangles, reporting FOLD faces; used for non-rigid steps, whose faces bend
1204 - `func compilePop(step: Int, script: ScriptStep, before: FoldFrame, after: FoldFrame, file: FoldFile) throws -> PopRecord` 1204 - `func compilePop(step: Int, script: ScriptStep, before: FoldFrame, after: FoldFrame, file: FoldFile) throws -> PopRecord`
1205 - `CompileError` gains `popTooStrained(step: Int, strain: Double)` and `missingSpine(step: Int)` 1205 - `CompileError` gains `popTooStrained(step: Int, strain: Double)`, `missingSpine(step: Int)` and `invalidSpine(step: Int)` (a spine on a step that is not a fold, or not folded flat)
1206 1206
1207Decision 0002: an inside reverse fold has no rigid motion with the flap closed. Flagged steps move in three phases on *t*: 1207Decision 0002: an inside reverse fold has no rigid motion with the flap closed. Flagged steps move in three phases on *t*:
1208 1208
12091. **Open**, `[0, phases[0]]`: the flap opens rigidly on its spine from 180° to `openAngle` (default 30°, measured from flat), carrying everything on that side of the spine. 12091. **Open**, `[0, phases[0]]`: the flap opens rigidly on its spine from 180° to `openAngle` (default 30°, measured from flat), carrying everything on that side of the spine. The layer nearer the step's viewpoint opens; the other holds. A script field to choose the other layer is added when a model needs it.
12102. **Pop**, `[phases[0], phases[1]]`: as-rigid-as-possible interpolation on the render mesh, from the open pose to `popped`. Each triangle's rotation is slerped from one pose to the other, the mesh positions are solved by least squares, and the faces that do not move in the step are held. 12102. **Pop**, `[phases[0], phases[1]]`: as-rigid-as-possible interpolation on the render mesh, from the open pose to `popped`. Each triangle's rotation is slerped from one pose to the other, the mesh positions are solved by least squares, and the faces that do not move in the step are held.
12113. **Close**, `[phases[1], 1]`: rigid, on the reverse-fold branch, from `popped` to frame n. `closeAxes` are an ordinary axis tree with solved curves, relative to `popped`. 12113. **Close**, `[phases[1], 1]`: rigid, on the reverse-fold branch, from `popped` to frame n. `closeAxes` are an ordinary axis tree with solved curves, relative to `popped`.
1212 1212
1213**What makes a step non-rigid is its script, not the solver.** A step with technique `insideReverse`, `outsideReverse` or `sink` must name a `spine`, and `foldc` fails it with `missingSpine` otherwise. Closure cannot decide this: with the flap closed, the solver finds a rigid motion to the reverse fold's coordinates with the tip swung outside (decision 0001, case 4(a)), which is the wrong fold. For a step with a spine, `foldc`: 1213**What makes a step non-rigid is its script, not the solver.** A step with technique `insideReverse`, `outsideReverse` or `sink` must name a `spine`, and `foldc` fails it with `missingSpine` otherwise. Closure cannot decide this: with the flap closed, the solver finds a rigid motion to the reverse fold's coordinates with the tip swung outside (decision 0001, case 4(a)), which is the wrong fold. For a step with a spine, `foldc`:
1214 1214
1215- builds `openAxes` (the spine as one linear axis); 1215- builds `openAxes` (the spine as one linear axis);
1216- builds `popped` (the reverse-fold branch with the spine held at `openAngle`, solved as in Task 7); 1216- builds `popped` (the reverse-fold branch with the spine held at `openAngle`, solved as in Task 7, starting each other crease at `openAngle`/180 of its travel, as the spike does). Closing the loops does not show which branch was found; a wrong branch is caught by the close reaching frame n's coordinates, the final assignment check and the validator's layer rules;
1217- builds `closeAxes` (from `popped` to the end frame, with the spine driven and the rest solved); 1217- builds `closeAxes` (from `popped` to the end frame, with the spine driven and the rest solved);
1218- checks `popped` has one position per vertex; 1218- checks `popped` has one position per vertex;
1219- writes `openAngle` and `phases` into the file explicitly: 30° and [⅓, ⅔] are the script's defaults, and the decoder requires both. The validator rejects a pop record with the wrong number of positions, phases outside 0 < p₀ < p₁ < 1, or a non-rigid step without one (`popMalformed`);
1219- measures the pop's strain on the step's render mesh, and fails the step above **10%**. 1220- measures the pop's strain on the step's render mesh, and fails the step above **10%**.
1220 1221
1221Decision 0002 measured 7.9% at 30° and 29% at 60° on this flap, at a mesh spacing of 1/32 of its longer side. Only the inside reverse fold was measured. Outside reverse folds and sinks use the same model until a model of theirs fails the bound; if one does, stop for a decision. 1222Decision 0002 measured 7.9% at 30° and 29% at 60° on this flap, at a mesh spacing of 1/32 of its longer side. Only the inside reverse fold was measured. Outside reverse folds and sinks use the same model until a model of theirs fails the bound; if one does, stop for a decision.
@@ -1338,8 +1339,9 @@ git commit -m "Non-rigid steps: open, pop, close"
1338- Produces: 1339- Produces:
1339 - `enum ModelLibrary { static func all() throws -> [FoldFile]; static func names() throws -> [String]; static func model(named: String) throws -> FoldFile }` 1340 - `enum ModelLibrary { static func all() throws -> [FoldFile]; static func names() throws -> [String]; static func model(named: String) throws -> FoldFile }`
1340 - `foldlint <path>...` — runs `validate` and then `readSteps`, which rejects step records the validator does not check; exits 0 when clean, 1 with one defect per line 1341 - `foldlint <path>...` — runs `validate` and then `readSteps`, which rejects step records the validator does not check; exits 0 when clean, 1 with one defect per line
1342 - `func layerMotionDefects(_ file: FoldFile) -> [FoldDefect]` in Folding, and `FoldDefect.movesThroughStillFace(step:moving:still:)` — the departure/arrival rule. Departure is read just after a face starts moving, against frame n − 1's order; arrival just before it stops, against frame n's. A non-rigid step uses its open axes for departure and its close axes for arrival, and the faces that open on the spine count as moving. `layerMotionDefects(step:in:)` checks one step on frames 0…n; `foldlint`, the catalogue gate and `foldc` (per step, as a `stepFailed`) run it. The arrival read time is the one the layer guess uses, so for a step without overrides the arrival check cannot disagree with the guess; it checks overrides and departures
1341 1343
1342**The cup is the model authored here, not the crane.** Six steps — five folds of one axis each and a turn-over — no reverse folds, at most six layers where the corner flaps cross. It exercises script, compile, validate, interpolate and the catalogue gate end to end without exercising coupled steps or deep stacks at the same time. The version authored folds the top flaps down — the front one, then after the turn-over the back one — rather than tucking them into the pocket, and it ends flat. Step 1's instruction starts "Valley fold"; Task 14's accessibility test reads it. 1344**The cup is the model authored here, not the crane.** Six steps — five folds of one axis each and a turn-over — no reverse folds, six layers where the corner flaps cross and eight in the centre once both top flaps are down. It exercises script, compile, validate, interpolate and the catalogue gate end to end without exercising coupled steps or deep stacks at the same time. The version authored folds the top flaps down — the front one, then after the turn-over the back one — rather than tucking them into the pocket, and it ends flat. Step 1's instruction starts "Valley fold"; Task 14's accessibility test reads it.
1343 1345
1344Its crease pattern and `.foldscript` are committed next to the generated `.fold`, so the model regenerates rather than only being editable. `docs/authoring/cup.md` records the crease pattern's provenance and every layer-order override and why. 1346Its crease pattern and `.foldscript` are committed next to the generated `.fold`, so the model regenerates rather than only being editable. `docs/authoring/cup.md` records the crease pattern's provenance and every layer-order override and why.
1345 1347
@@ -1621,6 +1623,8 @@ Depth handling is **hybrid**. `faceOrders` is defined only for faces that overla
1621 1623
1622Facets are two-sided, front and back distinguished in the fragment shader by `[[front_facing]]`. This task owns Review Focus item 3. 1624Facets are two-sided, front and back distinguished in the fragment shader by `[[front_facing]]`. This task owns Review Focus item 3.
1623 1625
1626During a non-rigid step the faces that open on the spine move, but `FoldStep.movingFaceUnion` holds only the main axes' faces (the pop's held faces depend on that). `LayerOrder.active`'s rewrite of mixed moving/still pairs must use the set `layerMotionDefects` uses — the main, open and close axes' faces — made a named `FoldStep` property here rather than a second copy. The pop's `SparseCholesky` factor is `@unchecked Sendable`; confirm concurrent solves on one factor are safe, or serialise them, before the renderer calls the interpolator from more than one thread.
1627
1624SwiftPM compiles `Shaders.metal` with the Metal toolchain; see *Setup* step 4. 1628SwiftPM compiles `Shaders.metal` with the Metal toolchain; see *Setup* step 4.
1625 1629
1626- [ ] **Step 1: Write the failing tests** 1630- [ ] **Step 1: Write the failing tests**
@@ -2069,6 +2073,8 @@ git commit -m "Orbit and zoom, accessibility pass and release assets"
2069 2073
2070Authoring, not engineering: three crease patterns, three scripts, and a correction pass over each model's guessed `faceOrders`, made as overrides in the script. Every gate already exists — Task 2's validator, Task 6's interpenetration checker, Task 8's catalogue tests including the isometry sweep — so this task adds no new machinery, only the models and the record of how each was verified. Published sampan sequences differ in their middle steps; `docs/authoring/sampan.md` records which sequence was authored and its source. 2074Authoring, not engineering: three crease patterns, three scripts, and a correction pass over each model's guessed `faceOrders`, made as overrides in the script. Every gate already exists — Task 2's validator, Task 6's interpenetration checker, Task 8's catalogue tests including the isometry sweep — so this task adds no new machinery, only the models and the record of how each was verified. Published sampan sequences differ in their middle steps; `docs/authoring/sampan.md` records which sequence was authored and its source.
2071 2075
2076Carried from batch D, to settle before or while authoring these models: a crease on a named crease's line through another layer with a scripted angle other than ±180 is rejected (the masu's 90° walls need its angle derived instead); `curveTooCoarse` is reported where an unreachable scripted angle is the real cause; the cycle computation has no test for several loops sharing axes (the petal fold); `compilePop` does not assert that held faces sit identically in the open pose and `popped`; a flap whose two layers also join through the body (the crane's neck and tail) fails with `noRigidMotion`, because the opening faces are found by cutting only the spine — rule on "that side of the spine" then; `structurallyEqual` must tolerate solver noise in `pop`.
2077
2072The crane is deliberately last. It is the model that proves multi-axis petal folds and eight-deep wing stacks work, and by this point the compiler, the renderer and the gestures are all known-good against the cup, so a failure here is an authoring error rather than an ambiguity about which layer is at fault. 2078The crane is deliberately last. It is the model that proves multi-axis petal folds and eight-deep wing stacks work, and by this point the compiler, the renderer and the gestures are all known-good against the cup, so a failure here is an authoring error rather than an ambiguity about which layer is at fault.
2073 2079
2074Each `docs/authoring/*.md` records the crease pattern's provenance, which guessed layer orders had to be overridden and why, which steps are coupled (solved curves, decision 0001) and which are flagged non-rigid with their `openAngle` and measured pop strain (decision 0002), and that the model regenerates from its script. 2080Each `docs/authoring/*.md` records the crease pattern's provenance, which guessed layer orders had to be overridden and why, which steps are coupled (solved curves, decision 0001) and which are flagged non-rigid with their `openAngle` and measured pop strain (decision 0002), and that the model regenerates from its script.
docs/superpowers/specs/2026-10-19-fold-design.md +2 −2
@@ -558,8 +558,8 @@ the compiler's own tests check that it reproduces those fixtures.
558### The cup first, the crane last 558### The cup first, the crane last
559 559
560The first model compiled is **the cup**: six steps — five folds of one 560The first model compiled is **the cup**: six steps — five folds of one
561axis each and a turn-over — no reverse folds, and a stack of at most six layers where the 561axis each and a turn-over — no reverse folds, six layers where the two corner flaps cross and
562two corner flaps cross. It exercises the entire chain — script, compile, 562eight in the centre once both top flaps are down. It exercises the entire chain — script, compile,
563validate, interpolate, diagram, render, fold under a finger — without 563validate, interpolate, diagram, render, fold under a finger — without
564exercising any of the hard parts at the same time. The version authored 564exercising any of the hard parts at the same time. The version authored
565folds the top flaps down, the front one in front and the back one after the 565folds the top flaps down, the front one in front and the back one after the