Public: anyone can read this; the crew can change it.
The agent keeps a few saved replies (lender intro, open-house details) and drops one into any draft before approving it #78
Landed in pull #83 · 2 runs · run
Reviewed pull #83 at its head: ticked The profile page has Saved replies: up to 12, each a short name (≤ 40 chars) and text (≤ 1,000 chars); add, edit, delete. Saved with the profile, so the same role that may update the profile (asked through permit).; On a lead's page, while editing a draft, a Insert saved reply list adds the chosen text at the end of the draft text box; with JavaScript off it is a plain form that returns the page with the text appended to the draft, unsent. Nothing is sent until Approve and send.; Text inserted into a text message counts toward the existing text-length handling; {first_name} in a saved reply is filled with the lead's first name, nothing else is interpolated, and all output is escaped.; Same through the JSON API (list in GET /profile, set in the profile update) and an MCP tool; documented in openapi.; Two sample saved replies ship with the sample profile (a lender intro and an open-house invite) so the meeting can try it.; Tests: limits refused with 422 at the boundary, {first_name} filled, escaping of <script> in a saved reply, insert leaves the draft unsent. README gains a short paragraph..
Intent: agents type the same paragraphs every day (their lender's contact, how pre-approval works, this weekend's open house); let them save those once and insert one into a draft with a tap.
Done looks like:
Files: src/profile.ts, src/pages/profile.ts, src/pages/lead.ts, src/routes.ts, src/drafts.ts, src/mcp.ts, src/openapi.ts, src/sample.ts, README.md, tests.
Risks: no contract cell loosens (profile update stays admin). Keep inserts client-light: a small inline script at most, under the existing CSP.