@funnelsgrove/cli 0.1.14 → 0.1.18
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/contracts/step-contract-v2.json +733 -0
- package/dist/analyticsOutput.d.ts +30 -15
- package/dist/analyticsOutput.js +45 -28
- package/dist/apiClient.d.ts +85 -0
- package/dist/apiClient.js +225 -8
- package/dist/cli.d.ts +149 -1
- package/dist/cli.js +1232 -71
- package/dist/diagnosticOutput.d.ts +42 -0
- package/dist/diagnosticOutput.js +83 -0
- package/dist/docsOutput.d.ts +19 -0
- package/dist/docsOutput.js +73 -0
- package/dist/docsTransaction.d.ts +81 -0
- package/dist/docsTransaction.js +1755 -0
- package/dist/funnelValidation.d.ts +14 -0
- package/dist/funnelValidation.js +297 -0
- package/dist/localSync.d.ts +79 -0
- package/dist/localSync.js +428 -53
- package/dist/projectValidator.d.ts +27 -0
- package/dist/projectValidator.js +208 -0
- package/dist/reskin.js +27 -1
- package/dist/stepContractMigration.d.ts +71 -0
- package/dist/stepContractMigration.js +1323 -0
- package/dist/templateDocs.js +8 -25
- package/docs-release-history.json +66 -0
- package/legacy-docs-catalog.json +1012 -0
- package/package.json +13 -4
- package/template_docs/.funnelsgrove-docs.json +144 -0
- package/template_docs/AGENTS.md +30 -58
- package/template_docs/CLAUDE.md +0 -2
- package/template_docs/docs/funnelsgrove/START-HERE.md +73 -0
- package/template_docs/docs/funnelsgrove/contracts/analytics-events.md +59 -0
- package/template_docs/docs/funnelsgrove/contracts/content-answers.md +44 -0
- package/template_docs/docs/funnelsgrove/contracts/flow-routing.md +41 -0
- package/template_docs/docs/funnelsgrove/contracts/payments.md +42 -0
- package/template_docs/docs/funnelsgrove/contracts/step-metadata.md +57 -0
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +39 -0
- package/template_docs/docs/funnelsgrove/qa/analytics.md +43 -0
- package/template_docs/docs/funnelsgrove/qa/local.md +42 -0
- package/template_docs/docs/funnelsgrove/qa/paywall-checkout.md +55 -0
- package/template_docs/docs/funnelsgrove/qa/publish.md +32 -0
- package/template_docs/docs/funnelsgrove/recipes/add-experiment.md +34 -0
- package/template_docs/docs/funnelsgrove/recipes/add-step.md +33 -0
- package/template_docs/docs/funnelsgrove/recipes/edit-step.md +31 -0
- package/template_docs/docs/funnelsgrove/steps/INDEX.md +26 -0
- package/template_docs/docs/funnelsgrove/steps/cancellation_offer.md +112 -0
- package/template_docs/docs/funnelsgrove/steps/checkout.md +120 -0
- package/template_docs/docs/funnelsgrove/steps/form_input.md +115 -0
- package/template_docs/docs/funnelsgrove/steps/intro_hero.md +110 -0
- package/template_docs/docs/funnelsgrove/steps/multi_select_choice.md +123 -0
- package/template_docs/docs/funnelsgrove/steps/paywall_offer.md +115 -0
- package/template_docs/docs/funnelsgrove/steps/progress_interstitial.md +111 -0
- package/template_docs/docs/funnelsgrove/steps/purchase_completed.md +117 -0
- package/template_docs/docs/funnelsgrove/steps/single_step_choice.md +122 -0
- package/template_docs/docs/funnelsgrove/steps/single_step_choice_emoji.md +122 -0
- package/template_docs/docs/funnelsgrove/steps/social_proof.md +110 -0
- package/template_docs/docs/funnelsgrove/steps/subscription_handoff.md +113 -0
- package/template_docs/docs/funnelsgrove/steps/subscription_management.md +112 -0
- package/template_docs/docs/funnelsgrove/steps/summary_confirmation.md +110 -0
- package/template_docs/docs/funnelsgrove/steps/upsell_offer.md +112 -0
- package/template_docs/docs/funnelsgrove/steps/value_prop_story.md +110 -0
- package/template_docs/funnel-docs.config.json +43 -0
- package/template_scaffold/.env.example +41 -0
- package/template_scaffold/.funnelsgrove-contract-tools.json +19 -0
- package/template_scaffold/.funnelsgrove-docs.json +144 -0
- package/template_scaffold/.funnelsgrove-scaffold.json +1078 -0
- package/template_scaffold/AGENTS.md +42 -0
- package/template_scaffold/CLAUDE.md +1 -0
- package/template_scaffold/PLAN.md +81 -0
- package/template_scaffold/PRODUCT_SENSE.md +28 -0
- package/template_scaffold/context/build-context.md +34 -0
- package/template_scaffold/docs/AGENT_FUNNEL_IMPLEMENTATION_SPEC.md +5 -0
- package/template_scaffold/docs/ARCHITECTURE.md +5 -0
- package/template_scaffold/docs/FLOW_CONFIG_AND_ROUTING.md +5 -0
- package/template_scaffold/docs/PAYWALL_AND_PAYMENTS.md +5 -0
- package/template_scaffold/docs/README.md +5 -0
- package/template_scaffold/docs/funnelsgrove/START-HERE.md +73 -0
- package/template_scaffold/docs/funnelsgrove/contracts/analytics-events.md +59 -0
- package/template_scaffold/docs/funnelsgrove/contracts/content-answers.md +44 -0
- package/template_scaffold/docs/funnelsgrove/contracts/flow-routing.md +41 -0
- package/template_scaffold/docs/funnelsgrove/contracts/payments.md +42 -0
- package/template_scaffold/docs/funnelsgrove/contracts/step-metadata.md +57 -0
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +39 -0
- package/template_scaffold/docs/funnelsgrove/qa/analytics.md +43 -0
- package/template_scaffold/docs/funnelsgrove/qa/local.md +42 -0
- package/template_scaffold/docs/funnelsgrove/qa/paywall-checkout.md +55 -0
- package/template_scaffold/docs/funnelsgrove/qa/publish.md +32 -0
- package/template_scaffold/docs/funnelsgrove/recipes/add-experiment.md +34 -0
- package/template_scaffold/docs/funnelsgrove/recipes/add-step.md +33 -0
- package/template_scaffold/docs/funnelsgrove/recipes/edit-step.md +31 -0
- package/template_scaffold/docs/funnelsgrove/steps/INDEX.md +26 -0
- package/template_scaffold/docs/funnelsgrove/steps/cancellation_offer.md +112 -0
- package/template_scaffold/docs/funnelsgrove/steps/checkout.md +120 -0
- package/template_scaffold/docs/funnelsgrove/steps/form_input.md +115 -0
- package/template_scaffold/docs/funnelsgrove/steps/intro_hero.md +110 -0
- package/template_scaffold/docs/funnelsgrove/steps/multi_select_choice.md +123 -0
- package/template_scaffold/docs/funnelsgrove/steps/paywall_offer.md +115 -0
- package/template_scaffold/docs/funnelsgrove/steps/progress_interstitial.md +111 -0
- package/template_scaffold/docs/funnelsgrove/steps/purchase_completed.md +117 -0
- package/template_scaffold/docs/funnelsgrove/steps/single_step_choice.md +122 -0
- package/template_scaffold/docs/funnelsgrove/steps/single_step_choice_emoji.md +122 -0
- package/template_scaffold/docs/funnelsgrove/steps/social_proof.md +110 -0
- package/template_scaffold/docs/funnelsgrove/steps/subscription_handoff.md +113 -0
- package/template_scaffold/docs/funnelsgrove/steps/subscription_management.md +112 -0
- package/template_scaffold/docs/funnelsgrove/steps/summary_confirmation.md +110 -0
- package/template_scaffold/docs/funnelsgrove/steps/upsell_offer.md +112 -0
- package/template_scaffold/docs/funnelsgrove/steps/value_prop_story.md +110 -0
- package/template_scaffold/docs/references/funnel-sdk-user-answers.md +5 -0
- package/template_scaffold/eslint.config.mjs +16 -0
- package/template_scaffold/funnel-agent-docs.test.ts +699 -0
- package/template_scaffold/funnel-docs.config.json +43 -0
- package/template_scaffold/funnel.config.json +5 -0
- package/template_scaffold/gitignore.template +5 -0
- package/template_scaffold/next-env.d.ts +6 -0
- package/template_scaffold/next.config.ts +53 -0
- package/template_scaffold/package-lock.json +7737 -0
- package/template_scaffold/package.json +37 -0
- package/template_scaffold/package.test.ts +23 -0
- package/template_scaffold/public/claimbee/bee.png +0 -0
- package/template_scaffold/public/claimbee/device-iphone.png +0 -0
- package/template_scaffold/public/claimbee/device-macbook.png +0 -0
- package/template_scaffold/public/claimbee/device-none.png +0 -0
- package/template_scaffold/public/claimbee/device-watch.png +0 -0
- package/template_scaffold/public/claimbee/glow.svg +3 -0
- package/template_scaffold/public/claimbee/steps-sprite-alt.png +0 -0
- package/template_scaffold/public/claimbee/steps-sprite-default.png +0 -0
- package/template_scaffold/public/claimbee/testimonial-avatar.png +0 -0
- package/template_scaffold/public/claimbee/testimonial-star.svg +3 -0
- package/template_scaffold/public/paywall/ai-claim-assistant.png +0 -0
- package/template_scaffold/public/paywall/claim-history.png +0 -0
- package/template_scaffold/public/paywall/clear-progress.png +0 -0
- package/template_scaffold/public/paywall/hero.png +0 -0
- package/template_scaffold/public/paywall/money-alerts.png +0 -0
- package/template_scaffold/public/paywall/money-back-badge.png +0 -0
- package/template_scaffold/public/paywall/paywall-image.png +0 -0
- package/template_scaffold/public/paywall/r1.png +0 -0
- package/template_scaffold/public/paywall/r2.png +0 -0
- package/template_scaffold/public/paywall/r3.png +0 -0
- package/template_scaffold/public/paywall/r4.png +0 -0
- package/template_scaffold/public/paywall/r5.png +0 -0
- package/template_scaffold/public/paywall/r6.png +0 -0
- package/template_scaffold/public/paywall/special-offer-gift.png +0 -0
- package/template_scaffold/public/please/bee.png +0 -0
- package/template_scaffold/public/please/device-iphone.png +0 -0
- package/template_scaffold/public/please/device-macbook.png +0 -0
- package/template_scaffold/public/please/device-none.png +0 -0
- package/template_scaffold/public/please/device-watch.png +0 -0
- package/template_scaffold/public/please/glow.svg +3 -0
- package/template_scaffold/public/please/steps-sprite-alt.png +0 -0
- package/template_scaffold/public/please/steps-sprite-default.png +0 -0
- package/template_scaffold/public/please/testimonial-avatar.png +0 -0
- package/template_scaffold/public/please/testimonial-star.svg +3 -0
- package/template_scaffold/public/upsell/upgrade-hero.png +0 -0
- package/template_scaffold/src/app/[stepId]/page.test.tsx +59 -0
- package/template_scaffold/src/app/[stepId]/page.tsx +62 -0
- package/template_scaffold/src/app/globals.css +49 -0
- package/template_scaffold/src/app/layout.test.ts +26 -0
- package/template_scaffold/src/app/layout.tsx +61 -0
- package/template_scaffold/src/app/page.tsx +8 -0
- package/template_scaffold/src/app/sdk/page.tsx +673 -0
- package/template_scaffold/src/app/subscription-dashboard/page.tsx +274 -0
- package/template_scaffold/src/assets/claimbee/bee.png +0 -0
- package/template_scaffold/src/assets/claimbee/device-iphone.png +0 -0
- package/template_scaffold/src/assets/claimbee/device-macbook.png +0 -0
- package/template_scaffold/src/assets/claimbee/device-none.png +0 -0
- package/template_scaffold/src/assets/claimbee/device-watch.png +0 -0
- package/template_scaffold/src/assets/claimbee/glow.svg +3 -0
- package/template_scaffold/src/assets/claimbee/steps-sprite-alt.png +0 -0
- package/template_scaffold/src/assets/claimbee/steps-sprite-default.png +0 -0
- package/template_scaffold/src/assets/claimbee/testimonial-avatar.png +0 -0
- package/template_scaffold/src/assets/claimbee/testimonial-star.svg +3 -0
- package/template_scaffold/src/components/FunnelEditorPanel.tsx +194 -0
- package/template_scaffold/src/components/FunnelFlow.test.tsx +17 -0
- package/template_scaffold/src/components/FunnelFlow.tsx +114 -0
- package/template_scaffold/src/components/FunnelStepImage.test.ts +15 -0
- package/template_scaffold/src/components/FunnelStepImage.tsx +28 -0
- package/template_scaffold/src/components/step/FunnelStepHeader.tsx +35 -0
- package/template_scaffold/src/config/billing.plans.test.ts +143 -0
- package/template_scaffold/src/config/billing.plans.ts +69 -0
- package/template_scaffold/src/config/billing.test.plans.ts +32 -0
- package/template_scaffold/src/config/experiments.generated.ts +4 -0
- package/template_scaffold/src/config/experiments.test.ts +12 -0
- package/template_scaffold/src/config/experiments.ts +9 -0
- package/template_scaffold/src/config/funnel.config.ts +12 -0
- package/template_scaffold/src/config/funnel.manifest.test.ts +166 -0
- package/template_scaffold/src/config/funnel.manifest.ts +139 -0
- package/template_scaffold/src/config/offer-sets.generated.ts +4 -0
- package/template_scaffold/src/contract/funnel-project.validation.test.ts +80 -0
- package/template_scaffold/src/contract/funnel-project.validation.ts +44 -0
- package/template_scaffold/src/contract/funnel-validator.vite.config.ts +11 -0
- package/template_scaffold/src/contract/golden/cancellation_offer.fixture.ts +29 -0
- package/template_scaffold/src/contract/golden/checkout.fixture.ts +37 -0
- package/template_scaffold/src/contract/golden/form_input.fixture.ts +28 -0
- package/template_scaffold/src/contract/golden/golden-fixtures.test.ts +190 -0
- package/template_scaffold/src/contract/golden/intro_hero.fixture.ts +27 -0
- package/template_scaffold/src/contract/golden/multi_select_choice.fixture.ts +37 -0
- package/template_scaffold/src/contract/golden/paywall_offer.fixture.ts +30 -0
- package/template_scaffold/src/contract/golden/progress_interstitial.fixture.ts +28 -0
- package/template_scaffold/src/contract/golden/purchase_completed.fixture.ts +33 -0
- package/template_scaffold/src/contract/golden/single_step_choice.fixture.ts +36 -0
- package/template_scaffold/src/contract/golden/single_step_choice_emoji.fixture.ts +36 -0
- package/template_scaffold/src/contract/golden/social_proof.fixture.ts +27 -0
- package/template_scaffold/src/contract/golden/subscription_handoff.fixture.ts +30 -0
- package/template_scaffold/src/contract/golden/subscription_management.fixture.ts +29 -0
- package/template_scaffold/src/contract/golden/summary_confirmation.fixture.ts +27 -0
- package/template_scaffold/src/contract/golden/upsell_offer.fixture.ts +29 -0
- package/template_scaffold/src/contract/golden/value_prop_story.fixture.ts +27 -0
- package/template_scaffold/src/contract/validate-funnel.cli.test.ts +180 -0
- package/template_scaffold/src/contract/validate-funnel.cli.ts +199 -0
- package/template_scaffold/src/runtime/checkout-runtime-config.test.ts +60 -0
- package/template_scaffold/src/runtime/checkout-runtime-config.ts +26 -0
- package/template_scaffold/src/runtime/funnel-runtime.test.ts +25 -0
- package/template_scaffold/src/runtime/funnel-runtime.ts +118 -0
- package/template_scaffold/src/runtime/step-content-context.test.ts +38 -0
- package/template_scaffold/src/runtime/step-content-context.ts +65 -0
- package/template_scaffold/src/runtime/step-registry.ts +66 -0
- package/template_scaffold/src/runtime/step-variable-values.ts +31 -0
- package/template_scaffold/src/runtime/use-funnel-flow-controller.integration.test.ts +203 -0
- package/template_scaffold/src/runtime/use-funnel-flow-controller.test.ts +76 -0
- package/template_scaffold/src/runtime/use-funnel-flow-controller.ts +53 -0
- package/template_scaffold/src/steps/content/email-capture.content.ts +29 -0
- package/template_scaffold/src/steps/content/manage-subscription.content.ts +62 -0
- package/template_scaffold/src/steps/content/paywall.content.ts +191 -0
- package/template_scaffold/src/steps/content/step-01.content.ts +23 -0
- package/template_scaffold/src/steps/content/step-02.content.ts +77 -0
- package/template_scaffold/src/steps/content/step-03.content.ts +40 -0
- package/template_scaffold/src/steps/content/step-04.content.ts +49 -0
- package/template_scaffold/src/steps/content/step-32-paywall.content.ts +352 -0
- package/template_scaffold/src/steps/content/subscription-started.content.ts +68 -0
- package/template_scaffold/src/steps/editor/email-capture.editor.ts +58 -0
- package/template_scaffold/src/steps/editor/manage-subscription.editor.ts +179 -0
- package/template_scaffold/src/steps/editor/paywall.editor.ts +232 -0
- package/template_scaffold/src/steps/editor/step-01.editor.ts +22 -0
- package/template_scaffold/src/steps/editor/step-02.editor.ts +41 -0
- package/template_scaffold/src/steps/editor/step-03.editor.ts +58 -0
- package/template_scaffold/src/steps/editor/step-04.editor.ts +98 -0
- package/template_scaffold/src/steps/editor/step-32-paywall.editor.ts +478 -0
- package/template_scaffold/src/steps/editor/subscription-started.editor.ts +131 -0
- package/template_scaffold/src/steps/index.ts +25 -0
- package/template_scaffold/src/steps/paywall-checkout-options.test.ts +104 -0
- package/template_scaffold/src/steps/paywall-checkout-options.ts +130 -0
- package/template_scaffold/src/steps/pricing/paywall-b.pricing.ts +12 -0
- package/template_scaffold/src/steps/pricing/paywall.pricing.ts +12 -0
- package/template_scaffold/src/steps/pricing/shared-plan-order.ts +17 -0
- package/template_scaffold/src/steps/pricing/upsell-form.pricing.ts +16 -0
- package/template_scaffold/src/steps/shared-header-contract.test.ts +27 -0
- package/template_scaffold/src/steps/step-01.test.ts +38 -0
- package/template_scaffold/src/steps/step-01.tsx +108 -0
- package/template_scaffold/src/steps/step-02.test.ts +43 -0
- package/template_scaffold/src/steps/step-02.tsx +140 -0
- package/template_scaffold/src/steps/step-03.test.ts +15 -0
- package/template_scaffold/src/steps/step-03.tsx +262 -0
- package/template_scaffold/src/steps/step-04.test.ts +32 -0
- package/template_scaffold/src/steps/step-04.tsx +673 -0
- package/template_scaffold/src/steps/step-31-email-capture.test.ts +22 -0
- package/template_scaffold/src/steps/step-31-email-capture.tsx +195 -0
- package/template_scaffold/src/steps/step-32-paywall.test.ts +770 -0
- package/template_scaffold/src/steps/step-32-paywall.tsx +2253 -0
- package/template_scaffold/src/steps/step-32b-paywall-b.tsx +35 -0
- package/template_scaffold/src/steps/step-33-subscription-started.test.ts +26 -0
- package/template_scaffold/src/steps/step-33-subscription-started.tsx +86 -0
- package/template_scaffold/src/steps/step-34-upsell-form.test.ts +27 -0
- package/template_scaffold/src/steps/step-35-manage-subscription.tsx +46 -0
- package/template_scaffold/src/steps/step-content.registry.ts +45 -0
- package/template_scaffold/src/steps/step-image-migration.test.ts +20 -0
- package/template_scaffold/src/steps/styles/index.css +2 -0
- package/template_scaffold/src/steps/styles/shared/final-flow-shared.css +55 -0
- package/template_scaffold/src/steps/styles/shared/funnel-base.css +543 -0
- package/template_scaffold/src/steps/styles/shared/info-shared.css +139 -0
- package/template_scaffold/src/steps/styles/shared/progress-shared.css +117 -0
- package/template_scaffold/src/steps/styles/shared/question-shared.css +76 -0
- package/template_scaffold/src/steps/styles/shared/responsive-container.css +176 -0
- package/template_scaffold/src/steps/types.ts +7 -0
- package/template_scaffold/src/steps/use-claimbee-step-content.ts +15 -0
- package/template_scaffold/src/theme/theme.ts +81 -0
- package/template_scaffold/tsconfig.json +38 -0
- package/template_scaffold/vitest.config.ts +32 -0
- package/template_validation/.funnelsgrove-contract-tools.json +19 -0
- package/template_validation/src/contract/funnel-project.validation.ts +44 -0
- package/template_validation/src/contract/funnel-validator.vite.config.ts +11 -0
- package/template_validation/src/contract/validate-funnel.cli.ts +199 -0
- package/template_docs/docs/ab-experiments.md +0 -55
- package/template_docs/docs/analytics.md +0 -65
- package/template_docs/docs/editing-flow.md +0 -125
- package/template_docs/docs/editing-step.md +0 -125
- package/template_docs/docs/editor-and-content.md +0 -58
- package/template_docs/docs/funnel-runtime-architecture.md +0 -125
- package/template_docs/docs/meta-pixel-conversions-api.md +0 -50
- package/template_docs/docs/payment-plans-and-discounts.md +0 -106
- package/template_docs/docs/publishing-and-versioning.md +0 -117
- package/template_docs/docs/qa-checklist.md +0 -80
- package/template_docs/docs/sdk-api-endpoints.md +0 -78
- package/template_docs/docs/step-ui-guidelines.md +0 -110
- package/template_docs/docs/theme.md +0 -35
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# `single_step_choice`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use when exactly one standard option completes the step on selection. Do not use for emoji-led choices, multi-select, or a separate form submission.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/single_step_choice -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `single_step_choice`
|
|
15
|
+
- Family: `choice`
|
|
16
|
+
- Description: Exactly one standard option is selected.
|
|
17
|
+
- Action owner: `step`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: _none_
|
|
21
|
+
- Allowed kinds: _None_
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `email-capture`, `checkout`, `subscription-management`, `subscription-handoff`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
- Cardinality: `one`
|
|
28
|
+
- Presentation: `standard`
|
|
29
|
+
- Completion: `selection`
|
|
30
|
+
- Allow empty config: `false`
|
|
31
|
+
|
|
32
|
+
#### Automatic lifecycle events
|
|
33
|
+
|
|
34
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
35
|
+
|
|
36
|
+
#### Approved capability owners
|
|
37
|
+
|
|
38
|
+
- `choice-write` must be owned by `useStepChoices`.
|
|
39
|
+
|
|
40
|
+
#### Reserved identities
|
|
41
|
+
|
|
42
|
+
_No reserved identity for this type._
|
|
43
|
+
|
|
44
|
+
#### Golden fixture source
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
48
|
+
|
|
49
|
+
const choice = { answerKey: 'routine' } as const;
|
|
50
|
+
|
|
51
|
+
const manifestStep = {
|
|
52
|
+
id: 'routine',
|
|
53
|
+
name: 'routine',
|
|
54
|
+
path: '/routine',
|
|
55
|
+
filePath: 'src/steps/step-routine.tsx',
|
|
56
|
+
componentKey: 'stepRoutine',
|
|
57
|
+
type: 'single_step_choice',
|
|
58
|
+
choice,
|
|
59
|
+
title: 'Choose a routine',
|
|
60
|
+
} as const satisfies FunnelManifestStep;
|
|
61
|
+
|
|
62
|
+
const componentMeta = {
|
|
63
|
+
id: 'routine',
|
|
64
|
+
name: 'routine',
|
|
65
|
+
type: 'single_step_choice',
|
|
66
|
+
choice,
|
|
67
|
+
figmaNodeId: 'golden:single-step-choice',
|
|
68
|
+
title: 'Choose a routine',
|
|
69
|
+
description: 'Select exactly one routine.',
|
|
70
|
+
} as const satisfies FunnelStepMeta;
|
|
71
|
+
|
|
72
|
+
export const goldenFixture = {
|
|
73
|
+
stepType: 'single_step_choice',
|
|
74
|
+
manifestStep,
|
|
75
|
+
componentMeta,
|
|
76
|
+
options: [
|
|
77
|
+
{ id: 'daily', label: 'Every day' },
|
|
78
|
+
{ id: 'weekdays', label: 'Weekdays' },
|
|
79
|
+
],
|
|
80
|
+
persistedAnswer: 'daily',
|
|
81
|
+
helper: 'useStepChoices',
|
|
82
|
+
} as const;
|
|
83
|
+
```
|
|
84
|
+
<!-- funnelsgrove:generated:end contract-v3/step/single_step_choice -->
|
|
85
|
+
|
|
86
|
+
## Interaction and persisted answer shape
|
|
87
|
+
|
|
88
|
+
Declare `choice.answerKey` in both metadata copies. Persist one stable option ID as a scalar string, never the label or an object.
|
|
89
|
+
|
|
90
|
+
## Automatic lifecycle events
|
|
91
|
+
|
|
92
|
+
`useStepChoices` coordinates the answer write with the controller-owned completion lifecycle. Preview keeps provider delivery suppressed.
|
|
93
|
+
|
|
94
|
+
## Required semantic conversions
|
|
95
|
+
|
|
96
|
+
None. Selecting an option is answer state plus automatic lifecycle completion.
|
|
97
|
+
|
|
98
|
+
## Approved shared helpers
|
|
99
|
+
|
|
100
|
+
Use `useStepChoices`; let it complete and route after the stable ID is persisted.
|
|
101
|
+
|
|
102
|
+
## MUST rules
|
|
103
|
+
|
|
104
|
+
- Give every option a stable ID that survives copy changes.
|
|
105
|
+
- Keep the manifest and component `choice.answerKey` identical.
|
|
106
|
+
|
|
107
|
+
## NEVER rules
|
|
108
|
+
|
|
109
|
+
- Never call answer SDK methods directly from the choice component.
|
|
110
|
+
- Never store a display label, index, or whole option object.
|
|
111
|
+
|
|
112
|
+
## Golden template or fixture
|
|
113
|
+
|
|
114
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `single_step_choice.fixture.ts`.
|
|
115
|
+
|
|
116
|
+
## Validation command
|
|
117
|
+
|
|
118
|
+
Run `fgrove validate`.
|
|
119
|
+
|
|
120
|
+
## Manual QA and completion criteria
|
|
121
|
+
|
|
122
|
+
Select every option once; confirm exactly one stable ID is saved and each selection completes/routes only once.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# `single_step_choice_emoji`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use when exactly one emoji-led option completes on selection. Do not use when emoji is merely decorative on a standard list or when multiple answers are allowed.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/single_step_choice_emoji -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `single_step_choice_emoji`
|
|
15
|
+
- Family: `choice`
|
|
16
|
+
- Description: Exactly one emoji-led option is selected.
|
|
17
|
+
- Action owner: `step`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: _none_
|
|
21
|
+
- Allowed kinds: _None_
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `email-capture`, `checkout`, `subscription-management`, `subscription-handoff`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
- Cardinality: `one`
|
|
28
|
+
- Presentation: `emoji`
|
|
29
|
+
- Completion: `selection`
|
|
30
|
+
- Allow empty config: `false`
|
|
31
|
+
|
|
32
|
+
#### Automatic lifecycle events
|
|
33
|
+
|
|
34
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
35
|
+
|
|
36
|
+
#### Approved capability owners
|
|
37
|
+
|
|
38
|
+
- `choice-write` must be owned by `useStepChoices`.
|
|
39
|
+
|
|
40
|
+
#### Reserved identities
|
|
41
|
+
|
|
42
|
+
_No reserved identity for this type._
|
|
43
|
+
|
|
44
|
+
#### Golden fixture source
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
48
|
+
|
|
49
|
+
const choice = { answerKey: 'goalFeeling' } as const;
|
|
50
|
+
|
|
51
|
+
const manifestStep = {
|
|
52
|
+
id: 'goal-feeling',
|
|
53
|
+
name: 'goal-feeling',
|
|
54
|
+
path: '/goal-feeling',
|
|
55
|
+
filePath: 'src/steps/step-goal-feeling.tsx',
|
|
56
|
+
componentKey: 'stepGoalFeeling',
|
|
57
|
+
type: 'single_step_choice_emoji',
|
|
58
|
+
choice,
|
|
59
|
+
title: 'How do you want to feel?',
|
|
60
|
+
} as const satisfies FunnelManifestStep;
|
|
61
|
+
|
|
62
|
+
const componentMeta = {
|
|
63
|
+
id: 'goal-feeling',
|
|
64
|
+
name: 'goal-feeling',
|
|
65
|
+
type: 'single_step_choice_emoji',
|
|
66
|
+
choice,
|
|
67
|
+
figmaNodeId: 'golden:single-step-choice-emoji',
|
|
68
|
+
title: 'How do you want to feel?',
|
|
69
|
+
description: 'Select exactly one emoji-led feeling.',
|
|
70
|
+
} as const satisfies FunnelStepMeta;
|
|
71
|
+
|
|
72
|
+
export const goldenFixture = {
|
|
73
|
+
stepType: 'single_step_choice_emoji',
|
|
74
|
+
manifestStep,
|
|
75
|
+
componentMeta,
|
|
76
|
+
options: [
|
|
77
|
+
{ id: 'focused', label: 'Focused', emoji: '🎯' },
|
|
78
|
+
{ id: 'calm', label: 'Calm', emoji: '🌿' },
|
|
79
|
+
],
|
|
80
|
+
persistedAnswer: 'focused',
|
|
81
|
+
helper: 'useStepChoices',
|
|
82
|
+
} as const;
|
|
83
|
+
```
|
|
84
|
+
<!-- funnelsgrove:generated:end contract-v3/step/single_step_choice_emoji -->
|
|
85
|
+
|
|
86
|
+
## Interaction and persisted answer shape
|
|
87
|
+
|
|
88
|
+
Declare `choice.answerKey`; every option includes an emoji and stable ID. Persist the selected ID as a scalar string.
|
|
89
|
+
|
|
90
|
+
## Automatic lifecycle events
|
|
91
|
+
|
|
92
|
+
`useStepChoices` coordinates persistence, controller completion, and manifest routing. Preview suppresses provider delivery.
|
|
93
|
+
|
|
94
|
+
## Required semantic conversions
|
|
95
|
+
|
|
96
|
+
None.
|
|
97
|
+
|
|
98
|
+
## Approved shared helpers
|
|
99
|
+
|
|
100
|
+
Use `useStepChoices` and the shared emoji-choice rendering pattern.
|
|
101
|
+
|
|
102
|
+
## MUST rules
|
|
103
|
+
|
|
104
|
+
- Provide meaningful emoji data for every option.
|
|
105
|
+
- Keep IDs stable when labels or emoji change.
|
|
106
|
+
|
|
107
|
+
## NEVER rules
|
|
108
|
+
|
|
109
|
+
- Never persist emoji or labels as the answer.
|
|
110
|
+
- Never bypass the choice helper.
|
|
111
|
+
|
|
112
|
+
## Golden template or fixture
|
|
113
|
+
|
|
114
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `single_step_choice_emoji.fixture.ts`.
|
|
115
|
+
|
|
116
|
+
## Validation command
|
|
117
|
+
|
|
118
|
+
Run `fgrove validate`.
|
|
119
|
+
|
|
120
|
+
## Manual QA and completion criteria
|
|
121
|
+
|
|
122
|
+
Confirm keyboard and pointer selection both save one stable ID, show the intended emoji, and advance once.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# `social_proof`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use for testimonials, reviews, credibility, or evidence. Do not use for general benefits, a survey, or an offer.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/social_proof -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `social_proof`
|
|
15
|
+
- Family: `content`
|
|
16
|
+
- Description: Testimonials, reviews, credibility, or evidence.
|
|
17
|
+
- Action owner: `shared-shell`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: _none_
|
|
21
|
+
- Allowed kinds: _None_
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `choice-write`, `email-capture`, `checkout`, `subscription-management`, `subscription-handoff`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
_Not a choice type._
|
|
28
|
+
|
|
29
|
+
#### Automatic lifecycle events
|
|
30
|
+
|
|
31
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
32
|
+
|
|
33
|
+
#### Approved capability owners
|
|
34
|
+
|
|
35
|
+
_No special capability is allowed._
|
|
36
|
+
|
|
37
|
+
#### Reserved identities
|
|
38
|
+
|
|
39
|
+
_No reserved identity for this type._
|
|
40
|
+
|
|
41
|
+
#### Golden fixture source
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
45
|
+
|
|
46
|
+
const manifestStep = {
|
|
47
|
+
id: 'member-results',
|
|
48
|
+
name: 'member-results',
|
|
49
|
+
path: '/member-results',
|
|
50
|
+
filePath: 'src/steps/step-member-results.tsx',
|
|
51
|
+
componentKey: 'stepMemberResults',
|
|
52
|
+
type: 'social_proof',
|
|
53
|
+
title: 'Member results',
|
|
54
|
+
} as const satisfies FunnelManifestStep;
|
|
55
|
+
|
|
56
|
+
const componentMeta = {
|
|
57
|
+
id: 'member-results',
|
|
58
|
+
name: 'member-results',
|
|
59
|
+
type: 'social_proof',
|
|
60
|
+
figmaNodeId: 'golden:social-proof',
|
|
61
|
+
title: 'Member results',
|
|
62
|
+
description: 'Show attributable testimonials and evidence.',
|
|
63
|
+
} as const satisfies FunnelStepMeta;
|
|
64
|
+
|
|
65
|
+
export const goldenFixture = {
|
|
66
|
+
stepType: 'social_proof',
|
|
67
|
+
manifestStep,
|
|
68
|
+
componentMeta,
|
|
69
|
+
actionOwner: 'shared-shell',
|
|
70
|
+
} as const;
|
|
71
|
+
```
|
|
72
|
+
<!-- funnelsgrove:generated:end contract-v3/step/social_proof -->
|
|
73
|
+
|
|
74
|
+
## Interaction and persisted answer shape
|
|
75
|
+
|
|
76
|
+
This content screen does not persist an answer. Standard progression belongs to the shared shell.
|
|
77
|
+
|
|
78
|
+
## Automatic lifecycle events
|
|
79
|
+
|
|
80
|
+
The controller owns lifecycle tracking and suppresses provider delivery in preview.
|
|
81
|
+
|
|
82
|
+
## Required semantic conversions
|
|
83
|
+
|
|
84
|
+
None.
|
|
85
|
+
|
|
86
|
+
## Approved shared helpers
|
|
87
|
+
|
|
88
|
+
Use shared content/image components and the shared action bar.
|
|
89
|
+
|
|
90
|
+
## MUST rules
|
|
91
|
+
|
|
92
|
+
- Keep proof content attributable and builder-editable where required.
|
|
93
|
+
- Keep metadata parity.
|
|
94
|
+
|
|
95
|
+
## NEVER rules
|
|
96
|
+
|
|
97
|
+
- Never turn proof interactions into invented conversion events.
|
|
98
|
+
- Never call providers directly.
|
|
99
|
+
|
|
100
|
+
## Golden template or fixture
|
|
101
|
+
|
|
102
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `social_proof.fixture.ts`.
|
|
103
|
+
|
|
104
|
+
## Validation command
|
|
105
|
+
|
|
106
|
+
Run `fgrove validate`.
|
|
107
|
+
|
|
108
|
+
## Manual QA and completion criteria
|
|
109
|
+
|
|
110
|
+
Confirm all proof content and assets render accessibly at supported breakpoints and Continue follows manifest routing.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# `subscription_handoff`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use for a non-terminal app, store, or deep-link handoff. Do not use for the canonical post-purchase registration-completion terminal.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/subscription_handoff -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `subscription_handoff`
|
|
15
|
+
- Family: `commerce`
|
|
16
|
+
- Description: A non-terminal app, store, or deep-link handoff.
|
|
17
|
+
- Action owner: `step`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: `subscription-handoff`
|
|
21
|
+
- Allowed kinds: `subscription-handoff`
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `choice-write`, `email-capture`, `checkout`, `subscription-management`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
_Not a choice type._
|
|
28
|
+
|
|
29
|
+
#### Automatic lifecycle events
|
|
30
|
+
|
|
31
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
32
|
+
|
|
33
|
+
#### Approved capability owners
|
|
34
|
+
|
|
35
|
+
- `subscription-handoff` must be owned by `runtime-handoff-helper`.
|
|
36
|
+
|
|
37
|
+
#### Reserved identities
|
|
38
|
+
|
|
39
|
+
_No reserved identity for this type._
|
|
40
|
+
|
|
41
|
+
#### Golden fixture source
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
45
|
+
|
|
46
|
+
const manifestStep = {
|
|
47
|
+
id: 'open-app',
|
|
48
|
+
name: 'open-app',
|
|
49
|
+
path: '/open-app',
|
|
50
|
+
filePath: 'src/steps/step-open-app.tsx',
|
|
51
|
+
componentKey: 'stepOpenApp',
|
|
52
|
+
type: 'subscription_handoff',
|
|
53
|
+
kind: 'subscription-handoff',
|
|
54
|
+
title: 'Continue in the app',
|
|
55
|
+
} as const satisfies FunnelManifestStep;
|
|
56
|
+
|
|
57
|
+
const componentMeta = {
|
|
58
|
+
id: 'open-app',
|
|
59
|
+
name: 'open-app',
|
|
60
|
+
type: 'subscription_handoff',
|
|
61
|
+
kind: 'subscription-handoff',
|
|
62
|
+
figmaNodeId: 'golden:subscription-handoff',
|
|
63
|
+
title: 'Continue in the app',
|
|
64
|
+
description: 'Continue through a non-terminal app handoff.',
|
|
65
|
+
} as const satisfies FunnelStepMeta;
|
|
66
|
+
|
|
67
|
+
export const goldenFixture = {
|
|
68
|
+
stepType: 'subscription_handoff',
|
|
69
|
+
manifestStep,
|
|
70
|
+
componentMeta,
|
|
71
|
+
helper: 'runtime handoff helper',
|
|
72
|
+
isRegistrationCompletion: false,
|
|
73
|
+
} as const;
|
|
74
|
+
```
|
|
75
|
+
<!-- funnelsgrove:generated:end contract-v3/step/subscription_handoff -->
|
|
76
|
+
|
|
77
|
+
## Interaction and persisted answer shape
|
|
78
|
+
|
|
79
|
+
Build the outbound destination through the runtime handoff helper. This screen persists no choice answer.
|
|
80
|
+
|
|
81
|
+
## Automatic lifecycle events
|
|
82
|
+
|
|
83
|
+
Leaving through the handoff is not funnel registration completion. The controller owns the step outcome.
|
|
84
|
+
|
|
85
|
+
## Required semantic conversions
|
|
86
|
+
|
|
87
|
+
None. This non-terminal handoff must not emit funnel or registration completion.
|
|
88
|
+
|
|
89
|
+
## Approved shared helpers
|
|
90
|
+
|
|
91
|
+
Use the runtime subscription-handoff helper with the safe default `SubscriptionHandoffScreen` completion mode of `step`; never opt a non-terminal handoff into `completionMode="funnel"`.
|
|
92
|
+
|
|
93
|
+
## MUST rules
|
|
94
|
+
|
|
95
|
+
- Treat the destination as configuration/runtime data.
|
|
96
|
+
- Keep non-terminal semantics explicit.
|
|
97
|
+
|
|
98
|
+
## NEVER rules
|
|
99
|
+
|
|
100
|
+
- Never emit trusted `purchase_completed`, `registration_completed`, or terminal `funnel_completed`.
|
|
101
|
+
- Never build an unvalidated deep link by string concatenation.
|
|
102
|
+
|
|
103
|
+
## Golden template or fixture
|
|
104
|
+
|
|
105
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `subscription_handoff.fixture.ts`.
|
|
106
|
+
|
|
107
|
+
## Validation command
|
|
108
|
+
|
|
109
|
+
Run `fgrove validate`.
|
|
110
|
+
|
|
111
|
+
## Manual QA and completion criteria
|
|
112
|
+
|
|
113
|
+
Test installed/uninstalled destinations, query propagation, return behavior, and absence of completion conversions.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# `subscription_management`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use to inspect or manage an existing subscription. Do not use for an acquisition paywall, cancellation save offer, or app handoff.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/subscription_management -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `subscription_management`
|
|
15
|
+
- Family: `commerce`
|
|
16
|
+
- Description: A screen for managing or inspecting an existing subscription.
|
|
17
|
+
- Action owner: `step`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: `manage-subscription`
|
|
21
|
+
- Allowed kinds: `manage-subscription`
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `choice-write`, `email-capture`, `checkout`, `subscription-handoff`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
_Not a choice type._
|
|
28
|
+
|
|
29
|
+
#### Automatic lifecycle events
|
|
30
|
+
|
|
31
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
32
|
+
|
|
33
|
+
#### Approved capability owners
|
|
34
|
+
|
|
35
|
+
- `subscription-management` must be owned by `runtime-subscription-helpers`.
|
|
36
|
+
|
|
37
|
+
#### Reserved identities
|
|
38
|
+
|
|
39
|
+
- `manage-subscription`: id=`manage-subscription`, name=`manage-subscription`; type=`subscription_management`; kind=`manage-subscription`; unique=`true`
|
|
40
|
+
|
|
41
|
+
#### Golden fixture source
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
45
|
+
|
|
46
|
+
const manifestStep = {
|
|
47
|
+
id: 'manage-subscription',
|
|
48
|
+
name: 'manage-subscription',
|
|
49
|
+
path: '/manage-subscription',
|
|
50
|
+
filePath: 'src/steps/step-manage-subscription.tsx',
|
|
51
|
+
componentKey: 'stepManageSubscription',
|
|
52
|
+
type: 'subscription_management',
|
|
53
|
+
kind: 'manage-subscription',
|
|
54
|
+
title: 'Manage subscription',
|
|
55
|
+
} as const satisfies FunnelManifestStep;
|
|
56
|
+
|
|
57
|
+
const componentMeta = {
|
|
58
|
+
id: 'manage-subscription',
|
|
59
|
+
name: 'manage-subscription',
|
|
60
|
+
type: 'subscription_management',
|
|
61
|
+
kind: 'manage-subscription',
|
|
62
|
+
figmaNodeId: 'golden:subscription-management',
|
|
63
|
+
title: 'Manage subscription',
|
|
64
|
+
description: 'Inspect and manage an existing subscription.',
|
|
65
|
+
} as const satisfies FunnelStepMeta;
|
|
66
|
+
|
|
67
|
+
export const goldenFixture = {
|
|
68
|
+
stepType: 'subscription_management',
|
|
69
|
+
manifestStep,
|
|
70
|
+
componentMeta,
|
|
71
|
+
helper: 'runtime subscription helpers',
|
|
72
|
+
} as const;
|
|
73
|
+
```
|
|
74
|
+
<!-- funnelsgrove:generated:end contract-v3/step/subscription_management -->
|
|
75
|
+
|
|
76
|
+
## Interaction and persisted answer shape
|
|
77
|
+
|
|
78
|
+
Load and mutate subscription state through runtime subscription helpers. This screen does not persist funnel choice answers.
|
|
79
|
+
|
|
80
|
+
## Automatic lifecycle events
|
|
81
|
+
|
|
82
|
+
The controller owns step lifecycle; subscription APIs own account-state changes.
|
|
83
|
+
|
|
84
|
+
## Required semantic conversions
|
|
85
|
+
|
|
86
|
+
None unless a separately defined server-owned subscription event exists.
|
|
87
|
+
|
|
88
|
+
## Approved shared helpers
|
|
89
|
+
|
|
90
|
+
Use runtime subscription-management helpers and manifest routing.
|
|
91
|
+
|
|
92
|
+
## MUST rules
|
|
93
|
+
|
|
94
|
+
- Preserve the reserved management identity.
|
|
95
|
+
- Refresh visible state after a successful management action.
|
|
96
|
+
|
|
97
|
+
## NEVER rules
|
|
98
|
+
|
|
99
|
+
- Never expose secrets or call a provider with browser credentials.
|
|
100
|
+
- Never relabel this screen as a paywall.
|
|
101
|
+
|
|
102
|
+
## Golden template or fixture
|
|
103
|
+
|
|
104
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `subscription_management.fixture.ts`.
|
|
105
|
+
|
|
106
|
+
## Validation command
|
|
107
|
+
|
|
108
|
+
Run `fgrove validate`.
|
|
109
|
+
|
|
110
|
+
## Manual QA and completion criteria
|
|
111
|
+
|
|
112
|
+
Test loading, empty state, action success/failure, refresh, back/exit, and exact reserved metadata.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# `summary_confirmation`
|
|
2
|
+
|
|
3
|
+
## Use when / do not use when
|
|
4
|
+
|
|
5
|
+
Use for a summary, review, or confirmation before the next action. Do not use for choice collection, a progress reveal, or an offer.
|
|
6
|
+
|
|
7
|
+
## Exact metadata contract
|
|
8
|
+
|
|
9
|
+
<!-- funnelsgrove:generated:start contract-v3/step/summary_confirmation -->
|
|
10
|
+
### Generated contract facts — do not edit
|
|
11
|
+
|
|
12
|
+
- Step contract version: `3`
|
|
13
|
+
- Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf`
|
|
14
|
+
- Type: `summary_confirmation`
|
|
15
|
+
- Family: `content`
|
|
16
|
+
- Description: A summary, review, or confirmation before the next action.
|
|
17
|
+
- Action owner: `either`
|
|
18
|
+
- Analytics role: _none_
|
|
19
|
+
- Terminal: `false`
|
|
20
|
+
- Required kind: _none_
|
|
21
|
+
- Allowed kinds: _None_
|
|
22
|
+
- Allowed semantic events: _None_
|
|
23
|
+
- Forbidden capabilities: `choice-write`, `email-capture`, `checkout`, `subscription-management`, `subscription-handoff`, `hardcoded-navigation`, `provider-direct-analytics`, `browser-registration-completed`
|
|
24
|
+
|
|
25
|
+
#### Choice contract
|
|
26
|
+
|
|
27
|
+
_Not a choice type._
|
|
28
|
+
|
|
29
|
+
#### Automatic lifecycle events
|
|
30
|
+
|
|
31
|
+
`first_step_clicked`, `first_step_viewed`, `funnel_started`, `step_completed`, `step_exited`, `step_started`
|
|
32
|
+
|
|
33
|
+
#### Approved capability owners
|
|
34
|
+
|
|
35
|
+
_No special capability is allowed._
|
|
36
|
+
|
|
37
|
+
#### Reserved identities
|
|
38
|
+
|
|
39
|
+
_No reserved identity for this type._
|
|
40
|
+
|
|
41
|
+
#### Golden fixture source
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import type { FunnelManifestStep, FunnelStepMeta } from '@funnelsgrove/runtime';
|
|
45
|
+
|
|
46
|
+
const manifestStep = {
|
|
47
|
+
id: 'review-plan',
|
|
48
|
+
name: 'review-plan',
|
|
49
|
+
path: '/review-plan',
|
|
50
|
+
filePath: 'src/steps/step-review-plan.tsx',
|
|
51
|
+
componentKey: 'stepReviewPlan',
|
|
52
|
+
type: 'summary_confirmation',
|
|
53
|
+
title: 'Review your plan',
|
|
54
|
+
} as const satisfies FunnelManifestStep;
|
|
55
|
+
|
|
56
|
+
const componentMeta = {
|
|
57
|
+
id: 'review-plan',
|
|
58
|
+
name: 'review-plan',
|
|
59
|
+
type: 'summary_confirmation',
|
|
60
|
+
figmaNodeId: 'golden:summary-confirmation',
|
|
61
|
+
title: 'Review your plan',
|
|
62
|
+
description: 'Review existing answers before continuing.',
|
|
63
|
+
} as const satisfies FunnelStepMeta;
|
|
64
|
+
|
|
65
|
+
export const goldenFixture = {
|
|
66
|
+
stepType: 'summary_confirmation',
|
|
67
|
+
manifestStep,
|
|
68
|
+
componentMeta,
|
|
69
|
+
actionOwner: 'either',
|
|
70
|
+
} as const;
|
|
71
|
+
```
|
|
72
|
+
<!-- funnelsgrove:generated:end contract-v3/step/summary_confirmation -->
|
|
73
|
+
|
|
74
|
+
## Interaction and persisted answer shape
|
|
75
|
+
|
|
76
|
+
Read existing answers through runtime state. Only edit an answer through its owning input/choice flow.
|
|
77
|
+
|
|
78
|
+
## Automatic lifecycle events
|
|
79
|
+
|
|
80
|
+
The controller owns completion and exit. Preview suppresses provider delivery.
|
|
81
|
+
|
|
82
|
+
## Required semantic conversions
|
|
83
|
+
|
|
84
|
+
None.
|
|
85
|
+
|
|
86
|
+
## Approved shared helpers
|
|
87
|
+
|
|
88
|
+
Use runtime answer readers, shared action UI, and manifest routing.
|
|
89
|
+
|
|
90
|
+
## MUST rules
|
|
91
|
+
|
|
92
|
+
- Render stable answer meaning, not internal object dumps.
|
|
93
|
+
- Keep confirmation and edit routes manifest-owned.
|
|
94
|
+
|
|
95
|
+
## NEVER rules
|
|
96
|
+
|
|
97
|
+
- Never invent a completion conversion for viewing a summary.
|
|
98
|
+
- Never mutate answer storage directly.
|
|
99
|
+
|
|
100
|
+
## Golden template or fixture
|
|
101
|
+
|
|
102
|
+
See the [embedded canonical fixture](#golden-fixture-source) generated from `summary_confirmation.fixture.ts`.
|
|
103
|
+
|
|
104
|
+
## Validation command
|
|
105
|
+
|
|
106
|
+
Run `fgrove validate`.
|
|
107
|
+
|
|
108
|
+
## Manual QA and completion criteria
|
|
109
|
+
|
|
110
|
+
Confirm empty/populated answers, edit-return behavior, accessibility, and exactly-once completion through the controller.
|