list_letters filters by job, by person, by kind, by whether it was ever sent,
or by a word anywhere in the text.
Gather before you write
prep_letter is the tool that matters. A letter worth sending is built from five things
that live five places apart:
The posting and the research
What they asked for, and whatever the person wrote down about the company.
What they have already been told
The last few entries on the application’s timeline, so a thank-you can name the
actual conversation.
Evidence from Me
The person’s own material, ranked against this posting. Nothing in a letter should
come from anywhere else.
How they sound
Up to three letters of the same kind they have already written. Two of somebody’s own
letters describe their voice better than any instruction about tone.
missing — no posting on file, no research, no named recipient, nothing
in Me that matched. Say those out loud rather than writing around them.
Drafts and sent
A letter with nosent_at is a draft, and list_letters can show only those. Setting the
date is what turns it into a record of something that actually went out.
Deleting a letter is final — there is no archive for them. A letter attached to an
archived application drops out of the lists with it, and comes back when it is restored.
prep_letter
Gather everything before writing a letter
Call this FIRST whenever someone asks for a cover letter, a cold message, a referral ask, a thank-you or a reply. A good letter is built from five things that live five places apart, and this returns all of them in one read: the posting and the company research (application), who it is going to (contact), the resume it goes out with, evidence — the material from Me that actually matches this posting, ranked — and priorLetters, up to three of the same kind they have already written. Those last ones matter more than any instruction about tone: two letters somebody wrote themselves are the only reliable description of how they sound. intent says what this kind of letter is for, and missing names what is not on file — no posting, no research, no named recipient, nothing in Me that matched. Say the missing things out loud rather than writing around them, and never invent an achievement to fill a gap. Read-only, saves nothing.
create_letter
Save a letter
Save a cover letter, a cold message, a referral ask, a thank-you or a reply. Call prep_letter first — a letter written without the posting, the evidence and their own earlier letters is the generic one everybody sends, and it is worse than nothing. The body is plain prose, in their voice, and every claim in it has to trace back to something in Me: never invent an employer, a date, a metric or a project. Links are optional but worth setting — application_id files it under the job, contact_id under the person, resume_id records which document it went out with. Leave sent_at unset while it is a draft; the list says which are still drafts. Returns the saved letter with its id.
list_letters
List letters
Everything they have written that is not a resume, newest first, each with the job, person and resume it is attached to. Filter by kind, by application, by contact, by whether it is still a draft, or by a word in the text. A letter attached to an archived application does not appear, the same way that application’s tasks and timeline do not. Use this to find something to reuse before writing from scratch, and to answer ‘did I ever reply to them’. Read-only.
get_letter
Read one letter
The full text of one letter, with the job, person and resume it is attached to. Read this before updating one — update_letter REPLACES the body you send.
update_letter
Update a letter
Change a saved letter. Only the fields you send change — but sending body REPLACES the whole body, so call get_letter first, edit what came back, and write it back whole. This is also how a draft becomes sent: set sent_at to the day it went. Send an empty string to a link to detach it.
Overwrites or deletes.