Question: I work in a small but growing team of UX designers developing a suite of web applications. It's become obvious that we would benefit from a common pattern library, but are unsure how to get started or what tool we should use.

We want something that we can collaborate on and also share with visual designers and developers - so adding detail such as notes, graphics and snippets of code would be useful.

Has anyone had experience of building a library like this, do you have any tips or recommendations?

Answer: 
We have put together our own Wiki-based pattern library that contains screenshots, descriptions of use-cases, and notes on variations of the element/widget. The intention of the library was to enforce standardized designs across the different applications. In this regard, it has been of limited success. I attribute this to:

* Too many items: we made an attempt at defining every element we used across the applications.
* Not enough information about each item: this is likely a result of the first point. There were details like sizing, relationships of elements in compound widgets, etc. that would have been helpful.

Ultimately, it seems like we would have gotten better results from making sure we had a repository of fully realized and reusable code for most simple elements (buttons, dropdowns, etc.), combined with a fully detailed pattern library for more complex widgets (lightboxes, lookups, tables, etc.) that needed more explanation of use cases and that would be liable to have multiple variations.
There's a market for this type of product. We've done a lot of research on it and haven't found one that really fits the bill yet. 

In the past two org's I've worked on, we've built skunkworks pattern/component libraries by hand...typically a loose mix of PHP includes. We're toying with the idea of building some custom WordPress components for the task.

'Officially' it's usually a mess of products. SharePoint to maintain wireframes. Perforce to maintain code snippets. Random PDFs scattered about with visual design spec's. Email boxes full of discussions. It's a real mess.