[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72SFRPRG2KW1G9ZM61JHTV8":3,"skill-same:01M72SFRPRG2KW1G9ZM61JHTV8":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"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":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M72SFRPRG2KW1G9ZM61JHTV8","fs-skia-elmish",null,"Work on Elmish adapter contracts and generated product Elmish wiring.","EHotwagner\u002FFS-Skia-UI","EHotwagner","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1645484?v=4","01M72S7CTBDPQDQHQJKKHY87K9","01M72S7CVFD0JN82RVX21NFEVC",2,"MIT","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Fsrc\u002FElmish\u002Fskill\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: fs-skia-elmish\ndescription: Work on Elmish adapter contracts and generated product Elmish wiring.\n---\n\n# Elmish Capability\n\n## Scope\n\nOwns `src\u002FElmish\u002F`, Elmish adapter tests, `template\u002Ffragments\u002Felmish\u002F`, and generated product Elmish entry points.\n\n## Public Contract\n\nThe supported API lives in `src\u002FElmish\u002FElmish.fsi`. Surface changes require `readiness\u002Fsurface-baselines\u002FFS.Skia.UI.Elmish.txt`.\n\n## Build Commands\n\nRun `.\u002Ffake.sh build -t CapabilityCheck`, `.\u002Ffake.sh build -t DependencyReport`, and `.\u002Ffake.sh build -t PackLocal`.\n\n## Test Commands\n\nRun `dotnet test tests\u002FElmish.Tests\u002FElmish.Tests.fsproj` and `.\u002Ffake.sh build -t GeneratedProductCheck`.\n\n## Evidence\n\nRecord transition and effect evidence under the active feature readiness\npackage-surface reports when adapter behavior changes. Stable public surface\nbaselines live under `readiness\u002Fsurface-baselines\u002F`.\n\n## Package Boundary\n\nKeep `Model`, `Msg`, `Effect`, `init`, and `update` pure. Native viewer I\u002FO belongs to SkiaViewer interpreter code.\n\n## Generated Product\n\nProducts that select Elmish receive Scene and SkiaViewer prerequisites plus this skill.\n\n## Runnable example\n\nOpen the package namespace and initialize the adapter over a pure user model:\n\n```fsharp\nopen FS.Skia.UI.Scene\nopen FS.Skia.UI.SkiaViewer\nopen FS.Skia.UI.Elmish\n\nlet options = { Title = \"elmish\"; InitialSize = { Width = 320; Height = 240 } }\nlet render (count: int) = Text((10.0, 20.0), sprintf \"count=%d\" count, Colors.white)\n\nlet model, _effects = ElmishAdapter.init options 0 (render 0)\nlet next, _ = ElmishAdapter.update render (UserMsg 1) model\nprintfn \"user model = %d\" next.UserModel\n```\n\n## Canonical arcade game-loop conventions\n\nEvery arcade demo (Asteroids, Breakout, …) re-derives the same deterministic\n`update`-side primitives. Capture them as canonical MVU conventions here rather\nthan re-implementing them per game. Each is a pure function of the model, so it\nlives inside `update`, never in the interpreter.\n\n**Shipped helper: deterministic seeded RNG (`FS.Skia.UI.SkillSupport.Random`).**\nAs of feature 062 (FR-010), the thrice-re-implemented seeded RNG is **shipped real\nAPI** — use it instead of ambient `System.Random` so your `update` stays pure and\nreplayable. Thread the opaque `RngState` through your `Model`:\n\n```fsharp\nopen FS.Skia.UI.SkillSupport\n\n\u002F\u002F in init: seed once (same seed ⇒ identical replayable stream on any platform)\nlet model0 = { model with Rng = Random.seedRng 42UL }\n\n\u002F\u002F in update: thread the state — no ambient System.Random, no wall-clock\nlet spawnColumn, rng' = Random.nextBelow boardColumns model.Rng\n{ model with Rng = rng' (* … place the entity at spawnColumn … *) }\n```\n\n`seedRng`\u002F`nextRng`\u002F`nextBelow` are pure `state -> (value, nextState)`; carrying\n`RngState` in the model keeps the whole simulation deterministic and replayable\n(a prerequisite for deterministic-replay evidence).\n\nThe three loop primitives below remain **documented conventions, not shipped\n`FS.Skia.UI` API** (feature 062 D10\u002FD11 defer them with rationale — not yet at the\n3-demo recurrence bar); each documented convention is the spec if a later feature\nships it.\n\n1. **Fixed-step accumulator (deterministic `step` driver).** Decouple simulation\n   from frame cadence: accumulate real elapsed time and advance the simulation in\n   fixed `1\u002F120 s` steps, capping the steps consumed per tick so a long stall\n   (debugger pause, GC) can never spiral into hundreds of catch-up steps. Pure in\n   `update`; the only input is the elapsed time carried on the tick `Msg`.\n   ```fsharp\n   let private dt = 1.0 \u002F 120.0          \u002F\u002F fixed simulation step\n   let private maxStepsPerTick = 5       \u002F\u002F cap catch-up after a stall\n   let stepFixed (advance: Model -> Model) (elapsed: float) (m: Model) : Model =\n       let acc = m.Accumulator + elapsed\n       let steps = min maxStepsPerTick (int (acc \u002F dt))\n       let m' = List.fold (fun s _ -> advance s) m [ 1 .. steps ]\n       { m' with Accumulator = acc - float steps * dt }\n   ```\n2. **Collision + single-reflection-per-step.** Use AABB for box-vs-box and\n   circle-vs-rect for a ball; resolve **at most one** reflection per fixed step,\n   choosing the axis by the **smaller normalized penetration** (penetration ÷\n   extent) so a corner hit flips exactly one component, not both. Reflect by\n   negating that one velocity component and pushing the body out by the\n   penetration depth.\n3. **Paddle-rebound angle with a `|Dy|` floor.** Map the ball's contact offset\n   from the paddle centre to a horizontal velocity, but clamp `|Dy|` to a minimum\n   so the ball can never settle into a purely-horizontal loop:\n   `dy = sign dy * max minDy (abs dy)` after the rebound.\n\n## Persistent problems\n\nWhen a problem outlasts reasonable in-repo attempts, extensive external research is\n**mandatory** — consult **official online docs first** (the F#\u002F.NET docs and the driven\nlibrary's own documentation\u002FAPI reference), then community sources (forums, Reddit, Q&A\nsites, issue trackers and changelogs). Record the findings and resolving links in the\nfeature's `specs\u002F\u003Cfeature>\u002Ffeedback\u002F` folder and, for durable lessons, in this skill's\n**Sources** line. Offline, the mandate degrades to recording \"research blocked — \u003Cwhy>\"\nrather than hard-failing the phase.\n\n## Related\n\n- [[fs-skia-skiaviewer]] provides the `ViewerModel`\u002F`ViewerMsg` this adapter wraps.\n- [[fs-skia-scene]] supplies the `SceneNode` the render function produces.\n\n## Sources \u002F links\n\n- F#\u002F.NET docs: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Ffsharp\u002F\n- Fable.Elmish (the Elmish architecture this adapter follows): https:\u002F\u002Felmish.github.io\u002Felmish\u002F\n","# Elmish Capability\n\n## Scope\n\nOwns `src\u002FElmish\u002F`, Elmish adapter tests, `template\u002Ffragments\u002Felmish\u002F`, and generated product Elmish entry points.\n\n## Public Contract\n\nThe supported API lives in `src\u002FElmish\u002FElmish.fsi`. Surface changes require `readiness\u002Fsurface-baselines\u002FFS.Skia.UI.Elmish.txt`.\n\n## Build Commands\n\nRun `.\u002Ffake.sh build -t CapabilityCheck`, `.\u002Ffake.sh build -t DependencyReport`, and `.\u002Ffake.sh build -t PackLocal`.\n\n## Test Commands\n\nRun `dotnet test tests\u002FElmish.Tests\u002FElmish.Tests.fsproj` and `.\u002Ffake.sh build -t GeneratedProductCheck`.\n\n## Evidence\n\nRecord transition and effect evidence under the active feature readiness\npackage-surface reports when adapter behavior changes. Stable public surface\nbaselines live under `readiness\u002Fsurface-baselines\u002F`.\n\n## Package Boundary\n\nKeep `Model`, `Msg`, `Effect`, `init`, and `update` pure. Native viewer I\u002FO belongs to SkiaViewer interpreter code.\n\n## Generated Product\n\nProducts that select Elmish receive Scene and SkiaViewer prerequisites plus this skill.\n\n## Runnable example\n\nOpen the package namespace and initialize the adapter over a pure user model:\n\n```fsharp\nopen FS.Skia.UI.Scene\nopen FS.Skia.UI.SkiaViewer\nopen FS.Skia.UI.Elmish\n\nlet options = { Title = \"elmish\"; InitialSize = { Width = 320; Height = 240 } }\nlet render (count: int) = Text((10.0, 20.0), sprintf \"count=%d\" count, Colors.white)\n\nlet model, _effects = ElmishAdapter.init options 0 (render 0)\nlet next, _ = ElmishAdapter.update render (UserMsg 1) model\nprintfn \"user model = %d\" next.UserModel\n```\n\n## Canonical arcade game-loop conventions\n\nEvery arcade demo (Asteroids, Breakout, …) re-derives the same deterministic\n`update`-side primitives. Capture them as canonical MVU conventions here rather\nthan re-implementing them per game. Each is a pure function of the model, so it\nlives inside `update`, never in the interpreter.\n\n**Shipped helper: deterministic seeded RNG (`FS.Skia.UI.SkillSupport.Random`).**\nAs of feature 062 (FR-010), the thrice-re-implemented seeded RNG is **shipped real\nAPI** — use it instead of ambient `System.Random` so your `update` stays pure and\nreplayable. Thread the opaque `RngState` through your `Model`:\n\n```fsharp\nopen FS.Skia.UI.SkillSupport\n\n\u002F\u002F in init: seed once (same seed ⇒ identical replayable stream on any platform)\nlet model0 = { model with Rng = Random.seedRng 42UL }\n\n\u002F\u002F in update: thread the state — no ambient System.Random, no wall-clock\nlet spawnColumn, rng' = Random.nextBelow boardColumns model.Rng\n{ model with Rng = rng' (* … place the entity at spawnColumn … *) }\n```\n\n`seedRng`\u002F`nextRng`\u002F`nextBelow` are pure `state -> (value, nextState)`; carrying\n`RngState` in the model keeps the whole simulation deterministic and replayable\n(a prerequisite for deterministic-replay evidence).\n\nThe three loop primitives below remain **documented conventions, not shipped\n`FS.Skia.UI` API** (feature 062 D10\u002FD11 defer them with rationale — not yet at the\n3-demo recurrence bar); each documented convention is the spec if a later feature\nships it.\n\n1. **Fixed-step accumulator (deterministic `step` driver).** Decouple simulation\n   from frame cadence: accumulate real elapsed time and advance the simulation in\n   fixed `1\u002F120 s` steps, capping the steps consumed per tick so a long stall\n   (debugger pause, GC) can never spiral into hundreds of catch-up steps. Pure in\n   `update`; the only input is the elapsed time carried on the tick `Msg`.\n   ```fsharp\n   let private dt = 1.0 \u002F 120.0          \u002F\u002F fixed simulation step\n   let private maxStepsPerTick = 5       \u002F\u002F cap catch-up after a stall\n   let stepFixed (advance: Model -> Model) (elapsed: float) (m: Model) : Model =\n       let acc = m.Accumulator + elapsed\n       let steps = min maxStepsPerTick (int (acc \u002F dt))\n       let m' = List.fold (fun s _ -> advance s) m [ 1 .. steps ]\n       { m' with Accumulator = acc - float steps * dt }\n   ```\n2. **Collision + single-reflection-per-step.** Use AABB for box-vs-box and\n   circle-vs-rect for a ball; resolve **at most one** reflection per fixed step,\n   choosing the axis by the **smaller normalized penetration** (penetration ÷\n   extent) so a corner hit flips exactly one component, not both. Reflect by\n   negating that one velocity component and pushing the body out by the\n   penetration depth.\n3. **Paddle-rebound angle with a `|Dy|` floor.** Map the ball's contact offset\n   from the paddle centre to a horizontal velocity, but clamp `|Dy|` to a minimum\n   so the ball can never settle into a purely-horizontal loop:\n   `dy = sign dy * max minDy (abs dy)` after the rebound.\n\n## Persistent problems\n\nWhen a problem outlasts reasonable in-repo attempts, extensive external research is\n**mandatory** — consult **official online docs first** (the F#\u002F.NET docs and the driven\nlibrary's own documentation\u002FAPI reference), then community sources (forums, Reddit, Q&A\nsites, issue trackers and changelogs). Record the findings and resolving links in the\nfeature's `specs\u002F\u003Cfeature>\u002Ffeedback\u002F` folder and, for durable lessons, in this skill's\n**Sources** line. Offline, the mandate degrades to recording \"research blocked — \u003Cwhy>\"\nrather than hard-failing the phase.\n\n## Related\n\n- [[fs-skia-skiaviewer]] provides the `ViewerModel`\u002F`ViewerMsg` this adapter wraps.\n- [[fs-skia-scene]] supplies the `SceneNode` the render function produces.\n\n## Sources \u002F links\n\n- F#\u002F.NET docs: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Ffsharp\u002F\n- Fable.Elmish (the Elmish architecture this adapter follows): https:\u002F\u002Felmish.github.io\u002Felmish\u002F\n",{"name":5,"description":7},"main","f943406829a9218b2882e09eb88d4ddb539c5e72","src\u002FElmish\u002Fskill",0,"https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI","https:\u002F\u002Fgithub.com\u002FEHotwagner","2026-06-16 16:16:52",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add EHotwagner\u002FFS-Skia-UI --skill fs-skia-elmish",{"tool":36,"command":37},"bunx","bunx skills add EHotwagner\u002FFS-Skia-UI --skill fs-skia-elmish",{"tool":39,"command":40},"pnpm","pnpm dlx skills add EHotwagner\u002FFS-Skia-UI --skill fs-skia-elmish","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Fsrc\u002FElmish\u002Fskill\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M72SGYR4T02T1HTS175E0V86","fs-skia-ui-widgets","Generated product guidance for Skia-rendered FS.Skia.UI Controls, rich text, chart controls, graph controls, DataGrid, and custom wrappers.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-ui-widgets\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M72SGVZJR1B117QK7TCC6E0J","fs-skia-testing","Assert generated-product expectations and evidence in a governed FS.Skia.UI product.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-testing\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M72SGTC5HZYEVVVZT4X51AZ3","fs-skia-skiaviewer","Wire a generated FS.Skia.UI product to the desktop viewer host.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-skiaviewer\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M72SGS47RPYPC9JTC39CC6EF","fs-skia-scene","Build pure scene descriptions in a generated FS.Skia.UI product.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-scene\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M72SGQF4G76C4NGSF69KZRRF","fs-skia-keyboard-input","Map keyboard input to product commands in a generated FS.Skia.UI product.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-keyboard-input\u002FSKILL.md",[],[],{"skillNo":81,"name":5,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M72SGNJP3PMSS2VRP98G7Z42","Drive a generated FS.Skia.UI product through the pure Elmish adapter.","https:\u002F\u002Fgithub.com\u002FEHotwagner\u002FFS-Skia-UI\u002Fblob\u002Fmain\u002Ftemplate\u002Fproduct-skills\u002Ffs-skia-elmish\u002FSKILL.md",[],[]]