[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AF3N4DM3SBJWVCAXSB082H":3,"skill-same:01M7AF3N4DM3SBJWVCAXSB082H":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":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7AF3N4DM3SBJWVCAXSB082H","0.4.6-understand-tagged_union_type",null,"sancovp\u002Fdark-factory-live","sancovp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F147458096?v=4","01M74F2EFE4Q0KF1Y5AY27HVNB","Isaac Wostrel-Rubin","01M7AC3EB8VZXS1SKHQW1EZ4N1",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fkbworld\u002Fstate\u002Flibraries\u002Ftype_systems_for_working_programmers\u002Funderstand-type_systems_for_working_programmers\u002Funderstand-tagged_union_type\u002F.claude\u002Fskills\u002F0.4.6-understand-tagged_union_type\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: 0.4.6-understand-tagged_union_type\ndescription: [0.4.6] Discriminated union with explicit tag field enabling exhaustive pattern matching.\n---\n\n# understand-tagged_union_type\n\n**CALL NUMBER:** `type_systems_for_working_programmers.tagged_union_type : deep_tagged_union_type(23)`\n**DEFINITION:** Discriminated union with explicit tag field enabling exhaustive pattern matching.\n\nInvoke this skill to understand `tagged_union_type` down to its primitives. The RELATIVE ROOT below is the least-fixed-point closure of everything it bundles from — the full import cone, grouped by the lib each prim comes from. Projected from a prover-typed KB (MAP\u002FSWI-Prolog consistency gate): every reference below resolves.\n\n## THE RELATIVE ROOT (the import cone, by lib)\n\n### from `?`\n- **primitive_union** (d4): An untagged union of types representing a value that could be one of several member types, but without a discriminator tag or label to identify which variant is active at runtime. Membership cannot be compiler-verified and exhaustive pattern matching is not enforced.\n\n### from `deep_tagged_union_type`\n- **du_exhaustiveness** (d2): The static guarantee that a du_match covers every du_variant of the discriminated union. The type system rejects non-exhaustive matches, ensuring no variant is silently ignored.\n- **du_inject** (d2): The introduction form for a discriminated union: given a variant label and a payload of the matching type, produce a value of the union type. Also called 'variant' or 'Left'\u002F'Right' in binary cases.\n- **du_match** (d2): The elimination form: a function that, given a discriminated union value, dispatches on its du_tag to apply the appropriate handler to the du_payload, yielding a uniform result type.\n- **du_variant** (d2): A named constituent of a discriminated union, pairing a du_tag with a du_payload type. Each variant represents one summand in the sum type.\n- **iso_optic** (d2): A bidirectional optic between two types that are isomorphic, providing both a forward view and a reverse constructor with no information loss.\n- **lens_optic** (d2): An optic pairing a getter with a setter over a product type's field, enabling focused access to one du_payload while preserving the rest of the product structure.\n- **optic_compose** (d2): Composition rule: chaining optics so the du_payload of one becomes the structure operated on by the next, forming a pipeline that satisfies the optic laws transitively.\n- **optic_law_get_set** (d2): Law: applying lens_setter to the result of lens_getter on any product yields back the original du_payload value — get never lies about what set just wrote.\n- **optic_law_set_get** (d2): Law: applying lens_getter to the result of lens_setter on a product yields back the du_payload value that was set — set reflects exactly what get will retrieve.\n- **optic_law_set_set** (d2): Law: composing two lens_setter calls yields the same product as applying only the second one — idempotent in the face of duplicate mutation, last du_payload wins.\n- **optic_law_unity** (d2): Law: the composition of a lens_setter with a lens_getter in reverse order yields a total transformation equivalent to the identity on du_payload — structural integrity preserved under round-trip.\n- **optic_variance** (d2): Classification of an optic by its directional capability: getter-only (covariant, read-only), setter-only (contravariant, write-only), or full optic (both directions, lenses are the canonical full case).\n- **prism_optic** (d2): An optic pairing a matcher with a builder over a sum type's du_variant, enabling partial projection into one du_tag's du_payload with fallback to the original sum.\n- **traversal_optic** (d2): An optic generalizing lens and prism to target zero or more locations simultaneously, enabling fold and map operations over collections of du_payload within a structure.\n- **du_primitive** (d3): An untagged union of types without a du_tag. The discriminated union adds a tag to this primitive structure to make variant membership verifiable.\n- **du_payload** (d3): The data value carried by a specific variant of a discriminated union. Only one payload is live at a time; the tag selects which one.\n- **du_tag** (d3): A value-level or type-level label that uniquely identifies which variant of a discriminated union is active in a given value. The tag is the first-class evidence of variant membership.\n- **lens_getter** (d3): A pure projection from a product type to a specific du_payload at a named field, extracting only the target substructure without mutation.\n- **lens_setter** (d3): A mutation function taking a product type and a new du_payload value, returning a new product with only the target field replaced, leaving all other du_payload fields unchanged.\n- **prism_builder** (d3): A constructor taking a du_payload and injecting it as the sole du_variant under a specific du_tag, rebuilding the sum type from the selected summand.\n- **prism_matcher** (d3): A partial function over a sum type that succeeds only when the active du_tag matches the target, yielding the contained du_payload; otherwise the sum is preserved.\n- **traversal_fold** (d3): Operation over a traversal_optic that reduces all targeted du_payload within a structure to a single aggregate value, consuming the structure without producing a new one.\n- **traversal_map** (d3): Operation over a traversal_optic that applies a function to each du_payload in the targeted locations, producing a new structure with all positions updated.\n\n### from `type_systems_for_working_programmers`\n- **algebraic_data_type** (d1): Type formed by sum (union) and product (record) of other types.\n- **discriminated_union** (d1): Tagged union enabling compiler-verified exhaustive pattern matching over variants.\n- **optics_type** (d1): Abstracting getters\u002Fsetters across product and sum types (lens, prism, traversal).\n- **type_safe_union** (d1): Tagged union with exhaustiveness guarantee preventing access without matching on tag.\n\n---\n*Projected from the `type systems for working programmers` KB (242 concepts \u002F 186 relations) — consistency-typed by MAP; the facet list after the colon IS the cross-lib dependency web.*\n\n_(leaf — this is an actual skill.)_\n","# understand-tagged_union_type\n\n**CALL NUMBER:** `type_systems_for_working_programmers.tagged_union_type : deep_tagged_union_type(23)`\n**DEFINITION:** Discriminated union with explicit tag field enabling exhaustive pattern matching.\n\nInvoke this skill to understand `tagged_union_type` down to its primitives. The RELATIVE ROOT below is the least-fixed-point closure of everything it bundles from — the full import cone, grouped by the lib each prim comes from. Projected from a prover-typed KB (MAP\u002FSWI-Prolog consistency gate): every reference below resolves.\n\n## THE RELATIVE ROOT (the import cone, by lib)\n\n### from `?`\n- **primitive_union** (d4): An untagged union of types representing a value that could be one of several member types, but without a discriminator tag or label to identify which variant is active at runtime. Membership cannot be compiler-verified and exhaustive pattern matching is not enforced.\n\n### from `deep_tagged_union_type`\n- **du_exhaustiveness** (d2): The static guarantee that a du_match covers every du_variant of the discriminated union. The type system rejects non-exhaustive matches, ensuring no variant is silently ignored.\n- **du_inject** (d2): The introduction form for a discriminated union: given a variant label and a payload of the matching type, produce a value of the union type. Also called 'variant' or 'Left'\u002F'Right' in binary cases.\n- **du_match** (d2): The elimination form: a function that, given a discriminated union value, dispatches on its du_tag to apply the appropriate handler to the du_payload, yielding a uniform result type.\n- **du_variant** (d2): A named constituent of a discriminated union, pairing a du_tag with a du_payload type. Each variant represents one summand in the sum type.\n- **iso_optic** (d2): A bidirectional optic between two types that are isomorphic, providing both a forward view and a reverse constructor with no information loss.\n- **lens_optic** (d2): An optic pairing a getter with a setter over a product type's field, enabling focused access to one du_payload while preserving the rest of the product structure.\n- **optic_compose** (d2): Composition rule: chaining optics so the du_payload of one becomes the structure operated on by the next, forming a pipeline that satisfies the optic laws transitively.\n- **optic_law_get_set** (d2): Law: applying lens_setter to the result of lens_getter on any product yields back the original du_payload value — get never lies about what set just wrote.\n- **optic_law_set_get** (d2): Law: applying lens_getter to the result of lens_setter on a product yields back the du_payload value that was set — set reflects exactly what get will retrieve.\n- **optic_law_set_set** (d2): Law: composing two lens_setter calls yields the same product as applying only the second one — idempotent in the face of duplicate mutation, last du_payload wins.\n- **optic_law_unity** (d2): Law: the composition of a lens_setter with a lens_getter in reverse order yields a total transformation equivalent to the identity on du_payload — structural integrity preserved under round-trip.\n- **optic_variance** (d2): Classification of an optic by its directional capability: getter-only (covariant, read-only), setter-only (contravariant, write-only), or full optic (both directions, lenses are the canonical full case).\n- **prism_optic** (d2): An optic pairing a matcher with a builder over a sum type's du_variant, enabling partial projection into one du_tag's du_payload with fallback to the original sum.\n- **traversal_optic** (d2): An optic generalizing lens and prism to target zero or more locations simultaneously, enabling fold and map operations over collections of du_payload within a structure.\n- **du_primitive** (d3): An untagged union of types without a du_tag. The discriminated union adds a tag to this primitive structure to make variant membership verifiable.\n- **du_payload** (d3): The data value carried by a specific variant of a discriminated union. Only one payload is live at a time; the tag selects which one.\n- **du_tag** (d3): A value-level or type-level label that uniquely identifies which variant of a discriminated union is active in a given value. The tag is the first-class evidence of variant membership.\n- **lens_getter** (d3): A pure projection from a product type to a specific du_payload at a named field, extracting only the target substructure without mutation.\n- **lens_setter** (d3): A mutation function taking a product type and a new du_payload value, returning a new product with only the target field replaced, leaving all other du_payload fields unchanged.\n- **prism_builder** (d3): A constructor taking a du_payload and injecting it as the sole du_variant under a specific du_tag, rebuilding the sum type from the selected summand.\n- **prism_matcher** (d3): A partial function over a sum type that succeeds only when the active du_tag matches the target, yielding the contained du_payload; otherwise the sum is preserved.\n- **traversal_fold** (d3): Operation over a traversal_optic that reduces all targeted du_payload within a structure to a single aggregate value, consuming the structure without producing a new one.\n- **traversal_map** (d3): Operation over a traversal_optic that applies a function to each du_payload in the targeted locations, producing a new structure with all positions updated.\n\n### from `type_systems_for_working_programmers`\n- **algebraic_data_type** (d1): Type formed by sum (union) and product (record) of other types.\n- **discriminated_union** (d1): Tagged union enabling compiler-verified exhaustive pattern matching over variants.\n- **optics_type** (d1): Abstracting getters\u002Fsetters across product and sum types (lens, prism, traversal).\n- **type_safe_union** (d1): Tagged union with exhaustiveness guarantee preventing access without matching on tag.\n\n---\n*Projected from the `type systems for working programmers` KB (242 concepts \u002F 186 relations) — consistency-typed by MAP; the facet list after the colon IS the cross-lib dependency web.*\n\n_(leaf — this is an actual skill.)_\n",{},"main","dfed66814f223a9f42bec375a3c59d74eefdcad5","kbworld\u002Fstate\u002Flibraries\u002Ftype_systems_for_working_programmers\u002Funderstand-type_systems_for_working_programmers\u002Funderstand-tagged_union_type\u002F.claude\u002Fskills\u002F0.4.6-understand-tagged_union_type","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live","https:\u002F\u002Fgithub.com\u002Fsancovp","https:\u002F\u002Fisaacwr.carrd.co\u002F","AKA Olivus Victory-Promise\r\n\r\nAI Agents, Tools, and Infrastructure","2026-10-09 02:22:46",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add sancovp\u002Fdark-factory-live --skill 0.4.6-understand-tagged_union_type",{"tool":37,"command":38},"bunx","bunx skills add sancovp\u002Fdark-factory-live --skill 0.4.6-understand-tagged_union_type",{"tool":40,"command":41},"pnpm","pnpm dlx skills add sancovp\u002Fdark-factory-live --skill 0.4.6-understand-tagged_union_type","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fkbworld\u002Fstate\u002Flibraries\u002Ftype_systems_for_working_programmers\u002Funderstand-type_systems_for_working_programmers\u002Funderstand-tagged_union_type\u002F.claude\u002Fskills\u002F0.4.6-understand-tagged_union_type\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7AGYB2CPCQYJP631CH18A1A","quests","The quest board — accept quests, craft skills to fulfill them, earn gold rewards.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Fthings\u002Fquests\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7AGXYVW23T3X4APFAV3H4ZY","metrics","Check your profitability and trading performance — gold earned, spent, net profit, trade history.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Fthings\u002Fmetrics\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7AGXWC0C1W7PZK5YXQW0NQM","things","Flat search across the game — find quests, knowledge domains, agents, trade listings, memories.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Fthings\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7AGXT9SX50REN4K7ZGE08JT","test-skill","Test a crafted skill by running it through a fresh Claude instance. Use before posting to trade or submitting for quests.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Ftest_skill\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7AGXRA67MFHJJNDEVX6PFKR","remember","Your zettelkasten — persistent memory that survives across seasons. Record observations, strategies, and craft insights.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Fremember\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7AGXNND02SYFXB1JV9YRPAN","skill-types","The type system — Template, Lens, Prosthesis, Towering, Combiner, Persona, Recipe. Learn to type skills, chain them, and write Recipes.","https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fworld\u002Fagents\u002Fagent_002\u002F.claude\u002Fskills\u002Fplaces\u002Fskill_types\u002FSKILL.md",[],[]]