{"id":100912,"plugin_id":"plugin_asdk_app_6aed717b263c81918b5bf19b95d3f38b","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T06:14:58.465Z","digest":"dd7c523d2be46b90919d555b46a726857c7d712aaaeb2aa46934439527595eea","against":null,"payload":{"description":"Turn a natural-language ask about media budget optimization into a configured MBO scenario — \"how should I split my budget\", \"how much should I spend on X\". Also handles rename, edit and delete on existing scenarios.","included_files":[{"relative_path":"examples/example-october-budget.md","size_in_bytes":3596},{"relative_path":"references/budget-parsing.md","size_in_bytes":2334},{"relative_path":"references/constraint-conflicts.md","size_in_bytes":1341},{"relative_path":"references/deliver-flow.md","size_in_bytes":4640},{"relative_path":"references/edge-cases.md","size_in_bytes":2807},{"relative_path":"references/failure-modes.md","size_in_bytes":4545},{"relative_path":"references/inputs-detail.md","size_in_bytes":2519},{"relative_path":"references/key-concepts.md","size_in_bytes":897},{"relative_path":"references/modify-flow.md","size_in_bytes":976},{"relative_path":"references/preview-format.md","size_in_bytes":1415},{"relative_path":"references/reference-period-rules.md","size_in_bytes":2013},{"relative_path":"references/saturation-tactics.md","size_in_bytes":2427},{"relative_path":"templates/saturation-proposal.md","size_in_bytes":977},{"relative_path":"templates/scenario-preview.md","size_in_bytes":1096}],"name":"mbo-create-scenario","skill_md_contents":"---\nname: mbo-create-scenario\ndescription: Turn a natural-language ask about media budget optimization into a configured MBO scenario — \"how should I split my budget\", \"how much should I spend on X\". Also handles rename, edit and delete on existing scenarios.\nmetadata:\n  category: mbo\n  risk: R1\n  version: 1.1.0\n  last-updated: 2026-09-23\n  references:\n  - references/inputs-detail.md\n  - references/reference-period-rules.md\n  - references/budget-parsing.md\n  - references/saturation-tactics.md\n  - references/constraint-conflicts.md\n  - references/preview-format.md\n  - references/deliver-flow.md\n  - references/modify-flow.md\n  - references/edge-cases.md\n  - references/failure-modes.md\n  - references/key-concepts.md\n  templates:\n  - templates/scenario-preview.md\n  - templates/saturation-proposal.md\n  examples:\n  - examples/example-october-budget.md\n---\n\n## 1. Purpose\n\nTake a user's natural-language ask about media budget optimization (\"how should I split \\$500K across Meta and Google next month?\") and turn it into a properly configured **MBO scenario** — collecting required settings, parsing budgets / goals / constraints from natural language, validating provisioning + scope, and creating the scenario via `budget-optimizer-create`. Also handles **modify** intents (rename, change inputs, delete) on existing scenarios.\n\nDifferent from `mbo-read-scenario` (interpret existing results) and from attribution skills (historical data / why questions). MBO is **forward-looking** — it produces a plan.\n\n## 2. When to trigger\n\nTrigger when the user wants **forward-looking budget allocation guidance** or wants to **modify an existing scenario's inputs**.\n\n## 3. Inputs\n\nMBO has 9 scenario settings. The skill must mirror UI defaults — if UI has a default, the skill applies it automatically and surfaces it via `appliedDefaults` in the preview so the user can override.\n\nTop-level summary of each setting (required vs default):\n\n| **Field** | **Required vs default** | **Default value** |\n|-|-|-|\n| `level` | Has default | `tactic` |\n| `channels` | Has default | All available under outcome + level |\n| `sales_platform` | Has default | All Ready platforms (combined) |\n| `optimization_period` | Required | Next ISO week (Mon → Sun) |\n| `reference_period` | **Required (always ask)** | Propose same-length window immediately prior, clamped to MMM model window |\n| `goalMethod` | Has default | `maximum` |\n| `optimization goal` | Has default | `sales` |\n| `budget` + `budgetChangeType` | Conditional (when `goalMethod=maximum`) | `percentage=100` (keep flat) |\n| `goalTarget` | Conditional (when `goalMethod=target`) | No default — must ask |\n| `budget_constraints` | Has default | None (model runs free) |\n| `perChannelBudgetChecked` | Has default | `false` |\n\nFull per-field semantics, parsing rules and budget percentage math live in references/inputs-detail.md. Reference-period rules including the HARD PRECONDITION on `model_window.end` live in references/reference-period-rules.md.\n\n## 4. SOP\n\n### Step 1: Check that MBO is provisioned\n\n- MBO is feature-gated; check the tenant's provisioning status directly. Don't re-derive eligibility at runtime from lift tests + iDDA calibration — that's the backend's job.\n- One call: `budget-optimizer-list`. Success → MBO is enabled; 403 / not-provisioned → not enabled, exit.\n- If not provisioned → don't collect settings. One-line message: \"MBO isn't enabled on your account yet — contact your CSM to turn it on.\"\n\n### Step 2: Detect intent type\n\n- **Create new scenario** — most common\n- **\"How much should I spend on X?\"** — recommendation question; only honest answer requires running a scenario. Do not search list, do not pull historical. Lead with: \"The optimal budget depends on your total spend, time window, and goal — let me build a scenario to answer that.\" Then collect inputs.\n- **Modify existing scenario** — user names an existing scenario + wants to change something. Locate via `budget-optimizer-list`, branch to modify flow (see references/modify-flow.md).\n- **Ambiguous** — see Step 3.\n\n### Step 3: Disambiguate vague asks (2 steps if needed)\n\n\"What's my budget?\" / \"Show me my budget\" type asks are ambiguous. Don't silently pick. Two-step:\n\n1. **Clarify type**: give 2-4 options matching the user's phrasing context, e.g.:\n\n   - \"Existing scenario recommendations (you have 3 saved)\"\n   - \"Build a new scenario for [period if user mentioned one]\"\n   - \"Actual spend on the attribution dashboard\"\n2. **If user picks \"build new\"** → continue this skill. If \"existing recommendations\" → route to `mbo-read-scenario`. If \"actual spend\" → route to `attribution-data-query`.\n\n### Step 4: Consult database-query-ask (MANDATORY)\n\nRequired before any data lookup or scenario creation. `ctx` timestamp for SQL plus MBO conventions + valid goal-vs-method combinations.\n\n### Step 5: Parse what user already gave\n\nFrom the raw ask, extract everything implicit using the Budget parsing + Goal parsing rules, incl. the worked parse examples (see references/budget-parsing.md).\n\nFewer fields you ask about, the better.\n\n### Step 6: Ask for missing required fields\n\nLead with the most pivotal missing field. Order:\n\n1. **Scenario type + budget/target** (if not implied) — inseparable\n2. **Optimization period** (if no time window) — apply default \"next week\" if user just says \"build a scenario\"\n3. **Reference period (ALWAYS ask, even if user said nothing)** — propose per reference-period-rules.md\n4. **Sales platform** (only if multiple Ready and user didn't specify)\n5. **Optimization goal** (only if maximize/target intent is implied but metric is unclear; if user said nothing, default to sales/maximum and surface)\n\n**If user said something wrong / inconsistent → push back and tell them what's wrong; don't silently coerce.**\n\n- If user named a channel that **isn't connected** → tell them explicitly, list what is available, don't silently drop\n- If user named a channel that's not **Ready** → tell them, point to Settings → Platform Integrations, offer to proceed without it (held fixed by the model)\n\n**For everything not explicitly mentioned by the user, apply the UI defaults silently** and surface them in the Step 11 preview with *(default)* annotation so user can override. Default values → §3 Inputs table (full per-field semantics in references/inputs-detail.md).\n\n### Step 7: Saturation-prone tactic lock proposal (MANDATORY)\n\nWhat counts as saturation-prone, the detection rules (≥ 1 match flags the tactic), the Lock / Adjust / Skip behavior and the user-scale-intent caveat live in references/saturation-tactics.md. Use the template at templates/saturation-proposal.md for the user message.\n\n### Step 8: Check constraint conflicts BEFORE building\n\nIf user voiced any budget constraints (\"Meta at least \\$30K\", \"TikTok flat\", \"Pinterest cap \\$5K\"):\n\n1. **Parse each constraint** into lock_budget / min / max format. **Don't miss any.**\n2. **Sum the constraints** against the total budget. Conflict conditions → references/constraint-conflicts.md.\n3. **If conflict** — tell user where + by how much, give 3 concrete options. Full resolution wording in references/constraint-conflicts.md.\n4. **NEVER silently adjust constraint numbers to make the scenario build.** If user said \"Meta at least \\$30K\" and that conflicts, you cannot lower it to \\$25K to fit — that's the worst possible failure.\n\n### Step 9: Validate against MBO scope\n\nBefore showing preview, check for out-of-scope inputs — the reject / push-back table (past period, over-long horizon, reference period outside the MMM model window, mismatched reference length, non-existent channel, negative budget, questions about the model itself) lives in references/edge-cases.md.\n\n### Step 10: Get reference period baseline budget\n\n- `budget-optimizer-reference-data` — Ready platforms, recent spend, baseline performance, available channels/tactics, **baseline spend (`spendBase`) for the parsed period** (needed to give user a sensible budget anchor).\n- For **target scenarios** (`goalMethod=target`): also capture the **baseline value of the target metric** over the reference period (e.g., baseline ROAS = 2.8x when user targets 4x). Show in preview so user knows the starting point.\n\n### Step 11: Show preview + confirm (skill-level UX)\n\n<callout emoji=\"🛑\">\n**HARD RULE.** Every single `budget-optimizer-create` call MUST be immediately preceded by a Step 11 preview-and-confirm in the SAME turn. No exceptions.\n</callout>\n\nUse the template at templates/scenario-preview.md. Full preview format spec lives in references/preview-format.md.\n\n### Step 12: Create\n\n- Call `budget-optimizer-create` with resolved settings (all UI defaults explicitly populated, not omitted).\n- If MBO returns a constraint conflict that the pre-check missed (rare; possible with subtle goal-constraint interactions), pass back the two options MBO provides: **Prioritize Constraints** or **Prioritize Target**. Don't pick for the user.\n- Quote `scenarioURL` from create response VERBATIM. NEVER construct a URL yourself. If absent, omit the link — say only \"scenario name N\".\n\n### Step 13: Deliver\n\nAfter Step 12 (create) succeeds, **wait \\~1 minute** then auto-call `budget-optimizer-forecast` to fetch the completed scenario. Then summarize the result for the user (top 2-3 reallocations + expected delta vs baseline + any excluded channels). **The summary is an interpretation — run the goal-vs-projection sanity check and baseline / paid-media decomposition per references/deliver-flow.md before writing it** (same discipline as mbo-read-scenario).\n\nForecast `status` handling (ready / running / error) and the result-message wording live in references/deliver-flow.md.\n\n## 5. Tools used\n\n| **Tool** | **Required?** | **System risk** | **Purpose** |\n|-|-|-|-|\n| `database-query-ask` | Required (first) | R0 | MBO conventions, goal-method combinations, `ctx` timestamp for SQL |\n| `budget-optimizer-list` | Required | R0 | Provisioning check (Step 1) + locate scenarios for modify intent |\n| `budget-optimizer-reference-data` | Required | R0 | Ready platforms + baseline spend + Halo eligibility + MMM model window (for reference period bounds) |\n| `tenant-list` | Optional | R0 | Verify sales platform setup if needed |\n| `lift-test-list` | Optional | R0 | Reference if user asks \"is this channel calibrated\"; not used for eligibility (backend-gated) |\n| `database-query-run` | Optional | R0 | Check reference window for anomalies |\n| `budget-optimizer-create` | Required | R1 | Create the scenario. |\n| `budget-optimizer-update-or-delete` | Conditional (modify intent) | R1 | Update fields or delete scenario. |\n| `budget-optimizer-forecast` | Required | R0 | Fetch completed scenario in Step 13 |\n\n## 6. Output format\n\nThree turns max:\n\n1. **Disambiguation / clarification** — only if needed; ambiguous \"show me my budget\" gets 2-4 options; missing required field gets one question (reference period proposal counts as the pivotal question)\n2. **Preview + confirm** — table of all settings (resolved + defaulted, with *(default)* annotations) + confirm/modify/cancel; warn run takes a few minutes\n3. **Result** — MBO link + 1-2 sentence brief reading (top reallocation + expected lift)\n\n**What never appears**:\n\n- Raw JSON of the `budget-optimizer-create` payload\n- Multi-question forms (\"which level? which sales platform? which period? which type? which goal? which budget?\")\n- Asking about budget constraints when user didn't mention them (default = none)\n- Silently defaulting reference period without surfacing — reference period proposal must always be visible to user\n- Internal terminology (`attr_model_name`, table names, model IDs)\n- Tool names exposed to user (\"do you want list or forecast?\")\n- Scenario IDs in conversation (use scenario names)\n\n## 7. CRITICAL rules (top 8)\n\n1. **Always preview before create.** Every `budget-optimizer-create` call must be preceded by Step 11 preview-and-confirm in the same turn.\n2. **Reference period: always ask explicitly**, and propose ONLY within `[model_window.start, model_window.end]`. Never propose dates after `model_window.end`, even if they look intuitive. See reference-period-rules.md.\n3. **Budget percentage semantics are % of baseline, NOT delta.**`budget=100` = keep flat. `budget=120` = +20%. `budget=80` = −20%. Mis-parsing is critical.\n4. **Mis-parse budget unit = critical failure.** \"\\$100k\" is 100000, not 100.\n5. **Never silently adjust constraint numbers to make scenario fit.** Conflict → 3 concrete options + ask user.\n6. **Default outcome = `totalSalesHalo` if Halo model available** (Amazon / TikTok Shop integrated); else `totalSales`.\n7. **Never silently lock saturation-prone tactics.** Always surface the proposal with reasons + 3 options (Lock all / Adjust per tactic / Skip).\n8. **Quote `scenarioURL` verbatim** from create response. Never construct URLs yourself.\n\nFull failure-mode catalog (\\~30 items) lives in references/failure-modes.md. Edge cases & routing live in references/edge-cases.md.\n\n## 8. Output artifacts\n\n- **Preview message** — table from templates/scenario-preview.md\n- **Saturation lock proposal** (when ≥ 1 flagged tactic) — message from templates/saturation-proposal.md\n- **Result message** — MBO link + top 2-3 reallocations + expected lift\n\n## 9. Related skills\n\n- **Sibling**: `mbo-read-scenario` — interpret existing scenario results\n- **Sibling**: `attribution-data-query` — historical actuals (when user wanted \"actual spend\" instead of a plan)\n- **Sibling**: `attribution-edge-routing` — when MBO not provisioned\n- **Worked example**: examples/example-october-budget.md — October 2026 scenario with model_window.end=2026-06-13\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}