[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E44SDA4CP16CTBVTMK0VVK":3,"skill-same:01M7E44SDA4CP16CTBVTMK0VVK":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},"01M7E44SDA4CP16CTBVTMK0VVK","test-harness",null,"Write or run tests against the NSail harnesses — which layer owes the proof (Architecture, Stack, kit WebApi.Tests on Postgres, bUnit, Apps, browser E2E), HandlerHost, the Release-build E2E host, Api.Send, culture and viewport. Use for a kit, bUnit or E2E test, deciding whether a fix earns a regression test, a flaky or instantly-failing suite, or reporting test totals.","nsail-ar\u002Fnsail-stack","nsail-ar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311138441?v=4","01M7E43SJ8P0ZN6TB6CXGBQQ3R","01M7E43SK611Q8B0KG2CF9A58X",4,"MIT","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Ftest-harness\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: test-harness\ndescription: Write or run tests against the NSail harnesses — which layer owes the proof (Architecture, Stack, kit WebApi.Tests on Postgres, bUnit, Apps, browser E2E), HandlerHost, the Release-build E2E host, Api.Send, culture and viewport. Use for a kit, bUnit or E2E test, deciding whether a fix earns a regression test, a flaky or instantly-failing suite, or reporting test totals.\n---\n\n# Test harness\n\nThe layer map and rulings are doctrine: read `${CLAUDE_PLUGIN_ROOT}\u002Fdoctrine\u002Ftesting.md` first —\neach layer proves one kind of truth, and a test in the wrong layer proves nothing twice.\nThis skill surfaces the lore that has been paid for. When they disagree, the doctrine wins.\n\n## Which layer owes the proof\n\n| Layer | Proves |\n|---|---|\n| `test\u002FArchitecture` (products' repository) | form — a doctrine rule quantified over the whole tree |\n| `test\u002FStack\u002F...` | a Stack module's own behavior, offline |\n| `test\u002FKits\u002F...\u002FWebApi.Tests` | handler doctrine against real Postgres (`NSail.Data.Testing`) |\n| `test\u002FKits\u002F...\u002FShared.Tests`, `test\u002FStack\u002FComponents` | screen behavior through real DOM events (bUnit) |\n| `test\u002FApps\u002F...` | composition seams — what a screen actually sends |\n| `test\u002FApps\u002F...\u002FE2E` | only what a real browser sees; a THIN layer on purpose |\n\nThe kits are covered; **the Apps layer is where defects pool**. When an app story touches\na seam, the seam's test rides the story.\n\n## Kit harness recipe\n\n- `HandlerHost.Start(prefix, contextFactory, compose)` — ephemeral database per collection\n  on the real local Postgres; the design-time factory migrates it with the composing app's\n  chain. Never hand-type a setup list — it rots the day a kit joins one app only.\n- **Every unique value embeds a fresh Guid**: the collection shares one database, so a\n  reused literal collides with a unique index. **Except a phone number**: a Guid cannot\n  spell one the numbering plan admits, so it is drawn with `Handsets.Draw()`\n  (`test\u002FShared\u002FDirectory\u002FHandsets.cs`) — why in testing.md, \"Every harness\".\n- The composition registers a **flat wide policy** (any authenticated session), so the\n  handler is what answers — gate semantics belong to `NSail.Security.Tests`. The exception\n  is a gate-proof collection (the `PolicyGate` precedent): it registers NO policies, so a\n  denial can only come from the stored constraint under test.\n\n## Browser e2e recipe\n\n- **The suite builds the Release host it spawns, every run.** `OpticalHostProcess` runs the\n  Release build (the `#if DEBUG` sign-in shortcuts are compiled out — the only way the\n  sign-in path is the real one), and no slot produces that output: `dotnet build`\u002F`dotnet\n  test` are Debug. Rebuilding only when the file is missing leaves a stale Release host\n  exercising last week's app.\n- **Arrange over HTTP, act through the UI.** `Api.Send` posts a message to its own `[Http]`\n  route over the signed-in context's cookie jar — reference rows cost one request, and what\n  the path proves is the screen it is named after.\n- **Declare the language and the viewport**: `OpticalE2EFixture.NewContext` writes the\n  culture cookie and a desktop viewport wide enough that the container-query columns are\n  present — an install-default language change breaks tests that assume one.\n- bUnit drives REAL DOM events; value-writing without events is the documented automation\n  trap and proves nothing about bindings.\n\n## Flaky suites\n\n- A whole assembly failing instantly on connects is the shared Postgres under cross-slot\n  load — **rerun serial before suspecting code**. `RetryingLazy` keeps a faulted sweep\n  from poisoning an assembly.\n\n## When a fix earns a test (testing.md, ruling 7 bounding ruling 6)\n\n**A test per contract, never a test per anecdote.** A fix earns a test when the defect\nexposed a promise nobody was watching. The question at every close is *what promise was\nunwatched?* — if the answer names a promise, the pin lands (red first, the fix turns it\ngreen); if the answer is \"we were careless here once\", the fix ships alone and the story\nsays so. A bug that reached a USER proves a flow nobody pinned, and a flow is a promise —\nits scenario lands in the catalog (`NSail.Optical.Scenarios.Tests` against\n`src\u002FApps\u002FOptical\u002Fdocs\u002Ftest-scenarios.md`) before the fix. The same shape landing three\ntimes in a week is a class that earns a net, not three regression tests.\n\nRepeatable verification lands as a test; prose is for what only the eye judges. Form\nrules quantified over the tree go to `Architecture.Tests` (products' repository; the Stack's own in `test\u002FStack`) with an explicit exemption\nlist, never a recurring manual audit.\n\n## Reporting\n\nThe suite total is the tree's, verified against `find test -name '*.Tests.csproj' | wc -l`,\nnever a number carried from memory. No coverage target, deliberately.\n","# Test harness\n\nThe layer map and rulings are doctrine: read `${CLAUDE_PLUGIN_ROOT}\u002Fdoctrine\u002Ftesting.md` first —\neach layer proves one kind of truth, and a test in the wrong layer proves nothing twice.\nThis skill surfaces the lore that has been paid for. When they disagree, the doctrine wins.\n\n## Which layer owes the proof\n\n| Layer | Proves |\n|---|---|\n| `test\u002FArchitecture` (products' repository) | form — a doctrine rule quantified over the whole tree |\n| `test\u002FStack\u002F...` | a Stack module's own behavior, offline |\n| `test\u002FKits\u002F...\u002FWebApi.Tests` | handler doctrine against real Postgres (`NSail.Data.Testing`) |\n| `test\u002FKits\u002F...\u002FShared.Tests`, `test\u002FStack\u002FComponents` | screen behavior through real DOM events (bUnit) |\n| `test\u002FApps\u002F...` | composition seams — what a screen actually sends |\n| `test\u002FApps\u002F...\u002FE2E` | only what a real browser sees; a THIN layer on purpose |\n\nThe kits are covered; **the Apps layer is where defects pool**. When an app story touches\na seam, the seam's test rides the story.\n\n## Kit harness recipe\n\n- `HandlerHost.Start(prefix, contextFactory, compose)` — ephemeral database per collection\n  on the real local Postgres; the design-time factory migrates it with the composing app's\n  chain. Never hand-type a setup list — it rots the day a kit joins one app only.\n- **Every unique value embeds a fresh Guid**: the collection shares one database, so a\n  reused literal collides with a unique index. **Except a phone number**: a Guid cannot\n  spell one the numbering plan admits, so it is drawn with `Handsets.Draw()`\n  (`test\u002FShared\u002FDirectory\u002FHandsets.cs`) — why in testing.md, \"Every harness\".\n- The composition registers a **flat wide policy** (any authenticated session), so the\n  handler is what answers — gate semantics belong to `NSail.Security.Tests`. The exception\n  is a gate-proof collection (the `PolicyGate` precedent): it registers NO policies, so a\n  denial can only come from the stored constraint under test.\n\n## Browser e2e recipe\n\n- **The suite builds the Release host it spawns, every run.** `OpticalHostProcess` runs the\n  Release build (the `#if DEBUG` sign-in shortcuts are compiled out — the only way the\n  sign-in path is the real one), and no slot produces that output: `dotnet build`\u002F`dotnet\n  test` are Debug. Rebuilding only when the file is missing leaves a stale Release host\n  exercising last week's app.\n- **Arrange over HTTP, act through the UI.** `Api.Send` posts a message to its own `[Http]`\n  route over the signed-in context's cookie jar — reference rows cost one request, and what\n  the path proves is the screen it is named after.\n- **Declare the language and the viewport**: `OpticalE2EFixture.NewContext` writes the\n  culture cookie and a desktop viewport wide enough that the container-query columns are\n  present — an install-default language change breaks tests that assume one.\n- bUnit drives REAL DOM events; value-writing without events is the documented automation\n  trap and proves nothing about bindings.\n\n## Flaky suites\n\n- A whole assembly failing instantly on connects is the shared Postgres under cross-slot\n  load — **rerun serial before suspecting code**. `RetryingLazy` keeps a faulted sweep\n  from poisoning an assembly.\n\n## When a fix earns a test (testing.md, ruling 7 bounding ruling 6)\n\n**A test per contract, never a test per anecdote.** A fix earns a test when the defect\nexposed a promise nobody was watching. The question at every close is *what promise was\nunwatched?* — if the answer names a promise, the pin lands (red first, the fix turns it\ngreen); if the answer is \"we were careless here once\", the fix ships alone and the story\nsays so. A bug that reached a USER proves a flow nobody pinned, and a flow is a promise —\nits scenario lands in the catalog (`NSail.Optical.Scenarios.Tests` against\n`src\u002FApps\u002FOptical\u002Fdocs\u002Ftest-scenarios.md`) before the fix. The same shape landing three\ntimes in a week is a class that earns a net, not three regression tests.\n\nRepeatable verification lands as a test; prose is for what only the eye judges. Form\nrules quantified over the tree go to `Architecture.Tests` (products' repository; the Stack's own in `test\u002FStack`) with an explicit exemption\nlist, never a recurring manual audit.\n\n## Reporting\n\nThe suite total is the tree's, verified against `find test -name '*.Tests.csproj' | wc -l`,\nnever a number carried from memory. No coverage target, deliberately.\n",{"name":5,"description":7},"main","05792baf2de3007074f23bcb6539a1a6b46b3486","plugins\u002Fnsail-stack\u002Fskills\u002Ftest-harness",0,"https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack","https:\u002F\u002Fgithub.com\u002Fnsail-ar","2026-11-14 14:30:35",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add nsail-ar\u002Fnsail-stack --skill test-harness",{"tool":36,"command":37},"bunx","bunx skills add nsail-ar\u002Fnsail-stack --skill test-harness",{"tool":39,"command":40},"pnpm","pnpm dlx skills add nsail-ar\u002Fnsail-stack --skill test-harness","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Ftest-harness\u002FSKILL.md",true,[],[45,52,59,66,73],{"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},"01M7E44KMEW16SXT6XEGDKX03M","new-message","Add an NSail operation end to end — a message in the Sdk ([Http] route, validation), its IHandler in WebApi, the Row\u002FRef\u002FModel projection, BusinessException failures and strings; endpoint, DI and client are generated. Use for a query or command such as ListInvoices or CreatePayment, when choosing a verb (there is no Save), or on SenderNotFound.","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Fnew-message\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},"01M7E44C5AYM5PQQEAN6V2XTWR","new-mapping","Write or convert a handler so the generated entity mapper copies the data — [MapFrom] a message onto an entity graph, [MapTo] a Row\u002FModel\u002FRef projection, EntityMapper.Map\u002FUpsert\u002FProject. Use when a handler would assign entity.X = message.X by hand, build a new Entity from a message, merge a child collection by key, or project with .Select; when adding a Create\u002FUpdate\u002FList\u002FGet\u002FLookup to a kit; or when a build says NSG004 to NSG013 or NSG025.","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Fnew-mapping\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},"01M7E446ZQC8228353102TW3HX","new-icon","Add an icon to an NSail icon catalog (NsIcons, a kit's or app's like ProductsIcons or OpticalIcons, a Stack library's own) from a Material Symbols path. Use when a screen, menu entry, button or field needs a glyph no catalog has, instead of Icons.Material.*, or when a pasted icon renders as nothing or a dot. Covers the 960-grid viewBox transform, catalog choice and sizing.","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Fnew-icon\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},"01M7E4414KBNYX5R1NTZ0RTHMT","doctrine","The Stack's architecture — which page to read before touching a message, handler, entity, migration, tenancy, permission, screen, Ns* component, test, React client, localization key or project layout. Use before editing code that builds on the Stack, when a CLAUDE.md routes the Stack's doctrine, or when asked how the Stack wants something done.","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Fdoctrine\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},"01M7E43WB8NPCHVQ07KZQYBBS7","convert-to-nsload","Convert a screen's data read into an NsLoad region (OnLoad, Reload, Retry, NsPartial.Handoff for dashboard cards). Use whenever you touch a Blazor screen or card that loads in OnCreatedAsync, OnParametersSetAsync or OnInitializedAsync, or when a load failure shows as a toast, a card reads twice, or an empty state lies about a failed read.","https:\u002F\u002Fgithub.com\u002Fnsail-ar\u002Fnsail-stack\u002Fblob\u002Fmain\u002Fplugins\u002Fnsail-stack\u002Fskills\u002Fconvert-to-nsload\u002FSKILL.md",[],[]]