Public: anyone can read this; the crew can change it.
The agent adds one line of their own on the Profile page, like "Text me anytime, I answer within the hour", and every new reminder draft carries it above the sign-off #138
Check · Review · Land · Live done — Landed and live in production.
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass. I did not run the full suite or bun scripts/gate.ts, and bun x tsc --noEmit could not run (details at the end).
What changed
- Validation (
src/profile.ts): the line is plain text, trimmed, at most 200 characters and one line. Any line break is refused (CR, LF, U+2028/2029). A refused form keeps what was typed and names the field. - Drafts (
src/reminders.ts):Agentgains an optionalline, andsignOffputs it on its own line directly above the name and brokerage. Date reminders, late follow-ups, "date changed" notices and status updates all usesignOff, so all four carry it. With no line,signOffreturns exactly what it did before. - Memo and sent drafts: the draft memo keys on
JSON.stringify(agent), so changing the line resets it. Sent and held drafts keep their stored words, and nothing rewrites them. - Storage (
src/db.ts): a migration addsprofile.linewith a default of''and a 200-character check. Existing rows and the environment defaults keep working. - Permissions: saving goes through the existing
permit(profile, update)check.contract.jsonis unchanged. - API and MCP: the profile read and update include
line, described in the OpenAPI schema (contract/openapi.jsonregenerated). MCPset_profiletakes it too. - Terminal: the terminal's profile edit keeps the saved line instead of wiping it.
- README: the "Make it yours" section says where to set it, in one sentence.
Tests are in src/line.test.ts:
- A saved line appears in a reminder draft and a status update.
- An empty line leaves the body identical to before.
- 201 characters and a line break are refused, over the API and the form, and the form keeps the typed text.
- HTML in the line is escaped on the Profile page and returned verbatim by the API.
Choices and gaps
- A PUT or MCP save that omits
lineclears it, as it does for the other fields. I did not add a keep-if-absent rule. - I did not add a separate test of the draft review page's escaping of the line. That page already escapes draft bodies, and the Profile page escaping is tested.
bun x tsc --noEmitcould not run: there is notsconfig.jsonin the repo, sotsconly prints help.scripts/gate.tsandscripts/fast.tsdo not exist here either, anddocs/VISION.mdwas not found.bun run lint:designprinted no findings (I read the empty output as clean).
Try it: open Profile as an admin, type a line, save, and open the review page for a deal (or GET /api/profile). The line sits above the sign-off of every unsent draft.
🤖 Generated with Claude Code
The core works (validation, migration, signOff, permit unchanged, contract.json untouched, OpenAPI), but four things must change in one round:
- Both doors: the terminal cannot set the line. src/terminal.ts only carries the saved line through an edit; a person at the terminal cannot type or change it, though the page can. Add a prompt for it in the I > e edit flow (enter keeps it, same as the other fields, with a way to clear it), validated by checkProfile, and show it in the terminal profile view. Add a terminal test, and say in the README sentence that the terminal edit asks for it too.
- Tests the issue lists are missing: HTML in the line escaped on the review page (box 6 names that page, not only /profile); a saved line appears in the other draft kinds the issue names (late follow-up and date-changed notice, not only the first reminder and status); a draft already sent or edited-and-held keeps its words after the line changes (box 3 has no test that fails without it).
- Validation: only CR/LF/U+2028/2029 are refused. Other control characters (\v, \f, \u0085, NUL, tabs) pass through into SMS/email drafts. Refuse all control characters (e.g. /[\p{Cc}\u2028\u2029]/u) and test one.
- A PUT/MCP set_profile that omits
linesilently erases it, so existing API/MCP clients that predate the field wipe the agent's line. Keep the saved line when the key is absent (clear only on an explicit empty string), and test it; document in openapi description.
Also: split the very long README sentence into two; tsc/gate could not run per the builder, so those are unverified by me.
All four points are addressed and pushed. The line, profile, terminal, sign-off, OpenAPI and hold tests pass, and the design lint prints no findings. I did not run the full suite. bun x tsc --noEmit still can't run because the repo has no tsconfig.json, and there is no scripts/gate.ts here, so those stay unverified.
1. Terminal
I, thene, now asks a fifth question: "A line of your own above the sign-off".- Enter keeps the saved line and
-clears it. Anything else goes throughcheckProfilelike the other fields. - The profile view shows an "Own line" row, with "none" when it is empty.
- A terminal test covers setting, keeping and clearing it.
- The README sentence says the terminal edit asks for the line too, and
-clears it. - I split the long README sentence into several shorter ones.
2. Tests added (src/line.test.ts)
- The line appears in the before, day-of, late and date-changed drafts.
- A sent draft and an edited-and-held draft keep their words after the line changes. The fresh drafts alongside them take the new line.
- HTML in the line is escaped on
/reminders/today.
3. Validation
- The check is now
/[\p{Cc}\u2028\u2029]/u, so tab,\v,\f, NUL, U+0085 and the line breaks are all refused. - The tests cover each of those characters.
4. Omitted line
- A save through PUT or MCP that leaves
lineout keeps the saved line. Only an explicit empty string clears it. - This is tested.
- The OpenAPI and MCP descriptions say so, and
contract/openapi.jsonis regenerated.
🤖 Generated with Claude Code
All four earlier asks are met on this head. (1) The terminal edit asks for the line (enter keeps it, - clears it), shows an Own line row, and has a test. (2) The new tests cover every draft kind, sent and held drafts keeping their words, and escaping on /reminders/today. (3) Validation now refuses every control character and U+2028/2029, with a test for each. (4) A save that leaves line out keeps the saved line, and only an empty string clears it; this is tested and described in OpenAPI and MCP. I read the diff since 565d09bb3177 and found nothing new. contract.json is unchanged and saving still goes through permit. I did not exercise the preview.
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass. I did not run the full suite or
bun scripts/gate.ts, andbun x tsc --noEmitcould not run (details at the end).What changed
src/profile.ts): the line is plain text, trimmed, at most 200 characters and one line. Any line break is refused (CR, LF, U+2028/2029). A refused form keeps what was typed and names the field.src/reminders.ts):Agentgains an optionalline, andsignOffputs it on its own line directly above the name and brokerage. Date reminders, late follow-ups, "date changed" notices and status updates all usesignOff, so all four carry it. With no line,signOffreturns exactly what it did before.JSON.stringify(agent), so changing the line resets it. Sent and held drafts keep their stored words, and nothing rewrites them.src/db.ts): a migration addsprofile.linewith a default of''and a 200-character check. Existing rows and the environment defaults keep working.permit(profile, update)check.contract.jsonis unchanged.line, described in the OpenAPI schema (contract/openapi.jsonregenerated). MCPset_profiletakes it too.Tests are in
src/line.test.ts:Choices and gaps
lineclears it, as it does for the other fields. I did not add a keep-if-absent rule.bun x tsc --noEmitcould not run: there is notsconfig.jsonin the repo, sotsconly prints help.scripts/gate.tsandscripts/fast.tsdo not exist here either, anddocs/VISION.mdwas not found.bun run lint:designprinted no findings (I read the empty output as clean).Try it: open Profile as an admin, type a line, save, and open the review page for a deal (or
GET /api/profile). The line sits above the sign-off of every unsent draft.🤖 Generated with Claude Code
Closes #135