Natural-language scheme editing #22

Open
opened 2026-07-07 17:38:03 +00:00 by claude-bot · 0 comments
Contributor

Goal

Let users refine a scheme with plain-language instructions — "make it warmer and slower," "more Halloween, less pastel," "add a second accent color" — and get back a validated candidate scheme.

Why it's valuable

Iris already has the SuggestionProvider abstraction with Ollama/Anthropic/OpenAI-compatible providers, a prompt builder, and Pydantic response validation. Natural-language editing is a high-delight, low-cost extension of that existing pipeline rather than net-new infrastructure.

Sketch

  • New endpoint POST /schemes/{id}/refine { instruction } that feeds the current scheme JSON + the instruction to the provider, reusing the existing validator + retry + fallback.
  • Reuse the daily-limit counter (AI_DAILY_LIMIT).
  • UI: a text box on the scheme editor with the same before/after preview as "Generate Suggestion."

Acceptance criteria

  • Instruction returns a schema-valid modified candidate
  • Reuses validation/retry/fallback and the daily cap
  • Before/after preview before saving
  • Provider-mocked tests (happy path + invalid response)

Proposed enhancement (brainstorm follow-up); builds on the M7 AI pipeline.

## Goal Let users refine a scheme with plain-language instructions — "make it warmer and slower," "more Halloween, less pastel," "add a second accent color" — and get back a validated candidate scheme. ## Why it's valuable Iris already has the `SuggestionProvider` abstraction with Ollama/Anthropic/OpenAI-compatible providers, a prompt builder, and Pydantic response validation. Natural-language editing is a high-delight, low-cost extension of that existing pipeline rather than net-new infrastructure. ## Sketch - New endpoint `POST /schemes/{id}/refine { instruction }` that feeds the current scheme JSON + the instruction to the provider, reusing the existing validator + retry + fallback. - Reuse the daily-limit counter (`AI_DAILY_LIMIT`). - UI: a text box on the scheme editor with the same before/after preview as "Generate Suggestion." ## Acceptance criteria - [ ] Instruction returns a schema-valid modified candidate - [ ] Reuses validation/retry/fallback and the daily cap - [ ] Before/after preview before saving - [ ] Provider-mocked tests (happy path + invalid response) Proposed enhancement (brainstorm follow-up); builds on the M7 AI pipeline.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rbrooks/Iris-WLED#22
No description provided.