[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ADHZABR7C25X93X0PCKMP2":3,"skill-same:01M7ADHZABR7C25X93X0PCKMP2":44},{"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":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":27,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7ADHZABR7C25X93X0PCKMP2","understand-discriminated_union",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\u002F_staging_type_systems_for_working_programmers\u002Funderstand-discriminated_union\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# understand-discriminated_union\n\n**CALL NUMBER:** `type_systems_for_working_programmers.discriminated_union : deep_tagged_union_type(7)`\n**DEFINITION:** Tagged union enabling compiler-verified exhaustive pattern matching over variants.\n\nInvoke this skill to understand `discriminated_union` 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** (d3): 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** (d1): 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** (d1): 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** (d1): 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** (d1): 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- **du_primitive** (d2): 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** (d2): 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** (d2): 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\n### from `type_systems_for_working_programmers`\n- **algebraic_data_type** (d1): Type formed by sum (union) and product (record) of other types.\n- **type_safe_union** (d1): Tagged union with exhaustiveness guarantee preventing access without matching on tag.\n\n## CONSUMERS (what needs this)\n`tagged_union_type`\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.*",{},"main","dfed66814f223a9f42bec375a3c59d74eefdcad5","kbworld\u002Fstate\u002Flibraries\u002F_staging_type_systems_for_working_programmers\u002Funderstand-discriminated_union","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":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add sancovp\u002Fdark-factory-live --skill understand-discriminated_union",{"tool":36,"command":37},"bunx","bunx skills add sancovp\u002Fdark-factory-live --skill understand-discriminated_union",{"tool":39,"command":40},"pnpm","pnpm dlx skills add sancovp\u002Fdark-factory-live --skill understand-discriminated_union","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fkbworld\u002Fstate\u002Flibraries\u002F_staging_type_systems_for_working_programmers\u002Funderstand-discriminated_union\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"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},"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":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"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":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"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":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"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":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"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",[],[]]