diff --git a/docs/superpowers/specs/2026-06-07-playground-messages-redesign-design.md b/docs/superpowers/specs/2026-06-07-playground-messages-redesign-design.md new file mode 100644 index 0000000..d1cb62f --- /dev/null +++ b/docs/superpowers/specs/2026-06-07-playground-messages-redesign-design.md @@ -0,0 +1,276 @@ +# Playground messages redesign + +**Status:** Draft +**Owner:** mia +**Date:** 2026-06-07 + +## Why + +The playground today asks the user to compose a single text template and +fill `{{ var }}` placeholders. That doesn't match how modern chat models +are actually called: a typed list of messages where the system prompt and +the user turn are separate things. The reference UX +([LangSmith's playground][langsmith-pg]) shows what we want — typed +messages, an Inputs panel that fills detected variables, save-as-prompt +with versioning. PR #10 made the model picker honor configured +credentials but left the playground's data shape untouched. + +[langsmith-pg]: https://docs.langchain.com/langsmith/playground + +## Decisions (locked in brainstorm) + +| # | Topic | Decision | +|---|---|---| +| 1 | Storage shape | Replace `prompt_version.template text` with `template_messages jsonb`. Backfill rewrites every existing row to `[{role: "human", content: