<< All versions

Skill v1.0.1

currentAutomated scan100/100
leopu00/job-hunter-team/email-application-flow

+9 new

──Details
PublishedNovember 17, 2026 at 04:46 PM
Content Hashsha256:45676a86aed33147...
Git SHAced32bd525a5
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 5.7 KB)
SKILL.md5.7 KBactive
SKILL.md · 104 lines · 5.7 KB

name: email-application-flow description: How the CLOSER sends one authorised application by email with email_application.py when apply_flow.py answers email_channel (the Apply control is a mailto: link) — inspect, preflight, draft, send, status; the gate checked again right before the transport; send_started before the irreversible command; the receipt without which applied is never written. Use it for every position whose flow ends in email_channel. Owned by the CLOSER. allowed-tools: Bash(python3 /app/shared/skills/email_application.py *) metadata: version: "1.0.1"


email-application-flow — one email, one receipt, no blind retry

Use it only for a position of the latest queue whose apply_flow.py run answered email_channel (exit 4). The browser flow left the raw mailto_href in its checkpoint; this skill reads it. You never open a mail client, never write an email by hand, never copy the address anywhere else.

bash
python3 /app/shared/skills/email_application.py send --position-id "$PID" --json

send runs everything in order and stops at the first problem. The other commands are for reading, not for working around a stop:

CommandWhat it does
inspectreads and parses the mailto link (To, CC, subject, body)
preflightinspect + gate + daily cap + transport + CV + cover letter + required facts
draftpreflight + the deterministic draft; nothing is sent
senddraft + gate again + send_started + transport + receipt + applied
statusthe last attempt and its state, read only

--dry-run stops before the transport and changes nothing on the application.

What the command guarantees

  • The flag is the authorisation. The gate decides in preflight and again

immediately before the transport. A flag revoked or a cap reached in between means nothing is sent (denied).

  • Nothing is invented. Recipients come only from the link. Name, contact

email and any fact the vacancy asks for (availability, salary expectation) come only from the candidate profile; a missing one is required_fact_missing.

  • The CV is always attached, after size, PDF and hash checks. A cover letter

is attached only when the vacancy asks for one; if none exists, the Scrittore is asked through the normal writer request and the flow stops.

  • One letter at most. send_started is recorded before the server receives

the message. After it, a timeout or an unclear answer is send_outcome_unknown: never retried, not even by a new run.

  • `applied` only after acceptance, with applied_via = agent_closer_email,

written by the command itself after the receipt is stored.

Reading the result

One JSON line: state, reason, detail, plus data.

stateExitMeaningWhat you do
sent0accepted by the server, receipt stored, application recordednext position
draft_ready0dry run: draft and attachments valid, nothing sentnext position
denied1the gate refused (flag_revoked, gate_mode_changed, daily_cap_reached, duplicate_attempt)next position; never retry
blocked_human1a human is needed; the stop is in the round's summarynext position; never retry
send_outcome_unknown3the email may have gone outnext position; never retry
receipt_incomplete3accepted, but the receipt or the record is incomplete; with some recipients refused the letter has probably arrivednext position; never retry
error2database, profile or checkpoint unreadablestop: [BLOCKED] to the Capitano

⚠️ These exit codes are not those of apply_flow.py (there denied is 1 and blocked_human is 3). Decide on state, never on the number.

blocked_human reasons

reasonTypical cause
transport_missingno email transport configured, or its password is unavailable
transport_needs_brokerthe mail account belongs to the secrets broker, which does not send applications yet: tell the user, do not look for a password file
auth_failedthe mail server refused the credentials
sender_unverifiedthe sender address is not the authenticated account or a verified sender
mailto_missingno browser checkpoint in email_channel for this position: run apply_flow.py first; the page is never read for an address
recipient_ambiguous / mailto_invalidzero or several recipients, a forbidden header, CR/LF in a header; also quoted local parts and international (IDN) addresses, which are not supported
recipient_refusedthe server refused the recipients before anything was sent: a new attempt, after the user acts, is not a duplicate
required_fact_missingthe vacancy asks for a fact the profile does not state
cv_missingno readable PDF CV for this application
cover_letter_requiredthe vacancy asks for a cover letter; the Scrittore has been asked

What you do, always the same:

  1. Nothing on that position. The command put the stop in the round's summary (closer_notices.py flush at STEP 6).
  2. Do not retry it. The queue holds it (email_blocked_human,

email_send_outcome_unknown, ...) until the user acts.

  1. Move to the next position of the queue.

Never

  • send an email any other way than this command;
  • run send on a position that is not in the latest queue read;
  • retry after send_started, send_outcome_unknown or receipt_incomplete;
  • write applied, applied_via or apply_requested yourself;
  • paste the SMTP password, or ask the user for it in chat.

Checking afterwards

bash
python3 /app/shared/skills/email_application.py status --position-id "$PID" --json

state: sent with a message_id = the command recorded the email send.

← v1.0.0All versions