My research aims to understand how bacteria and archaea regulate their CRISPR adaptive immune systems. To adapt and acquire immunity to new phages, CRISPR-associated proteins (Cas1 and Cas2) integrate fragments of phage DNA ("spacers") at the "leader-end" of the CRISPR locus, near the transcription start site. Polarized integration is crucial because spacers at the leader-end of the CRISPR provide greater immunity against recently encountered phages. But how Cas1-2 recognizes the leader-end of the CRISPR remains poorly understood. Next, the CRISPR locus is transcribed and processed into "guide RNAs" that are loaded into surveillance complexes (i.e., Cas9 or Csm complexes). Upon sensing viral RNA, the Csm complex makes cyclic oligonucleotide messengers that regulate CRISPR immune effectors critical for phage defense. But the biological roles of many of these immune effectors, which include nucleases and peptidases, remain understudied. Addressing knowledge gaps in CRISPR adaptation and CRISPR immune signaling provides insight into how bacteria and archaea evade phage predation, with implications in understanding the human microbiome, the design of phage therapies, and the development of new biotechnological tools such as genetic recording devices and diagnostics. I am using a combinatorial approach of bioinformatics, biochemistry, and cryo-electron microscopy to discover how conserved CRISPR leader DNA motifs are recognized and folded to regulate CRISPR adaptation. Further, to address an urgent need for inexpensive and rapid detection of viruses, I have repurposed a CRISPR immune signaling pathway to detect SARS-CoV-2 in patient samples.