Add documentation for patterns