📦 Task

Generate SAFE Agreement

Create and send SAFE documents with validation, template population, PDF conversion, and email drafting

Requirements

Company information UI file, SAFE template available

1
💬 Check if 🎨 Company Legal Information exists. If it does, read it and verify it contains these required fields: - Company Name (legal entity name) - CEO Name (signing officer) - CEO Title (officer title) - Office Address (complete address)
2
💬 If 🎨 Company Legal Information is missing or lacks any required fields (Company Name, CEO Name, CEO Title, or Office Address), ask the user to provide the missing information. Explain what each field is for: - Company Name: The legal entity name (e.g., "HeyDaily, Inc.") - CEO Name: The name of the signing officer (e.g., "Filip Kozera") - CEO Title: The officer's title (e.g., "Chief Executive Officer") - Office Address: The registered office address (e.g., "1185B Old Mason Street, San Francisco, CA 94123") Once collected, write all the information to 🎨 Company Legal Information in a clear format: # Company Legal Information **Company Name:** [value] **CEO Name:** [value] **CEO Title:** [value] **Office Address:** [value]
5
💬 Verify that the SAFE template was successfully loaded. If the template is missing or empty, inform the user that the SAFE template is not available and the process cannot continue. Exit the task if the template is missing.
6
💬 Gather the investment parameters from the user: - Investor Name: The name of the investor or fund (e.g., "Sequoia Capital") - Valuation Cap: Post-money valuation cap with $ and commas (e.g., "$2,000,000,000") - Investment Amount: Purchase amount with $ and commas (e.g., "$500,000") - Recipient Email: Email address for sending the SAFE (e.g., "partner@sequoia.com") Ask clearly for each parameter if not already provided.
7
💬 Prepare all template variables: - Company Name: From 🎨 Company Legal Information - COMPANY (uppercase): Convert Company Name to all caps for signature section - Investor Name: From user input - Purchase Amount: From user input (ensure $ and comma formatting) - Date of Safe: Today's date in long format (e.g., "November 26, 2025") - Valuation Cap: From user input (ensure $ and comma formatting) - State of Incorporation: "Delaware" (standard) - Governing Law Jurisdiction: "Delaware" (standard) - name: CEO Name from 🎨 Company Legal Information - title: CEO Title from 🎨 Company Legal Information
8
💬 Create the output directory for 🎨 SAFE Documents if it doesn't exist. Create a temporary SAFE file by copying the template content to: 🎨 SAFE Documents/temp_[YYYY-MM-DD]_[Investor_Name]_SAFE.md Sanitize the investor name for the filename (replace spaces with underscores, remove special characters).
9
💬 Populate the SAFE template by replacing all placeholder variables with the prepared values. Replace each variable exactly as shown: - {Company Name} → Company Name (appears 2x in template) - {COMPANY} → COMPANY (uppercase) - {Investor Name} → Investor Name - {Purchase Amount} → Investment Amount (formatted with $) - {Date of Safe} → Today's date (spelled-out format) - {Valuation Cap} → Valuation Cap (formatted with $) - {State of Incorporation} → "Delaware" - {Governing Law Jurisdiction} → "Delaware" - {name} → CEO Name - {title} → CEO Title Verify that all placeholder variables have been replaced and none remain in the document.
10
💬 Convert the populated markdown SAFE document to PDF format. Use an available method (pandoc command-line tool, markdown-pdf, or similar): - Input: temp_[timestamp]_[investor]_SAFE.md from 🎨 SAFE Documents - Output: [YYYY-MM-DD]_[Investor_Name]_SAFE.pdf to 🎨 SAFE Documents After successful PDF creation, delete the temporary markdown file.
11
💬 Create an email draft file in the session/ directory with this structure: --- _action: label: "Send SAFE to [Investor Name]" prompt: "Send the email draft below with the attached SAFE PDF to [recipient email]" isComplete: false --- **TO:** [recipient email] **FROM:** [authenticated Gmail account] **SUBJECT:** SAFE Agreement - [Investor Name] Investment in [Company Name] **ATTACHMENT:** [YYYY-MM-DD]_[Investor_Name]_SAFE.pdf from 🎨 SAFE Documents --- Dear [Investor Name], Please find attached the SAFE (Simple Agreement for Future Equity) agreement for your [Investment Amount] investment in [Company Name] at a [Valuation Cap] post-money valuation cap. The agreement has been prepared as of [Date of Safe]. Please review at your convenience and let me know if you have any questions. Best regards, [CEO Name] [CEO Title] [Company Name] Save this draft file with a descriptive name in session/.
12
💬 Present the draft to the user. Explain that the SAFE PDF has been created in 🎨 SAFE Documents. Show them the complete email draft you created, including the recipient email address and all details.
13
💬 **CONFIRMATION REQUIRED - DO NOT PROCEED WITHOUT USER APPROVAL** Ask the user to explicitly confirm before sending any emails: "The SAFE document and email draft are ready. Before proceeding, please confirm: 1. **SEND TO ACTUAL RECIPIENT**: Type 'CONFIRM SEND' to send to [recipient email] 2. **USE TEST EMAIL**: Provide a test email address to send there instead (e.g., 'test@myemail.com') 3. **CANCEL**: Type 'CANCEL' to stop and not send any emails Which option would you like?" Wait for the user's response. Do not proceed until you receive one of these responses.
14
💬 Handle the user's confirmation response: - If user typed "CONFIRM SEND" or clearly confirmed: Proceed with the original recipient email. Update the draft file's _action.isComplete to true if they want you to send it now. - If user provided a test email address: Update the email draft file to replace the recipient email with the test email address provided. Add a note at the top of the email body: "[TEST MODE: Originally intended for [original recipient email]]". Ask if they want you to send it now. - If user typed "CANCEL" or wants to stop: Do not send any emails. Inform them the SAFE PDF is saved in 🎨 SAFE Documents and they can send it manually later. Exit the task here. Only proceed to sending if the user explicitly confirmed or provided a test email AND wants you to send now.
15
💬 If the user confirmed sending (either to actual recipient or test email), let them know they can: 1. Click the action button in the draft file to send the email 2. Review and modify the draft before sending 3. Send the PDF manually if they prefer Confirm all steps completed successfully.