---
repo: "mohan-n-swamy/promptlab"
title: "PromptLab — Evolutionary Prompt Optimizer & Golden-Set Evaluator"
license: "MIT"
keywords: [prompt-engineering, llm-evaluation, prompt-optimization, ai-agents, evals, typescript, llmops, benchmarking, automated-testing]
capabilities:
  - "An autonomous evolutionary prompt optimization CLI (TypeScript/Node) that mutates prompts against golden test cases, evaluates rubrics, blocks regressions, and tracks cost-vs-accuracy improvements."
  - "Complete human and machine documentation pack (`AI-README.md`, `llms.txt`, `AGENTS.md`, `PRD`, `PR-FAQ`, `HLD`, `LLD`, `RESEARCH-2026`)."
when_to_use:
  - "An autonomous evolutionary prompt optimization CLI (TypeScript/Node) that mutates prompts against golden test cases, evaluates rubrics, blocks regressions, and tracks cost-vs-accuracy improvements."
  - "Hand-tuning system prompts by vibe breaks three old edge cases every time you fix a new one. `promptlab` runs structured mutation-and-eval loops over golden JSON datasets with explicit criteria YAML."
inputs_required:
  - "LOG_LEVEL: Optional diagnostic verbosity control"
quickstart:
  - "npm install"
  - "npm run build || npx tsc --noEmit"
---

# PromptLab — Evolutionary Prompt Optimizer & Golden-Set Evaluator — Machine-Readable Agent Guide

An autonomous evolutionary prompt optimization CLI (TypeScript/Node) that mutates prompts against golden test cases, evaluates rubrics, blocks regressions, and tracks cost-vs-accuracy improvements.

<problem_patterns>
Hand-tuning system prompts by vibe breaks three old edge cases every time you fix a new one. `promptlab` runs structured mutation-and-eval loops over golden JSON datasets with explicit criteria YAML.
</problem_patterns>

<architecture_map>
Key modules and entry points in this repository:
  - `README.md & AI-README.md`: Human quickstart and machine-readable adaptation guide
  - `docs/`: PRD, Working-Backwards PR-FAQ, HLD, LLD, and 2026 research notes
</architecture_map>

<inputs_and_configuration>
Every organization-specific value enters through `.env` (copied from `.env.example`) or external adapter files. No source edit is needed to change organization names, endpoints, database URLs, webhook secrets, or thresholds.
</inputs_and_configuration>

<adaptation_playbook>
When a human asks an AI coding agent to deploy or adapt `promptlab` into their stack:
  1. Follow the quickstart in `README.md` (`npm install`).
  2. Point your AI coding assistant at `AI-README.md` to tailor configuration to your workspace.
</adaptation_playbook>

<reference_docs>
- Product Requirements: `docs/PRD.md`
- Working-Backwards PR-FAQ: `docs/PR-FAQ.md`
- High-Level Architecture: `docs/HLD.md`
- Low-Level Interfaces & Runbook: `docs/LLD.md`
- Coding Agent Rules: `AGENTS.md`
</reference_docs>
