---
name: plugsky-user-journey
slug: plugsky--plugsky-user-journey
description: "Use when validating the full Plugsky user journey end-to-end \u2014 signup (email + Google), sign-in, plan selection and profile sync, and every dashboard section (Overview, Playground, Playground Beta, API Keys, Usage, Models, Agent Cloud, Tools, Knowledge/RAG, Fusion, Marketplace, Team, Billing, Integrations, Download OS, Support, Referral, Enterprise, GPU Share, Settings, Security, Status, Legal, Audit log, CLI Docs). Verifies icons/nav, screens load with zero console errors, subscriptions renew, and API calls work. WHEN: user journey, test signup, test dashboard, all services, check screens, subscription renewal, full audit, QA the product, verify workspace, test billing."
collection: Plugsky
category: Platform Ops
license: Plugsky
source: https://plugsky.com/skills
install: "Download the Plugsky skills pack (see below)"
---

# plugsky-user-journey

Use when validating the full Plugsky user journey end-to-end — signup (email + Google), sign-in, plan selection and profile sync, and every dashboard section (Overview, Playground, Playground Beta, API Keys, Usage, Models, Agent Cloud, Tools, Knowledge/RAG, Fusion, Marketplace, Team, Billing, Integrations, Download OS, Support, Referral, Enterprise, GPU Share, Settings, Security, Status, Legal, Audit log, CLI Docs). Verifies icons/nav, screens load with zero console errors, subscriptions renew, and API calls work. WHEN: user journey, test signup, test dashboard, all services, check screens, subscription renewal, full audit, QA the product, verify workspace, test billing.

## Install

```bash
Download the Plugsky skills pack (see below)
```

## Skill

# Plugsky — full user journey validation

Last updated: **2026-11-06** (Round 21). Full audit: `Plugsky/docs/ops/audit-skills.md` and `PLUGSKY-FULL-AUDIT-2026-10-27.md`.

Run this whenever you need to prove the whole product works: account creation → plan →
every workspace screen → API surface → subscription state → artifacts → admin overview.

## 0. Access

| Thing | Value |
|---|---|
| Site | `https://plugsky.com` · dashboard `https://plugsky.com/dashboard` (SPA, hash routes) |
| API | `https://api.plugsky.com/v1` |
| QA account | `qa.audit@plugsky.com` / `QaAuditPass123!` (trial plan; recreate: `php bin/qa_user.php create`) |
| VPS | `ssh -i ~/.ssh/plugsky_deploy root@72.61.81.91` · backend `/var/www/plugsky/backend` |
| Harness | `Plugsky/tools/audit/user-journey/journey.mjs` (Playwright, local) |

## 1. Journey steps (each must be verified, not assumed)

1. **Signup (email)**: create a unique user via the UI or `POST /api/auth/signup`; expect
   verification flow + workspace auto-provisioned (slug, plan=free, trial_ends_at +7d since Oct 6
   2026 — `TRIAL_DURATION_DAYS`; earlier signups got 14 days. The separate $5 one-time plan = 1 day full access).
2. **Signup (Google)**: `GET /api/auth/google?next=/dashboard` → 302 to accounts.google.com with
   correct `redirect_uri`; full consent cannot be automated — assert the redirect + callback route.
3. **Sign-in**: `POST /api/auth/login` → 200 + JWT; wrong password → 401; 2FA path if enabled.
4. **Plan selection**: `/dashboard#billing` lists self-serve + enterprise plans; upgrade CTAs
   create Stripe checkout sessions; **plan sync** must appear on the profile (workspace plan or
   `plan_overrides`) and unlock the right models (PlanLimits::resolve).
5. **Workspace sections** (walk every one; assert hash, title, content length, zero console errors,
   icons present, key action works):
   `overview, playground, playground-beta, keys, usage, models, agents, tools, rag, fusion,
   marketplace, team, billing, integrations, downloads, support, affiliates, enterprise, gpu,
   settings, security, status, legal, audit, cli-docs`
   Locked (🔒) sections on free/trial must show the lock/upgrade state — that IS the expected result.
6. **API surface** (temp key): `GET /v1/models` (count), chat completion, streaming, embeddings,
   tools/JSON mode, RAG collections, usage/keys endpoints, rate-limit 429 behaviour.
7. **Subscription renewal**: read-only DB check — `subscriptions` rows have correct
   `current_period_end`, `cancel_at_period_end`, status; webhook events recorded in `stripe_events`;
   `bin/reconcile-plans.php` cron (*/15) keeps workspace plan in sync; comps honoured via
   `plan_overrides`.
8. **Billing surface**: `/billing` + `/billing-success` + `/accept-invite` load (clean URLs), plan
   cards show annual/monthly toggle, coupons apply at checkout.

## 2. Run the harness

```bash
cd /tmp/tools-audit            # Playwright + cached Chromium live here
node /path/to/Plugsky/tools/audit/user-journey/journey.mjs
# outputs: /tmp/journey/<page>.png + console/network errors + summary JSON
```

Pass criteria: **every section loads, 0 console errors, 0 failed requests (except known 401/404
probes), API smoke 100%, renewal fields sane**.

Lock detection (fixed 2026-09-27): the harness reads the real UI state — nav item has class
`.nav-item[data-page=X].locked` **or** the section shows the `"is a paid feature"` upgrade gate.
Do NOT text-match "upgrade"/"locked" in body copy (false positives: security page has 🔒 copy, footers say "upgrade").

Trial plan (verified 2026-09-27): unlocks 22/25 sections; locks exactly **agents, marketplace, team** (seats=1).

## 2b. API sweep — every endpoint, every page (added 2026-09-29)

Beyond walking pages visually, call **every API endpoint used by every page** and check results +
logs. Toolkit: `Plugsky/tools/audit/user-journey/api-sweep/` (also documented in its README).

```bash
# 1. upgrade QA account to admin+enterprise so scope gates (tools/agents/rag) unlock
ssh VPS 'bash /tmp/prep_qa.sh'
# 2. sweep: dashboard/status/nodes/playground, then admin panel
ssh VPS 'python3 /tmp/api_sweep.py && python3 /tmp/admin_sweep.py'
# 3. ALWAYS restore afterwards
ssh VPS 'bash /tmp/restore_qa.sh'
```

Rules that keep the live product clean:
- GETs are called fully; creation endpoints get **empty-body validation probes** (expect clean 4xx, zero rows created).
- **Never** call billing mutations (subscribe/cancel/resume/checkout/portal/change-plan), key reveal, logout,
  2FA disable, or delete endpoints — skip them explicitly and note why (the harness prints the SKIP list).
- 405s on GET probes of POST/PUT/DELETE-only routes are correct — confirm the route method in
  `backend/src/Interface/Http/routes.php` before calling it a bug.
- Revoke every temp `sk-live-…` key afterwards; verify with `api_keys.revoked_at is not null`.
- Check `storage/logs/error.log` for new 5xx before/after the sweep (`user_id` is now attributed).

**2026-09-29 baseline: dashboard 59/59 OK, admin 29/29 OK, addendum 5/5 OK — 0 failures.**
MCP stress is included: `mcp_stress.py sk-live-…` → 210 requests, 0 failures, 0× 5xx.

## 2c. OTP login note (2026-09-29)

Email OTP is ON by default for all accounts: a password login from a NEW browser context returns
`{otp_required, challenge_id, email_hint}` (200, no token) instead of a token. Harnesses must either:
- use the QA account (`qa.audit@plugsky.com`) — its OTP is **disabled** (do not re-enable), or
- complete the challenge: pin the code via `/tmp/pin_code.sh <email> 123456`, then
  `POST /api/auth/otp/verify {challenge_id, code}`.

Login is also throttled (≈10/min per IP) — batch logins in harnesses, don't loop them.

## 3. Manual/limited checks (no automation possible)

- Google OAuth consent (needs a real Google account) — verify redirect + callback only.
- Stripe live payment — do NOT charge cards in audits. Verify checkout *session creation* and use
  `plan_overrides` or Stripe test mode for end-to-end; check existing customers' renewal fields instead.
- Email delivery (verification, tickets) — verify via logs (`EMAIL_*` provider) not by sending.
  Welcome email on signup: `mail.sent` line in `backend/storage/logs/*.log` (subject "Welcome to Plugsky — your AI workspace is ready", SMTP 250 accepted = delivered to relay).
  Both signup paths send it (email signup + Google) via `AuthService::sendWelcomeEmail()` — fixed 2026-09-28 (Google path previously sent nothing).
  Resend any time: `php bin/send-welcome.php <email|user_id>`.
  Deliverability: SPF ✅, DMARC p=none ✅, DKIM **not configured** — owner action in Hostinger hPanel; warn users to check spam until then.
- Pending subscriptions (checkout started, never paid): billing UI shows a "PAYMENT PENDING — no charge was made" banner with a resume CTA. Verify with a temporary pending row + screenshot, then delete it. Checkout creation: `POST /api/billing/subscribe {plan, interval}` returns `checkout_url`.

## 4. Failure playbook

| Symptom | Cause / fix |
|---|---|
| Dashboard blank / "Loading…" forever | workspace slug race — check `WorkspaceRepository` retry; verify `/api/auth/me` 200 (there is no `/api/me`) |
| Section shows 🔒 for a paid user | plan sync: check `workspaces.plan`, `plan_overrides`, run `bin/reconcile-plans.php` |
| 500 on any `/api/*` | `.env` perms (`www-data:www-data 640`) then `systemctl reload php8.4-fpm` |
| Plan cards missing | `/api/public/pricing` 200? settings/site_settings row present? |
| Checkout session fails | Stripe keys in `.env`; check `stripe_events` + webhook logs |
| API key 401 | key revoked or wrong scope; create a fresh key for the QA workspace |

## 5. Rules

- Never complete real payments or send real emails during audits.
- Every DB change must be reversible (create temp rows, delete after).
- Screenshot every section for evidence; keep the summary JSON next to the run.

## 6. Known findings (2026-09-26 run)

- **Signup 201, login 200, all 25 dashboard sections load with 0 console errors / 0 failed requests.**
- **Stripe period bug (fixed):** newer Stripe API (Basil+) moved `current_period_start/end` onto
  **subscription items**; the webhook read the legacy top-level fields, so `subscriptions.current_period_end`
  was NULL for every row (renewal reminders/dashboards blind). Fixed in
  `StripeWebhookController::periodStart()/periodEnd()` (items-first fallback) and backfilled 29 rows via
  `bin/backfill-subscription-periods.php` — now 23/24 active subs carry period ends, 21 renew within 30 days.
- Google OAuth: `GET /api/auth/google` returns the correct accounts.google.com 302 (consent = manual).
- `locked=true` in the harness output for nav items is expected for trial users (🔒 sections by design);
  refine the check to the section content only when needed.
- Re-run cadence: after every billing/webhook change + weekly.


## Last run — 2026-09-27 (evening)

- Harness: 25/25 sections, **0 console errors, 0 failed requests**; trial locks agents/marketplace/team only.
- Signup E2E (fresh user): 201 → free + 14-day trial + workspace auto-provisioned → welcome email sent (`mail.sent`)
  → key created 201 → `/v1/models` 36 → `plugsky-micro` chat 200 in **0.7s** (served `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning`, usage recorded) → `/api/usage` correct.
- Billing: checkout session creation returns a live Stripe URL; pending-sub banner renders correctly (verified with a temp row, then removed).
- Known minor: signup can take ~10s when the inline welcome-email SMTP call is slow (works, just synchronous).

## 2026-09-28 — Google signup welcome email

- Bug: `loginOrSignupWithGoogle()` created accounts but never sent the welcome/getting-started email (only email/password signup did).
- Fix: extracted the 10KB welcome template into `AuthService::sendWelcomeEmail(User)`; both paths call it (Google only for accounts < 60s old).
- Retroactive send for `bitrixteam@gmail.com` (user 1617) + both paths regression-tested (`mail.sent` + `auth.google is_new:true`).
- New utility: `php bin/send-welcome.php <email|user_id>` (support can resend).


## 2026-10-12 — Notifications center (bell + page + lifecycle engine)

- **DB**: `notifications` (per-user rows; `dedupe_key` unique = idempotent; `read_at`, `email_sent_at`, `expires_at`).
- **API**: `GET /api/notifications` (limit/cursor/unread/read), `GET /api/notifications/unread-count`,
  `POST /api/notifications/{id}/read`, `POST /api/notifications/{id}/unread`, `POST /api/notifications/read-all` (all auth'd).
- **Engine**: `bin/notify-lifecycle.php` (cron `*/10`): trial 48h / 24h / expired; renewals 3d (+cancel notices);
  past_due; checkout recovery #1 (1h–7d) + #2 (≥20h after #1); welcome for new signups.
  **In-app only by default — emails require `--email`** (owner preference, 2026-10-12).
  Flags: `--dry-run`, `--email`, `--only=trials|renewals|failed|checkout|welcome`, `--backfill-welcome`, `--backfill-expired`, `--test-email=ADDR`.
- **Broadcast**: `bin/notify-broadcast.php --title="…" --body="<p>…</p>" [--cta-label= --cta-url= --audience=all|free|paid|trial --email]`.
- **UI**: 🔔 bell + badge in dashboard topbar `.actions` (before user chip), dropdown (8 latest, mark-all, view-all),
  `#notifications` page (All/Read/Unread tabs, full body + CTA, "See more/See less" expander for long bodies, load-more). Badge polls every 60s.
- **Email transport**: `Infrastructure/Mail/Mailer.php` sends both MIME parts **quoted-printable** + dot-stuffed
  (fixed 2026-10-12 — raw multi-thousand-char HTML lines were hard-wrapped by relays mid-word, e.g. "Builde r" / "< b>Builder").
- **Test recipe**: seed a row for the QA user via SQL → login → Playwright (see `notif_e2e.mjs` pattern) →
  bell badge, dropdown, read, read-all, 0 console errors → delete seed rows. `--test-email=<addr>` sends every template.
- **Data note**: pending checkouts older than 7 days are reclassified `status='abandoned'` (billing UI ignores unknown statuses).


## Pitfall (dashboard patching) — template-literal escaping

The dashboard renderers return big JS **template literals** (backtick strings) that embed `<script>` blocks.
Text inside a template literal is still subject to escape processing, so:

- writing `\n` in the SOURCE becomes a REAL newline in the rendered/injected script
  → `SyntaxError: Invalid or unexpected token` at injection (`replaceChild`) time.
  If the injected script needs a `\n` inside a JS string, the source must contain `\\n` (double backslash).
- `</script>` inside the template must be written `<\/script>` in source.
- backticks (`` ` ``) and `${` inside embedded script code must never appear literally.

Symptom checklist: page shows "Failed to load" or silently breaks → check `pageerror` at
`dashboard:56xx (loadPage replaceChild)` → extract the interpolated script via a `createElement('script')`
hook (capture `.textContent`), then `node --check` it to find the exact line.


### 2026-10-13 — free-plan scopes opened + playground-beta scope gating + version broadcast

- **Free plan scopes** (PlanLimits + dashboard PLAN_SCOPES): now `chat, streaming, json-mode, function-calling, rag, integrations`
  (rag_docs cap 0 → **25**). Still locked for free: **agents, marketplace, team**. Verified with a temp free account:
  /api/tools 200, /api/rag/collections 200, /api/integrations 200, /api/agents 403, /api/marketplace 403; chat gate unchanged (micro 200 / pro 400).
- **playground-beta**: loaders (tools/agents/marketplace) now check `betaAllows(scope)` before fetching (mirrors PLAN_SCOPES)
  and fall back to seed catalogs on any non-OK — no more 403 console noise for free users. Verified: signed-in free user → tools 200,
  agents/marketplace skipped, **zero failed requests**.
- **Version broadcasts**: `bin/notify-broadcast.php --version=v2026.10.13 ...` prefixes the title and (content-hashed) dedupes per version.
  First version notification (v2026.10.13) sent to bitrixme as a test; all-users send = same command with `--audience=all`.
- **Status page** (`/dashboard#status`) is fully dynamic: reads `model_health_status` per request via `/api/status` + `/api/health/models`,
  auto-refresh 30s; Issues KPI now shows status + latency per model.

### 2026-10-13 — Video Studio (admin-only beta) + version broadcast + free scopes

- **Video Studio**: `https://plugsky.com/studio` — standalone page, **admin-only** (page role check + `AdminMiddleware` on
  `/api/studio/video` create, `/api/studio/videos` list, `/api/studio/video/{id}` status). Delegates to `VideoController`
  with a synthesized key (quota + usage behave like the public API). Tasks live in Redis (`plugsky:video:task:*`, 24h).
  Verified: real Seedance clip generated end-to-end; non-admin → 403. Dashboard nav shows "Beta → Video Studio" only for admins.
  **P1.5:** clips archived to `storage/videos/` with HMAC-signed URLs (`/api/studio/video-file`); one `video_ready` notification
  per task; prompts moderated via ContentGuard; `/api/studio/videos` returns quota {used,limit}.
  **P2 core:** image→video live — `POST /api/studio/frame` (upload, admin-gated) + `image_url` on create auto-routes to
  `plugsky-video-pro` (seedance-1-0-pro-250528, first-frame); UI has an image picker with preview.
  **P2/P3:** storyboard + ffmpeg stitch (`POST /api/studio/stitch`) + projects (`/api/studio/projects`, `studio_projects` table);
  video packages (`/api/studio/packages`, Stripe checkout, bonus seconds via webhook; `video_purchases`/`video_subscriptions`).
  **Plugins:** built-ins are REAL via `TestToolController` → `BuiltinTools` (web-search, calculator, weather, stock, translator,
  image-gen; code-run = browser Worker). Settings password warnings fixed with hidden forms (pgSettingsForm / dashPwForm).
  **Credential validation:** `POST /api/playground/validate` (github/replicate/assemblyai/twilio/elevenlabs/slack/notion/email —
  email does a real IMAP login over TLS). Settings UI has Test buttons + result chips on every key field.
  **Studio V1 (2026-10-14):** `studio.html` rebuilt from the CinePilot prototype design — sidebar (Quick Create/Pro Studio/Projects/
  Gallery/Packages) + hero + step card + "Your Director" panel + mobile bottom nav; same real endpoints; credits card shows quota+bonus.
  **Studio V2 (2026-10-15):** full prototype nav (10 views + collapsible sidebar) · AI Director (`/api/studio/director`: chat/plan/expert/
  postkit) · Characters + Brand Kit (studio_characters/studio_brand_kits) · Voice & Audio (ElevenLabs TTS + browser recording → ffmpeg
  voiceover mux) · Pro Studio timeline+inspector · 16 creation types · Publish post-kit. All admin-gated; E2E verified.
- **Version broadcasts**: `bin/notify-broadcast.php --version=vX` — v2026.10.13 delivered in-app to all users (no email).
- **Free scopes** now: chat, streaming, json-mode, function-calling, rag (25 docs), integrations, agents, marketplace;
  Team is viewable on every plan, invites are seat-gated server-side (403 "includes N seat(s)").

## 2026-10-27 — full journey + custom-skill + admin verification

**Verdict:** full suite **ALL SKILLS PASS**; paid acceptance **PASS 100/100 · key #8112 · starter** (91.93s in the final suite after the guard/concurrency changes; 75.24s standalone before them).

| Layer | Result |
|---|---|
| Custom skills | **14/14 available** (completed `frontend-design`, `brand-guidelines`, `writing-guidelines`) |
| Skill prompts | **14/14** (`skill-quality`) |
| Router | **19/19** (added landing-page, brand, docs cases) |
| Live text outputs | **9/9** (premium-answer, research, writing, code-review, SEO, finance, frontend, brand, writing-guidelines) |
| User journeys | **13/13** · 8 journeys: free chat, paid chat, streaming, JSON, tools, embeddings/catalog, GPU share, transparency headers |
| Artifacts | **4/4** — PPTX 3 slides/162,851 bytes; XLSX D2=20/D3=60 with 2 formulas; chart 2048×1152; analysis 3×3 with 1 missing cell |
| Admin overview | 0 failed admin requests; alias/engine split, full-day request comparison, expired GPU jobs, unresolved-ticket label verified |
| Admin Error Watch | 0 failed admin requests; 0 paid / 2 free in 15m, 120 fallbacks, no alerts |

**Premium class 3:** `plugsky-max` → NVIDIA ultra answered the ball-cost canary correctly (`$0.05`). One text-skill output used a class-2 rescue under load and is recorded as such; do not present it as class 3.

**New checks to keep in this runbook:**

1. Artifact endpoints (`/v1/artifacts/pptx`, `/xlsx`, `/chart`, `/analyze`) return 200 **and** the file opens with the expected slide count, formulas, image size, and missing-cell count. HTTP 200 alone is not enough.
2. JSON mode returns a valid object and stays on the NVIDIA primary; a 6K JSON request should be ~5s.
3. A 12K-output request with a cooling primary returns 200 within the paid window (controlled test: 12s, `last-resort/deepseek-v4.1-flash`).
4. Admin `#overview` has 0 failed admin requests and every KPI denominator matches the DB/API; see `plugsky-surface-audit` §6.
5. Privacy page `https://plugsky.com/legal/privacy` is v1.1 and lists the real failover subprocessors, GPU Share operators, and the free-tier retention caveat.

## 2026-11-06 — security journey update (post-incident)

- Admin passwords for `admin@plugsky.com` (user 1) and `mmarhama@gmail.com` (user 17) were rotated after the incident. They are **not** in the Git repo. The `0600` recovery file is `/Users/mmarhama/Documents/Plugsky-Admin-Recovery-20261106-1729.txt`; move it to a password manager and delete it.
- Email OTP is enabled for both admins. TOTP 2FA is still **off** — enroll it. `mmarhama@gmail.com` still has Google sign-in; Google login may bypass the app email OTP, so enable Google 2FA or disable Google login for admin.
- Trusted devices and login challenges were cleared. The next password login requires a fresh email code.
- The `qa.audit@plugsky.com` automation account is separate. If its OTP is enabled, the Playwright harness cannot log in without completing the challenge; use `/tmp/pin_code.sh <email> 123456` or a temp QA account. Never use a production admin for UI automation.

### New full-suite command

```bash
cd /var/www/plugsky/backend
bash bin/skills/run-all.sh
```

The suite now has **7 skills**: catalogue/router, models, API surface, user journeys, security controls, errors/paid impact, paid acceptance.

- `skill-journey.sh`: **13/13 PASS** immediately after the tool-cap fix. A later run during a provider wave reported 3 PASS / 10 WARN / 0 FAIL; WARN is capacity, not a code failure.
- `skill-security.sh`: PASS=27 WARN=2 FAIL=0 after adding the public `GET /mcp` server-card check.
- Paid acceptance is reported as **WARN/Paused** when `PAID_LANES_ENABLED=false`; the score and failed checks are still printed, but the code suite does not fail for a policy pause.

### Add these security journey checks to every release

1. `GET /v1/payouts` → 404 (not a Plugsky route).
2. `POST /api/playground/browser` with a valid key → 403/404/503, never 200.
3. `POST /mcp` `tools/call` without auth → 401/403.
4. `GET /api/admin/error-watch`, `/api/auth/me`, `/api/keys` without auth → 401/403.
5. `GET /.env` and `/storage/.env` → no secret fields.
6. Admin email OTP is enabled; admin TOTP is enrolled; no active admin API keys; no trusted admin devices.
7. `/api/status` contains no secret names or key prefixes.
8. Non-streaming `max_tokens > 8192` → 400 `max_tokens_too_large`; explicit tool `max_tokens` (e.g. 32) is honored and not inflated to 12288.

### 2026-11-06 UI journey result

Ran `journey.mjs` from a temporary directory with `playwright-core` installed (the repo does not vendor it):

- signup: **201**
- QA login: **200, token=true**
- dashboard sections: **25/25** loaded
- console errors: **0**
- failed requests: **0**
- test: `overview, playground, playground-beta, keys, usage, models, agents, tools, rag, fusion, marketplace, team, billing, integrations, downloads, support, affiliates, enterprise, gpu, settings, security, status, legal, audit, cli-docs`

This is the clean UI baseline. Re-run after every dashboard/auth change; if `playwright-core` is missing, install it in a temp dir rather than adding it to the repo.

## Notes

Listed by Plugsky. Skill text and behaviour belong to the upstream author.
If you redistribute it, keep the upstream license and attribution.
