@explorer02/cfm-survey-sdk 0.2.3 → 0.2.4
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/dist/cli/index.js +140 -33
- package/dist/cli/index.mjs +140 -33
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -1
- package/postinstall.js +8 -5
- package/templates/AGENT.md +60 -19
- package/templates/deploy-wizard-to-s3.sh +52 -0
- package/templates/docs/00-integration/agent-execution-flow.md +281 -0
- package/templates/docs/00-integration/agent-operating-contract.md +260 -0
- package/templates/docs/00-integration/apply-ui-config.md +365 -0
- package/templates/docs/00-integration/canonical-survey-fixtures.md +94 -0
- package/templates/docs/00-integration/client-integration-guide.md +9 -7
- package/templates/docs/00-integration/client-lib-folder.md +115 -0
- package/templates/docs/00-integration/component-checklist.md +88 -62
- package/templates/docs/00-integration/constraints.md +13 -5
- package/templates/docs/00-integration/custom-field-logic-and-navigation.md +56 -0
- package/templates/docs/00-integration/progress.md +4 -2
- package/templates/docs/00-integration/setup.md +12 -0
- package/templates/docs/00-integration/ui-customization-wizard.md +144 -0
- package/templates/docs/00-integration/useSurveySDK.md +35 -1
- package/templates/docs/00-integration/wizard-api.md +134 -0
- package/templates/docs/00-integration/wizard-config-handoff.md +246 -0
- package/templates/docs/00-integration/wizard-preview-build-guide.md +400 -0
- package/templates/docs/00-integration/wizard-question-type-styling.md +195 -0
- package/templates/docs/01-components/01-survey-page.md +18 -8
- package/templates/docs/01-components/02-question.md +2 -2
- package/templates/docs/01-components/03-rating-scale.md +12 -18
- package/templates/docs/01-components/05-csat-matrix-scale.md +18 -26
- package/templates/docs/01-components/06-likert-matrix-scale.md +19 -39
- package/templates/docs/01-components/07-slider-matrix-scale.md +48 -33
- package/templates/docs/01-components/09-custom-slider-track.md +15 -25
- package/templates/docs/01-components/10-header-footer.md +23 -4
- package/templates/docs/01-components/11-progress-bar.md +14 -6
- package/templates/docs/01-components/19-survey-sticky-chrome.md +79 -0
- package/templates/docs/01-components/README.md +2 -2
- package/templates/docs/02-reference/question-types/10-slider-matrix.md +38 -26
- package/templates/docs/02-reference/routing-table.md +1 -0
- package/templates/docs/02-reference/value-derivation.md +1 -1
- package/templates/docs/03-ui-specs/00-question-shell.md +10 -0
- package/templates/docs/03-ui-specs/01-rating.md +18 -0
- package/templates/docs/03-ui-specs/02-radio.md +16 -1
- package/templates/docs/03-ui-specs/03-text.md +12 -1
- package/templates/docs/03-ui-specs/04-csat.md +84 -50
- package/templates/docs/03-ui-specs/06-slider.md +3 -1
- package/templates/docs/03-ui-specs/07-matrix-cfm.md +71 -48
- package/templates/docs/03-ui-specs/08-matrix-csat-rating.md +48 -18
- package/templates/docs/03-ui-specs/09-slider-matrix.md +59 -32
- package/templates/docs/03-ui-specs/10-file-upload.md +11 -0
- package/templates/docs/03-ui-specs/11-text-and-media.md +4 -0
- package/templates/docs/03-ui-specs/12-survey-chrome.md +54 -5
- package/templates/docs/03-ui-specs/13-heatmap.md +12 -1
- package/templates/docs/03-ui-specs/14-rank-order.md +11 -0
- package/templates/docs/03-ui-specs/README.md +4 -2
- package/templates/docs/03-ui-specs/shared/matrix-dropdown.md +1 -1
- package/templates/docs/MANIFEST.json +162 -6
- package/templates/docs/index.md +116 -117
- package/templates/docs/templates/CsatMatrixScale.tsx +637 -0
- package/templates/docs/templates/FileUploadScale.tsx +262 -0
- package/templates/docs/templates/HeatmapScale.tsx +114 -0
- package/templates/docs/templates/LikertMatrixScale.tsx +414 -0
- package/templates/docs/templates/Question.tsx +3 -0
- package/templates/docs/templates/RatingScale.tsx +129 -0
- package/templates/docs/templates/SliderMatrixScale.tsx +248 -0
- package/templates/docs/templates/SurveyStickyChrome.tsx +24 -0
- package/templates/docs/templates/customFieldValues.ts +36 -0
- package/templates/docs/templates/implementation_plan.md +56 -9
- package/templates/docs/templates/labelStyles.ts +33 -0
- package/templates/docs/templates/selectionStyles.ts +100 -0
- package/templates/docs/templates/surveyUiIcons.tsx +11 -0
- package/templates/docs/templates/surveyUiScaleUtils.ts +51 -0
- package/templates/docs/templates/verify-agent-build.sh +119 -0
- package/templates/preview-harness/preview-bridge.inline.js +201 -0
- package/templates/preview-harness/previewPages.js +108 -0
- package/templates/preview-harness/previewPages.ts +298 -0
- package/templates/preview-harness/vite-app/src/PreviewConfigContext.tsx +67 -0
- package/templates/preview-harness/vite-app/src/QuestionPreview.tsx +122 -0
- package/templates/preview-harness/vite-app/src/SurveyPagePreview.tsx +75 -0
- package/templates/preview-harness/vite-app/src/fixtures/questions.ts +311 -0
- package/templates/preview-harness/vite-app/src/globals.css +16 -0
- package/templates/preview-harness/vite-app/src/mount.tsx +9 -0
- package/templates/preview-harness/vite-app/src/preview-live-overrides.css +101 -0
- package/templates/preview-harness/vite-app/stubs/next-dynamic.tsx +25 -0
- package/templates/preview-harness/vite-app/stubs/next-image.tsx +29 -0
- package/templates/previewBridge.ts +153 -0
- package/templates/survey-theme.css +295 -0
- package/templates/survey-ui-config.schema.json +213 -0
- package/templates/wizard-dist/assets/PreviewMock-DgHfrVeb.js +1 -0
- package/templates/wizard-dist/assets/TypePanel-CFVC3Ptn.js +1 -0
- package/templates/wizard-dist/assets/index-BhWM50Yu.css +1 -0
- package/templates/wizard-dist/assets/index-DYK3X1e5.js +34 -0
- package/templates/wizard-dist/assets/vendor-BwkXDkd3.js +17 -0
- package/templates/wizard-dist/index.html +20 -0
- package/templates/wizard.html +13 -1129
package/templates/docs/index.md
CHANGED
|
@@ -4,173 +4,172 @@
|
|
|
4
4
|
|
|
5
5
|
Master guide for AI coding agents. Machine-readable index: `MANIFEST.json`.
|
|
6
6
|
|
|
7
|
+
**Authoritative execution order:** [`00-integration/agent-operating-contract.md`](00-integration/agent-operating-contract.md) (read **first**) → [`agent-execution-flow.md`](00-integration/agent-execution-flow.md) → this file.
|
|
8
|
+
|
|
7
9
|
**Installed package path:** `node_modules/@explorer02/cfm-survey-sdk/templates/docs/` (docs ship inside `templates/` — no postinstall copy needed).
|
|
8
10
|
|
|
11
|
+
## Anti-hallucination (agents)
|
|
12
|
+
|
|
13
|
+
Client-side coding agents **must not guess** SDK behavior. Before any code:
|
|
14
|
+
|
|
15
|
+
1. Read [`agent-operating-contract.md`](00-integration/agent-operating-contract.md) — source hierarchy, phase gates, hallucination blocklist, doc routing table
|
|
16
|
+
2. Read [`agent-execution-flow.md`](00-integration/agent-execution-flow.md) — pipeline and client questions
|
|
17
|
+
3. For each fetched `question.type`, read MANIFEST `blueprint` + `reference` + `uiSpec` **before** implementing that type
|
|
18
|
+
4. Copy from `docs/templates/` — do not rewrite dispatchers or scales from memory
|
|
19
|
+
5. Run `verify-agent-build.sh` before claiming the build is done
|
|
20
|
+
|
|
21
|
+
**Prime directive:** If it is not in these docs or templates, do not implement it.
|
|
22
|
+
|
|
9
23
|
## Documentation Layout
|
|
10
24
|
|
|
11
25
|
```
|
|
12
|
-
templates/docs/
|
|
13
|
-
|
|
14
|
-
├──
|
|
15
|
-
├──
|
|
16
|
-
├──
|
|
17
|
-
├──
|
|
18
|
-
├──
|
|
19
|
-
├──
|
|
26
|
+
templates/docs/
|
|
27
|
+
├── index.md ← YOU ARE HERE
|
|
28
|
+
├── MANIFEST.json ← Phase + question-type routing
|
|
29
|
+
├── 00-integration/
|
|
30
|
+
│ ├── agent-operating-contract.md ← Anti-hallucination — read FIRST
|
|
31
|
+
│ ├── agent-execution-flow.md ← Pipeline, client questions, wizard-ready build
|
|
32
|
+
│ ├── wizard-preview-build-guide.md
|
|
33
|
+
│ ├── wizard-question-type-styling.md
|
|
34
|
+
│ └── …
|
|
35
|
+
├── 01-components/ ← Wiring blueprints (per type from MANIFEST)
|
|
36
|
+
├── 02-reference/ ← Data shapes, routing, config fields
|
|
37
|
+
├── 03-ui-specs/ ← UI anatomy + wizard token sections
|
|
20
38
|
└── templates/
|
|
21
|
-
├──
|
|
22
|
-
├──
|
|
23
|
-
├──
|
|
24
|
-
├──
|
|
25
|
-
|
|
26
|
-
└── Question.tsx ← Canonical dispatcher (copy before building)
|
|
39
|
+
├── Question.tsx ← Canonical dispatcher (copy first)
|
|
40
|
+
├── selectionStyles.ts ← Wizard selection colors (copy to src/lib/surveyUi/)
|
|
41
|
+
├── labelStyles.ts ← Matrix/slider label items
|
|
42
|
+
├── survey-theme.css ← Full --cfm-* defaults
|
|
43
|
+
└── implementation_plan.md
|
|
27
44
|
```
|
|
28
45
|
|
|
29
|
-
**Import rule:** Use whatever package name appears in
|
|
46
|
+
**Import rule:** Use whatever package name appears in `package.json` (`@explorer02/cfm-survey-sdk` or `@repo/sdk`).
|
|
30
47
|
|
|
31
48
|
## Do Not Read
|
|
32
49
|
|
|
33
50
|
- Internal SDK mapper/source paths (`packages/sdk/src/**` or `node_modules/.../src/**`)
|
|
34
|
-
-
|
|
35
|
-
-
|
|
51
|
+
- Legacy `survey-config.json` or pre-build setup wizard
|
|
52
|
+
- `apps/client` as implementation source — it is a reference snapshot only; agents build from `docs/templates/` + these docs
|
|
36
53
|
|
|
37
54
|
---
|
|
38
55
|
|
|
39
|
-
## Client
|
|
56
|
+
## Client inputs (4) — when to ask
|
|
40
57
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
| # | Phase | Agent question | Doc |
|
|
59
|
+
|---|-------|----------------|-----|
|
|
60
|
+
| 1 | Start | *(Client prompt — usually provided)* | Extract branding → `implementation_plan.md` |
|
|
61
|
+
| 2 | Phase 2 | *"Please provide your survey instance ID (JWT token)."* | `useSurveySDK.md` |
|
|
62
|
+
| 3 | Phase 6 | *"Your survey is running locally. Would you like to customize the UI through the web wizard?"* | `ui-customization-wizard.md` |
|
|
63
|
+
| 4 | Phase 7 | *"Your survey is built and verified. Ready to deploy to production?"* | `aws-deploy.md` / deploy CLI |
|
|
44
64
|
|
|
45
|
-
**Branding
|
|
65
|
+
**Branding defaults from INPUT 1.** Wizard (INPUT 3) is optional — but Phase 5 build must still be **wizard-ready**.
|
|
46
66
|
|
|
47
67
|
---
|
|
48
68
|
|
|
49
|
-
## Execution
|
|
50
|
-
|
|
51
|
-
### PHASE 0: ORIENT
|
|
69
|
+
## Execution pipeline (summary)
|
|
52
70
|
|
|
53
|
-
-
|
|
54
|
-
- **Monorepo:** `packages/sdk/templates/AGENT.md`
|
|
55
|
-
- **Installed npm:** `node_modules/@explorer02/cfm-survey-sdk/templates/AGENT.md`
|
|
56
|
-
- Detect framework: read `package.json` — Next.js / Vite / CRA (see `00-integration/setup.md`)
|
|
57
|
-
- Extract branding and layout from client prompt
|
|
58
|
-
- For existing apps: read project structure; do not blindly scaffold
|
|
71
|
+
Full step-by-step: [`agent-execution-flow.md`](00-integration/agent-execution-flow.md).
|
|
59
72
|
|
|
60
|
-
|
|
73
|
+
| Phase | Goal | Key reads |
|
|
74
|
+
|-------|------|-----------|
|
|
75
|
+
| **0** Orient | Framework + branding | `index.md`, `AGENT.md`, `agent-execution-flow.md`, `MANIFEST.json` |
|
|
76
|
+
| **1** Scaffold | Install SDK | `setup.md` |
|
|
77
|
+
| **2** Instance ID | Get JWT | `useSurveySDK.md` — **ask client** |
|
|
78
|
+
| **3** SDK contract | Hook + logic | `client-integration-guide.md`, `question-type-sdk-matrix.md`, logic docs |
|
|
79
|
+
| **4** Plan | Inventory + copy dispatcher | `component-checklist.md`, per-type MANIFEST docs, `implementation_plan.md` |
|
|
80
|
+
| **5** Build | Wizard-ready UI | `constraints.md`, `wizard-preview-build-guide.md`, `wizard-question-type-styling.md`, `03-ui-specs/*` |
|
|
81
|
+
| **6** Verify | Build + dev server | `verify-agent-build.sh` — **ask wizard** |
|
|
82
|
+
| **6b** Wizard | Optional customize | `customize-ui` — only if client said yes |
|
|
83
|
+
| **6c** Apply | Sync final config | `apply-ui-config.md` |
|
|
84
|
+
| **7** Deploy | Production | **ask deploy** — `aws-deploy.md` or Vercel |
|
|
61
85
|
|
|
62
|
-
|
|
86
|
+
**Auto-proceed:** Phase 4 → 5 and Phase 5 → 6 without waiting for approval.
|
|
63
87
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
### PHASE 2: INSTANCE ID (INPUT 2)
|
|
88
|
+
---
|
|
67
89
|
|
|
68
|
-
|
|
90
|
+
### PHASE 5 — Build (wizard-ready, required artifacts)
|
|
69
91
|
|
|
70
|
-
|
|
92
|
+
Every agent build includes these even if the client later skips the wizard:
|
|
71
93
|
|
|
72
|
-
|
|
94
|
+
| Artifact | Source | Destination |
|
|
95
|
+
|----------|--------|-------------|
|
|
96
|
+
| Theme CSS | `templates/survey-theme.css` | `src/styles/survey-theme.css` |
|
|
97
|
+
| Selection helpers | `templates/selectionStyles.ts` | `src/lib/surveyUi/selectionStyles.ts` |
|
|
98
|
+
| Label helpers | `templates/labelStyles.ts` | `src/lib/surveyUi/labelStyles.ts` |
|
|
99
|
+
| Preview bridge | `templates/previewBridge.ts` | `src/lib/previewBridge.ts` |
|
|
100
|
+
| Dispatcher | `templates/Question.tsx` | `src/components/Question.tsx` |
|
|
101
|
+
| Scale components | `templates/*Scale*.tsx` etc. | `src/components/` per inventory |
|
|
102
|
+
| Draft config | agent-written | `./survey-ui-config.json` |
|
|
73
103
|
|
|
74
|
-
|
|
104
|
+
**Chrome:** `data-cfm-logo` / `data-cfm-logo-text`, `data-cfm-company`, `data-cfm-btn-next`, `data-cfm-btn-back`, `data-cfm-survey-title`, `data-cfm-thank-you` — see `wizard-preview-build-guide.md`.
|
|
75
105
|
|
|
76
|
-
|
|
106
|
+
**Selection pattern:** focus ring = outer border + inner dot; cell selected = annulus fill — see `wizard-question-type-styling.md`.
|
|
77
107
|
|
|
78
|
-
|
|
108
|
+
**Forbidden:** stub branches, `subType` routing, changing `onAction` payloads, hardcoded hex for wizard-controlled tokens.
|
|
79
109
|
|
|
80
|
-
|
|
110
|
+
Copy scale templates: `SliderMatrixScale`, `LikertMatrixScale`, `CsatMatrixScale`, `RatingScale`, `FileUploadScale`, `HeatmapScale`, `RankOrderScale`, `MatrixDropdown`, `CustomSliderTrack`, `surveyUiIcons`, `surveyUiScaleUtils`, `heatmapCoords`, `customFieldValues` (when needed).
|
|
81
111
|
|
|
82
|
-
|
|
83
|
-
2. Write inventory to `implementation_plan.md` §3b (validate against `templates/survey-inventory.schema.json`)
|
|
84
|
-
3. Read **always**: `component-checklist.md`, `00-integration/question-type-sdk-matrix.md`, `03-ui-specs/00-question-shell.md`, `03-ui-specs/12-survey-chrome.md`, `01-components/01-survey-page.md`, `01-components/02-question.md`, `01-components/14-intro-page.md`, `01-components/15-end-page.md`, `01-components/16-paused-page.md`
|
|
85
|
-
4. For **each type in the survey**, read MANIFEST `questionTypes.{type}` → blueprint + reference + uiSpec; cross-check the matching row in `question-type-sdk-matrix.md`
|
|
86
|
-
5. When config flags match MANIFEST `sharedUiSpecTriggers` (e.g. `gridLayout:dropdown`, `displayStyle:graphics`) → read matching `03-ui-specs/shared/` specs
|
|
87
|
-
6. Copy `docs/templates/implementation_plan.md` → `./implementation_plan.md` and fill every section
|
|
88
|
-
7. Copy `docs/templates/Question.tsx` as the dispatcher starting point
|
|
89
|
-
8. **Auto-proceed to Phase 5** — do not wait for approval
|
|
112
|
+
---
|
|
90
113
|
|
|
91
|
-
|
|
114
|
+
### PHASE 6 — Verify checklist
|
|
92
115
|
|
|
93
|
-
|
|
116
|
+
- [ ] `Question.tsx` covers all **11** `question.type` values (flat literals)
|
|
117
|
+
- [ ] Zero `"not yet implemented"` matches
|
|
118
|
+
- [ ] `src/styles/survey-theme.css` + `selectionStyles.ts` + `labelStyles.ts` present
|
|
119
|
+
- [ ] Chrome `data-cfm-*` hooks on Header, SurveyPage, Intro/End
|
|
120
|
+
- [ ] `npm run build` exits 0
|
|
121
|
+
- [ ] Dev server loads survey
|
|
122
|
+
- [ ] AWS: `out/index.html` exists; file count ≤ 500
|
|
94
123
|
|
|
95
|
-
|
|
124
|
+
Run: `bash templates/verify-agent-build.sh`
|
|
96
125
|
|
|
97
|
-
|
|
126
|
+
---
|
|
98
127
|
|
|
99
|
-
|
|
100
|
-
2. Read `02-reference/question-types/` doc for data shape (MANIFEST `reference`)
|
|
101
|
-
2. Read matching `03-ui-specs/` (MANIFEST `uiSpec`)
|
|
102
|
-
3. If `gridLayout`, `displayStyle`, or `statementLayout` triggers shared specs → read `03-ui-specs/shared/`
|
|
103
|
-
4. Cross-check `02-reference/config-field-index.md` for every non-default field
|
|
104
|
-
5. Implement per ui-spec — trust SDK Integration Checklist in blueprint/reference + `templates/Question.tsx` + exported SDK types + `02-reference/value-derivation.md`
|
|
128
|
+
### PHASE 6b / 6c — Wizard (wait → apply every change)
|
|
105
129
|
|
|
106
|
-
|
|
130
|
+
Only after Phase 6 passes and client says **yes**:
|
|
107
131
|
|
|
108
|
-
```
|
|
109
|
-
|
|
132
|
+
```bash
|
|
133
|
+
export CFM_INSTANCE_ID="<JWT>"
|
|
134
|
+
export CFM_DEPLOY_API_BASE="http://43.204.26.213:3000"
|
|
135
|
+
npx cfm-sdk customize-ui # uploads previews → prints client link → WAITS until submit
|
|
110
136
|
```
|
|
111
137
|
|
|
112
|
-
**
|
|
113
|
-
|
|
114
|
-
**AWS deploy prep (when client prompt mentions AWS / CloudFront / S3 / EC2 / Sprinklr):** apply Next.js static export config **during this phase**, not at deploy time. Read `00-integration/setup.md#nextjs-aws-static-export` and `00-integration/aws-deploy.md` § Build Config. Fill `implementation_plan.md` §8.
|
|
115
|
-
|
|
116
|
-
### PHASE 6: VERIFY
|
|
117
|
-
|
|
118
|
-
Read: `00-integration/constraints.md` (troubleshooting)
|
|
138
|
+
**Phase 6b:** CLI uploads component previews to S3, prints deployed wizard link for the client, polls until `Configuration ready`. Read `survey-ui-config.diff.md`. Do **not** apply yet.
|
|
119
139
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
Checklist:
|
|
123
|
-
|
|
124
|
-
- [ ] `Question.tsx` copied from `docs/templates/Question.tsx` — covers all **11** `question.type` values
|
|
125
|
-
- [ ] Each matrix variant routes by its own type literal (`CFM_MATRIX`, `CSAT_MATRIX`, `RATING_MATRIX`) — **no `subType`**
|
|
126
|
-
- [ ] All scale components from `component-checklist.md` exist for types in survey
|
|
127
|
-
- [ ] **Zero stub text:** `grep -r "not yet implemented" src/ components/ app/` returns no matches
|
|
128
|
-
- [ ] Every question wrapper has `id={question.id}`
|
|
129
|
-
- [ ] No imports from `@explorer02/cfm-survey-sdk/src/...` or `@repo/sdk/src/...`
|
|
130
|
-
- [ ] `SurveyPage` handles loading / error / empty / all `state.phase` values / active content
|
|
131
|
-
- [ ] Hook uses `state.answers`, `state.canGoBack`, `state.primaryButtonType`, and `payload.answerValue`
|
|
132
|
-
- [ ] Stable `customFieldValues` ref when survey uses custom-field logic; passed to hook and `Question` visibility helpers
|
|
133
|
-
- [ ] `SURVEY_PLACEHOLDERS` stable ref; `surveyOptions` in `useMemo` (see `placeholders-and-tokens.md`)
|
|
134
|
-
- [ ] `SCROLL` + `RECORD_QUESTION_VIEW` lifecycle effects wired (see `survey-lifecycle-analytics.md`)
|
|
135
|
-
- [ ] Monorepo: `packages/sdk` built before client dev (`npm run build`)
|
|
136
|
-
- [ ] `npm run build` exits 0
|
|
137
|
-
- [ ] **AWS intent:** `out/index.html` exists; file count ≤ 500; Next.js static export configured (`output: export`, `assetPrefix: "./"`)
|
|
138
|
-
|
|
139
|
-
### PHASE 7: DEPLOY (INPUT 3)
|
|
140
|
-
|
|
141
|
-
Ask: *"Your survey is built and verified. Ready to deploy?"*
|
|
142
|
-
|
|
143
|
-
**Route by client prompt** (see MANIFEST `deployTargets` and `phases[7].selectTargetFromPrompt`):
|
|
144
|
-
|
|
145
|
-
| Prompt mentions | Target | Action |
|
|
146
|
-
|-----------------|--------|--------|
|
|
147
|
-
| AWS, CloudFront, S3, EC2, Sprinklr | **AWS** | Read `00-integration/aws-deploy.md`; set env vars; run 3-channel deploy or `bash templates/deploy-to-aws.sh` |
|
|
148
|
-
| Vercel or unspecified (default) | **Vercel** | `npx cfm-sdk deploy` (requires `VERCEL_TOKEN` or Vercel CLI) |
|
|
149
|
-
|
|
150
|
-
**AWS env vars (dev machine):**
|
|
140
|
+
**Phase 6c:** Apply from `survey-ui-config.final.json` per [`wizard-config-handoff.md`](00-integration/wizard-config-handoff.md) + [`apply-ui-config.md`](00-integration/apply-ui-config.md) — **every** diff path. Then:
|
|
151
141
|
|
|
152
142
|
```bash
|
|
153
|
-
|
|
154
|
-
export CFM_DEPLOY_API_BASE="http://43.204.26.213:3000"
|
|
155
|
-
export OUT_DIR="<absolute path to out/ or dist/>"
|
|
143
|
+
npx cfm-sdk confirm-ui-config
|
|
156
144
|
```
|
|
157
145
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
**Vercel success:** CLI prints production URL.
|
|
146
|
+
Re-run verify script + build.
|
|
161
147
|
|
|
162
148
|
---
|
|
163
149
|
|
|
164
|
-
## Progressive
|
|
150
|
+
## Progressive reading guide
|
|
165
151
|
|
|
166
152
|
| When | Read |
|
|
167
153
|
|------|------|
|
|
168
|
-
| Always first | `
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
| After
|
|
154
|
+
| **Always first** | `agent-operating-contract.md`, `agent-execution-flow.md`, `index.md`, `client-integration-guide.md`, `constraints.md` |
|
|
155
|
+
| Phase 3 contract | `question-type-sdk-matrix.md`, `useSurveySDK.md`, logic/navigation docs |
|
|
156
|
+
| Before React code | `component-checklist.md`, `templates/Question.tsx`, per-type `03-ui-specs/*` |
|
|
157
|
+
| Wizard build | `wizard-preview-build-guide.md`, `wizard-question-type-styling.md` |
|
|
158
|
+
| Wizard run | `wizard-config-handoff.md`, `ui-customization-wizard.md`, `wizard-api.md` |
|
|
159
|
+
| After wizard (apply all paths) | `apply-ui-config.md` |
|
|
160
|
+
| Deploy | `aws-deploy.md`, `setup.md#nextjs-aws-static-export` |
|
|
174
161
|
| Config audit | `02-reference/config-field-index.md` |
|
|
175
|
-
|
|
176
|
-
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Wizard styling (all types)
|
|
166
|
+
|
|
167
|
+
| Token | Variable | Applies to |
|
|
168
|
+
|-------|----------|------------|
|
|
169
|
+
| Cell selected | `--cfm-matrix-selected` | Radio annulus; numbered/star cell fill |
|
|
170
|
+
| Focus ring | `--cfm-input-focus-ring` | Radio outer border + inner dot |
|
|
171
|
+
| Label items | `--cfm-*-column-label-*` | Matrix column headers (not hint labels on CFM) |
|
|
172
|
+
| Hint labels | `--cfm-hint-label-*` | NPS min/max anchors |
|
|
173
|
+
| Number labels | `--cfm-number-*` | Traffic-light badges (unselected only) |
|
|
174
|
+
|
|
175
|
+
Full per-type table: [`wizard-question-type-styling.md`](00-integration/wizard-question-type-styling.md).
|