{
  "$schema": "../../oss/scenecast/schemas/scene-blueprint-v1.json",
  "version": 1,
  "id": "scn_onboarding",
  "slug": "onboarding",
  "name": "Customer Onboarding",
  "icon": "person.badge.plus",
  "tint": "#0EA5E9",
  "settings": {
    "description": "Give it a name + email. It fills the contract, sends a welcome email, and creates the customer record. A mostly-symbolic program with one LLM step (the welcome copy)."
  },
  "inputs": {
    "from_email": {
      "type": "string",
      "required": false,
      "description": "The 'from'/company identity used in the welcome email and contract."
    }
  },
  "assets": [
    {
      "id": "intro",
      "type": "daslab/note",
      "name": "About onboarding",
      "fields": {
        "content": "# Customer Onboarding\n\nRun the **onboard** task with a name + email. The agent:\n\n1. fills a **Contract** doc (name, date) — write op\n2. drafts a warm welcome email (the one LLM step) and **sends it** via gmail_send\n3. creates the **customer record** in the Customers list — a scene commit\n\nMostly symbolic; the LLM only writes the welcome copy. Connect a Google account (placeholder tile) for the email step.\n\n## Try\n- *\"Onboard Ada Lovelace, ada@analytical.dev.\"*"
      },
      "layout": {
        "sortOrder": 0,
        "size": "medium"
      }
    },
    {
      "id": "contract",
      "type": "daslab/note",
      "name": "Contract",
      "fields": {
        "content": "_The latest filled contract appears here._"
      },
      "layout": {
        "sortOrder": 1,
        "size": "large"
      }
    },
    {
      "id": "customers",
      "type": "daslab/note",
      "name": "Customers",
      "fields": {
        "content": "| Name | Email | Onboarded | Contract |\n|---|---|---|---|\n_No customers yet._"
      },
      "layout": {
        "sortOrder": 2,
        "size": "large"
      }
    }
  ],
  "linkedAssets": [
    {
      "slot": "email_acct",
      "accepts": "google/account",
      "layout": {
        "sortOrder": 98,
        "size": "icon"
      }
    }
  ],
  "tasks": [
    {
      "id": "onboard",
      "name": "Onboard a customer",
      "prompt": "Onboard a new customer. The chat message contains their NAME and EMAIL — extract both.\n\n1. Fill the **Contract** note via daslab_note_write: a short MSA-style contract addressed to the customer's name, dated today.\n2. Write the welcome email body (warm, 3 lines), then send it to the customer's email via gmail_send (subject 'Welcome aboard').\n3. Append a row to the **Customers** note: name, email, today's date, and 'filled' for the contract column.\n\nDo not invent a customer — use only the name/email given.",
      "initialState": {},
      "tools": {
        "expected": [
          "daslab_note_write",
          "gmail_send"
        ]
      },
      "checks": [
        {
          "op": "contains",
          "path": "contract.content",
          "substring": "20",
          "ci": false,
          "why": "Contract must be dated — proves a real fill."
        },
        {
          "op": "lte",
          "path": "$run.cost_usd",
          "value": 0.15,
          "expose": true,
          "severity": "fail",
          "why": "Onboarding budget cap."
        }
      ]
    }
  ],
  "members": [
    {
      "email": "labhausxyz@gmail.com",
      "role": "owner"
    }
  ],
  "meta": {
    "author": "Daslab",
    "license": "MIT",
    "source": "blueprint demo — connect a Google account, run the onboard task with a name + email."
  }
}
