[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AC86AMTKT80H2ZA3DC0C1T":3,"skill-same:01M7AC86AMTKT80H2ZA3DC0C1T":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},"01M7AC86AMTKT80H2ZA3DC0C1T","understand-c11_memory_model",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_concurrency_synchronization_primitives_and_memor\u002Funderstand-c11_memory_model\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# understand-c11_memory_model\n\n**CALL NUMBER:** `concurrency_synchronization_primitives_and_memor.c11_memory_model : deep_c11_memory_model(52), deep_synchronizes_with(20), deep_indivisibility_prope(9), deep_happens_before_relat(7)`\n**DEFINITION:** Standard C11 specification defining memory orderings: memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release, memory_order_acq_rel, memory_order_seq_cst; defines happens-before and synchronizes-with relations.\n\nInvoke this skill to understand `c11_memory_model` 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- **atomic_cas** (d4): Compare-and-swap operation atomically loading a value, comparing it to an expected value, and storing a new value only if they matched, returning whether the swap occurred.\n\n### from `concurrency_synchronization_primitives_and_memor`\n- **acquire_semantics** (d1): Memory ordering semantics ensuring all subsequent loads\u002Fstores cannot be reordered before the acquire operation; used for lock acquisition, reading a flag after volatile write.\n- **happens_before_relation** (d1): A fundamental ordering relation in memory models defining that if operation A happens-before operation B, then A's effects are visible to B; forms the basis for reasoning about program correctness in concurrent settings.\n- **memory_order_relaxed** (d1): C11\u002FC++11 memory ordering that only guarantees atomicity of the operation with no ordering constraints relative to other operations; allows all reorderings.\n- **release_semantics** (d1): Memory ordering semantics ensuring all prior loads\u002Fstores cannot be reordered after the release operation; used for lock release, writing data before a volatile flag.\n- **sequentially_consistent** (d1): The strongest memory ordering requiring a single total order of all sequentially consistent operations visible to all threads; implied by default for std::atomic operations in C++.\n- **synchronizes_with** (d2): A relation between atomic operations in memory models where a release fence on one thread synchronizes with an acquire fence on another thread, establishing happens-before order across threads.\n- **atomic_compare_exchange** (d3): C++11\u002FC11 atomic operation attempting to replace expected value with desired; returns boolean indicating success; on failure, expected is updated with actual value for retry loops.\n\n### from `deep_c11_memory_model`\n- **memory_order_relaxed_vs_acquire** (d2): The ordering contrast where acquire_semantics prevents subsequent operations from being reordered before the acquire, while memory_order_relaxed permits all such reorderings with no barrier effect.\n- **relaxed_mod_order_visibility_timing_undefined** (d2): A store's position in the modification order does not determine when other threads observe it; relaxed loads may observe stale values with no bound on staleness, contrasting with acquire-visibility guarantees.\n- **indivisibility_property** (d2): The fundamental property that a relaxed atomic operation executes as a single indivisible step from the perspective of all threads; the operation either completes fully or not at all without observable intermediate states.\n- **memory_order_relaxed_atomicity_guarantee** (d2): The indivisibility guarantee that a relaxed atomic operation completes as a single indivisible step; no intermediate state is observable by other threads during the operation, scoped to the specific atomic variable being read or written.\n- **memory_order_relaxed_coherence_per_location** (d2): The property that each atomic variable maintains its own independent coherence order but this order is not coordinated with coherence orders of other variables; operations on separate variables are totally unordered with respect to each other.\n- **memory_order_relaxed_load_value_visibility** (d2): The undefined timing of when a relaxed load obtains its value; a load may observe any value from the modification order up to that point, with no guarantee about when the load's value becomes visible to other threads.\n- **memory_order_relaxed_modification_order** (d2): The per-variable constraint that each atomic variable still has a well-defined modification order agreed upon by all threads, even though relaxed operations on different variables are unconstrained relative to each other.\n- **memory_order_relaxed_no_ordering_constraints** (d2): The defining property that relaxed operations impose zero ordering constraints relative to any other operations on any memory location; no happens-before or synchronizes-with relationship is established with respect to other threads.\n- **memory_order_relaxed_no_synchronization** (d2): The absence of any synchronization relationship; relaxed operations do not participate in the synchronizes-with relation and do not establish happens-before edges across thread boundaries regardless of visibility.\n- **memory_order_relaxed_program_order_within_thread** (d2): The within-thread ordering guarantee that within a single thread, the program order of relaxed operations is still preserved for that thread's own perspective; only cross-thread visibility and cross-variable ordering are relaxed.\n- **memory_order_relaxed_reordering_freedom** (d2): The freedom to reorder relaxed operations across variable boundaries; a relaxed store may be reordered with respect to a relaxed load on a different variable, and loads may observe values in an order inconsistent with program order across different locations.\n- **memory_order_relaxed_store_buffering** (d2): The phenomenon that relaxed stores may be buffered in store buffers and become visible to other threads in an order different from the program order of the storing thread.\n- **no_tearing_guarantee** (d2): The guarantee that multi-byte atomic values cannot be observed in a torn state where some bytes reflect the old value and others reflect a new concurrent value.\n- **relaxed_mod_order_def** (d2): The well-defined sequential order of all store operations to a single atomic variable; every relaxed store to variable x appends to x's modification order in some position, and all threads agree on this order for x.\n- **memory_order_relaxed_vs_release** (d2): The ordering contrast where release_semantics prevents prior operations from being reordered after the release, while memory_order_relaxed permits all such reorderings with no barrier effect.\n- **memory_order_relaxed_vs_seq_cst** (d2): The ordering contrast where sequentially_consistent imposes a single global total order visible to all threads, while memory_order_relaxed has no global ordering requirement across variables.\n- **relaxed_mod_order_thread_agreement** (d2): Although relaxed operations impose no ordering constraints, all threads nevertheless agree on the modification order for any given atomic variable; this agreement is a property of the machine model, not of synchronization.\n- **seq_cst_atomic_visibility** (d2): The guarantee that all threads observe the effects of a sequentially consistent operation at the same logical point in the global total order; reads observe the most recent write in the total order.\n- **seq_cst_default_atomic_ordering** (d2): The default memory ordering for std::atomic operations in C11\u002FC++11 when no memory_order is explicitly specified; provides the strongest guarantees without requiring explicit fence code.\n- **seq_cst_fence** (d2): The explicit memory fence with sequentially consistent ordering that provides both acquire and release semantics plus additional ordering constraints to enforce the global total order.\n- **seq_cst_global_total_order** (d2): A single total order of all sequentially consistent operations that is visible and agreed upon by all threads in the system; the interleaving point where all threads observe the same sequence of operations.\n- **seq_cst_implies_acquire** (d2): A load operation with sequentially consistent ordering carries acquire semantics; all subsequent loads and stores cannot be reordered before the seq_cst load.\n- **seq_cst_implies_release** (d2): A store operation with sequentially consistent ordering carries release semantics; all prior loads and stores cannot be reordered after the seq_cst store.\n- **seq_cst_indivisible_atomicity** (d2): The property that each sequentially consistent operation appears indivisible and instantaneous to all observers; no intermediate states are visible during the operation.\n- **seq_cst_program_order_preservation** (d2): Within each thread, sequentially consistent operations maintain program order; no reordering of these operations is permitted within the same thread.\n\n### from `deep_happens_before_relat`\n- **acquire_fence** (d4): A memory ordering primitive that ensures all load and store operations appearing after the fence in program order do not begin until the fence completes and all prior writes are visible.\n- **release_fence** (d4): A memory ordering primitive that ensures all load and store operations appearing before the fence in program order complete before any operations appearing after the fence begin.\n- **synchronizes_with_acquire_side** (d5): The acquire-side endpoint of a synchronizes_with relation: an atomic operation or fence that performs an acquire action, making all subsequently observed writes visible to the acquiring thread.\n- **synchronizes_with_release_side** (d5): The release-side endpoint of a synchronizes_with relation: an atomic operation or fence that performs a release action, making all prior memory operations visible to acquiring threads.\n- **program_order** (d6): The sequential ordering of operations within a single thread as written in the source code, before any concurrent interleaving is considered.\n- **inter_thread_happens_before** (d7): The subset of happens_before relations that cross thread boundaries, established by synchronizes_with connections between release and acquire operations.\n- **happens_before_order** (d8): A transitive, irreflexive partial order over operations in a memory model that defines which operations must appear to precede others from any thread's perspective.\n\n### from `deep_indivisibility_prope`\n- **isi_atomicity_boundary** (d4): The demarcation line separating the before-state from the after-state of a relaxed atomic operation; no observable execution window exists across this boundary.\n- **isi_operation_completeness** (d5): The property that a relaxed atomic operation executes to full completion before any observer can witness its effect or lack thereof; partial execution is undetectable.\n- **isi_no_in_flight_state** (d6): The guaranteed absence of any transient value during operation execution that could be sampled by a concurrent thread; the in-flight state is logically invisible.\n- **isi_post_state_visibility** (d6): The state of the target atomic variable after the operation has fully completed, which is the only alternative state an observer may witness.\n- **isi_pre_state_visibility** (d6): The state of the target atomic variable as it existed before the operation commenced, which is the only alternative state an observer may witness.\n- **isi_load_visibility_rule** (d7): For a relaxed atomic load, the read returns exactly one value from the modification order; no torn read of a partial encoding is observable.\n- **isi_rmw_visibility_rule** (d7): For a relaxed read-modify-write operation, observers see either the complete state before the modification or the complete state after modification; the read-modify-write executes atomically without observable intermediate stages.\n- **isi_store_visibility_rule** (d7): For a relaxed atomic store, any reading thread observes either the complete value that existed before the store or the complete value after the store; torn writes are impossible.\n- **isi_observer_exclusivity** (d7): The constraint that any given observer of a relaxed atomic operation sees exclusively one of the two complete states; mixed or hybrid observations are prohibited.\n\n### from `deep_synchronizes_with`\n- **atomic_load** (d3): load operation with memory_order semantics; load with acquire is the endpoint of synchronizes_with from release store\n- **atomic_store** (d3): store operation with memory_order semantics; store with release triggers synchronizes_with on matching acquire\n- **barrier_arrival** (d3): The event when a thread reaches a synchronization barrier; each arrival synchronizes-with all other arrival events at the same barrier instance, enforcing a global rendezvous.\n- **condvar_broadcast** (d3): A condition variable broadcast that wakes all waiting threads; each woken thread's lock acquire synchronizes-with the broadcast operation.\n- **condvar_signal** (d3): signal operation on condition variable; may synchronize_with a condvar_wait on the same condition variable and mutex\n- **condvar_wait** (d3): wait operation on condition variable; releases associated mutex (release) and blocks until signal (acquire); part of condvar synchronizes_with\n- **full_fence** (d3): A memory fence providing both acquire and release semantics; no memory operation on the issuing core may be reordered across the fence in either direction.\n- **lock_acquire** (d3): A synchronization operation that atomically claims exclusive access to a protected region; on most architectures it is an acquire operation establishing a synchronizes-with edge with the matching release.\n- **lock_release** (d3): A synchronization operation that atomically relinquishes exclusive access; it is a release operation establishing a synchronizes-with edge with all subsequent acquires of the same lock.\n- **memory_order_acquire** (d3): Memory ordering barrier ensuring all loads and stores after the barrier in program order cannot be reordered before it, synchronizing with release stores.\n- **memory_order_release** (d3): Memory ordering barrier ensuring all loads and stores before the barrier in program order cannot be reordered after it, making prior writes visible to acquiring threads.\n- **semaphore_acquire** (d3): A decrement of a semaphore counter that claims a permit; when it succeeds the acquire synchronizes-with the release that previously published the permit.\n- **semaphore_release** (d3): An increment of a semaphore counter that releases a permit; the release synchronizes-with any subsequent acquire that consumes that permit.\n- **signal_delivery** (d3): The delivery of a signal to a thread creates a synchronizes-with edge from the last operation before the signal mask change to the first operation in the signal handler.\n- **thread_creation** (d3): The operation of spawning a new thread of execution; the creating thread's operations before the spawn synchronizes-with the new thread's first operation in program order.\n- **thread_join** (d3): joining a thread; synchronizes_with the termination of the joined thread; acquire semantics for thread's memory effects\n- **fence_synchronizes_with_fence** (d3): A pair of fences on different threads where the second fence in program order synchronizes-with the first fence establishing an ordering boundary.\n- **memory_order_acq_rel** (d4): A memory ordering that is simultaneously acquire and release; applies to read-modify-write atomics and makes the update visible atomically with surrounding writes.\n- **fence_synchronizes_with_op** (d4): A relation where a fence on one thread establishes a synchronizes-with edge over an operation on another thread that accesses memory visible across the fence boundary.\n- **unlock_synchronizes_with** (d4): A specific instance of synchronizes-with: a lock-release operation synchronizes-with the lock-acquire operation of the same lock on another thread.\n\n## CONSUMERS (what needs this)\n`c11_atomic_thread_fence_contrast`, `cpp11_memory_model`, `data_race`\n\n---\n*Projected from the `concurrency synchronization primitives and memory models` KB (407 concepts \u002F 477 relations) — consistency-typed by MAP; the facet list after the colon IS the cross-lib dependency web.*",{},"main","dfed66814f223a9f42bec375a3c59d74eefdcad5","kbworld\u002Fstate\u002Flibraries\u002F_staging_concurrency_synchronization_primitives_and_memor\u002Funderstand-c11_memory_model","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-c11_memory_model",{"tool":36,"command":37},"bunx","bunx skills add sancovp\u002Fdark-factory-live --skill understand-c11_memory_model",{"tool":39,"command":40},"pnpm","pnpm dlx skills add sancovp\u002Fdark-factory-live --skill understand-c11_memory_model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsancovp\u002Fdark-factory-live\u002Fblob\u002Fmain\u002Fkbworld\u002Fstate\u002Flibraries\u002F_staging_concurrency_synchronization_primitives_and_memor\u002Funderstand-c11_memory_model\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",[],[]]