# Demo script — Capital ⇄ Teamcenter

A click-by-click talk track. Runs entirely on the bundled sample — no server, no
network. Total time ~5 minutes.

## The story in one line

> Capital's Platform Schematic is the multi-domain layer between SysML and detail
> design; Teamcenter holds the configuration-managed **Logical BOM**. This plugin
> is the two-way bridge — pull the managed data **in**, push the schematic **out**.

## The sample dataset (`bundle.json`)

A small multi-domain vehicle program, so both electrical and fluid show up:

- **Electrical:** Body Control Module (ECU), Front Zone Controller (ECU), a
  **Body CAN** network carrying `LowBeamRequest`.
- **Fuel:** Fuel Boost Pump, Fuel Reservoir, with a reservoir→pump fluid line.
- **The cross-domain edge:** the BCM feeds **power** to the fuel pump — one object
  (the pump) accountable in two domains at once.
- **Functions & traceability:** Exterior Lighting (with sub-functions) and Fuel
  Transfer, allocated to components, plus two **requirement links**
  (`satisfies`).

## 1. Teamcenter Browser — "what's in the managed model"

1. Open a **platform design**.
2. Open the **Design Inspector** → **Teamcenter Browser** tab → **Refresh**.
3. Expand the tree. Talking points:
   - Components carry **ports** and **parameters** (e.g. the pump's `flowRate`
     with a *budget* 40 l/min and a *tested* 42.1 l/min — the maturing value).
   - **Functions** and their **allocations** to components are shown.
   - The **network** (Body CAN), its **signals** and **messages**.
   - **Requirement links** hang off the functions/components they satisfy.
   - Point out the header shows the **source** — here the bundled sample; against
     a live service it reads *Teamcenter (live)*.

> Line: *"This is the Teamcenter Logical BOM, browsable right inside Capital —
> the engineer never leaves the schematic to see what's under configuration
> management."*

## 2. Import from Teamcenter — "sync + audit, you know when you're done"

1. On the open platform design, **Space Bar → Custom → Import from Teamcenter…**
   (or right-click → Custom).
2. A **dry-run preview** appears first — nothing is written yet. Walk through it:
   - Components/carriers are matched by **`TC_ID`** then by name; matched ones get
     part number, revision, `TC_DOMAIN`, and `TC_PARAM_*` values synced.
   - Functions, signals, messages, allocations are **verified** against the design;
     every gap is reported as a warning.
   - Requirement links are stamped as `REQ_<id>` on writable targets.
3. Confirm. The report lands in a **"Teamcenter Import"** output-window tab.

> Line: *"It's a sync and an audit. It updates what it can and tells you exactly
> what's missing — so you know when the design and the managed model agree."*
> If nothing matches yet, that's the expected first-run message: create the
> components in SA (or use SA's Allocate-by-Property rules) and re-run — it's
> **idempotent**, re-import updates instead of duplicating.

## 3. Publish to Teamcenter — "save to Teamcenter behind the scenes"

1. **Space Bar → Custom → Publish to Teamcenter…**
2. The plugin walks the open design and writes a **Logical BOM v1.1 JSON** into
   `plugins\XceleratorTcImport\tc-outbox\` (newest file wins).
3. Open that JSON to show the payload: components + ports, carriers, signals/
   messages, functions, allocations, **derived connections**, `TC_PARAM_*`
   maturing parameters, and `REQ_*` links — the exact neutral contract in
   `docs\exchange-format.md`.

> Line: *"One click turns the schematic into the managed Logical BOM. In the live
> setup this same payload POSTs straight to the Teamcenter-side service and
> becomes a numbered revision."*

## Optional: no-Capital preview (CLI)

On any machine with Java, show the pipeline without Capital at all — run these
from inside the `plugins\XceleratorTcImport\` folder:

```
java -jar capital-tc-import.jar validate --file bundle.json
java -jar capital-tc-import.jar dry-run  --file bundle.json
```

`validate` proves referential integrity; `dry-run` prints every operation a real
import would perform.

## If someone asks about the live/managed setup

The same three actions run against a real Teamcenter-side service (flip
`tc.source=rest` — see INSTALL.md). Publish then becomes an append-only revision
in the store, and the browser reads live. That service isn't in this demo
package by design (it carries environment specifics) — Chris has it.
