← ClaudeAtlas

herlihylisted

Use when atomicizing any subsystem or removing a concurrency constraint — a lock, a Mutex/RwLock, a blocking wait, a serialization point, a step-barrier, a GIL-serialized scheduler. Triggers on "make this lock-free", "atomicize this", "rewrite this atomic", "which atomic primitive", "CAS or fetch-add", "is this actually wait-free / lock-free", "prove this concurrent path correct", "how do I safely reclaim this memory under lock-free readers", or designing a KV cache / scheduler / commit / free-list / ring on hardware atomics. This is the Herlihy doctrine: pick the primitive by consensus number, fix the linearization point, choose the progress guarantee by whether a token can wait, pick the reclamation scheme by reader lifetime, and know the impossibility walls before burning a run. Reach for it by default whenever a token-flow path must be non-blocking; skip only for genuinely single-threaded code with no shared mutable state.
88plug/herlihy · ★ 0 · AI & Automation · score 58
Install: claude install-skill 88plug/herlihy
# The Herlihy Doctrine Named for Maurice Herlihy, who founded wait-free synchronization. This skill turns "everything atomic" from a slogan into a procedure grounded in his published results — so every atomicize/rewrite picks the *sound* primitive, has a provable correctness point, claims the *true* progress guarantee, and never chases something topology forbids. **Before writing the concurrent code, invoke `read-the-damn-docs`** for the exact atomic API in play (Rust `std::sync::atomic` orderings, CUDA `atomicCAS`/ `atomicAdd` semantics, the memory model). A wrong memory ordering is a Heisenbug that a parity gate catches only sometimes — ground it in the docs. The scholarship (verified primary sources, with the NOT-Herlihy flags) lives in `references/corpus.md`. Read it before citing any result — misattributing a technique to Herlihy is the exact overclaim this skill exists to prevent. ## The core move: constraint → atomicize Given a constraint (a lock, a blocking wait, a serialization/step-barrier), rewrite it atomic by running these seven rules **in order**. Each rule is grounded in a specific Herlihy result — cite it, don't assert it. 1. **Name the constraint's consensus need.** Does the rewrite require *multi-party agreement* — who wins a slot, who commits, who retires exactly once? If yes, the primitive floor is **CAS**. *(Consensus-number hierarchy — Herlihy, "Wait-Free Synchronization", TOPLAS 1991.)* 2. **Pick the minimum sound primitive.** Monotonic