# engagement-rehearsal

A persona conversation simulator for **filling the gaps of an engagement**.

Every Rosetta engagement carries gaps — the `engagement-codex` audit-tone
`«TBD-N»` inventory and the live `KnowledgeGap` surface. This plugin role-plays
the **humans who would fill those gaps**, driving live `rosetta_turn`
conversations against the Rosetta agent substrate so you can:

- **Rehearse** gap closures before the real customer call — surfacing which gaps
  each persona can plausibly answer, proposing concrete (simulated) values, and
  flagging the gaps that genuinely require the customer.
- **Generate** the agent stack's first labeled conversation **eval** corpus,
  exercising the flow engine and the persona classifier end-to-end (including
  the `KnowledgeGap` dual-coupling on empty retrievals).

It is a **pure consumer**: read-only against the graph (ADR-RX-002) — it
*proposes*, the operator applies, and the operator then **ratifies** via the
enablement-agent review queue (the `(protected)/engagements` console — the
human-only `twin:ratify` act, DT-RX-022; no agent has that verb) — and every
value it emits is stamped `SIMULATED` (ADR-RX-007) so a rehearsal value can
never be mistaken for ratified engagement data.

## The six personas

Three canonical query personas reused from `rosetta-agent/core/personas.md`, plus
three customer-side roles defined here (the people who own the customer-side
gaps). See `skills/persona-conversation-sim/references/persona-profiles.md`.

| # | Persona | Side | Owns (gap categories) |
| --- | --- | --- | --- |
| 1 | Seller (AE/SE) | internal | exec-sponsor-name, stakeholder-name, cta-owner, cta-target-date |
| 2 | Implementer (SA/FDE) | internal | integration boundaries, technical baseline-measurement, pov-duration |
| 3 | Practitioner (admin/dev) | internal | org constraints, deprecation status, operational forensics |
| 4 | Exec sponsor (VP/CxO) | customer | exec-sponsor-name (self), strategic intent, gap-cost, cta-target-date |
| 5 | Economic buyer | customer | gap-cost, business baseline-measurement, ROI thresholds, pov-duration |
| 6 | Customer admin | customer | real-org forensics, operational baseline-measurement, data realities |

The `gap-ownership-matrix.md`
maps every `tbd-numbering` gap category to its owner(s); a gap no in-run persona
owns is routed `escalate-to-customer`.

## Slash commands

| Command | Mode | Output |
| --- | --- | --- |
| <code>/engagement-rehearsal:rehearse &lt;ENGAGEMENT&#124;BUNDLE&gt; [--personas …] [--source live&#124;bundle]</code> | rehearsal | transcripts + gap-closure ledger + review-only `proposed-twin-apply.json` |
| <code>/engagement-rehearsal:eval &lt;ENGAGEMENT&#124;BUNDLE&gt; [--personas …]</code> | eval | labeled corpus entries for the `rosetta-agent` eval harness |
| <code>/engagement-rehearsal:run-all &lt;ENGAGEMENT&#124;BUNDLE&gt;</code> | both | the full six-persona sweep → combined ledger + corpus |

The load-bearing specification is
`skills/persona-conversation-sim/SKILL.md`;
the command files are thin entry surfaces that dispatch to it.

## Live-mode prerequisites

Live-first runs reuse the `rosetta` stdio MCP server registered by the
**`rosetta-agent`** plugin (this plugin registers **no** MCP server of its own).
Both ship in the same install bundle. Live mode needs the same runtime prereqs as
`rosetta-agent` (see `rosetta-agent/references/install-guide.md`):

- `ROSETTA_AGENT_TOKEN` (the `agent-harness` KMS scope),
- a tagged project on the substrate, and
- reachability to `https://api.rosetta-design.com`.

Where no MCP wrapper exists for an endpoint the run needs, hitting
`api.rosetta-design.com` REST directly with bearer `ROSETTA_API_KEY` is the sanctioned
fallback transport. When the live surface or credentials are unavailable, the
skill drops to a deterministic **offline** flow with a loud degradation banner —
the output shape is identical.

## What it never does

- **Never writes the graph.** No `rosetta_apply_engagement_twin`,
  `rosetta_record`, `rosetta_create_*`, or raw write Cypher. It emits a
  *review-only* `proposed-twin-apply.json`; the operator alone applies it through
  the sanctioned write path.
- **Never emits an unstamped value.** Every proposed gap value carries
  `provenance: simulated` + a `simulationRunId`.

## Outputs

Per ADR-PA-008, all artifacts land under
`outputs/plugins/engagement-rehearsal/<engagementKey>/<run-id>/` — gitignored,
never auto-promoted. Canonical destinations are untouched.

## Governance

Authorized by `util/plugins/decision-traces/dt-pa-005-engagement-rehearsal-plugin.md`
(ratified 2026-06-14; promoted to `ADR-PA-011`, Accepted). Tracked as manifest Work Packet
**E3-S5-WP19**. Plugin-author governance index:
[`util/plugins/README.md`](../README.md).
