Agent: what a day of live use asked for
Build image / build-and-push (push) Successful in 19s
Gadfly review (reusable) / review (pull_request) Successful in 10m2s
Adversarial Review (Gadfly) / review (pull_request) Successful in 10m2s

Twenty-one prompts against the live assistant found one fabricated success,
a model that believed it was 2025, and a describe_garden that was ~450 plop
entries per turn. This is the set of fixes, each traceable to a finding:

- The gardener's LOCAL day travels with the turn (`today` on POST /agent/chat,
  sent by the UI like plantedAt) into the system prompt and every dated tool
  default. Left to guess, the model dated journal entries a year back; left to
  the server, a 9 pm fill landed on UTC's tomorrow.
- describe_garden groups plops by plant — count, where, planted date, days to
  maturity — and lists ids only for groups of ≤ 8; list_plantings spells a big
  group out on demand and remove_plantings acts on one plant in a bed ("take
  the beets out, leave the garlic"), which used to mean 116 single removals.
- New tools: move_planting (keeps the planting date; across beds via the new
  MovePlanting, which is why the store's UPDATE now writes object_id),
  update_plant, read_history, copy_garden (the "<garden> — <year>" plan
  convention). fill_region takes an explicit local rectangle and a seedLotId;
  place_planting's radius defaults to one plant (spacing/2) instead of a guess.
- The system prompt states the date and the gardener's units, forbids claiming
  a change no tool made, says it cannot undo and points at the Undo button,
  asks before clearing beds on an ambiguous sentence, and stops narrating its
  own plantings into the journal.
- A mutation aimed at ANOTHER garden inside a turn is recorded under that
  garden as its own change set, not filed into the open scope.
- UI: the thread scrolls inside the Assistant panel so the composer stays
  put; every tool has a step label; wide tables stay inside the bubble.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-08-23 00:14:41 -04:00
co-authored by Claude Fable 5
parent f0aefb5378
commit bc14bbed0d
18 changed files with 1702 additions and 186 deletions
+18
View File
@@ -160,6 +160,24 @@ Conventions that follow from it:
plantings. Fixing it per-call-site is how it came back, which is why the rule
lives in `commitScope` where no caller can forget it.
- **The assistant's date comes from the client, never from the model.**
`POST /agent/chat` carries `today` (the browser's local day, same reason the
UI sends `plantedAt`); `Runner.Run` puts it in the system prompt and
`NewToolbox` stamps it on every dated tool default through `adapter.day`. A
new tool that takes a date defaults through `day()`, not `time.Now()`. Left to
guess, the live model dated journal entries a year back (2025) — the year it
remembered from training.
- **`describe_garden` is a summary, not a dump.** Plops are grouped per plant
(`service.DescribeGroup`: count, where, planted date, days to maturity) and
ids are listed only for groups of ≤ `maxListedPlops`; the first grid-filled
garden made the old per-plop describe ~450 entries on every turn. A tool that
needs individual ids uses `list_plantings`; bulk work takes (object, plant)
`remove_plantings`, `ClearPlantings`. Don't add a tool that lists plops.
- **The assistant can't undo and must not pretend to.** Asked to "undo the
beets", the live model replied "Done!" and changed nothing. The prompt now
forbids claiming a change no tool made and points at the Undo button; keep
both rules when editing `systemPrompt`.
- **Request deadlines are extended through `responseController(c)`, never
`http.NewResponseController(c.Writer)`.** A controller built in a handler
can't reach the socket — the logging middleware wraps the writer — so every