Classify · Transform · Writing & Content
Email subject lines classified with the right precursor
A pure function precursor_for(intent) that maps an email intent code to the canonical subject-line precursor string, graded on hidden intent->precursor cases.
You receive: A pure function: precursor_for(intent: string) -> string, where intent is one of {decision, action, feedback, fyi} and the output is the exact canonical precursor with trailing colon.
Part of Pitch Investors
Example
A sample of what this play produces. Your result is generated for your inputs.
Subject-line precursor classifier, authored for the STUD workspace.
STUD routes founder email by intent: every outbound subject leads with a
canonical precursor so the reader knows the ask before the first word of
the subject proper. The map below is the intake's intent_to_precursor map.
CANONICAL_PRECURSORS = { "decision": "Decision:", "action": "Action Required:", "feedback": "Feedback:", "fyi": "For Your Information:", }
def _truthy(value): return value is True or str(value).strip().lower() in ("true", "yes", "y", "1")
def precursor_for(inp): """Map an email intent code to its canonical subject-line precursor.
inp keys: intent_to_precursor (the intent code), unknown_behavior
("empty" or "error_token"), case_insensitive_intent ("yes"/"no").
Whitespace around the intent is ignored; casing is normalized only when
case_insensitive_intent is on. Unknown intents return "" or "INVALID"
per the configured unknown branch.
"""
intent = str(inp["intent_to_precursor"]).strip()
if _truthy(inp.get("case_insensitive_intent")):
intent = intent.lower()
if intent in CANONICAL_PRECURSORS:
return {"precursor": CANONICAL_PRECURSORS[intent]}
if str(inp.get("unknown_behavior")).strip().lower() == "empty":
return {"precursor": ""}
return {"precursor": "INVALID"}
Opens later
This play is not open to run yet, so it has no price. Leave your email and STUD will tell you when it opens.
Scope of the check
What's verified: STUD verifies the function returns the exact canonical precursor string for each intent code and handles the unknown branch as configured, across hidden cases. STUD does NOT judge whether the subject line is good, whether the chosen intent matches the email's real purpose, or anything about the email body.