Repository navigation
Conversation
A one-day description usually came back with the date in the description only. With no date field the signup has no reminder anchor, so nobody who signs up gets the day-before email. The date-and-time rule connected assistants already had now goes to the drafter too, through RULES_IN_BOTH, and says it holds when every slot is on the same day. The prompt gains a DATES AND TIMES line and a worked example of a one-day event with Date and Time columns, the golden file is regenerated, and two single-day eval cases are added. The rule is reworded to keep the MCP instructions inside their 2048-byte budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SU29EH5yo7dguphwJD
Tophat: passedRan b49e9e0 locally with
The mock's date, 2030-11-14, is a Thursday, so the rows read "Thu". That comes from my test data, not from this PR. For the owner (UX): nothing on screen changes. What changes is what Magic Compose and connected AI assistants are told: give a signup a Date column even when everything is on one day. When a draft follows that rule, people who sign up get the day-before reminder, as the third row shows. This tophat can't tell you how often real models now follow it. Please run the model-panel eval ( Screenshots are in https://claude.ai/code/session_016YZ9SS8d7RXpGsMtTDVwGd. Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The PR moves USE_DATE_AND_TIME_FIELDS into RULES_IN_BOTH, adds the one-day clause to it, puts it in the Magic Compose prompt under the field type guide, and adds Example F (a one-day car wash where every slot has a Date and a start Time). It also regenerates the golden prompt and adds two eval cases. The change is small and does what it says. The shared constant reaches both readers word for word: prompt.test.ts:60 and instructions.test.ts:24 both loop over RULES_IN_BOTH, and the MCP instructions still use the same constant at src/mcp/instructions.ts:45, so the wording can't drift. June 6, 2026 really is a Saturday, and Example F's prompt isn't copied from any eval case. The new eval keys (fields.must_include_field_type, slot_dates.set_must_equal, slot_values_must_cover_all) are ones the harness already handles.
Blocking (0)
Optional (1):
evals/magic-compose/dev-evals.json(ev_038): the description says this case "also needs the start time". Butslot_times_or_description_must_mentionsearches the whole draft, description included, and passes when any one of the strings appears. So a draft with no Time field still passes as long as its description says "10am". Requiring a time field would need a new harness check. The eval is a smoke signal, so it's fine as it stands.
Earlier threads: none. Copilot couldn't review (its quota was used up).
Checks: CI is green on b49e9e0 (lint-type-test, e2e, CodeQL). The tophat passed on b49e9e0, the same commit, so no runtime code has changed since. Locally I only read the diff, the eval harness's handlers for the new keys, and src/mcp/instructions.ts.
Why it waits for the owner: it's UX (it changes what Magic Compose drafts and what connected assistants are told), and the PR asks the owner to do something before merging. Issue #685's "Done when" asks for a model-panel eval run, PR vs main, and that run hasn't happened yet: this pipeline has no LLM endpoint. Before approving, please run pnpm eval:magic-compose on this branch and on main (3 runs each, on the OpenRouter panel). Check that ev_038 and ev_039 now get a date field, and look for drift on the item-list cases (ev_001, ev_016, ev_032) and the TBD cases (ev_034, ev_035, ev_037). Nothing changes on screen. The tophat's 693-after-desktop-build shows a one-day draft that has its reminder anchor.
https://claude.ai/code/session_016YZ9SSy8e2nEbatBBDPC4L
Generated by Claude Code
Fixes #685.
The problem
When a Magic Compose description covers one day ("bake sale on Saturday, November 14, 9am to 1pm…"), the draft usually puts the date in the description and gives the slots no Date column. A signup with no date field has no
reminderFromFieldRefand its slots have noslot_at, so nobody who signs up gets the day-before reminder, and nothing tells the organizer. The rule that would have prevented this,USE_DATE_AND_TIME_FIELDS, only went to connected AI assistants. #475 kept it out of the Magic Compose prompt until it had an eval run.The fix
Shared rule.
USE_DATE_AND_TIME_FIELDSmoves intoRULES_IN_BOTH(src/lib/signup-rules.ts), so the drafter and assistants read the same words, and the tests on both sides check that.One day is named. The rule now reads: "When slots happen on a day or at a time, add a date field, even if all are on one day, and a time field if needed. Reminders are timed from the date field: with a text field like "Sat 9am" nobody gets one." The issue said to add the one-day clause only if the model still left the date out. I added it up front, because the reported failure is exactly the one-day case and I had no model to measure with (see Before merging).
Byte budget. My first wording put the MCP instructions at 2101 bytes before the tools line, over the 2048 limit
route.test.tschecks. "Reminder emails" became "Reminders" and the clause got shorter, so the instructions are now 2045 bytes. A comment by the constant says every word there counts against that budget.The prompt (
src/lib/magic-compose/prompt.ts) gets aDATES AND TIMES — <rule> See Example F.line right after the field type guide. Example F is new: a one-day car wash with two jobs, where every slot carries a Date (2026-06-06) and a start Time (09:00). It's a list of jobs on one day, the same shape as the failing case, and it uses its own words, so the test that compares worked examples with eval prompts still passes. As the issue asked, a time range gets only a start time.Golden file regenerated. Its diff is just the new line and Example F.
Evals. Two made-up cases in
evals/magic-compose/dev-evals.json. Each needs a date field andslot_dates.set_must_equalon the one date, which means that date is in every slot:ev_038: a one-day spring fair with roles and a 10am-to-3pm range. It also needs the start time.ev_039: a one-day block-party dish list.Both use existing harness checks, so the harness itself doesn't change.
CHANGELOG has an entry under Fixed.
Tests
prompt.test.tsnow expects worked examples A–F. A new test checks that Example F gives every slot the same date and start time.pnpm lint,pnpm typecheck,pnpm knip,pnpm test(157 files, 1996 tests, including the instructions byte-budget test and the word-for-word checks on both sides), andpnpm test:db src/mcp.Before merging
This session had no LLM endpoint, so I haven't run the model-panel eval that the issue's "Done when" asks for and that the golden-file test's comment requires before a prompt change. Please run it on this branch and on
main(3 runs per side, across the OpenRouter panel used for #526 and #577):Watch for:
ev_038andev_039now get a date field;ev_001,ev_016andev_032;ev_034,ev_035andev_037.Generated by Claude Code