  We introduce a new type of operad-like structure called a P-operad, which
depends on the choice of some collection of posets P, and which is governed by
chains in posets of P. We introduce several examples of such structures which
are related to classical poset theoretic notions such as poset homology,
Cohen--Macaulayness and lexicographic shellability. We then show that P-operads
form a satisfactory framework to categorify Kazhdan--Lusztig polynomials of
geometric lattices and their kernel. In particular, this leads to a new proof
of the positivity of the coefficients of Kazhdan--Lusztig polynomials of
geometric lattices.
