Prompt as Program
The pattern: prompts are code (or config, depending on the lens) — versioned, tested, PR-reviewed. An eval suite (golden inputs + expected behavior) gates prompt changes. Regressions get caught at PR time, not by users.
The trade-off: engineering discipline vs. iteration speed. Throwaway strings are fast; treating prompts as code is slower upfront but compounds. The maturity arc: prompts in code, then versioned files, then a registry with eval, then feature-flagged with A/B tests. Senior+ ML/AI work lives near the right end of that arc.
Deepens in Year 5 Phase 26: Agent Development — prompts live in basecamp git, the PR template requires eval-pass, regressions are tracked over versions. Phase 28: AIOps and services/aiops/ exercise this discipline under production pressure.
Related patterns
- agent-loop — the planner node is the prompt this pattern governs.
- tool-use-as-capability — prompts and tool schemas evolve together; both need eval coverage.
- model-lifecycle — same versioning shape applied to model artifacts.
- train-serve-skew — prompt drift is the LLM-era cousin of train/serve skew.