@sentientui/mcp 0.18.3 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -33,14 +33,14 @@ Server keys start with `sk_` — required for the management API. Public keys (`
33
33
  | `create_project` | Onboard a new user: creates a project + returns its `pk_` key. Needs an account login (OAuth) — refuses `sk_` project keys and demo tokens. Follow with `get_integration_guide` |
34
34
  | `get_project_stats` | Health status + 24h event/session volume |
35
35
  | `list_components` | Components + variant counts + impression totals |
36
- | `get_variant_performance` | CVR current vs prior window + momentum (range/from/to params; default 7d) |
36
+ | `get_variant_performance` | Per-(component, variant) rate with its n (converting / exposed sessions, range/from/to; default 7d), plus the server's evidence verdict on that windowed rate vs the component's baseline (`verdict`: ahead / behind / unclear; `verdictBasis` says window, or all_time on older APIs) and the all-time verdict as reliability (`evidenceState`, `reliabilityVerdict`). Only ahead/behind is a result; the preceding-window change is an untested descriptor |
37
37
  | `get_persona_breakdown` | Cluster distribution + avg reliability per cluster |
38
- | `get_goal_funnel` | Goal hit counts + per-variant completion rates |
38
+ | `get_goal_funnel` | Goal hit counts + per-variant all-time completion rates, each with its n and a low-sample flag (descriptive — no verdict) |
39
39
  | `list_guardrail_events` | Auto-paused variants (last 24h) |
40
40
  | `get_layout_stats` | Per-persona layout order + bandit pulls/reward |
41
- | `get_insights` | Narrator bullets + (Growth) advisor bullets |
41
+ | `get_insights` | Ranked measured findings (tier + sample, low-sample flagged; `limit`, default 10) + (Growth) AI narrations, which are unmeasured |
42
42
  | `refresh_insights` | Async trigger — wait ~15s then call `get_insights` |
43
- | `get_variant_brief` | **Start here to optimize a component.** Insight-driven brief for writing a new CODE-NATIVE variant: performance, audience, insights, data-sufficiency + best-practice fallback, and code instructions |
43
+ | `get_variant_brief` | **Start here to optimize a component.** Evidence-driven brief for writing a new CODE-NATIVE variant: each arm's rate with n and server evidence verdict, audience, measured findings for the component, evidence state (EMPTY / COLLECTING / DIRECTIONAL / DECIDED) + best-practice fallback, and code instructions |
44
44
  | `create_variant` | Creates a no-code **managed text** DRAFT — user must activate in dashboard. Fallback only; not for code-native variants |
45
45
  | `pause_variant` | Stops traffic; no MCP resume |
46
46
  | `get_cell_matrix` | "Who sees what": per-(visitor type, region) generation state + traffic share. A missing cell = they see the original |
@@ -52,18 +52,18 @@ Server keys start with `sk_` — required for the management API. Public keys (`
52
52
  **Diagnose a conversion drop**
53
53
  1. `get_project_stats` — confirm events are flowing
54
54
  2. `get_goal_funnel` — find which goals/variants are down
55
- 3. `get_variant_performance` — check CVR momentum
55
+ 3. `get_variant_performance` — check each arm's rate with its n and the server's evidence verdict
56
56
  4. `list_guardrail_events` — see if the guardrail fired
57
57
  5. `refresh_insights` → wait 15s → `get_insights` — read AI summary
58
58
 
59
59
  **Optimize a component with a new variant (code-native — recommended)**
60
60
  1. `list_components` — confirm the component ID
61
- 2. `get_variant_brief` — pull performance, audience, insights, data-sufficiency, best-practice priors, and code instructions for that component
61
+ 2. `get_variant_brief` — pull per-arm evidence, audience, measured findings, evidence state, best-practice priors, and code instructions for that component
62
62
  3. Find `<Adaptive id="...">` in the repo and add a new on-brand variant key to its `variants` map (and to the `AdaptiveRoot` `components` list if SSR). Match the project's existing components and design system.
63
63
  4. Do **not** call `create_variant`. Commit, push, deploy — the variant auto-registers on the first assignment and goes live.
64
64
  5. Optional: enable shadow mode (project-level, in dashboard settings — it applies to the whole project, not a single component) first to validate before serving.
65
65
 
66
- Data sufficiency (from the brief) drives the change: when it reports **SUFFICIENT**, target the specific weakness; when **COLLECTING** or **EMPTY** (no data yet), apply the best-practice priors for the project's context type — use your best judgment and make one conservative change.
66
+ The evidence state (from the brief) drives the change. It is keyed on the server's evidence tiers, never on a traffic count: only **DECIDED** (an arm reliably ahead of or behind the baseline, at the multiple-comparison-corrected strong bar) is a result to build on. **DIRECTIONAL** (early/moderate/inconclusive signals), **COLLECTING** (below the 100-visit floor per arm) and **EMPTY** all mean: apply the best-practice priors for the project's context type and make one conservative change. Never call an arm better or worse from its raw rate.
67
67
 
68
68
  **Add a no-code managed text variant (fallback — text only, less powerful)**
69
69
  1. `list_components` — confirm the component ID
@@ -85,7 +85,8 @@ Data sufficiency (from the brief) drives the change: when it reports **SUFFICIEN
85
85
  - Presenting stale insights without checking `isStale` — always check, and offer to `refresh_insights`
86
86
  - Assuming `create_variant` is live — it's always a draft
87
87
  - Calling `create_variant` for a variant that's being written in code — it creates an empty managed draft, not your code variant. Code-native variants auto-register on deploy; only use `create_variant` for no-code/managed variants whose content lives in SentientUI
88
- - Optimizing a component without calling `get_variant_brief` first — it gives you the performance, audience, insights, and data-sufficiency fallback you need to write a variant that actually makes sense (and the right steps when there is no data yet)
88
+ - Optimizing a component without calling `get_variant_brief` first — it gives you the per-arm evidence, audience, findings, and evidence-state fallback you need to write a variant that actually makes sense (and the right steps when there is no data yet)
89
+ - Ranking variants by raw conversion rate — a rate on 10 sessions is noise. Only a server `verdict` of ahead/behind is a comparison; every rate carries its n for this reason
89
90
  - Calling `pause_variant` without warning the user it's irreversible via MCP
90
91
  - Using a `pk_` key instead of `sk_` — it will be rejected
91
92
  - Interpreting `avgReward` in layout stats as a conversion rate — it's a bandit reward signal, not CVR
package/README.md CHANGED
@@ -88,17 +88,17 @@ A sandboxed demo token is provisioned automatically — 10 calls/month, read-onl
88
88
  | `create_project` | Create a new project and return its `pk_` public key (account login required — not usable with an `sk_` project key or demo token) |
89
89
  | `get_project_stats` | Events, sessions, agent calls, and health status |
90
90
  | `list_components` | All adaptive components with variant counts |
91
- | `get_variant_performance` | CVR, momentum, and impressions per variant (windowed: range 7d/30d/90d/all or from/to; default 7d vs prior 7d) |
92
- | `get_insights` | AI-generated narrator observations and advisor recommendations |
91
+ | `get_variant_performance` | Per-(component, variant) conversion with its sample, plus the server's evidence verdict vs the baseline (windowed rates: range 7d/30d/90d/all or from/to; default 7d; the verdict judges the windowed rate, with all-time reliability reported separately — all-time only on APIs without window evidence) |
92
+ | `get_insights` | Ranked measured findings with tier and sample (low samples flagged), plus AI narrations marked as unmeasured |
93
93
  | `refresh_insights` | Trigger fresh AI insight generation |
94
94
  | `get_persona_breakdown` | Visitor cluster distribution with reliability scores |
95
- | `get_goal_funnel` | Goal hit counts and conversion rates per variant (windowed; default 30d) |
95
+ | `get_goal_funnel` | Goal hit counts and conversion rates (windowed; default 30d), plus all-time per-variant rates with their n |
96
96
  | `list_goals` | Defined goals (id, role, event, status) — includes goals with no conversions yet, so agents can wire a dashboard-defined goal into code |
97
97
  | `list_guardrail_events` | Variants auto-paused by the guardrail (last 24h) |
98
98
  | `get_layout_stats` | Per-persona section layout rankings and reward weights |
99
99
  | `get_integration_guide` | SentientUI adaptive-ladder setup guide (static — same for every project) |
100
- | `get_test_brief` | What to test and how, for the project's current state |
101
- | `get_variant_brief` | Insight-driven brief for writing a new **code-native** variant: performance, audience, insights, data-sufficiency (with a best-practice fallback when there's no data yet), and step-by-step code instructions |
100
+ | `get_test_brief` | Ready-to-paste test code (RTL, mock server, Playwright/Cypress) that forces one of the component's real variants |
101
+ | `get_variant_brief` | Evidence-driven brief for writing a new **code-native** variant: per-arm rates with n and evidence verdicts, audience, measured findings, an evidence state (with a best-practice fallback while nothing is decided), and step-by-step code instructions |
102
102
  | `create_variant` | Create a no-code (managed) text variant (Starter+) — fallback for text-only variants without a code change |
103
103
  | `pause_variant` | Pause a variant to stop traffic assignment |
104
104
  | `get_cell_matrix` | The "Who sees what" matrix: which visitor types have an AI-generated version live in each personalizable region, with traffic share and auto-fill status |
@@ -109,7 +109,7 @@ A sandboxed demo token is provisioned automatically — 10 calls/month, read-onl
109
109
  >
110
110
  > **Code-native vs no-code variants.** Variants you declare in your app (`<Adaptive variants={{…}}>`) register automatically the first time the SDK requests an assignment after you deploy — they go live immediately and need **no** `create_variant` call. Use `create_variant` only for **no-code** variants whose content is stored in SentientUI and rendered without a code change; these start as drafts you activate from the dashboard.
111
111
  >
112
- > **Optimizing a component?** Call `get_variant_brief` first. It returns the component's performance, audience, insights, and a data-sufficiency assessment — then your AI assistant writes a new on-brand variant directly into your code (which auto-registers on deploy). When there's no data yet, the brief falls back to best-practice priors for your project's context type so the assistant still makes a sensible change.
112
+ > **Optimizing a component?** Call `get_variant_brief` first. It returns each variant's rate with its sample and the server's evidence verdict, the audience, measured findings, and an evidence-state assessment — then your AI assistant writes a new on-brand variant directly into your code (which auto-registers on deploy). While nothing is decided, the brief falls back to best-practice priors for your project's context type so the assistant still makes a sensible change.
113
113
 
114
114
  ## Example prompts
115
115