[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75V5F805ZV3Y8F0B8GS175E":3,"skill-same:01M75V5F805ZV3Y8F0B8GS175E":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M75V5F805ZV3Y8F0B8GS175E","physics",null,"Maps Puck physics and contact: Puck.Physics kernels, IContactField and its providers, the body step, sweeps, step-up and snap, rigid solver, tether, gravity, navigation, field lattices, motion.","ByteTerrace\u002FPuck","ByteTerrace","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18753984?v=4","01M75V2WCB9PGGC3H7RZC7AXPS","01M75V2WD0NJPRNP5HJ75VZGD0",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: physics\ndescription: \"Maps Puck physics and contact: Puck.Physics kernels, IContactField and its providers, the body step, sweeps, step-up and snap, rigid solver, tether, gravity, navigation, field lattices, motion.\"\n---\n\n# Physics\n\nA map of the deterministic fixed-point kernels in `Puck.Physics` and the World\ncode that applies them to bodies. Two layers, and the split is the first thing\nto get right:\n\n- **The kernels** (`src\u002FPuck.Physics`) return a correction, an acceleration or\n  a route and decide nothing. They parse no document and know no body\n  identity: contact geometry, the contact seam's analytic and field solvers,\n  step-up and snap, the rigid solver, the tether, gravity solvers,\n  navigation, field lattices, bounded perception and the motion-program core.\n- **The host** (`src\u002FPuck.World.Server`) owns body state and decides what a\n  result means: `WorldBody` (one body's step, contacts, rigid, carry, tether,\n  hold, sleep, refusal capture), `WorldPopulation` (the roster, body pairs,\n  the rigid solve, wakes), `WorldColliderSet` and `WorldSolidField` (the two\n  contact providers), `WorldEventFeed`. Authored rows become kernel input in\n  `Puck.World.Schema` (`BodyMotionProgramFactory`, `BodyActionSpecFactory`,\n  `WorldMotionTuningFactory`, the collider compiler).\n\n[Physics kernels](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md) is the kernel reference;\n[the server README](..\u002F..\u002F..\u002Fsrc\u002FPuck.World.Server\u002FREADME.md#the-entity-table-worldpopulationcs-worldbodycs)\ndocuments the host side; the document fields (kits, `motion`, `collision`,\n`navigation`, `fields`) are in the `puck-world` references\n([motion](..\u002Fpuck-world\u002Freferences\u002Fdocuments-motion.md),\n[render facets](..\u002Fpuck-world\u002Freferences\u002Fdocuments-render.md),\n[state and navigation](..\u002Fpuck-world\u002Freferences\u002Fdocuments-state.md)). When this\nfile and the code disagree, the code wins and this file is corrected in the\nsame change.\n\n## Find the owner by what you need\n\n| You need | Owner | Read |\n|---|---|---|\n| A body resolves its swept position against the world | the seam `IContactField` (`Resolve`, `ResolveSweep`, `TrySupportDistance`, `TryUp`), providers `WorldColliderSet` (analytic) and `WorldSolidField` (signed distance) | [contact seam](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Every sweep that moves a body, entity-aware | `WorldBody.SweepContact`, the one dispatch; an `IEntityContactField` learns which body moves | [below](#the-body-step-and-the-seam-door) |\n| Analytic colliders: spheres, boxes (rounded, chamfered, oriented), superellipsoids, cylinders, half-spaces | `FixedStaticCollider` (`TryGetPush`, `RoundedBox`, `ChamferedBox`, `Cylinder`), `FixedOrientedBox`, `FixedConvexContact` (GJK and EPA), `FixedStaticContactSolver` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| A carved, relieved or smoothly blended creation collides as drawn | field colliders (`WorldColliderSet.CollidesAsField`) with a `FixedFieldPartition` narrowing hard unions to their exact pieces | [sdf-authoring contact admission](..\u002Fsdf-authoring\u002Freferences\u002Fshapes.md#contact-admission) |\n| Never tunnel, however fast or thin | `FixedFieldContactSolver.ResolveSweep` (certified sweep through `ICertifiedSweepQuery`); `FixedStaticContactSolver.ResolveSweep` (sliced analytic sweep); both refuse with `ContactRefusal` rather than wrap | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Walk up a kerb; stick to a downhill slope | `FixedStepUp.TryStep` and `FixedStepUp.TrySnap` over one `IContactField.TrySupportDistance` query, driven by kit `motion.stepHeight` and `motion.groundSnap` | [motion](..\u002Fpuck-world\u002Freferences\u002Fdocuments-motion.md) |\n| Body-against-body depenetration and collision events | `FixedDynamicBodyContacts.TryCorrection`; events ask `FixedDynamicBodyContacts.Overlaps` (a positive push at zero margin, so a touching pair is neither), so an event and a contact never disagree; host pairs in `WorldPopulation.ResolveDynamicContacts` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Remove a velocity's approach into a contact | `FixedVector3.LimitAlong` with the inward axis and a zero bound, shared by ordinary, field, tether and seam responses | `maths-usage` |\n| Rigid bodies: impulses, friction, restitution, warm-started manifolds | `FixedRigidWorld` (the one solver), `FixedRigidContacts`, `FixedRigidManifold`, `FixedPairManifoldSlotTable`, `FixedTwoBodyKernel`; host side `WorldBody.Rigid.cs`, `WorldPopulation.Rigid.cs` | [the rigid solver](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-rigid-solver) |\n| A rope that caps distance and keeps swing momentum | `FixedTetherConstraint` (`ResolveAnchor`, `Reel`); host `WorldBody.Tether.cs` | [tether](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-tether-constraint) |\n| Climb a wall, grapple, pick an anchor | `FixedSurfaceQuery.TryNearest`, `TryNearestDirected`; `IContactField.TryHoldableSurfaceAlongDirection` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Gravity between many bodies | `GravitySolvers.Create` over `PairwiseGravitySolver` (the oracle), `FastMonopoleGravitySolver`, `AdaptiveFmmGravitySolver` | [choose a solver](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#choose-a-gravity-solver) |\n| Routes, shared goal searches, off-grid checks | `NavigationRuntime` over `NavigationDomainInput`; medium fields through `INavigationMediumField`; host `WorldPopulation.Navigation.cs` | [navigation](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#navigation-kernel-navigation) |\n| Evolving scalar fields (water, heat, snow) and their solids | `FieldLattice` (reactions, `IFieldLatticeHost`), `FieldLatticeSolid`, `UnionField`, ordering by `ReadWriteHazard.Conflicts` | [field lattice](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#field-lattice-fields) |\n| Steering samples and flocks | `FixedSpatialNeighborhood` (bounded, never a broadphase), `FixedFlockSteering` | [perception](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#bounded-local-perception) |\n| How a body moves under its kit: drive, shaping, holds, actions | `CompiledBodyMotionProgram`, `BodyMotionOp`, `FixedMotionTuning` (Physics `Motion\u002F`), executed by `WorldBody` phases | [motion core](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-motion-program-core-motion) |\n| Sleep, wake on a moved carrier or lattice, rest | `WorldBody.Sleep.cs`, `WorldPopulation.ObserveContactFieldChange`, `WorldPopulation.ContactFieldVersion` | [server README](..\u002F..\u002F..\u002Fsrc\u002FPuck.World.Server\u002FREADME.md#the-entity-table-worldpopulationcs-worldbodycs) |\n\n## The body step and the seam door\n\n- `WorldPopulation` steps bodies one at a time; `WorldBody.Advance` runs the\n  motion program's phases, then `ResolveProgramContacts` sweeps the step\n  through the field. A rigid kit only prepares its step and joins the\n  population's one `FixedRigidWorld` solve; carried and tethered bodies have\n  their own files beside it.\n- **One door for every moving sweep.** `WorldBody.SweepContact` is the\n  dispatch every sweep that moves a body goes through; an\n  `IEntityContactField` (today `WorldAdjacencyContactField`) learns which\n  local body moves, so a neighbour's answer is admitted against that body. A\n  probe that moves no body calls the field directly and names none. A new\n  path that moves a body calls `SweepContact` or the `BodyContactStep` bound to\n  it, never `IContactField.ResolveSweep` directly.\n- **A refused sweep is a full block.** `ContactRefusal` means the body keeps\n  the pose it started the tick with. `WorldBody.SweepRefusal.cs` captures\n  everything the step writes (`WorldBodyTransferState`,\n  `WorldBodyIntegrationResidue`, pose and contact facts) before the step and\n  restores it, and a walking body's emitted effects are withdrawn. A body\n  refused this tick (`WorldBody.SweepRefusedThisTick`) is static to its pair\n  partners, unpulled by a tether and never corrects a carrier until\n  `WorldPopulation.CompleteStep`. A field added to either captured record is\n  covered with no change.\n- **Only a proven contact corrects a carrier.** A sweep that held its body for\n  want of proof reports `ContactResolution.Unproved` and hands the carrier\n  nothing.\n- **Two snaps share one answer** where the body has not moved between them\n  (`BodySupportMemo`, keyed by field, volume derivation, start, orientation, up\n  and reach).\n- A kit change whose collider would embed the body steps it out along up or\n  world X\u002FZ, never down (`WorldBody.EscapeEmbedding`).\n\n## Contracts that bite\n\n- **Determinism.** Every kernel is fixed point over `Puck.Maths`; mixed-scale\n  products and wide roundings go through `FusedArithmetic` and its siblings,\n  so a kernel rounds the way every other consumer does (`maths-usage`). A\n  deliberate correction moves body poses and state hashes; judge it by the\n  new answer's exactness, not by matching old bytes (AGENTS.md rule 4).\n- **Kernels decide nothing.** Walkability, authority, waking and admission\n  are the caller's. A kernel returning a correction must not mutate a body.\n- **One mechanism per question.** One rigid solver, one round-core rule\n  (`TryRoundPush`, behind both static spheres and dynamic round pairs), one\n  box geometry owner (`FixedOrientedBox`), one approach-removal\n  (`FixedVector3.LimitAlong`), one overlap sense for events and contacts.\n  Writing a second is a defect; extend the one that exists.\n- **Perception is not a broadphase.** `FixedSpatialNeighborhood` drops\n  candidates when its attention budget binds; a contact solver may not.\n- **Work is counted, not timed.** `physics.contact`\n  (`FixedStaticContactWork`), `physics.sweep` (`FixedContactSweepWork`) and\n  `physics.bodies` are deterministic work sources; read them with\n  `world.counters` before and after a change. `physics.contact.field-unproved`\n  counts every field solve that proved nothing, the ground snap's bracket\n  probes included, so a body standing at an unprovable feature adds several a\n  tick and the total follows that body's path: a change that moves one pose by\n  a raw can move a sweep's total by thousands. Before calling such a delta a\n  bounds regression, run the same poses through both builds and compare each\n  outcome and box interval ([the crease item](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#certified-field-contact)).\n- **Scale reaches every contact query.** A body's `Scale` multiplies its\n  collider volumes for world contact, body pairs, events, the adjacency\n  sweep's local side and rigid probing alike.\n- **Workspaces are reused and not thread-safe.** The hierarchical gravity\n  solvers and navigation domains allocate once and keep their arrays.\n\n## Where each contract is enforced\n\n| Contract | Enforced by |\n|---|---|\n| A body never moves through space no sweep proved clear | `FixedFieldContactSolver.ResolveSweep` and `FixedStaticContactSolver.ResolveSweep`: budget exhaustion keeps the proved prefix, an unrepresentable step refuses whole |\n| A kit capsule fits its sweep ceiling; no volume quantizes to a point | collider validation (`CapsuleCoreFitsSweep`, `VolumeCoreSweeps`) at load |\n| A refused step changes nothing | `WorldBody.SweepRefusal.cs`'s capture of whole records, restored on refusal |\n| A neighbour's contact answer is admitted against the moving body | `WorldBody.SweepContact` dispatching to `IEntityContactField` |\n| A lattice's solid stays inside the carrier | `FieldLatticeSolid.CellFits` at world validation; the constructor throws otherwise |\n| Field-program dependency edges mean the same on both sides | `ReadWriteHazard.Conflicts`, called by the lattice and the Schema compiler |\n| Same input, same poses | the population's checkpoint codecs and `puck test --reproduce` |\n\n## Open gaps\n\n- **Body action gates are a second gate interpreter.** `WorldBody.GateOpen`\n  folds `CompiledPredicate[]` beside `RuleEvaluation.Decide` (`state`); the\n  merge, with body facts as rule operands, is a design step.\n- **The adjacency sweep's remote side reads a neighbour's unscaled collider**:\n  the delivered snapshot carries no per-entity `Scale` yet.\n- **Approximations the reference names.** Rounded or chamfered circular rims\n  use a contained cylinder core with a reported inward bound (the fix is an\n  exact rim contact); elliptical and carved primitives stay bounded\n  approximations in the analytic provider; tilted box-in-cylinder edges are\n  conservative.\n- Packets: [certified field contact](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#certified-field-contact),\n  [collision versus drawn mesh](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#collision-versus-drawn-mesh),\n  [water](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#water) and\n  [the Moth's motion](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#dual-stick-play-and-the-moths-motion).\n\n## Verify\n\n- Kernel laws: `tests\u002FPuck.Physics.Tests` (gravity against the pairwise oracle,\n  contact kernels, sweeps, the rigid solver's mechanism and sabotage cases,\n  navigation, lattices, neighborhoods), filtered to the class you touched.\n  Body integration laws are in `tests\u002FPuck.World.Server.Tests`.\n- Scenarios in the debug world: `puck test worlds\u002Fdebug\u002Fhall-tests.puck --jobs 1`\n  (stairs, slabs, the lift), `noclip-tests`, `suit-tests`, the `water-*-tests`,\n  `meadow-tests`; add `--reproduce` for anything that moves a pose.\n- Live read-backs over stdin: `body.where` (pose, support,\n  `sweep=refused(...)`, `asleep=`), `body.motion` (effective `stepHeight=`),\n  `world.kits`, `world.collision.status`, `world.fields`, `world.counters\n  physics.contact`, `physics.sweep` and `physics.bodies`. `puck creation stats`\n  builds a creation's contact field offline (`sdf-authoring`).\n- The reference pages' canary names (`thin-wall-sweep` and others) are\n  quarantined under `experimental\u002F` with the other canaries.\n\n## Look-alikes\n\n- The chase camera's clearance sweeps and an effector's surface probe query\n  the rendered field for presentation (`WorldFieldAnswer`, `puck-world`), not\n  the contact seam.\n- `FixedSpatialNeighborhood` is perception; the body-pair broadphase is the\n  population's X sweep and YZ grid under `collision.bodyContacts`.\n- `collision.events` budgets proximity events; `collision.bodyContacts`\n  budgets physical depenetration. They are separate limits.\n\n## Route adjacent work\n\n| Skill | Route there for |\n|---|---|\n| `puck-world` | Kit, `motion`, `collision`, `navigation` and `fields` document fields, the tick order, running a World. |\n| `sdf-authoring` | Which shapes a creation's contact admits, contact tuning, `puck creation stats` and `creation.shape`. |\n| `maths-usage` | Fixed-point vectors, rate accumulators, rounding and the certified sweep's field queries. |\n| `maths-laws` | Law coverage for a changed `Puck.Maths` member a kernel uses. |\n| `state` | Rules that read body facts or write body targets, and the rule-gate interpreter. |\n| `rendering` | The SDF evaluator and mesh the drawn surface comes from. |\n| `verification` | Leases, the private CLI copy, flaky versus failing scenarios. |\n","# Physics\n\nA map of the deterministic fixed-point kernels in `Puck.Physics` and the World\ncode that applies them to bodies. Two layers, and the split is the first thing\nto get right:\n\n- **The kernels** (`src\u002FPuck.Physics`) return a correction, an acceleration or\n  a route and decide nothing. They parse no document and know no body\n  identity: contact geometry, the contact seam's analytic and field solvers,\n  step-up and snap, the rigid solver, the tether, gravity solvers,\n  navigation, field lattices, bounded perception and the motion-program core.\n- **The host** (`src\u002FPuck.World.Server`) owns body state and decides what a\n  result means: `WorldBody` (one body's step, contacts, rigid, carry, tether,\n  hold, sleep, refusal capture), `WorldPopulation` (the roster, body pairs,\n  the rigid solve, wakes), `WorldColliderSet` and `WorldSolidField` (the two\n  contact providers), `WorldEventFeed`. Authored rows become kernel input in\n  `Puck.World.Schema` (`BodyMotionProgramFactory`, `BodyActionSpecFactory`,\n  `WorldMotionTuningFactory`, the collider compiler).\n\n[Physics kernels](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md) is the kernel reference;\n[the server README](..\u002F..\u002F..\u002Fsrc\u002FPuck.World.Server\u002FREADME.md#the-entity-table-worldpopulationcs-worldbodycs)\ndocuments the host side; the document fields (kits, `motion`, `collision`,\n`navigation`, `fields`) are in the `puck-world` references\n([motion](..\u002Fpuck-world\u002Freferences\u002Fdocuments-motion.md),\n[render facets](..\u002Fpuck-world\u002Freferences\u002Fdocuments-render.md),\n[state and navigation](..\u002Fpuck-world\u002Freferences\u002Fdocuments-state.md)). When this\nfile and the code disagree, the code wins and this file is corrected in the\nsame change.\n\n## Find the owner by what you need\n\n| You need | Owner | Read |\n|---|---|---|\n| A body resolves its swept position against the world | the seam `IContactField` (`Resolve`, `ResolveSweep`, `TrySupportDistance`, `TryUp`), providers `WorldColliderSet` (analytic) and `WorldSolidField` (signed distance) | [contact seam](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Every sweep that moves a body, entity-aware | `WorldBody.SweepContact`, the one dispatch; an `IEntityContactField` learns which body moves | [below](#the-body-step-and-the-seam-door) |\n| Analytic colliders: spheres, boxes (rounded, chamfered, oriented), superellipsoids, cylinders, half-spaces | `FixedStaticCollider` (`TryGetPush`, `RoundedBox`, `ChamferedBox`, `Cylinder`), `FixedOrientedBox`, `FixedConvexContact` (GJK and EPA), `FixedStaticContactSolver` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| A carved, relieved or smoothly blended creation collides as drawn | field colliders (`WorldColliderSet.CollidesAsField`) with a `FixedFieldPartition` narrowing hard unions to their exact pieces | [sdf-authoring contact admission](..\u002Fsdf-authoring\u002Freferences\u002Fshapes.md#contact-admission) |\n| Never tunnel, however fast or thin | `FixedFieldContactSolver.ResolveSweep` (certified sweep through `ICertifiedSweepQuery`); `FixedStaticContactSolver.ResolveSweep` (sliced analytic sweep); both refuse with `ContactRefusal` rather than wrap | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Walk up a kerb; stick to a downhill slope | `FixedStepUp.TryStep` and `FixedStepUp.TrySnap` over one `IContactField.TrySupportDistance` query, driven by kit `motion.stepHeight` and `motion.groundSnap` | [motion](..\u002Fpuck-world\u002Freferences\u002Fdocuments-motion.md) |\n| Body-against-body depenetration and collision events | `FixedDynamicBodyContacts.TryCorrection`; events ask `FixedDynamicBodyContacts.Overlaps` (a positive push at zero margin, so a touching pair is neither), so an event and a contact never disagree; host pairs in `WorldPopulation.ResolveDynamicContacts` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Remove a velocity's approach into a contact | `FixedVector3.LimitAlong` with the inward axis and a zero bound, shared by ordinary, field, tether and seam responses | `maths-usage` |\n| Rigid bodies: impulses, friction, restitution, warm-started manifolds | `FixedRigidWorld` (the one solver), `FixedRigidContacts`, `FixedRigidManifold`, `FixedPairManifoldSlotTable`, `FixedTwoBodyKernel`; host side `WorldBody.Rigid.cs`, `WorldPopulation.Rigid.cs` | [the rigid solver](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-rigid-solver) |\n| A rope that caps distance and keeps swing momentum | `FixedTetherConstraint` (`ResolveAnchor`, `Reel`); host `WorldBody.Tether.cs` | [tether](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-tether-constraint) |\n| Climb a wall, grapple, pick an anchor | `FixedSurfaceQuery.TryNearest`, `TryNearestDirected`; `IContactField.TryHoldableSurfaceAlongDirection` | [physics reference](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#contact-and-rigid-body-kernels) |\n| Gravity between many bodies | `GravitySolvers.Create` over `PairwiseGravitySolver` (the oracle), `FastMonopoleGravitySolver`, `AdaptiveFmmGravitySolver` | [choose a solver](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#choose-a-gravity-solver) |\n| Routes, shared goal searches, off-grid checks | `NavigationRuntime` over `NavigationDomainInput`; medium fields through `INavigationMediumField`; host `WorldPopulation.Navigation.cs` | [navigation](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#navigation-kernel-navigation) |\n| Evolving scalar fields (water, heat, snow) and their solids | `FieldLattice` (reactions, `IFieldLatticeHost`), `FieldLatticeSolid`, `UnionField`, ordering by `ReadWriteHazard.Conflicts` | [field lattice](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#field-lattice-fields) |\n| Steering samples and flocks | `FixedSpatialNeighborhood` (bounded, never a broadphase), `FixedFlockSteering` | [perception](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#bounded-local-perception) |\n| How a body moves under its kit: drive, shaping, holds, actions | `CompiledBodyMotionProgram`, `BodyMotionOp`, `FixedMotionTuning` (Physics `Motion\u002F`), executed by `WorldBody` phases | [motion core](..\u002F..\u002F..\u002Fdocs\u002Freference\u002Fphysics.md#the-motion-program-core-motion) |\n| Sleep, wake on a moved carrier or lattice, rest | `WorldBody.Sleep.cs`, `WorldPopulation.ObserveContactFieldChange`, `WorldPopulation.ContactFieldVersion` | [server README](..\u002F..\u002F..\u002Fsrc\u002FPuck.World.Server\u002FREADME.md#the-entity-table-worldpopulationcs-worldbodycs) |\n\n## The body step and the seam door\n\n- `WorldPopulation` steps bodies one at a time; `WorldBody.Advance` runs the\n  motion program's phases, then `ResolveProgramContacts` sweeps the step\n  through the field. A rigid kit only prepares its step and joins the\n  population's one `FixedRigidWorld` solve; carried and tethered bodies have\n  their own files beside it.\n- **One door for every moving sweep.** `WorldBody.SweepContact` is the\n  dispatch every sweep that moves a body goes through; an\n  `IEntityContactField` (today `WorldAdjacencyContactField`) learns which\n  local body moves, so a neighbour's answer is admitted against that body. A\n  probe that moves no body calls the field directly and names none. A new\n  path that moves a body calls `SweepContact` or the `BodyContactStep` bound to\n  it, never `IContactField.ResolveSweep` directly.\n- **A refused sweep is a full block.** `ContactRefusal` means the body keeps\n  the pose it started the tick with. `WorldBody.SweepRefusal.cs` captures\n  everything the step writes (`WorldBodyTransferState`,\n  `WorldBodyIntegrationResidue`, pose and contact facts) before the step and\n  restores it, and a walking body's emitted effects are withdrawn. A body\n  refused this tick (`WorldBody.SweepRefusedThisTick`) is static to its pair\n  partners, unpulled by a tether and never corrects a carrier until\n  `WorldPopulation.CompleteStep`. A field added to either captured record is\n  covered with no change.\n- **Only a proven contact corrects a carrier.** A sweep that held its body for\n  want of proof reports `ContactResolution.Unproved` and hands the carrier\n  nothing.\n- **Two snaps share one answer** where the body has not moved between them\n  (`BodySupportMemo`, keyed by field, volume derivation, start, orientation, up\n  and reach).\n- A kit change whose collider would embed the body steps it out along up or\n  world X\u002FZ, never down (`WorldBody.EscapeEmbedding`).\n\n## Contracts that bite\n\n- **Determinism.** Every kernel is fixed point over `Puck.Maths`; mixed-scale\n  products and wide roundings go through `FusedArithmetic` and its siblings,\n  so a kernel rounds the way every other consumer does (`maths-usage`). A\n  deliberate correction moves body poses and state hashes; judge it by the\n  new answer's exactness, not by matching old bytes (AGENTS.md rule 4).\n- **Kernels decide nothing.** Walkability, authority, waking and admission\n  are the caller's. A kernel returning a correction must not mutate a body.\n- **One mechanism per question.** One rigid solver, one round-core rule\n  (`TryRoundPush`, behind both static spheres and dynamic round pairs), one\n  box geometry owner (`FixedOrientedBox`), one approach-removal\n  (`FixedVector3.LimitAlong`), one overlap sense for events and contacts.\n  Writing a second is a defect; extend the one that exists.\n- **Perception is not a broadphase.** `FixedSpatialNeighborhood` drops\n  candidates when its attention budget binds; a contact solver may not.\n- **Work is counted, not timed.** `physics.contact`\n  (`FixedStaticContactWork`), `physics.sweep` (`FixedContactSweepWork`) and\n  `physics.bodies` are deterministic work sources; read them with\n  `world.counters` before and after a change. `physics.contact.field-unproved`\n  counts every field solve that proved nothing, the ground snap's bracket\n  probes included, so a body standing at an unprovable feature adds several a\n  tick and the total follows that body's path: a change that moves one pose by\n  a raw can move a sweep's total by thousands. Before calling such a delta a\n  bounds regression, run the same poses through both builds and compare each\n  outcome and box interval ([the crease item](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#certified-field-contact)).\n- **Scale reaches every contact query.** A body's `Scale` multiplies its\n  collider volumes for world contact, body pairs, events, the adjacency\n  sweep's local side and rigid probing alike.\n- **Workspaces are reused and not thread-safe.** The hierarchical gravity\n  solvers and navigation domains allocate once and keep their arrays.\n\n## Where each contract is enforced\n\n| Contract | Enforced by |\n|---|---|\n| A body never moves through space no sweep proved clear | `FixedFieldContactSolver.ResolveSweep` and `FixedStaticContactSolver.ResolveSweep`: budget exhaustion keeps the proved prefix, an unrepresentable step refuses whole |\n| A kit capsule fits its sweep ceiling; no volume quantizes to a point | collider validation (`CapsuleCoreFitsSweep`, `VolumeCoreSweeps`) at load |\n| A refused step changes nothing | `WorldBody.SweepRefusal.cs`'s capture of whole records, restored on refusal |\n| A neighbour's contact answer is admitted against the moving body | `WorldBody.SweepContact` dispatching to `IEntityContactField` |\n| A lattice's solid stays inside the carrier | `FieldLatticeSolid.CellFits` at world validation; the constructor throws otherwise |\n| Field-program dependency edges mean the same on both sides | `ReadWriteHazard.Conflicts`, called by the lattice and the Schema compiler |\n| Same input, same poses | the population's checkpoint codecs and `puck test --reproduce` |\n\n## Open gaps\n\n- **Body action gates are a second gate interpreter.** `WorldBody.GateOpen`\n  folds `CompiledPredicate[]` beside `RuleEvaluation.Decide` (`state`); the\n  merge, with body facts as rule operands, is a design step.\n- **The adjacency sweep's remote side reads a neighbour's unscaled collider**:\n  the delivered snapshot carries no per-entity `Scale` yet.\n- **Approximations the reference names.** Rounded or chamfered circular rims\n  use a contained cylinder core with a reported inward bound (the fix is an\n  exact rim contact); elliptical and carved primitives stay bounded\n  approximations in the analytic provider; tilted box-in-cylinder edges are\n  conservative.\n- Packets: [certified field contact](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#certified-field-contact),\n  [collision versus drawn mesh](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#collision-versus-drawn-mesh),\n  [water](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#water) and\n  [the Moth's motion](..\u002F..\u002F..\u002Fdocs\u002Fplans\u002Fopen-items.md#dual-stick-play-and-the-moths-motion).\n\n## Verify\n\n- Kernel laws: `tests\u002FPuck.Physics.Tests` (gravity against the pairwise oracle,\n  contact kernels, sweeps, the rigid solver's mechanism and sabotage cases,\n  navigation, lattices, neighborhoods), filtered to the class you touched.\n  Body integration laws are in `tests\u002FPuck.World.Server.Tests`.\n- Scenarios in the debug world: `puck test worlds\u002Fdebug\u002Fhall-tests.puck --jobs 1`\n  (stairs, slabs, the lift), `noclip-tests`, `suit-tests`, the `water-*-tests`,\n  `meadow-tests`; add `--reproduce` for anything that moves a pose.\n- Live read-backs over stdin: `body.where` (pose, support,\n  `sweep=refused(...)`, `asleep=`), `body.motion` (effective `stepHeight=`),\n  `world.kits`, `world.collision.status`, `world.fields`, `world.counters\n  physics.contact`, `physics.sweep` and `physics.bodies`. `puck creation stats`\n  builds a creation's contact field offline (`sdf-authoring`).\n- The reference pages' canary names (`thin-wall-sweep` and others) are\n  quarantined under `experimental\u002F` with the other canaries.\n\n## Look-alikes\n\n- The chase camera's clearance sweeps and an effector's surface probe query\n  the rendered field for presentation (`WorldFieldAnswer`, `puck-world`), not\n  the contact seam.\n- `FixedSpatialNeighborhood` is perception; the body-pair broadphase is the\n  population's X sweep and YZ grid under `collision.bodyContacts`.\n- `collision.events` budgets proximity events; `collision.bodyContacts`\n  budgets physical depenetration. They are separate limits.\n\n## Route adjacent work\n\n| Skill | Route there for |\n|---|---|\n| `puck-world` | Kit, `motion`, `collision`, `navigation` and `fields` document fields, the tick order, running a World. |\n| `sdf-authoring` | Which shapes a creation's contact admits, contact tuning, `puck creation stats` and `creation.shape`. |\n| `maths-usage` | Fixed-point vectors, rate accumulators, rounding and the certified sweep's field queries. |\n| `maths-laws` | Law coverage for a changed `Puck.Maths` member a kernel uses. |\n| `state` | Rules that read body facts or write body targets, and the rule-gate interpreter. |\n| `rendering` | The SDF evaluator and mesh the drawn surface comes from. |\n| `verification` | Leases, the private CLI copy, flaky versus failing scenarios. |\n",{"name":5,"description":7},"main","2ef814b84c9595144e052c6dcd300badb619ee2f",".claude\u002Fskills\u002Fphysics",0,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck","https:\u002F\u002Fgithub.com\u002FByteTerrace","https:\u002F\u002Fbyteterrace.com","2026-11-12 13:59:16",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ByteTerrace\u002FPuck --skill physics",{"tool":37,"command":38},"bunx","bunx skills add ByteTerrace\u002FPuck --skill physics",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ByteTerrace\u002FPuck --skill physics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002FSKILL.md",true,[45,51,55,58,62,66,70,74,77,81],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"evals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fauthored-not-new-code.md","REFERENCE","参考文档",958,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fauthored-not-new-code.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fnames-ground-snap.md",58,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fnames-ground-snap.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":57},"evals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fnames-step-height.md","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fnames-step-height.md",{"path":59,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":60,"sourceHtmlUrl":61},"evals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fskill-fired.md",36,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp01-kerb-and-slope\u002Fgraders\u002Fskill-fired.md",{"path":63,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":64,"sourceHtmlUrl":65},"evals\u002Fp01-kerb-and-slope\u002Fprompt.md",820,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp01-kerb-and-slope\u002Fprompt.md",{"path":67,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":68,"sourceHtmlUrl":69},"evals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fevents-agree-with-contact.md",875,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fevents-agree-with-contact.md",{"path":71,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fnames-the-kernel.md",72,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fnames-the-kernel.md",{"path":75,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":60,"sourceHtmlUrl":76},"evals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fskill-fired.md","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp02-event-overlap-sense\u002Fgraders\u002Fskill-fired.md",{"path":78,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fp02-event-overlap-sense\u002Fgraders\u002Ftouching-is-not-overlap.md",534,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp02-event-overlap-sense\u002Fgraders\u002Ftouching-is-not-overlap.md",{"path":82,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":83,"sourceHtmlUrl":84},"evals\u002Fp02-event-overlap-sense\u002Fprompt.md",741,"https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphysics\u002Fevals\u002Fp02-event-overlap-sense\u002Fprompt.md",[86,93,100,107,114,121],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M75V6X1GBYDMSMJC8VXXPFAP","verification","Verifies Puck changes: landing bar, builds, stale DLLs, flaky tests, GPU\u002Fheavy leases, coverage, source-scan or regex laws versus type\u002Fcompiler enforcement, and writing tests.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fverification\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M75V6TM3F9A7ZMA0Q43RVJSF","tooling","Maps shared build\u002FCLI architecture, compiler assembly identity, candidate installation, generated sections, and host admission.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftooling\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M75V6R4E6AY73X27MC6EE5X5","tooling-files","Maps shared repository tooling for files, paths, Git queries, project ownership and Markdown fences. Load before adding or changing a helper in these areas.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftooling-files\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M75V6N2P9XWWPH7EHRKMBTEC","symbol-analysis","Answers C# structure questions with puck references and declarations: which types derive from, implement or override a symbol, who references it, safe to delete or rename. Text: content-search.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsymbol-analysis\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M75V6HRKM57BD8Q7A4N8QN0C","state","Maps Puck's state and rule engine (Puck.State, .Rules, .Search, .Topology, .Vectors, .Generators): arena, journal scopes, undo, hashing, rule compiler, faults, transforms, search, draws.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fstate\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":18},"01M75V6CE3X73KNZYFRT9A5W8F","sdf-authoring","Authors creations: shape rows, primitives, blends, folds, palettes, paints, render lanes, rigs, bake work and bytes, creation stats. Use to sculpt or fix a part. Grammar: puck-dsl; GPU: rendering.","https:\u002F\u002Fgithub.com\u002FByteTerrace\u002FPuck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsdf-authoring\u002FSKILL.md",[],[]]