[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F46JJY0K98SHNRQAS31EDT":3,"skill-same:01M7F46JJY0K98SHNRQAS31EDT":45},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7F46JJY0K98SHNRQAS31EDT","graph-representation-selection",null,"Choose between graph, relational, document, and hybrid representations for a logical domain model, decide labeled property graph versus RDF where a graph is warranted, and design the schema evolution and versioning strategy.","cwik-tech\u002Foctopus","cwik-tech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54542292?v=4","01M7F42E123GEHVK6RWC5MSWJ9","Tomasz Cwik","01M7F42E1PD4P54MTG8PG32VCV",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fagents\u002Farchitect-ontology\u002Fskills\u002Fgraph-representation-selection\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: graph-representation-selection\ndescription: Choose between graph, relational, document, and hybrid representations for a logical domain model, decide labeled property graph versus RDF where a graph is warranted, and design the schema evolution and versioning strategy.\n---\n\n# Graph Representation Selection\n\n## Purpose\n\nTake a settled logical model and decide how it is represented. Cover the representation class, the graph flavor where a graph survives scrutiny, hybrid decomposition where one representation does not fit the whole domain, and schema evolution — because domain understanding always improves after launch and a model that cannot absorb that is unfinished.\n\n## When To Use\n\nAfter `domain-entity-modeling` has produced a pruned logical model with settled identity. Never before — representation chosen ahead of model shape is a bet, not a decision.\n\n## Step 1 — The Traversal-Depth Test\n\nThis test decides more than any other input. Collect the actual queries the system must answer and classify each:\n\n| Depth | Shape | Implication |\n|---|---|---|\n| 0 hops | Filter attributes on one entity type | Relational or document |\n| 1 hop | Join to a directly related entity | Relational, comfortably |\n| 2 hops, known shape | A fixed path known at design time | Relational; the join is writable and indexable |\n| 2+ hops, variable shape | Path discovered at query time, depth unbounded | Graph earns its cost |\n| Reachability \u002F pathfinding | \"How is A connected to D\", shortest path, cycles | Graph, strongly |\n\nRequire *actual queries*, not query categories. \"We'll want to explore relationships\" is not evidence. If the collected queries are all depth 0–2 with known shapes, the recommendation is relational and the graph discussion ends here. This outcome is common and is not a compromise — it buys transactions, mature tooling, a hiring pool, and operational familiarity.\n\nTwo secondary signals push toward graph even at moderate depth:\n\n- **Attributed relations** — connections carrying their own data, flagged during entity modeling\n- **Heterogeneous relation types between the same endpoints** — many distinct verbs connecting the same two entity types, where the relation type is itself a query filter\n\n## Step 2 — Representation Class\n\nEvaluate against the pruned model:\n\n**Relational** — Default. Strong when entity types are stable, attributes are largely uniform, cardinalities are known, and traversal is shallow. Handles attributed relations through join tables at readability cost. Weak where the schema must absorb genuinely unanticipated relation types.\n\n**Document** — Strong when the aggregate boundary matches the read pattern exactly and the whole aggregate is read together. Weak the moment two access patterns want different boundaries, or the same sub-entity is referenced from multiple aggregates — that is duplication and drift.\n\n**Graph** — Strong for variable-depth traversal, attributed relations, heterogeneous relation types, and schemas that grow new relation types without migration. Costs are real: smaller hiring pool, less mature operational tooling, weaker transactional guarantees in some engines, and query languages the team likely does not know.\n\n**Hybrid** — Frequently correct and under-proposed. Decompose the domain: put the traversal-heavy subgraph in a graph store, the high-volume uniform records in relational, the read-together aggregates in documents. The cost is a consistency boundary between them. Name that boundary explicitly, state which side is authoritative, and state the acceptable staleness. A hybrid without a named consistency boundary is not a design, it is two systems that will disagree.\n\n## Step 3 — LPG Versus RDF\n\nOnly if a graph survived Step 1.\n\n**Labeled property graph.** Nodes and edges both carry arbitrary key-value properties. Natural fit when relations carry rich attributes, when the schema is yours alone, and when the team wants an imperative-feeling traversal language. Chosen for engineering ergonomics.\n\n**RDF \u002F triple store.** Everything is a subject-predicate-object triple, with global identifiers and formal semantics. Earns its cost under specific conditions:\n\n- The model must interoperate with external vocabularies or published ontologies\n- Formal inference over the model is genuinely required, not merely appealing\n- Global identifier stability across organizational boundaries matters\n- A standards or regulatory requirement names it\n\nIf none of these hold, RDF's overhead — reification for attributed relations, verbose query syntax, a much smaller talent pool — is paid for nothing. Choose LPG.\n\n**The reification tell.** If the model has many attributed relations and RDF is being proposed anyway, note that each becomes a reified statement or an n-ary relation node. If that pattern appears more than a handful of times, LPG is the honest answer.\n\n## Step 4 — Schema Evolution And Versioning\n\nNon-optional. Design this in the same pass, not later.\n\n**Additive by default.** New entity types, relation types, and optional attributes must be addable without touching existing data or breaking existing readers. Verify this against the chosen representation — it is nearly free in graph and document stores, and requires discipline in relational.\n\n**Deprecation, not deletion.** Mark elements deprecated with a date and a replacement pointer. Remove only after consumers have migrated. Record how you will know when they have.\n\n**Taxonomy versioning.** Taxonomies drift fastest. Decide whether category assignments are versioned with the taxonomy or re-derived on change, and what happens to historical records classified under a retired term.\n\n**Identity stability across change.** Entity identifiers must survive schema evolution. If identifiers encode structure — type prefixes, hierarchy paths — they will break when the structure changes. Prefer opaque stable identifiers with structure held as queryable attributes.\n\n**Name the migration-forcing classes.** Be explicit about what still requires a coordinated migration:\n\n- Changing cardinality on an existing relation\n- Splitting one entity type into two\n- Changing identity resolution strategy retroactively\n- Making an optional attribute required\n\nA design that claims no migration is ever needed is not describing reality.\n\n## Step 5 — Boundary Handoff\n\nState precisely what you are and are not deciding:\n\n- **Yours** — the logical model, the representation class, LPG versus RDF, schema evolution strategy, identity stability requirements\n- **To retrieval** — what a unit of knowledge is, which attributes are semantically meaningful, which relations should be traversable at query time\n- **To persistence** — concrete engine, indexing, sharding, durability, backup, operational profile, with your constraints attached: expected volumes, read\u002Fwrite ratio, traversal depth, consistency requirements\n\nWhere no persistence seat is on the call, carry the engine choice and say plainly that you are doing so, so the lead records who owned it.\n\n## Output\n\n1. **Traversal evidence** — the actual queries, classified by depth, with the verdict they produce\n2. **Representation class** — chosen, with the two strongest arguments against it and why they lose\n3. **Graph flavor** — LPG or RDF with the deciding condition, where applicable\n4. **Hybrid decomposition** — which subdomain to which representation, with the named consistency boundary and acceptable staleness\n5. **Evolution strategy** — additive rules, deprecation process, taxonomy versioning, identity stability\n6. **Migration-forcing changes** — the explicit list\n7. **Boundary handoff** — to retrieval, to persistence, and what you are carrying yourself\n","# Graph Representation Selection\n\n## Purpose\n\nTake a settled logical model and decide how it is represented. Cover the representation class, the graph flavor where a graph survives scrutiny, hybrid decomposition where one representation does not fit the whole domain, and schema evolution — because domain understanding always improves after launch and a model that cannot absorb that is unfinished.\n\n## When To Use\n\nAfter `domain-entity-modeling` has produced a pruned logical model with settled identity. Never before — representation chosen ahead of model shape is a bet, not a decision.\n\n## Step 1 — The Traversal-Depth Test\n\nThis test decides more than any other input. Collect the actual queries the system must answer and classify each:\n\n| Depth | Shape | Implication |\n|---|---|---|\n| 0 hops | Filter attributes on one entity type | Relational or document |\n| 1 hop | Join to a directly related entity | Relational, comfortably |\n| 2 hops, known shape | A fixed path known at design time | Relational; the join is writable and indexable |\n| 2+ hops, variable shape | Path discovered at query time, depth unbounded | Graph earns its cost |\n| Reachability \u002F pathfinding | \"How is A connected to D\", shortest path, cycles | Graph, strongly |\n\nRequire *actual queries*, not query categories. \"We'll want to explore relationships\" is not evidence. If the collected queries are all depth 0–2 with known shapes, the recommendation is relational and the graph discussion ends here. This outcome is common and is not a compromise — it buys transactions, mature tooling, a hiring pool, and operational familiarity.\n\nTwo secondary signals push toward graph even at moderate depth:\n\n- **Attributed relations** — connections carrying their own data, flagged during entity modeling\n- **Heterogeneous relation types between the same endpoints** — many distinct verbs connecting the same two entity types, where the relation type is itself a query filter\n\n## Step 2 — Representation Class\n\nEvaluate against the pruned model:\n\n**Relational** — Default. Strong when entity types are stable, attributes are largely uniform, cardinalities are known, and traversal is shallow. Handles attributed relations through join tables at readability cost. Weak where the schema must absorb genuinely unanticipated relation types.\n\n**Document** — Strong when the aggregate boundary matches the read pattern exactly and the whole aggregate is read together. Weak the moment two access patterns want different boundaries, or the same sub-entity is referenced from multiple aggregates — that is duplication and drift.\n\n**Graph** — Strong for variable-depth traversal, attributed relations, heterogeneous relation types, and schemas that grow new relation types without migration. Costs are real: smaller hiring pool, less mature operational tooling, weaker transactional guarantees in some engines, and query languages the team likely does not know.\n\n**Hybrid** — Frequently correct and under-proposed. Decompose the domain: put the traversal-heavy subgraph in a graph store, the high-volume uniform records in relational, the read-together aggregates in documents. The cost is a consistency boundary between them. Name that boundary explicitly, state which side is authoritative, and state the acceptable staleness. A hybrid without a named consistency boundary is not a design, it is two systems that will disagree.\n\n## Step 3 — LPG Versus RDF\n\nOnly if a graph survived Step 1.\n\n**Labeled property graph.** Nodes and edges both carry arbitrary key-value properties. Natural fit when relations carry rich attributes, when the schema is yours alone, and when the team wants an imperative-feeling traversal language. Chosen for engineering ergonomics.\n\n**RDF \u002F triple store.** Everything is a subject-predicate-object triple, with global identifiers and formal semantics. Earns its cost under specific conditions:\n\n- The model must interoperate with external vocabularies or published ontologies\n- Formal inference over the model is genuinely required, not merely appealing\n- Global identifier stability across organizational boundaries matters\n- A standards or regulatory requirement names it\n\nIf none of these hold, RDF's overhead — reification for attributed relations, verbose query syntax, a much smaller talent pool — is paid for nothing. Choose LPG.\n\n**The reification tell.** If the model has many attributed relations and RDF is being proposed anyway, note that each becomes a reified statement or an n-ary relation node. If that pattern appears more than a handful of times, LPG is the honest answer.\n\n## Step 4 — Schema Evolution And Versioning\n\nNon-optional. Design this in the same pass, not later.\n\n**Additive by default.** New entity types, relation types, and optional attributes must be addable without touching existing data or breaking existing readers. Verify this against the chosen representation — it is nearly free in graph and document stores, and requires discipline in relational.\n\n**Deprecation, not deletion.** Mark elements deprecated with a date and a replacement pointer. Remove only after consumers have migrated. Record how you will know when they have.\n\n**Taxonomy versioning.** Taxonomies drift fastest. Decide whether category assignments are versioned with the taxonomy or re-derived on change, and what happens to historical records classified under a retired term.\n\n**Identity stability across change.** Entity identifiers must survive schema evolution. If identifiers encode structure — type prefixes, hierarchy paths — they will break when the structure changes. Prefer opaque stable identifiers with structure held as queryable attributes.\n\n**Name the migration-forcing classes.** Be explicit about what still requires a coordinated migration:\n\n- Changing cardinality on an existing relation\n- Splitting one entity type into two\n- Changing identity resolution strategy retroactively\n- Making an optional attribute required\n\nA design that claims no migration is ever needed is not describing reality.\n\n## Step 5 — Boundary Handoff\n\nState precisely what you are and are not deciding:\n\n- **Yours** — the logical model, the representation class, LPG versus RDF, schema evolution strategy, identity stability requirements\n- **To retrieval** — what a unit of knowledge is, which attributes are semantically meaningful, which relations should be traversable at query time\n- **To persistence** — concrete engine, indexing, sharding, durability, backup, operational profile, with your constraints attached: expected volumes, read\u002Fwrite ratio, traversal depth, consistency requirements\n\nWhere no persistence seat is on the call, carry the engine choice and say plainly that you are doing so, so the lead records who owned it.\n\n## Output\n\n1. **Traversal evidence** — the actual queries, classified by depth, with the verdict they produce\n2. **Representation class** — chosen, with the two strongest arguments against it and why they lose\n3. **Graph flavor** — LPG or RDF with the deciding condition, where applicable\n4. **Hybrid decomposition** — which subdomain to which representation, with the named consistency boundary and acceptable staleness\n5. **Evolution strategy** — additive rules, deprecation process, taxonomy versioning, identity stability\n6. **Migration-forcing changes** — the explicit list\n7. **Boundary handoff** — to retrieval, to persistence, and what you are carrying yourself\n",{"name":5,"description":7},"main","f0f0efe1d4c64b51a51f44427ad147750d29154e","agents\u002Farchitect-ontology\u002Fskills\u002Fgraph-representation-selection","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus","www.cuteoctopus.site","https:\u002F\u002Fgithub.com\u002Fcwik-tech","2026-10-27 06:12:19",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add cwik-tech\u002Foctopus --skill graph-representation-selection",{"tool":37,"command":38},"bunx","bunx skills add cwik-tech\u002Foctopus --skill graph-representation-selection",{"tool":40,"command":41},"pnpm","pnpm dlx skills add cwik-tech\u002Foctopus --skill graph-representation-selection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fagents\u002Farchitect-ontology\u002Fskills\u002Fgraph-representation-selection\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7F5MQVQ3CHGM77Q51M4B1AC","twenty-year-land-plan","Apply the Bren discipline of evaluating every land and development decision on a twenty-year horizon, with a comprehensive plan for how the land, the community, and the surrounding public infrastructure evolve together. Deals optimized for a five-year exit are structurally different from deals that compound across generations; insist on knowing which kind you are making. Use when evaluating land, entitlements, master-planned development, or phasing decisions, and when separating five-year exit deals from generational holds.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Ftwenty-year-land-plan\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7F5MGQ8JSV27SFDQVVGFQE3","thematic-gut-check","Apply the Gray discipline of identifying the structural theme behind every real estate deal, testing where that theme sits in its capital-flow lifecycle, and insisting that deals without a named theme — or deals late in a crowded theme — clear a higher bar. A mediocre deal in a strong theme usually beats a clever deal in a weak one. Use when naming the structural thesis behind a deal, judging whether that theme is early or crowded, and setting the bar the deal must clear.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Fthematic-gut-check\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7F5M8V64Y0ZD8PTPWEJQXJ9","supply-pipeline-gut-check","Apply the Zell discipline of grounding every real estate thesis in the local supply pipeline. Demand counts over adjectives — units under construction, units permitted, units proposed — and convert them into a forward absorption schedule. A deal that ignores the pipeline is a bet on a market you have not actually studied. Use when validating a market thesis, forecasting absorption and rent growth, or counting units under construction, permitted, and proposed.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Fsupply-pipeline-gut-check\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7F5M3J2Q146BJC13TD3YCXF","ruin-scenario-mapping","Apply the Taleb discipline of identifying, for every real estate deal, the specific chain of events that produces ruin — permanent, unrecoverable capital loss — and verifying that no single such chain has non-trivial probability. Deals with any plausible ruin path must be restructured or abandoned. Use when sizing leverage, testing refinancing, covenant, and liquidity risk, or checking whether any single failure chain can permanently wipe out the position.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Fruin-scenario-mapping\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7F5KZDS0DYD172P6HS0WXEM","revenue-cost-architecture","Design a venture's revenue streams, pricing logic, cost structure, and unit economics so the business model has a coherent theory of value capture, not just value creation. Use after the value proposition and customer segment are set and before financial projections, when choosing a pricing model, calculating contribution margin or CAC payback, or checking whether the unit economics hold at scale.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Frevenue-cost-architecture\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7F5KP1CNQMYAVCDTV4EEW3J","replacement-cost-stress-test","Apply the Buffett discipline of pricing every real estate asset against the cost to rebuild it from scratch. The ratio of purchase price to replacement cost sets a ceiling on long-run downside: below replacement cost, new supply cannot profitably undercut you; at or above it, you are buying a liability disguised as an asset. Use when setting a purchase price, judging downside protection, or testing how exposed an asset is to newly built competing supply.","https:\u002F\u002Fgithub.com\u002Fcwik-tech\u002Foctopus\u002Fblob\u002Fmain\u002Fskills\u002Freplacement-cost-stress-test\u002FSKILL.md",[],[]]