Lin-Manuel Miranda’s Brooklyn 99 cameo could’ve set up a great meta joke about Hamilton. Introduced in season 6, Miranda guest stars as Amy’s brother David Santiago. Miranda’s cameo is a tribute to his love of the show, with him showing support for the show after Brooklyn 99’s initial cancelation. However, Gina mentions in season 4 that she loved the musical Hamilton. While shows and movies have meta references like this all the time, Miranda’s cameo actually made sense in the Brooklyn 99 universe.
https://screenrant.com/brooklyn-99-lin-manuel-miranda-cameo-hamilton-joke-setup/