herlihylisted
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