[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76WWNTF03H9S5CN22QBX5ZK":3,"skill-same:01M76WWNTF03H9S5CN22QBX5ZK":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M76WWNTF03H9S5CN22QBX5ZK","magus-test-design",null,"egladman\u002Fmagus","egladman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8713153?v=4","01M75H42QB5A4X82APZF4H44GM","Eli Gladman","01M75H42R1K59Z7JWAP621J849",3,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-test-design\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"{{if .Full}}# Designing tests from observable boundaries{{else}}# Test design{{end}}\n\n{{if .Full}}Choose a test boundary from the behavior that must be proved, not from the package,\ndirectory, or test target name. Use this skill when the tier, the real\u002Ffake\u002Fstub\nchoice, what the test must assert, or where coverage goes is undecided or\nunder review.\n\nDo not use it:\n\n- for routine writing of an already-scoped test;{{else}}Choose test boundary from behavior that must be proved, not package, directory, or test target name.\nUse when tier, real\u002Ffake\u002Fstub choice, what test must assert, or coverage placement is undecided or under review.\nDo not use:\n- routine writing of already-scoped test;{{end}}\n- to run or diagnose tests (`{{skill \"run\"}}` owns that);\n{{if .Full}}- to choose a package boundary (`{{skill \"architecture-review\"}}` owns that). Pair it\n  with architecture review only when a refactor deliberately makes code easier to test.{{else}}- to choose package boundary (`{{skill \"architecture-review\"}}` owns that). Pair with architecture review only when refactor deliberately makes code easier to test.{{end}}\n\n{{if .Full}}This skill observes evidence and recommends. It does not choose the repository's\ntest policy, enable a service, create credentials, or decide what runs locally, on a\ncommit, or in CI.{{else}}Observes evidence, recommends; does not choose test policy, enable service, create credentials, or decide what runs locally, on commit, in CI.{{end}}\n\n{{if .Full}}## Gather only the evidence the decision needs{{else}}## Only needed evidence{{end}}\n\n{{if .Full}}1. State the behavior as an observable contract: triggering input or event,\n   expected result or state, and visible side effects.{{else}}1. State behavior as observable contract: triggering input or event, expected result or state, visible side effects.{{end}}\n{{if .Full}}2. Discover the workspace's tests before naming a target:{{else}}2. Discover workspace tests before naming target:{{end}}\n\n   ```sh\n   magus describe targets -o name\n   magus describe target \u003Cselected-test-target> \u003Cproject>\n   magus explain \u003Cnode>\n   ```\n\n{{if .Full}}3. Locate real collaborators and seams when that matters:{{else}}3. Real collaborators, seams, when that matters:{{end}}\n\n   ```sh\n   magus refs \u003Csymbol>\n   magus explain \u003Ca> --to \u003Cb>\n   ```\n\n{{if .Full}}4. Read the scoped code and existing tests. Identify the effects that change what a\n   lower boundary can prove. Those include a live process or runtime, the filesystem,\n   network, time, a scheduler, durable storage, or a language boundary.{{else}}4. Read scoped code, existing tests; find effects changing what lower boundary can prove: live process or runtime, filesystem, network, time, scheduler, durable storage, language boundary.{{end}}\n\n{{if .Full}}Prefer `{{tool \"client\"}}` (`{{buzz \"describe.evaluatedTarget\"}}`, `{{buzz \"graph.explain\"}}`, `{{buzz \"graph.refs\"}}`,\n`{{buzz \"graph.path\"}}`); fall back to the CLI commands above. Do not start a server only to\nreview test design.\n\nAn `unknown` from `{{cmd \"refs\"}}` is missing evidence, not proof of no callers: record\nit. Never infer the tier from a filename, an existing mock, or a target called\n`test`.{{else}}Prefer `{{tool \"client\"}}` (`{{buzz \"describe.evaluatedTarget\"}}`, `{{buzz \"graph.explain\"}}`, `{{buzz \"graph.refs\"}}`, `{{buzz \"graph.path\"}}`); else CLI above.\nDo not start server only to review test design.\n`unknown` from `{{cmd \"refs\"}}`: missing evidence, not proof of no callers; record it.\nNever infer tier from filename, existing mock, or target called `test`.{{end}}\n\n{{if .Full}}## Select the closest boundary that can falsify the contract{{else}}## Closest falsifying boundary{{end}}\n\n{{if .Full}}| Tier | The contract is about | Keep real |\n| --- | --- | --- |\n| Unit | one owned, deterministic decision | values and local state that establish its invariant; it should not require a live external service, credentials, or ambient environment |\n| Integration | a real component\u002Fservice boundary, binding, or durable effect that must participate to prove the contract | the named collaborators and services, and what each needs to start and sign in |\n| End-to-end | a user-visible workflow that depends on real dispatch, runtime or process behavior, a scheduler, durable state, or another boundary lower tiers cannot establish | the in-scope workflow and observable output |{{else}}Tier: contract about; keep real\n- Unit: one owned, deterministic decision; values and local state establishing its invariant; no live external service, credentials, or ambient environment\n- Integration: real component\u002Fservice boundary, binding, or durable effect that must participate to prove contract; named collaborators, services, what each needs to start and sign in\n- End-to-end: user-visible workflow depending on real dispatch, runtime or process behavior, scheduler, durable state, or other boundary lower tiers cannot establish; in-scope workflow and observable output{{end}}\n\n{{if .Full}}A unit test that reimplements a collaborator falsely reassures. An end-to-end test\nthat only checks a local branch is slow and repeats a lower tier's check. State what\nthe test does not prove and where that coverage belongs.{{else}}Unit test reimplementing collaborator: false reassurance.\nEnd-to-end test only checking local branch: slow, repeats lower tier's check.\nState what test does not prove, and where that coverage belongs.{{end}}\n\n{{if .Full}}## Make execution conditions visible{{else}}## Execution conditions{{end}}\n\n{{if .Full}}For every recommended test, report the evidence; do not decide policy:\n{{else}}Every recommended test: report evidence; do not decide policy:{{end}}\n{{if .Full}}- real external services, credentials, login, fixtures, or environment;{{else}}- real external services, credentials, login, fixtures, environment;{{end}}\n{{if .Full}}- whether a developer can run it locally from a normal checkout, and the setup it\n  needs when they cannot;{{else}}- whether developer can run it locally from normal checkout; setup needed when not;{{end}}\n{{if .Full}}- expected cost: time, compute, network, money, or shared-state risk;{{else}}- expected cost: time, compute, network, money, shared-state risk;{{end}}\n{{if .Full}}- the declared target or explicit invocation that shows them.{{else}}- declared target or explicit invocation showing them.{{end}}\n\n{{if .Full}}A test that needs a real service, secret, or externally prepared environment is not\na unit test: classify the boundary and state what it needs. Never assume\nintegration or end-to-end tests are opt-in, scheduled, or excluded from commits or\npull requests. Recommend a run scope from the observed cost and prerequisites; the\nuser makes the policy choice.{{else}}Test needing real service, secret, or externally prepared environment is not unit test: classify boundary, state what it needs.\nNever assume integration or end-to-end tests opt-in, scheduled, or excluded from commits or pull requests.\nRecommend run scope from observed cost and prerequisites; user chooses policy.{{end}}\n\n{{if .Full}}## Decide which collaborators are real{{else}}## Which collaborators are real{{end}}\n\n{{if .Full}}Use a real collaborator by default. A fake implements the real behavior; a stub\nsupplies only the response the subject needs. For every substitute, state:\n{{else}}Real collaborator by default. Fake implements real behavior; stub supplies only response subject needs.\nEvery substitute, state:{{end}}\n{{if .Full}}- why the real dependency is unsuitable at this boundary;{{else}}- why real dependency unsuitable at this boundary;{{end}}\n{{if .Full}}- the contract the substitute preserves;{{else}}- contract substitute preserves;{{end}}\n{{if .Full}}- the real-boundary test that checks that contract;{{else}}- real-boundary test checking that contract;{{end}}\n{{if .Full}}- the failure mode the substitute cannot reveal.{{else}}- failure mode substitute cannot reveal.{{end}}\n\n{{if .Full}}Never add an interface only to mock something. It earns its place only when the\nshipped boundary is meaningful on its own.\n\nAn existing concrete collaborator or test setup may falsify the contract at the\nselected tier. Then say so: **do not add or widen `\u003Cseam\u002Finterface>`; test through\n`\u003Cexisting boundary>`**.{{else}}Never add interface only to mock something; earns place only when shipped boundary meaningful alone.\nExisting concrete collaborator or test setup may falsify contract at selected tier -> say so: do not add or widen `\u003Cseam\u002Finterface>`; test through `\u003Cexisting boundary>`.{{end}}\n\n{{if .Full}}## Assert what the caller can observe{{else}}## Assert what caller can observe{{end}}\n\n{{if .Full}}Compare the complete normalized result or state: structured output, persisted\nstate, emitted events, relevant side effects. Do not stop at one field, a success\nboolean, or a call count when the contract is richer.\n\nNormalize values that vary between runs at the boundary (temporary paths, timestamps,\nunordered traversal, generated IDs), and assert volatile invariants separately.\nNever normalize ordering, errors, or state changes the contract includes. Internal\nsetup fits only a narrow owned unit invariant.{{else}}Compare complete normalized result or state: structured output, persisted state, emitted events, relevant side effects.\nDo not stop at one field, success boolean, or call count when contract is richer.\nNormalize values varying between runs at boundary (temporary paths, timestamps, unordered traversal, generated IDs); assert volatile invariants separately.\nNever normalize ordering, errors, or state changes contract includes.\nInternal setup fits only narrow owned unit invariant.{{end}}\n\n{{if .Full}}## Name and record the proposed case{{else}}## Case name{{end}}\n\n{{if .Full}}Propose a case name in the repository's existing idiom; never impose a universal\npattern or borrow one from another language. Record the case as:{{else}}Case name in repository's existing idiom; never impose universal pattern or borrow from another language. Record case as:{{end}}\n\n```text\n\u003Cproposed repository-idiomatic case name>\n  trigger\u002Fprecondition -> complete observable result\u002Fstate -> visible side effects\n  volatile invariants asserted separately\n```\n\n{{if .Full}}Hand language- or framework-specific mechanics to the applicable language guidance\n(syntax, helpers, fixture setup, naming). This skill keeps the boundary,\ncollaborator, and observable-contract advice language agnostic.{{else}}Language- or framework-specific mechanics -> applicable language guidance.{{end}}\n\n{{if .Full}}## Deliver the recommendation{{else}}## Deliver{{end}}\n\n{{if .Full}}Report, for each behavior:\n\n1. Observable contract and crossed system boundary.{{else}}Each behavior, report:\n1. Observable contract, crossed system boundary.{{end}}\n2. Evidence used, including index or runtime gaps.\n{{if .Full}}3. Recommended tier and why it can falsify the contract.{{else}}3. Recommended tier, why it can falsify contract.{{end}}\n4. Collaborator matrix: `collaborator -> real\u002Ffake\u002Fstub -> reason -> contract check`.\n{{if .Full}}5. What the test asserts in full, after normalizing, and the volatile invariants separately.{{else}}5. What test asserts in full after normalizing; volatile invariants separately.{{end}}\n{{if .Full}}6. Proposed repository-idiomatic case name and its explicit case record.{{else}}6. Proposed repository-idiomatic case name, explicit case record.{{end}}\n{{if .Full}}7. Whether an existing boundary suffices, or the independent reason the shipped code\n   needs a new or wider one.{{else}}7. Whether existing boundary suffices, or independent reason shipped code needs new or wider one.{{end}}\n{{if .Full}}8. How it runs: prerequisites, whether a developer reproduces it locally, cost, and\n   the observed target or invocation.{{else}}8. How it runs: prerequisites, whether developer reproduces it locally, cost, observed target or invocation.{{end}}\n{{if .Full}}9. Owning Magus test target, final affected-CI route, and complementary coverage.{{else}}9. Owning Magus test target, final affected-CI route, complementary coverage.{{end}}\n\n{{if .Full}}Hand the run to `{{skill \"run\"}}`. This skill chooses the proof; it never bypasses\nMagus with raw language test commands.{{else}}Run -> `{{skill \"run\"}}`. Skill chooses proof; never bypasses Magus with raw language test commands.{{end}}{{if .Full}}\n\n## Evidence gate for delegated work\n\nDo not label a test unit, integration, or end-to-end until the behavior and at\nleast one system boundary are named. If a selected target, reference result, or\nruntime fact is unavailable, the recommendation is **provisional**. Name the\nmissing evidence and one concrete next action; do not fill the gap with a\nguess.{{end}}{{if .Full}}\n\nDo not claim a fake is protected by real-boundary coverage unless you name that\ntest and its owning Magus target. If no such test exists, the plan\nmust include it as complementary coverage.{{end}}{{if .Full}}\n\n### Preservation gate\n\nBefore proposing a seam, interface, or widened substitute point, identify the\nexisting concrete collaborator or test setup that was considered. If it\ncan falsify the contract at the selected tier, preserve it and state:\n**do not add or widen `\u003Cseam\u002Finterface>`; test through `\u003Cexisting boundary>`**.\nOnly recommend a new or wider seam when the shipped boundary has an\nindependent reason to exist; a test double alone is not that reason.{{end}}{{if .Full}}\n\n### Execution-policy gate\n\nRecord the actual prerequisites and cost before suggesting a run scope. A\nmodel may suggest an explicit target, opt-in path, or broader gate, but only with\nthat evidence behind it. It may not present a policy choice as settled, assume\ncredentials are available, or create\u002Fmodify external configuration to make a test\nrun.{{end}}{{if .Full}}\n\n### Decision procedure\n\n```text\nCan owned local state alone falsify the observable contract?\n  yes -> unit\n  no  -> Does the contract require collaboration of owned components or a\n         durable local\u002Fbinding boundary?\n           yes -> integration\n           no  -> Does it depend on real dispatch, process\u002Fruntime behavior,\n                  scheduling, persistence, or a user-visible workflow?\n                    yes -> end-to-end\n                    no  -> provisional: gather the missing boundary evidence\n```{{end}}{{if .Full}}\n\nThe tiers are not a speed ranking. Move outward only when the inner boundary\ncannot produce the failure the contract describes.{{end}}{{if .Full}}\n\n### Common false confidence{{end}}{{if .Full}}\n\n| Shape | Why it misleads | Better proof |\n| --- | --- | --- |\n| Mock asserts a call count | proves a call pattern the test chose, not the result a caller receives | assert the complete result; cover the real call path at integration scope |\n| Snapshot hides volatile data | can bless a change without saying which values matter | normalize only what legitimately varies and assert the remaining structure |\n| Fake service mirrors shipped logic | duplicates the system under test and drifts | use the real local component or add a named contract\u002Fintegration test |\n| E2E checks only success | proves the workflow exited, not that it produced the required state | assert the full observable result and durable effects |{{end}}{{if .Full}}\n\n### Fill-in report{{end}}{{if .Full}}\n\n```text\nBehavior:\n  trigger -> observable result\u002Fstate -> side effects\n\nEvidence:\n  selected target \u002F project:\n  graph and source evidence:\n  unknown or unavailable evidence, and next action:\n\nBoundary:\n  unit | integration | end-to-end\n  reason this boundary can falsify the contract:\n\nCase:\n  proposed repository-idiomatic name:\n  trigger\u002Fprecondition -> complete observable result\u002Fstate -> visible side effects:\n  volatile invariants asserted separately:\n\nPreservation:\n  existing boundary considered:\n  do not add or widen \u003Cseam\u002Finterface>; test through \u003Cexisting boundary>\n  or independent production reason to introduce\u002Fwiden it:\n\nCollaborators:\n  \u003Cname> -> real|fake|stub -> reason -> named contract test \u002F target\n\nAssertions:\n  complete normalized result\u002Fstate:\n  volatile invariant asserted separately:\n\nExecution and gaps:\n  prerequisites \u002F local setup \u002F cost:\n  observed target or invocation -> recommended run scope (user decides):\n  owning test target -> affected CI\n  complementary coverage \u002F residual risk:\n```\n{{end}}\n",{},"main","5f0df014d9eaf4aea1a930b0bd13c3338e2642de","internal\u002Fagent\u002Fskills\u002Fmagus-test-design",0,"https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus","http:\u002F\u002Feli.gladman.cc\u002Fmagus\u002F","https:\u002F\u002Fgithub.com\u002Fegladman","eli.gladman.cc","2026-11-14 12:23:44",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add egladman\u002Fmagus --skill magus-test-design",{"tool":37,"command":38},"bunx","bunx skills add egladman\u002Fmagus --skill magus-test-design",{"tool":40,"command":41},"pnpm","pnpm dlx skills add egladman\u002Fmagus --skill magus-test-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-test-design\u002FSKILL.md",true,[],[46,52,58,64,70,76],{"skillNo":47,"name":48,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M76WWZ75J70NCG0TR23XDDE6","magus-workspace-rules","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-workspace-rules\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M76WWX72SY78KG03AVYFE768","magus-vcs-hygiene","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-vcs-hygiene\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M76WWTJYGRCKKXH948KN6RR3","magus-upstream-source","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-upstream-source\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M76WWRTBBAPNKM0PA2NG5Q3N","magus-upstream-docs","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-upstream-docs\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M76WWJX1FPSWYD1RB8JXNF3C","magus-sdk","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-sdk\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M76WWGW39RTK0GRPX4QJXF9V","magus-run","https:\u002F\u002Fgithub.com\u002Fegladman\u002Fmagus\u002Fblob\u002Fmain\u002Finternal\u002Fagent\u002Fskills\u002Fmagus-run\u002FSKILL.md",[],[]]