[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B45AD0G0BGSV4EP0PN15XA":3,"skill-same:01M7B45AD0G0BGSV4EP0PN15XA":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7B45AD0G0BGSV4EP0PN15XA","change-a-contract",null,"Any change to a function a contract proves or to a contract under a package's contracts\u002F (its type imported from there), a change that adds a pure function that decides — a status, an action, a refusal — and the design or review of one: load it with tsverify before reading, writing or judging it. What each step owes a contract here: design writes it, implement starts from it, review diffs it against design's, and CI's contracts job.","emyann\u002Fnemia","emyann","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4748419?v=4","01M7B458J23KJ5S5AEBR86G7RN","Yann RENAUDIN","01M7B458JPM0CCBDP4KCR6NATT",3,"MIT","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fchange-a-contract\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: change-a-contract\ndescription: \"Any change to a function a contract proves or to a contract under a package's contracts\u002F (its type imported from there), a change that adds a pure function that decides — a status, an action, a refusal — and the design or review of one: load it with tsverify before reading, writing or judging it. What each step owes a contract here: design writes it, implement starts from it, review diffs it against design's, and CI's contracts job.\"\napplies: [\"packages\u002F*\u002Fcontracts\u002F**\", \"apps\u002F*\u002Fcontracts\u002F**\"]\n---\n\n# Change a contract\n\nA contract proves a function by laws the verifier checks (`tsverify`, whose own skill says how to write and read one). This is what a\ncontract asks of each step here, by what the step does. CI's `contracts` job runs every contract on each commit pushed.\n\n**A contract imports nothing from the file that implements it** (`tools\u002Fguards\u002Ftest\u002Fcontract-first.test.ts`): it is written first and\ntypechecks before the code exists, so an implementer is handed the types with the laws. The types its signature needs are the\ncontract's own, or `objects`'; a value both need — an error class, a service — lives in a file of its own that both import; and a type\nseveral files of `src` share, in a file that does not implement the contract, is imported by `import type`. A contract that reads its\ncode is named in that guard's baseline, which only shrinks: move its types into it when you change it, and take it off.\n\nA contract is handed from step to step as a file, never as prose: design writes it, the run commits it under design's step, implement\nstarts from that commit, and review reads implement's diff of it against that commit.\n\nA function's `src\u002F` imports its contract's types by `import type` from its package's `contracts\u002F`, never `@emyann\u002Ftsverify` itself:\nthe verifier stays in the root's `devDependencies`, no workspace ships it (`tools\u002Fguards\u002Ftest\u002Fno-shipped-verifier.test.ts`), and a law\nthat would want it at run time is made provable from the code, or restated so a helper's spec carries it.\n\n## Design\n\nWhen the change adds a pure function that decides — a status, an action, a refusal, from what it is handed — or changes one a contract\nproves (its type is imported from its package's `contracts\u002F`), load the `tsverify` skill and **write the contract yourself**: the file\n`\u003Cpackage>\u002Fcontracts\u002F\u003Cname>.contract.ts`, directly under a package's or an app's `contracts\u002F`, its laws written in the order the\n`tsverify` skill asks, each named and with its sentence beside it. In the nemia factory your fence allows that file and refuses every\nother write, `contracts\u002Flaws.ts` included: a helper the laws need is written inside the contract file, and implement may move it to\n`laws.ts`, which changes no law.\n\n- **The function exists**: run `npx tsverify \u003Cits source file> \u003Cname>`, bare (a fenced step's fence refuses `--cache`, which writes, and\n  `--watch`, which never ends). Each law you add or change comes back `counterexample` on the code as it is; one that comes back `proved`\n  says nothing the code does not already do, and one that comes back `vacuous` holds of no input: rewrite either before you hand it on.\n- **The function does not exist yet**: the verifier refuses a spec with no implementation, so write the spec, export its\n  `Implementation\u003Ctypeof …Spec>` type under the function's name. A word or a shape `objects` holds (`packages\u002Fobjects\u002Fsrc\u002Fwords.ts`\n  and its Schemas) is imported by `import type` from its entry, `objects`, never declared again; every other type the signature needs\n  is declared and exported in the contract, where it stays: the code takes it from the contract and hands it on, and never moves it\n  into `src`. Typecheck it, `npx tsrs --noEmit -p \u003Cpackage>` (each package that holds a `contracts\u002F` has it in its tsconfig's\n  `include`; a new one adds it), and say each law's verdict as `no code yet`.\n\nYour spec names the file and gives each law's name and verdict; it does not carry the laws in words. Name the file in your `artifacts`,\nand leave it uncommitted: the run commits it with the rest of your step as `design: hand off what was left uncommitted`, the commit\nimplement starts from and review compares against. A spec rewritten after a round rewrites the file, never only its words.\n\n## Implement\n\nWhen the change touches a function a contract proves, or design handed you a contract for one, load the `tsverify` skill before you\nchange the code. **Start from design's file**, as its hand-off commit has it. Change no law of it without naming in your closeout the\nlaw, what you changed (dropped, added, renamed, loosened or tightened) and why: the verifier says it cannot be proved, another law\nimplies it, a review finding, an `undecided` closed. A law changed with no reason given is a finding of the review.\n\nRun the verifier before you change the code: each new law comes back `counterexample` on the code as it is. Where design said `no code\nyet`, write first a stub typed by the spec and see each law come back `counterexample` on it (a `vacuous` one goes back to the spec);\nonly then write the code. Change the code until every law is `proved`. When the laws cannot all hold, change no law: the verifier says\n`unmeetable` where no result keeps them together at an input, and names the laws that leave none. Sign off `blocked`, naming the laws,\nthe input and why no result keeps them together, so that a person amends the spec. When the verifier says `undecided` of a contract (two\nresults of different kinds keep every law at an input `requires` allows, so the laws do not say which the code answers), add the law\nthat picks one, or, where the choice is the code's on purpose, an `open` on that part (`open: [\"output.\u003Cpart>\"]`, or `open: true` for\nthe whole result) with a line beside it saying why, and name either in your closeout as a change of the contract. Never an `open` to make\na hole go away. Run `npx tsverify \u003Cfile>` on each file you changed that holds a function a contract proves, and say in your summary each\nnew law's `counterexample` before the code and its verdict after: CI's `contracts` job runs every contract on the commit your check\npushes. A new behaviour of a function a contract proves is a law of its contract, not a new row of its tests. Delete a test a law makes\nredundant only once you have planted the bug it guards, seen the law come back `counterexample`, and put the code back: name in your\nsummary the test, the bug and the law.\n\nWhere no design handed you a file (a run with no design), name each law in your plan, with its sentence, before you write it.\n\n## Review\n\nWhen the change touches a contract under a package's `contracts\u002F`, or a function one proves, load the `tsverify` skill to judge its\nlaws. CI's `contracts` job verified every contract on the commit implement pushed, and its verdict is in the `ci` you read: you run no\nverifier, which your fence refuses.\n\nRead each contract against design's: find the commit, `git log -n 1 --format=%H --grep='^design: ' -- \u003Cfile>` (a design retried\nleaves one per try; the latest is the one handed on), and read `git diff \u003Cit> HEAD -- \u003Cfile>`. A file design handed on that implement\ndeleted is in `git diff --stat \u003Cit> HEAD`.\n\nA finding, each: a law dropped, added, renamed or loosened between design's commit and the head whose reason implement's closeout does\nnot give; a law loosened or removed with no reason the card or the spec gives; a law that restates the code rather than say the domain's\nfact; a new behaviour of a function a contract proves held by a new test row where a law could state it; a test deleted where the\nsummary names no bug planted and no law that refused it; a new law whose `counterexample` before the code implement does not report.\n","# Change a contract\n\nA contract proves a function by laws the verifier checks (`tsverify`, whose own skill says how to write and read one). This is what a\ncontract asks of each step here, by what the step does. CI's `contracts` job runs every contract on each commit pushed.\n\n**A contract imports nothing from the file that implements it** (`tools\u002Fguards\u002Ftest\u002Fcontract-first.test.ts`): it is written first and\ntypechecks before the code exists, so an implementer is handed the types with the laws. The types its signature needs are the\ncontract's own, or `objects`'; a value both need — an error class, a service — lives in a file of its own that both import; and a type\nseveral files of `src` share, in a file that does not implement the contract, is imported by `import type`. A contract that reads its\ncode is named in that guard's baseline, which only shrinks: move its types into it when you change it, and take it off.\n\nA contract is handed from step to step as a file, never as prose: design writes it, the run commits it under design's step, implement\nstarts from that commit, and review reads implement's diff of it against that commit.\n\nA function's `src\u002F` imports its contract's types by `import type` from its package's `contracts\u002F`, never `@emyann\u002Ftsverify` itself:\nthe verifier stays in the root's `devDependencies`, no workspace ships it (`tools\u002Fguards\u002Ftest\u002Fno-shipped-verifier.test.ts`), and a law\nthat would want it at run time is made provable from the code, or restated so a helper's spec carries it.\n\n## Design\n\nWhen the change adds a pure function that decides — a status, an action, a refusal, from what it is handed — or changes one a contract\nproves (its type is imported from its package's `contracts\u002F`), load the `tsverify` skill and **write the contract yourself**: the file\n`\u003Cpackage>\u002Fcontracts\u002F\u003Cname>.contract.ts`, directly under a package's or an app's `contracts\u002F`, its laws written in the order the\n`tsverify` skill asks, each named and with its sentence beside it. In the nemia factory your fence allows that file and refuses every\nother write, `contracts\u002Flaws.ts` included: a helper the laws need is written inside the contract file, and implement may move it to\n`laws.ts`, which changes no law.\n\n- **The function exists**: run `npx tsverify \u003Cits source file> \u003Cname>`, bare (a fenced step's fence refuses `--cache`, which writes, and\n  `--watch`, which never ends). Each law you add or change comes back `counterexample` on the code as it is; one that comes back `proved`\n  says nothing the code does not already do, and one that comes back `vacuous` holds of no input: rewrite either before you hand it on.\n- **The function does not exist yet**: the verifier refuses a spec with no implementation, so write the spec, export its\n  `Implementation\u003Ctypeof …Spec>` type under the function's name. A word or a shape `objects` holds (`packages\u002Fobjects\u002Fsrc\u002Fwords.ts`\n  and its Schemas) is imported by `import type` from its entry, `objects`, never declared again; every other type the signature needs\n  is declared and exported in the contract, where it stays: the code takes it from the contract and hands it on, and never moves it\n  into `src`. Typecheck it, `npx tsrs --noEmit -p \u003Cpackage>` (each package that holds a `contracts\u002F` has it in its tsconfig's\n  `include`; a new one adds it), and say each law's verdict as `no code yet`.\n\nYour spec names the file and gives each law's name and verdict; it does not carry the laws in words. Name the file in your `artifacts`,\nand leave it uncommitted: the run commits it with the rest of your step as `design: hand off what was left uncommitted`, the commit\nimplement starts from and review compares against. A spec rewritten after a round rewrites the file, never only its words.\n\n## Implement\n\nWhen the change touches a function a contract proves, or design handed you a contract for one, load the `tsverify` skill before you\nchange the code. **Start from design's file**, as its hand-off commit has it. Change no law of it without naming in your closeout the\nlaw, what you changed (dropped, added, renamed, loosened or tightened) and why: the verifier says it cannot be proved, another law\nimplies it, a review finding, an `undecided` closed. A law changed with no reason given is a finding of the review.\n\nRun the verifier before you change the code: each new law comes back `counterexample` on the code as it is. Where design said `no code\nyet`, write first a stub typed by the spec and see each law come back `counterexample` on it (a `vacuous` one goes back to the spec);\nonly then write the code. Change the code until every law is `proved`. When the laws cannot all hold, change no law: the verifier says\n`unmeetable` where no result keeps them together at an input, and names the laws that leave none. Sign off `blocked`, naming the laws,\nthe input and why no result keeps them together, so that a person amends the spec. When the verifier says `undecided` of a contract (two\nresults of different kinds keep every law at an input `requires` allows, so the laws do not say which the code answers), add the law\nthat picks one, or, where the choice is the code's on purpose, an `open` on that part (`open: [\"output.\u003Cpart>\"]`, or `open: true` for\nthe whole result) with a line beside it saying why, and name either in your closeout as a change of the contract. Never an `open` to make\na hole go away. Run `npx tsverify \u003Cfile>` on each file you changed that holds a function a contract proves, and say in your summary each\nnew law's `counterexample` before the code and its verdict after: CI's `contracts` job runs every contract on the commit your check\npushes. A new behaviour of a function a contract proves is a law of its contract, not a new row of its tests. Delete a test a law makes\nredundant only once you have planted the bug it guards, seen the law come back `counterexample`, and put the code back: name in your\nsummary the test, the bug and the law.\n\nWhere no design handed you a file (a run with no design), name each law in your plan, with its sentence, before you write it.\n\n## Review\n\nWhen the change touches a contract under a package's `contracts\u002F`, or a function one proves, load the `tsverify` skill to judge its\nlaws. CI's `contracts` job verified every contract on the commit implement pushed, and its verdict is in the `ci` you read: you run no\nverifier, which your fence refuses.\n\nRead each contract against design's: find the commit, `git log -n 1 --format=%H --grep='^design: ' -- \u003Cfile>` (a design retried\nleaves one per try; the latest is the one handed on), and read `git diff \u003Cit> HEAD -- \u003Cfile>`. A file design handed on that implement\ndeleted is in `git diff --stat \u003Cit> HEAD`.\n\nA finding, each: a law dropped, added, renamed or loosened between design's commit and the head whose reason implement's closeout does\nnot give; a law loosened or removed with no reason the card or the spec gives; a law that restates the code rather than say the domain's\nfact; a new behaviour of a function a contract proves held by a new test row where a law could state it; a test deleted where the\nsummary names no bug planted and no law that refused it; a new law whose `counterexample` before the code implement does not report.\n",{"name":5,"applies":24,"description":7},[25,26],"packages\u002F*\u002Fcontracts\u002F**","apps\u002F*\u002Fcontracts\u002F**","main","e3efae8a132cdd1bb19337ef25a64fc7444f2708",".claude\u002Fskills\u002Fchange-a-contract",0,"https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia","https:\u002F\u002Fgithub.com\u002Femyann","Senior Software Engineer","2026-11-15 05:55:45",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add emyann\u002Fnemia --skill change-a-contract",{"tool":41,"command":42},"bunx","bunx skills add emyann\u002Fnemia --skill change-a-contract",{"tool":44,"command":45},"pnpm","pnpm dlx skills add emyann\u002Fnemia --skill change-a-contract","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fchange-a-contract\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7BGEY7EKSRDFAB7B9567QKJ","groom-the-inbox","Read each card in play in the inbox against the repository and say, per card, done (the commit on the base that landed it), replaced (the decision or card that did), stale (each fact that moved, what it said and what it says now) or standing, reading closely only what the period touched. For the janitor's step, which proposes and never acts: a person removes or amends each card by the command the check writes.","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Fgroom-the-inbox\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7B4AD0ZJYZ3HAJCCBM4CPTY","write-a-spec","Turn an accepted intent into a spec an engineer can build from in this repository: the goal restated, the approach and why, every path it touches, the steps, the tests that prove it, the risks, and what is still open. For a step that designs a change before anyone builds it.","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Fwrite-a-spec\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7B4A88P2FKWCS1RND507WHE","review-a-change","Review a change in this repository as a second engineer would: against its intent and spec, by reading the diff and the suite's verdict, with findings that name the file, the line and what goes wrong. For a read-only step that decides whether the work goes round again.","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Freview-a-change\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7B4A2HFW8F53E390A2KM0R8","read-the-stats","Read a factory's stats since the janitor's last run, against the same length of time before it, write a short report, and propose one correction per card — an allow or deny by name, a line in an agent's body or a skill, or a refusal kept on purpose — each with the numbers behind it, never one already in the inbox. For the janitor's step, which proposes and never acts.","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Fread-the-stats\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7B49Z4GJ2G8T76X744YHAAN","land-a-branch","Land a run's result on the base branch in this repository's own checkout, the way the step says it lands: make that one act, read its result, and write the message that records what landed — or change nothing and say why it refused. For a gated ending step (workspace: base).","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Fland-a-branch\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7B49TMM0QAWF5WQ0QBXM9BG","implement-a-change","Build a change from its spec in this repository: tests first where a rule is claimed, small commits, the tests of what changed green for the right reason, and each review finding answered in the next round. For a step that writes the code.","https:\u002F\u002Fgithub.com\u002Femyann\u002Fnemia\u002Fblob\u002Fmain\u002Fpackages\u002Ftemplates\u002Fsdlc\u002Fskills\u002Fimplement-a-change\u002FSKILL.md",[],[]]