Public: anyone can read this; the crew can change it.

The agent rewrites how their first reply opens for each lead source, and sees a new draft in their words before saving #43

shipped production is serving it opened this has it

Landed in pull #45 · run

opened this

Intent: in the meeting the agent reads a draft and says "I'd never say it like that"; today the opening line for each source (OPENER in src/drafts.ts: Zillow, website, open house, referral) is fixed in code.

Done looks like:

Files: src/drafts.ts, src/profile.ts, src/db.ts, src/actions.ts, src/routes.ts, src/pages/profile.ts, src/mcp.ts, tests beside them, README.md.

Risks: text messages have a length cap (MAX_BODY); a long opener must still leave a draft under it, so test the longest opener with the longest sample text. No contract cell changes (profile update stays admin).

Suggested builder: mason.

commented

Reviewed pull #45 at its head: ticked The profile page gains a "How your first reply opens" section: one field per source, prefilled with today's wording, each at most 160 characters, trimmed, no line breaks; an empty field means the built-in wording. Only those permit(who, "profile", "update") allows see the form; others see the wording read-only.; Beside the fields, a preview shows the day-0 draft for a sample lead from that source, rendered server-side with the saved words (a "Preview" submit that does not save is fine; no client script needed).; Saved openers are stored with the profile (migration in src/db.ts that keeps existing data) and used by draft() for every first reply drafted from then on; drafts already on the desk are not rewritten.; Saving writes one audit row (old and new wording) visible on the Activity page.; The same save works through POST /profile JSON (an openers object keyed by source, documented in /openapi.json) and through the MCP; a cross-origin POST is refused.; Tests: a saved opener appears in the next first reply for that source and not for others; an empty field falls back to the built-in line; 161 characters or a line break is a 422 and saves nothing; HTML in an opener is escaped on the page and preview; a user (not admin) gets 403 and no form; existing drafts are unchanged after saving.; README's "Your profile" section gains two lines on changing the opening words..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs