Prompt Engineering103 · Module III · Lesson 12 of 14
Article · 12 min

Building a prompt library

The one habit that scales.

Summary

A prompt library is a versioned, tested collection of prompts your team relies on. Not a Notion doc — a repository, with tests, changelog, and retirement discipline. The one habit that separates production teams from tinkerers.

Objectives
  • 01Design the folder structure of a prompt library.
  • 02Version prompts and track changes.
  • 03Set the retirement rule for a failing prompt.
The Lesson

The structure

One prompt per file, with metadata: intent, input schema, expected output, evaluation set, changelog, owner. Store in Git. Automated tests run on each prompt against a fixed test set. Failing tests block merge.

The discipline

Every change is a diff, reviewed. Every prompt has an owner. Every prompt has a retirement rule ('if pass rate drops below 90% for two weeks, retire'). Without discipline, prompt libraries decay into folklore.

Key Ideas
  • A prompt library is a Git repository with tests.
  • Retirement discipline prevents rot.