[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7YBPRC0VMQZ6YHVB82VH0":3,"skill-same:01M7F7YBPRC0VMQZ6YHVB82VH0":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},"01M7F7YBPRC0VMQZ6YHVB82VH0","principle-model-the-domain",null,"Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.","bitgineer\u002Fopencode-pstack","bitgineer","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F133060368?v=4","01M7F7V139SDYHXSH9GXXM8EV7","01M7F7V13Y1ZZCY3J922JX06QC",1,"MIT","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fprinciple-model-the-domain\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: principle-model-the-domain\ndescription: \"Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.\"\n\n---\n\n# Model the Domain\n\nEncode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.\n\nReach for:\n\n- A state machine instead of scattered booleans, phases, or lifecycle checks.\n- A typed model instead of loose parameters or repeated shape assumptions.\n- A map, registry, lookup table, or discriminated union instead of branching spread across files.\n- A reducer or command\u002Fevent model instead of ad hoc state mutations.\n- A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.\n- A small module boundary that gathers repeated behavior, ownership, or invariants.\n- A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.\n- Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.\n\nDo not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.\n\nThe sign that you skipped this is a new feature that grows an existing if\u002Felse chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.\n","# Model the Domain\n\nEncode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.\n\nReach for:\n\n- A state machine instead of scattered booleans, phases, or lifecycle checks.\n- A typed model instead of loose parameters or repeated shape assumptions.\n- A map, registry, lookup table, or discriminated union instead of branching spread across files.\n- A reducer or command\u002Fevent model instead of ad hoc state mutations.\n- A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.\n- A small module boundary that gathers repeated behavior, ownership, or invariants.\n- A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.\n- Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.\n\nDo not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.\n\nThe sign that you skipped this is a new feature that grows an existing if\u002Felse chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.\n",{"name":5,"description":7},"main","dbb7a4935f614ebaec65ca3beb181bf74ed53431","skills\u002Fpstack\u002Fprinciple-model-the-domain",0,"https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack","https:\u002F\u002Fgithub.com\u002Fbitgineer","2026-10-21 18:58:00",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add bitgineer\u002Fopencode-pstack --skill principle-model-the-domain",{"tool":36,"command":37},"bunx","bunx skills add bitgineer\u002Fopencode-pstack --skill principle-model-the-domain",{"tool":39,"command":40},"pnpm","pnpm dlx skills add bitgineer\u002Fopencode-pstack --skill principle-model-the-domain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fprinciple-model-the-domain\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},"01M7F8095YEQBD1R95S3CQNM7M","why","Trace why code works this way or why a design was chosen, from source control, trackers, docs, and telemetry. Use for rationale, regressions, or postmortems.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fwhy\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},"01M7F807MX84XR7FGZ1YTDPNPP","unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Funslop\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},"01M7F804Y0KW517P76ZAYQ86ED","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Ftypescript-best-practices\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},"01M7F800R1VV08YF0AKMNTPZ2J","technical-writing","Write or review docs, RFCs, readmes, PR descriptions, and commit messages in Diataxis structure with Google style, STE, and Global English.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Ftechnical-writing\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},"01M7F7ZX5TJ2049PWXHB07MA7Y","teach","Explain a body of work so a person actually understands it, running how and why and weaving both into one clear explanation. Use for teach me this.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Fteach\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7F7ZSN544YPV34WWVFW332X","tdd","Use only when the user asks for TDD, a failing test, or a regression test, or when a bug has a cheap local test target; skip unclear or costly test paths.","https:\u002F\u002Fgithub.com\u002Fbitgineer\u002Fopencode-pstack\u002Fblob\u002Fmain\u002Fskills\u002Fpstack\u002Ftdd\u002FSKILL.md",[],[]]