From 0996b03f8f320b738b53b3d79a36b3e04360064c Mon Sep 17 00:00:00 2001 From: Wolf Date: Tue, 29 Sep 2026 16:17:15 +0200 Subject: [PATCH] Edit an agent's prompts as rows and its gates as a Where block and rules The card lists each prompt and says the gates in words. The form edits prompts as name and text rows, and the gates as a Where block (countries required, then one of countries, remote or places, and prefer hybrid) over a row per remaining rule. A gate the Where block cannot say lands in a row, so a load and a save lose nothing. The gates JSON box stays under Advanced, read only, as a view of what Save sends. Co-Authored-By: Claude Opus 5.5 --- app/static/agents.js | 376 +++++++++++++++++++++++++++-- app/static/app.css | 41 +++- app/templates/settings/agents.html | 48 +++- 3 files changed, 434 insertions(+), 31 deletions(-) diff --git a/app/static/agents.js b/app/static/agents.js index d6de095..34e3175 100644 --- a/app/static/agents.js +++ b/app/static/agents.js @@ -2,9 +2,12 @@ * against, one agent at a time. * * Every agent from `/api/agents` is a card, newest first: its name, its - * switch, what it looks for, its weights, and a link to the Roles tab in its - * order. What it looks for is the paragraph, since that is what fit is - * measured against; the weights only share out the terms. Edit turns a card + * switch, its prompts, its gates in words, its weights, and a link to the + * Roles tab in its order. The prompts are the body, since fit is measured + * against the one a role fits best; the weights only share out the terms. + * The form edits the prompts as rows, and the gates as a Where block for the + * usual location rules over a row per remaining rule; a gate Where cannot + * say lands in a row, so a load and a save lose nothing. Edit turns a card * into the form from the page's `