Playground (Prompt/Agent Playground): foundations

accepted

Playground (Prompt/Agent Playground) — foundations RFC

Status

*ccepted*— 20260509. Sector bootstrap (skeleton + 5 impl tickets) landed as part of /k-go services/ai audit wave (Modo C). Q1 resolved: Flutter Web (reuses koder_kit, path to desktop variant later, complex interactive surface justifies real client framework). Q2 resolved: KoderSignInButton + KoderAuthGate only for v1; sharelink grants readonly run viewing without login (signed token, revocable); public API-key access deferred to v0.2.

Summary

UI pra prototipar promptsagents antes de virar produto — análogo OpenAI PlaygroundAnthropic Workbench/HF Spaces.

Motivation

Sem playground, prototipagem acontece em scripts, ngrok, ou direto em produção. Workbench reduz tempo de iteração 5-10x.

Scope

In

  • Chat UI multi-model
  • Prompt editor
  • Parameter tuning (temp/top-p)
  • Share runs
  • Export como ticket

Out (yet)

  • Full IDE (escopo koder.ai/kode)

Initial design

Surfaces

  • app/web — UI principal (Flutter web ou templ+HTMX)
  • backend/ — thin proxyadapter (consome gatewayruntime)

Key APIs

  • web UI consume gatewayruntimeprompt
  • sem APIs próprias além de save/share

Dependencies

  • services/ai/gateway — execução LLM
  • services/ai/prompt — registry
  • services/ai/trace — debugging
  • services/ai/runtime — model list

Relation to existing sectors

  • UI layer sobre gatewayprompttrace
  • Não compete com kode (kode é IDE; playground é workbench rápido)

Selfhostedfirst analysis (5 gates)

  • *1 Feature parity* zero
  • *2 Performance* N/A
  • *3 Stability* N/A
  • *4 Capability* frontend simples
  • *5 Critical-path readiness* destrava produtividade interna

Open questions

  • Q1: Surface — Flutter web ou templ+HTMX (per koder-app/behaviors)?
  • Q2: Auth — KoderSignInButton suficiente?

Next steps

  1. Ratificar esta RFC (1 round de comments).
  2. Criar sector dir services/ai/playground/ com koder.toml, README.md, skeleton.
  3. Abrir tickets de implementação em services/ai/playground/backlog/pending/.
  4. Registrar em meta/docs/stack/registries/self-hosted-pairs.md se substituir externo.

Source: ../home/koder/dev/koder/meta/docs/stack/rfcs/playground-RFC-001-foundations.kmd