Skip to content

Aetheria-Labs1/storefront-skills / skills/ab-test

ab-test

Verified

Analyze an editable Lexsis landing-page URL, plan one controlled change, build verified challenger pages, and create or evaluate a draft A/B test. Use for URL-first storefront experimentation, not ordinary page editing.

FileKindSize
SKILL.mdskill md2.5 KB
agents/openai.yamlconfig471 B
references/ab-testing.mdmarkdown6.3 KB
references/ad-to-page.mdmarkdown1.3 KB
references/animation-system.mdmarkdown11.1 KB
references/anti-patterns/copy-anti-patterns.mdmarkdown12.2 KB
references/anti-patterns/cro-anti-patterns.mdmarkdown17.8 KB
references/anti-patterns/dark-patterns.mdmarkdown23.9 KB
references/anti-patterns/design-anti-patterns.mdmarkdown9.3 KB
references/anti-patterns/mobile-anti-patterns.mdmarkdown9.7 KB
references/asset-prep.mdmarkdown6.9 KB
references/assets/asset-sourcing-sequence.mdmarkdown12.2 KB
references/assets/generation-policy.mdmarkdown25.9 KB
references/assets/image-jobs-by-page-type.mdmarkdown31.8 KB
references/assets/imagery-by-vertical.mdmarkdown24.8 KB
references/assets/slot-spec.mdmarkdown20.2 KB
references/assets/video-rules.mdmarkdown17.6 KB
references/authoring/css-and-styling.mdmarkdown4.0 KB
references/authoring/source-authoring.mdmarkdown9.0 KB
references/blob-shapes.mdmarkdown1018 B
references/cart-composition.mdmarkdown7.2 KB
references/cart-profile-management.mdmarkdown17.1 KB
references/consumer-behavior-cro.mdmarkdown12.7 KB
references/copy/copy-frameworks.mdmarkdown20.5 KB
references/copy/headline-and-cta-rules.mdmarkdown12.9 KB
references/copy/message-match.mdmarkdown9.2 KB
references/copy/voice-of-customer-mining.mdmarkdown10.9 KB
references/design-assets.mdmarkdown366 B
references/design-enrichment.mdmarkdown334 B
references/design-rules.mdmarkdown15.5 KB
references/generate-collection.mdmarkdown555 B
references/generation-protocol.mdmarkdown3.2 KB
references/islands/collection-grid/index.mdmarkdown5.4 KB
references/islands/collection-swipe/index.mdmarkdown4.1 KB
references/lexsis-mcp-contract.mdmarkdown14.2 KB
references/merchant-templates.mdmarkdown2.6 KB
references/module-authoring.mdmarkdown9.0 KB
references/offers/campaign-calendar.mdmarkdown21.4 KB
references/offers/funnel-stages.mdmarkdown17.6 KB
references/offers/offer-ledger.mdmarkdown5.1 KB
references/offers/offer-strategy.mdmarkdown9.6 KB
references/offers/offer-types.mdmarkdown36.6 KB
references/offers/price-presentation.mdmarkdown18.0 KB
references/offers/urgency-scarcity.mdmarkdown17.5 KB
references/page-editing.mdmarkdown9.7 KB
references/page-files.mdmarkdown2.7 KB
references/page-types/_checklist-format.mdmarkdown11.1 KB
references/page-types/_index.mdmarkdown21.9 KB
references/page-types/collection-landing.mdmarkdown21.9 KB
references/product-grid.mdmarkdown2.0 KB
references/proof/before-after-and-claims.mdmarkdown19.2 KB
references/proof/numbers-and-counts.mdmarkdown16.0 KB
references/proof/press-and-media-mentions.mdmarkdown12.5 KB
references/proof/proof-ledger.mdmarkdown8.3 KB
references/proof/reviews-sourcing.mdmarkdown24.8 KB
references/proof/trust-badges-certifications.mdmarkdown21.8 KB
references/proof/ugc-rights-and-display.mdmarkdown16.0 KB
references/publishing.mdmarkdown2.4 KB
references/qa-recipe.mdmarkdown4.3 KB
references/quiz-authoring.mdmarkdown14.5 KB
references/resource-templates.mdmarkdown7.7 KB
references/scroll-patterns.mdmarkdown1.2 KB
references/source-artifact-workflow.mdmarkdown3.7 KB
references/styling-hooks.mdmarkdown7.8 KB
references/traffic-source-google.mdmarkdown1.6 KB
references/traffic-source-meta.mdmarkdown1.5 KB
references/traffic-source-tiktok.mdmarkdown1.5 KB
references/vertical-beauty.mdmarkdown1.8 KB
references/vertical-fashion.mdmarkdown1.7 KB
references/vertical-food.mdmarkdown1.6 KB
references/vertical-home.mdmarkdown1.7 KB
references/vertical-luxury.mdmarkdown1.6 KB
references/vertical-supplements.mdmarkdown1.7 KB
references/workflow-intent.mdmarkdown2.0 KB
references/workflows/_how-to-read.mdmarkdown2.7 KB
references/workflows/copy-workflow.mdmarkdown1.5 KB
references/workflows/island-selection-workflow.mdmarkdown4.8 KB
references/workflows/section-asset-workflow.mdmarkdown5.8 KB

references/quiz-authoring.md

View on GitHub
# Quiz authoring

Use `Quiz` for any deterministic interaction that collects answers and
resolves content, products, exact variants, navigation, or Cart V2 actions.
Examples include product finders, shade and size matching, assessments,
calculators, gift finders, routine builders, profile quizzes, and guided
selling.

Search aliases: product finder quiz, branching assessment, variant matching
quiz, guided recommendation.

## Source of truth

Read `vibe://schema/island/Quiz` immediately before authoring. The current
schema defines available fields, limits, host roles, and styling hooks.

Embed one complete props object in an `<lx-island name="Quiz">` with a single
JSON script child, in ordinary versioned page source. Empty question/result
arrays are not a valid starting definition. Use the public Quiz example or the
live schema, and replace illustrative IDs with the selected store's catalog IDs.

Do not put resolved product data, current prices, inventory, or authored
copies of Shopify variants in production source. Use `lexsis_catalog` to
resolve real Product and ProductVariant GIDs; the renderer hydrates current
commerce facts.

## Definition design

Use stable lowercase IDs. Each meaningful answer must affect at least one of:

- Next question
- Product or result score
- Eligibility or exclusion
- Named profile score or trait
- Exact variant mapping
- Result explanation

Delete questions that do not change the journey or provide necessary context.
Always define a deterministic fallback result.

Supported question families include choices, booleans, scales, numeric
ranges, numbers, selects, text, textarea, email, phone, and date. Email and
phone values are answer fields, not automatic subscriptions. Persisting any
answer requires the managed capture policy and shopper consent described below.

## Logic choices

- Put simple weights directly on option `effects`.
- Use `dynamicScoring.entries` when the same answer affects several products,
  variants, results, or profiles.
- Use `rules` for nested if/then eligibility, traits, forced results, badges,
  reasons, and variant-option selection.
- Use `branches` to skip irrelevant questions or terminate early.
- Use `pointProfiles` when answers first produce a shopper characteristic and
  that characteristic determines the result.
- Use `variantMatrices` when answers must resolve an exact Shopify SKU.

These systems may be combined. Keep rule priority explicit and verify tied
scores resolve predictably.

### Evaluation order

- `rules` run in **ascending** `priority` (lowest first). A later rule
  overwrites traits set earlier, and the last `force_result` wins.
- `force_result` beats scoring.
- Otherwise results are ranked by **descending** `priority`, then score.
  Set `resolution.tieBreak: "score_then_priority"` to rank by score first.
- `branches` from one question are checked in descending `priority`; the
  first match wins.

### Condition operators

A leaf condition is `{answer, operator, value}`, or a `trait_*` / `score_*`
form. Combine leaves with `{all: [...]}`, `{any: [...]}` or `{not: {...}}`.

| Operator | Example |
|---|---|
| `equals` / `not_equals` | `{"answer":"occasion","operator":"equals","value":"gift"}` |
| `includes_any` / `includes_all` | `{"answer":"style","operator":"includes_any","value":["minimal","bold"]}` |
| `greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal` | `{"answer":"budget","operator":"less_than","value":5000}` |
| `between` | `{"answer":"budget","operator":"between","value":[2000,5000]}` |
| `answered` / `unanswered` | `{"answer":"note","operator":"answered"}` |
| `trait_equals` | `{"trait":"recipient","operator":"trait_equals","value":"her"}` |
| `score_at_least` / `score_below` | `{"scoreTarget":"result","scoreKey":"minimal","operator":"score_at_least","value":5}` |

Copy the exact leaf shape from the live `vibe://schema/island/Quiz` schema
when it differs from these examples.

### Rule actions

`then` is an array of:

- `{"action":"include"|"exclude","target":"product"|"variant"|"result","key":"..."}`
- `{"action":"add_score","target":"product"|"variant"|"result"|"profile","key":"...","value":2}`
- `{"action":"set_trait","key":"recipient","value":"her"}`
- `{"action":"force_result","resultKey":"gift_her"}`
- `{"action":"set_variant_option","productKey":"ring","option":"Size","value":"7"}`
- `{"action":"add_reason","key":"ring","value":"Matches your minimal style"}`
- `{"action":"add_badge","resultKey":"gift_her","value":"Best seller"}`

### Limits

The validator rejects definitions over these limits:

| Item | Max |
|---|---|
| Questions | 30 |
| Options per question | 20 |
| Options in total | 250 |
| Catalog products | 100 |
| Results | 50 |
| Products per result | 8 |
| Branches | 200 |
| Rules | 300 |
| Variant-matrix combinations | 1,000 |

## Products and actions

Declare Shopify products once in `catalog` and reference their stable keys
from results. Every recommended product should include a concise reason tied
to the shopper's answers.

Use `add_items` for one or several recommended products. Quiz constructs one
renderer-managed `lx:cart:add-items` request and uses the effective Cart V2
profile. Never call Shopify directly or click hidden controls.

Use `view_product`, `navigate`, or `restart` for non-cart outcomes. They
render as real links, so shoppers can open them in a new tab.
Do not use `reward` or `offer`; those require a future managed adapter.

- **Per-product cards.** Cards link to their PDP by default. Set
  `content.cardAction` to `"add"` or `"both"` to give each card its own add
  button (`content.cardAddLabel`). An `add_items` action with a `productKey`
  adds only that product.
- **Answer-driven URLs.** `navigate` URLs accept `{{questionId}}`
  placeholders, filled with the URL-encoded answer (multi-select answers are
  joined with commas). One result can then route to, say,
  `/collections/rings?filter.v.price.lte={{budget}}` instead of authoring one
  result per budget.
- **Sold-out products.** A sold-out product is replaced by the first
  available entry in its catalog `alternativeKeys`, or hidden. "Currently
  unavailable" only shows when every product in the result is sold out.
- **Controls.** The built-in restart button hides when a result has its own
  `restart` action, or with `content.showRestart: false`. Back is hidden on
  the first question. `appearance.showQuestionNumber: false` hides the
  "Question N" label.
- **Host sections.** The quiz dispatches bubbling `lx:quiz:step`
  (`{quizKey, questionId, index}`) and `lx:quiz:result` (`{quizKey,
  resultKey}`) events. Listen with `lifecycle.on(section, "lx:quiz:result",
  ...)` rather than observing island DOM.
- **Pop-ups.** Put the quiz in a `Modal` with `trigger: "event"` and a
  `storageKey`; any `[data-lx-open-modal="<storageKey>"]` element on the
  page opens it. `position: {"mobile":"bottom","desktop":"center"}` gives a
  bottom sheet on phones.

## Optional response saving

Definitions remain in page source. A version-bound capture policy controls
whether the published Quiz offers saving and which answers are retained.
Discover exact arguments before calling these actions:

| Action | Purpose and boundary |
|---|---|
| `lexsis_capture.quiz_inspect` | Read the saved page version's instances, hashes, and current capture state. |
| `lexsis_drafts.quiz_prepare` | Prepare an inactive definition and policy; does not enable collection. |
| `lexsis_live_ops.quiz_activate` | Activate the exact reviewed policy with explicit approval. |
| `lexsis_live_ops.quiz_deactivate` | Stop collection with explicit approval; retained responses are not deleted. |
| `lexsis_capture.quiz_responses` | Paginated retained response summaries, filtered by definition, status, and test mode. |
| `lexsis_capture.quiz_response` | Read one attempt; personal/sensitive values are redacted in MCP. |

Every call needs `store_id`; supply `workspace_id` explicitly when selection is
ambiguous. Inspect uses `page_id` and immutable `page_version_id`, not the display
version number. Prepare uses that version, `instance_id`,
`expected_definition_hash`, and `policy`. Activation/deactivation uses
`definition_id`, `expected_definition_hash`, and `expected_active_definition_id`
(the current ID, or null when none is active). Re-read conflicts; do not retry
with a guessed hash or silently replace another active definition.

Policy fields:

| Field | Contract |
|---|---|
| `version`, `mode` | `1`, `"responses"` |
| `purpose`, `disclosure` | State why answers are saved and explain the shopper's choice. |
| `fields` | Every `question_id`, classification (`categorical`, `personal`, `sensitive`), and `merchant_visible`. |
| `partial_retention_days` | 1-30 days for unfinished responses. |
| `completed_retention_days` | 1-365 days for completed responses. |
| `resume_ttl_minutes` | 1-10080 minutes for resume credentials. |
| `contact_fields`, `contact_purpose` | Optional email/phone/name plus a separate purpose when collecting contact. |

Choose the shortest retention that serves the stated purpose. The limits are
validation bounds, not recommended defaults. Do not misclassify contact, free
text, or sensitive questions as categorical to expose them through MCP.
The policy must cover every question, and resume cannot outlive unfinished
retention. Text, textarea, email, phone, and date cannot be categorical.

Saving is an unchecked choice; the visitor can continue without it. Contact
collection has a separate unchecked choice. Analytics consent is independent:
saving while analytics is denied can create a Forms response without events.
Neither saving nor contact collection sends results by email or enrolls marketing.

The managed service protects answer/contact values. Forms submissions reference
attempts rather than duplicating plaintext answers. When managed capture is
available, the browser does not persist a local raw-answer snapshot; scoped
credentials allow resume within policy and current-version limits. A result
screen is not proof of saving: wait for confirmed save status and inspect the
response. The merchant Forms viewer provides controlled reveal and export of
displayed answers; MCP exposes only merchant-visible categorical answers.

Prepare and activate the same version that will be published. Page publication
and policy activation require their own explicit authorization; an existing
approval for the exact scope remains valid. Editing source requires fresh
inspection and a matching policy. Preview does not collect production responses.
Normal visits used for testing a published page are not automatically test-mode
records. Respect response filters, pagination, and retention when verifying.

## Journey analytics

Quiz emits identifier-only `lx_quiz_*` events for exposure, start/resume/restart,
question views, committed/changed answers, skipped questions, branches, review,
validation/errors, completion, results, products, cart outcomes, and explicit
dismissal. Do not emit answer text, contact values, or question labels.
`analytics.answerAllowlist` remains a compatibility field and does not permit
raw answers. Respect analytics denial and preview suppression.

`lx_quiz_completed` means a result was reached. `lx_quiz_submission_saved` is a
server event for a persisted completion with analytics linkage. Cart outcome is
separate from both, and none of these proves payment. The current tools do not
provide a dedicated question drop-off or quiz-to-paid-order report. Missing
completion does not establish a specific exit point or cause.

## Custom visual design

Default result styles have zero specificity (`:where()`), so plain section
CSS on any `data-part` overrides them without `!important`. For quick theming
set `--lx-quiz-button-bg`, `--lx-quiz-button-color`, `--lx-quiz-button-radius`,
`--lx-quiz-button-padding`, `--lx-quiz-badge-bg`, `--lx-quiz-badge-color`,
`--lx-quiz-card-bg`, `--lx-quiz-card-border`, `--lx-quiz-card-radius` and
`--lx-quiz-card-padding`. The schema's parts list names every `data-part`
the default renderers emit.

There are no Quiz presets. Create the requested design through:

- Surrounding section HTML
- Page theme variables
- Quiz content and layout props
- Scoped CSS targeting the schema's `data-part`, `data-state`,
  `data-selected`, `data-question-id`, `data-result-key`, and availability
  hooks

The page-authored island remains `Quiz`. `QuizExperience`, `QuizInput`, and
`QuizResult` are host-only default renderers and cannot be placed directly.

Use a custom registered host only when it appears in the current schema with
the required `quiz:experience`, `quiz:input`, or `quiz:result` capability.
When the desired structure cannot be built with the default hooks, request a
reusable host-island implementation rather than inventing one.

Templates may later package complete Quiz definitions, section composition,
and CSS as examples. Adapt them to the current store and products; do not
treat them as hardcoded runtime modes.

## QA

Compile before creating or editing a draft. Review at 390, 768, and 1280. Verify:

- Every reachable branch and result
- Default and tied scores
- Back, review, restart, and resume behavior
- Required and optional answer validation
- Missing and unavailable exact variants
- Multiple Quiz instances when present
- Cart pending, success, partial, and error states
- Keyboard operation, focus visibility, selected state, and error
  announcements
- Mobile, tablet, and desktop layout without overflow
- Forward/back/review/result transition motion, keyboard focus after each change,
  reduced motion, and visible saving/error/retry states

Do not claim a Quiz is ready when only the start screen or happy path was
tested.

After authorized activation and publication, test on the returned published URL:

- Saving declined: the quiz still works and creates no saved response.
- Saving accepted and analytics allowed: confirmed save, one completed Forms row,
  and consented identifier-only events without duplicate counts on retry.
- Saving accepted and analytics denied: saved response with no quiz analytics.
- Edit/back/reload/retry: restored state within the active version and resume
  window, with visible failure handling when saving or resume is unavailable.
- Correct product/variant and final cart outcome; inspect existing promotions
  separately when gifts or discounts change the cart.

Store concise evidence in existing hosted QA/operation records, not local JSON
or screenshot bundles. Mark pre-publication capture checks pending, rather than
claiming preview captured a response. Distinguish a design approval from live
capture proof. Historical-version resume, preview capture, automatic result
email, dedicated funnel dashboards, and paid-order attribution remain deferred.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall