tough-tongue/toughtongue-skills / skills/ttai-agent
ttai-agent
VerifiedCreates, edits, and refines Tough Tongue AI Scenarios, the definitions behind voice agents (sales calls, lead qualification, demos, screening, support, booking) and practice roleplays (negotiations, interviews, coaching). Writes ai_instructions, ai_model_config, strategy, tools_config, and rubrik through ttai:create_scenario and ttai:update_scenario. Also resolves the personal or organization workspace, checks plan and balance, places or cancels SIP calls, schedules or cancels meeting bots, mints private Scenario links, grounds a Scenario in the user's documents with knowledge FileBases, and troubleshoots ttai MCP sign-in. Use when the user wants a voice agent or practice Scenario created or improved ("create a voice agent", "the agent ends calls too early", "make it sound more natural"), a call placed, a meeting bot sent, or a Tough Tongue AI account question answered. Not for reports across many sessions (ttai-session-analyst) or browser demo steps (ttai-browser-demo-builder).
references/scenario/workflow.md
View on GitHub# Scenario workflow: create, edit, refine
Turn a brief, a requested change, or a bad session into a Scenario that is
better on the next run. This file is the procedure; field meaning lives in the
sibling Scenario references.
## Contents
- Choose the job
- Ground the action
- Create
- Edit
- Refine from evidence
- Report and hand off
## Choose the job
| User has | Do |
| --------------------------------------- | ---------- |
| A new outcome or no live Scenario | **Create** |
| A known Scenario and a requested change | **Edit** |
| A complaint, transcript, or poor result | **Refine** |
Create finishes with `ttai:create_scenario`; Edit finishes with
`ttai:update_scenario`; Refine gathers evidence, then makes a surgical
`ttai:update_scenario`.
Advice only? Stop at a recommendation. A named write request authorizes the
smallest matching change.
## Ground the action
1. Follow [../operating-model.md](../operating-model.md): guide tool once, then
workspace. Pass `org_id` for organization work.
2. Resolve the Scenario. A known ID → `ttai:get_resource(scenarios)`. A title
only → one `ttai:list_resources(scenarios, query: "<title>")`, then continue
with the returned ID. `ttai:list_resources(scenarios)` is for inventory and counts, not title
lookup.
3. Load the Scenario field schema once: `ttai:get_schema("scenario")`. `ttai:create_scenario` / `ttai:update_scenario` take one
`scenario` object with those fields.
Never invent fields, model IDs, voice IDs, or linked-resource IDs.
## Create
Load, in order:
1. [authoring.md](authoring.md) — human outcome, reality model, evidence.
2. One recipe matching the AI's role (see the router in SKILL.md).
3. [model-selection.md](model-selection.md) — `ai_model_config` stamp.
4. [control.md](control.md) — `strategy`, `appearance`, `tools_config`,
`session_analysis`.
5. [ai-instructions.md](ai-instructions.md) — prompt shape.
6. [rubric.md](rubric.md) — who is scored and how; a `rubrik` always goes with
`is_auto_analysis: true`.
Build from supplied facts, not generic filler. The recipe decides the AI role,
resistance, success evidence, and rubric subject; the references decide
pipeline, controls, and prompt shape.
Call `ttai:create_scenario` with no `id`; `name` and `ai_instructions` are
required. When you send `rubrik` (the usual case), send `session_analysis`
with `is_auto_analysis: true` in the same call: the server default is `false`,
and a rubric without it never runs. Always send an explicit `tools_config`:
when it is omitted, the server registers a broad default tool set. On a
validation error, fix the named field and retry.
Return the run link `https://app.toughtongueai.com/run/<scenario_id>`. For a
private Scenario (only when the user asked to limit access), offer a Scenario
Access Token when the user wants to share it
([../entities/account-and-access.md](../entities/account-and-access.md)).
Recorded browser steps → the `ttai-browser-demo-builder` skill.
## Edit
1. Fetch the current Scenario with `ttai:get_resource(scenarios)`.
2. Change only the requested fields. Most nested objects merge one level, but a
tool's `tool_settings` and the whole `ai_model_config` are replaced: send the
full current object plus your change. Full merge rules:
[../mcp/tools.md](../mcp/tools.md#updating-a-scenario). Adding or changing
`rubrik`: if the fetched `session_analysis.is_auto_analysis` is false or
missing, also send `"session_analysis": { "is_auto_analysis": true }` and
tell the user analysis is now on.
3. Call `ttai:update_scenario` with one `scenario` object: its `id` plus those
fields. Put `save_as_version` (a 1–100 character label) inside it to archive
the prior state first when the change is risky. The label names the new
version, not the archived one.
4. Re-fetch with `ttai:get_resource(scenarios)` and state exactly what changed.
## Refine from evidence
1. Fetch the Scenario; read the instructions and controls the complaint touches.
2. Get evidence. Use a supplied transcript when present. Otherwise call
`ttai:list_resources(sessions)` with `scenario_ids` and a small `limit`; add
`include_fields: ["transcript"]` or `["evaluation"]` only for the selected
sessions. `ttai:get_resource(sessions)` gives one full detail. Legacy
filters (`user_email`, `from_date`, `to_date`, `hasLearning`) on
`ttai:list_resources(sessions)` cover person, date, or learning.
3. Read [runtime.md](runtime.md). Name one concrete cause that the evidence
supports; separate what the Scenario prescribes from what happened. Do not
layer more prose onto a weak prompt.
4. Update the narrowest field that improves it, then re-fetch.
## Report and hand off
Report **Diagnosis** (refine only), **Change** (fields touched, before → after
in one line each), the run link, and the reminder that edits affect new sessions
only — never an active or past session.
- Population-wide trends, scorecards → the `ttai-session-analyst` skill.
- Deterministic browser walkthroughs → the `ttai-browser-demo-builder` skill.
Never request a token, and never expose or fabricate private linked-resource
configuration.
## Key Files
- [runtime.md](runtime.md) — evidence for refining runtime behavior
- [control.md](control.md) — control fields
- [../mcp/tools.md](../mcp/tools.md) — create/update semantics
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |