From 492defa08ec73c9e4910674786efe71efc7272ae Mon Sep 17 00:00:00 2001 From: shad Date: Sun, 14 Jun 2026 15:20:28 +0400 Subject: [PATCH] fix(explainer): scrub residual Pi branding + add regression QA Oracle round-8 closure: 3 user-visible 'Pi' refs remaining in Explainer.tsx ('ask Pi' in DEFINE step, 'Why an agent (Pi)?' card title, 'Pi is a co-pilot' card body, 'Ask Pi instead' chip). All replaced with 'the assistant' / 'Command Assistant'. New no_pi_branding_in_user_facing_scenes QA gate sweeps landing + explainer + agent for \bPi\b word boundary on the rendered DOM text and fails if any scene leaks. --- qa/full_dogfood.mjs | 25 +++++++++++++++++++++++++ src/scenes/Explainer.tsx | 8 ++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/qa/full_dogfood.mjs b/qa/full_dogfood.mjs index 334f3c5..a3e9c1c 100644 --- a/qa/full_dogfood.mjs +++ b/qa/full_dogfood.mjs @@ -197,6 +197,31 @@ const welcome = (await p.locator(".agent-turn-agent .agent-turn-body").first().t const honestyOk = !/\bai agent\b/i.test(welcome) || /command assistant/i.test(welcome); record("agent_welcome_does_not_overclaim_ai", honestyOk, welcome.slice(0, 80)); +// 14b. NEGATIVE: no user-visible 'Pi' branding anywhere (deterministic router +// should never read as the pi coding agent product). Sweep landing + +// explainer + agent + chat scenes for the word boundary. +async function scenePiLeak(scene) { + if (scene === "landing") { + await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {}); + } else if (scene === "explainer") { + await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {}); + await p.waitForTimeout(400); + await p.locator(".hub-chip", { hasText: /What is FlowMaster/ }).click(); + } else if (scene === "agent") { + await p.locator(".tab", { hasText: /Home/i }).first().click().catch(() => {}); + await p.waitForTimeout(400); + await p.locator(".hub-chip", { hasText: /Command Assistant/i }).click(); + } + await p.waitForTimeout(800); + const body = await p.locator("body").innerText(); + return /\bPi\b/.test(body); +} +const leaks = []; +for (const sc of ["landing", "explainer", "agent"]) { + if (await scenePiLeak(sc)) leaks.push(sc); +} +record("no_pi_branding_in_user_facing_scenes", leaks.length === 0, leaks.length ? `LEAKED in: ${leaks.join(", ")}` : "clean"); + // 15. MEMORY VAULT: remember + recall round-trips, per-user isolation. // Assistant scene is already open from step 13. { diff --git a/src/scenes/Explainer.tsx b/src/scenes/Explainer.tsx index 06b23f6..e0dd842 100644 --- a/src/scenes/Explainer.tsx +++ b/src/scenes/Explainer.tsx @@ -24,7 +24,7 @@ const SECTIONS = [ title: "Process lifecycle", eyebrow: "FROM PEN TO PROD", body: - "Every process travels the same four stops:\n\n1. DEFINE — author it in the Process Creation Wizard (drag, drop, describe, upload a doc, ask Pi)\n2. VERSION — freeze a release, get sign-off, immortalise the diff\n3. DEPLOY — roll it out to the tenant\n4. EXECUTE — the Execution Engine runs every instance, step-by-step, persisting state to EA2 at every write\n\nAuthoring tools and the runtime are separate concerns by design. They never bleed into each other.", + "Every process travels the same four stops:\n\n1. DEFINE — author it in the Process Creation Wizard (drag, drop, describe, upload a doc, ask the assistant)\n2. VERSION — freeze a release, get sign-off, immortalise the diff\n3. DEPLOY — roll it out to the tenant\n4. EXECUTE — the Execution Engine runs every instance, step-by-step, persisting state to EA2 at every write\n\nAuthoring tools and the runtime are separate concerns by design. They never bleed into each other.", }, { title: "What's a 'hub'?", @@ -45,10 +45,10 @@ const SECTIONS = [ "Everything is stored in EA2, the FlowMaster graph database, organised into five document collections (flow, data, view, rule, version) and four edge collections (instantiates, defines, relates, governs). When the Wizard creates a step, when an agent applies a decision, when an SAP record gets transformed into a native shape — all of it lands in the same graph. There is exactly one source of truth.", }, { - title: "Why an agent (Pi)?", + title: "Why a command assistant?", eyebrow: "AN INTERFACE FOR EVERYONE", body: - "Most people don't want to learn nineteen tabs. Pi is a co-pilot you can talk to: navigate the cockpit, start a process, message your team, list what's published, build a new flow. It's the same API the UI uses — Pi just speaks human. If a regional store manager asks 'start a laptop request for store 204', Pi finds the right published flow and starts it.", + "Most people don't want to learn nineteen tabs. The FlowMaster Command Assistant lets you type the action: navigate the cockpit, start a process, message your team, list what's published, build a new flow. It's the same EA2 API the UI uses — the assistant just maps short phrases onto it. If a regional store manager types 'start a laptop request for store 204', the assistant finds the right published flow and starts it.", }, ] as const; @@ -63,7 +63,7 @@ export default function Explainer() { Eight pages, eight minutes — everything a new operator needs to understand before they touch the cockpit. Distilled from the FlowMaster Element Architecture (v2.1) and the EA2 contracts.

- +