Status: Ready for your review (automated checks passed).
Source of truth: User-provided specification (not DOCX).
Schema version: 1 · Draft storage key: lonham_questionnaire_draft_v1
Run:
npx tsx src/lonham-questionnaire/schema/verify-schema.ts
npx tsx src/lonham-questionnaire/schema/emit-schema-json.ts
| # | Requirement | Status |
|---|---|---|
| 1 | Every numbered question 1–17 present | ✅ |
| 2 | Section headings 11–16 + 17. MATERIAL FACTS + DECLARATION | ✅ |
| 3 | Document title + intro verbatim | ✅ |
| 4 | Underwriter disclaimer notes (intruder alarm + electrical) | ✅ |
| 5 | All Y/N conditionals wired (18 conditional rules) | ✅ |
| 6 | Claims table: 3 columns, verbatim headers | ✅ |
| 7 | Declaration text + confirm checkbox + signature block + printed name + company + date | ✅ |
| 8 | Signature methods: draw, typed, upload | ✅ |
| 9 | 10 wizard steps (UX grouping) | ✅ |
| 10 | Unique pdfOrder for PDF document sequence |
✅ |
| 11 | No DOCX parsing references | ✅ |
| 12 | QUESTIONNAIRE_SCHEMA_VERSION + draft key exported |
✅ |
| Category | Count |
|---|---|
| Total schema entries | 81 |
| Answerable fields (excl. notes/headings) | 60 |
| Yes/No fields | 28 |
| Conditional detail fields | 18 |
| Section headings | 9 |
| Static notes / disclaimers | 8 |
| Repeatable claims table | 1 |
| Step | Fields |
|---|---|
| 1 | Account, Q1–3 |
| 2 | Q4–7 |
| 3 | Q8–10 |
| 4 | Q11 Construction |
| 5 | Q12 Occupancy |
| 6 | Q13 Security |
| 7 | Q14 Protections |
| 8 | Q15 Exposures / Other |
| 9 | Q16 Claims |
| 10 | Q17, Declaration, Signature |
| Child field | Shows when |
|---|---|
q4_sole_occupancy_details |
q4_sole_occupancy = no |
q7_seasonal_details |
q7_seasonal_fluctuations = yes |
q10_other_activities_details |
q10_other_activities = yes |
q11b_external_walls_other |
q11b_external_walls includes other_cladding |
q11c_roof_other |
q11c_roof includes other |
q11h_lining_details |
q11h_composite_panels = yes |
q12a_hours_* (4 fields) |
q12a_occupied_24_7 = no |
q12b_machinery_details |
q12b_machinery_unattended = yes |
q13d_alarm_remote |
q13d_intruder_alarm = yes |
q13e_cctv_remote |
q13e_cctv = yes |
q14a_sprinkler_remote |
q14a_sprinkler = yes |
q14b_fire_remote |
q14b_fire_detection = yes |
q14c_extinguisher_maintenance |
q14c_extinguishers = yes |
q15b_flood_details |
q15b_ever_flooded = yes |
q15e_lighting_details |
q15e_high_intensity_lighting = yes |
Rendered as three schema entries (PDF order):
e) Are the premises illuminated by any of the following high intensity lighting bulbs:YES / NO| File | Purpose |
|---|---|
questionnaire.types.ts |
Types, version constants, response/draft shapes |
questionnaire.schema.ts |
Canonical field definitions |
schema-utils.ts |
Visibility, defaults, PDF ordering helpers |
index.ts |
Public exports |
verify-schema.ts |
Automated spec verification |
emit-schema-json.ts |
JSON export for API/PDF |
questionnaire.schema.json |
Generated JSON snapshot |
YES / NO label on the toggle (matches paper form layout); confirm this is acceptable vs. inline Y/N on the question line.minRows: 0); rows are optional until submit validation rules are added in Phase 2.Awaiting your approval before Phase 1 (Supabase) or Phase 2 (UI).