Skip to content

Blank section template

Since the SurveyJS migration, this page is prose only

Every field — its type, options, and conditional logic — is authored in survey/sections/NN-your-topic.json, registered in survey/survey.json's pages array, not here. This page still owns the intro paragraph, the section-meta line, a subsection heading per panel (mirroring the panel order in the JSON so a reader can move between the two), and the Red flags subsection where one applies. See fq-edit-question for authoring the fields themselves; this page is about wiring up the section around them. Question patterns still defines the vocabulary of types and the conditional-logic rules — they now apply to SurveyJS type/visibleIf/requiredIf, not to a table.

Copy the block below into docs/sections/NN-your-topic.md, then add a matching survey/sections/NN-your-topic.json page (empty elements: [] panels are fine as a starting point) and register it in survey/survey.json. Then add a line to the nav array in zensical.toml:

{ "11. Your topic" = "sections/11-your-topic.md" },

The preview server picks up both changes without a restart.

The template

---
icon: lucide/circle
---

# NN. Section title

<div class="section-meta" markdown>
<b>Filled by</b> Client &nbsp;·&nbsp;
<b>Questions</b> 0 &nbsp;·&nbsp;
<b>Time</b> ~0 min &nbsp;·&nbsp;
<b>Prefix</b> <code>xxx_*</code>
</div>

One or two sentences on what this section is for and why it comes at this point
in the questionnaire. If any answer here changes what a later section does, say
so here.

## NN.1 Subsection title

<!-- One heading per panel in survey/sections/NN-your-topic.json, in the same
     order, so the two files can be read side by side. No question table here
     — see the note at the top of this page. -->

!!! tip "Coach note"

    Guidance for whoever reads the answers — what to look for, what it changes
    in the programme. Delete if there's nothing useful to say.

## NN.2 Subsection title

## NN.N Red flags

<!-- Only add this subsection if this section's own fields actually drive a
     red flag. Delete it entirely if none do — see "Adding the Red flags
     subsection" below for how to decide, and 06-goals.md /
     10-preferences-logistics.md for sections that correctly have none. -->

---

**Previous:** NN-1. Previous section ·
**Next:** NN+1. Next section

Adding the Red flags subsection

Not every section gets one, and no two that have one look the same. Each section's Red flags subsection carries only the entries whose trigger field lives on that page — filtered by judgement, not copied wholesale from Screening red flags.

To add it to a new section:

  1. Read Screening red flags, and check which of its stop, clearance, caution and age-and-load items are actually driven by an answer on this section's page — by field ID, not by loose thematic overlap.
  2. If none are, don't add the subsection at all. An empty or irrelevant Red flags block is worse than none — it trains whoever reads it to skim past the heading.
  3. If some are, write them in the same format used elsewhere: bullets for Stop and refer immediately / Clearance required, a Flag | Source field | Typical modification table for Proceed with caution. Cite the field ID inline, same as the source page does.
  4. Where a rule depends on fields from more than one section — age-and-load is the clearest example, needing client_dob plus fields from two other sections — put the substantive version where its primary field lives and leave a one- or two-line cross-reference on the others, rather than repeating the full table. See 1.6 for the primary copy and 5.3 for a cross-reference example.
  5. Renumber the heading to the next number on your new page.

This means the specifics have no single source of truth

Screening red flags is deliberately generic and does not carry the specifics anymore — they live split across whichever section pages own the triggering fields. If a threshold changes, find every section that mentions it (grep the field ID across docs/sections/) rather than assuming one file holds it.

Checklist for a new section

  • survey/sections/NN-your-topic.json exists and is registered in survey/survey.json's pages array
  • Every field ID uses the section's prefix and is unique across the whole questionnaire (bun web-apps/questionnaire/build.ts fails loudly on a duplicate)
  • Every SurveyJS type comes from Question patterns
  • Conditional questions use visibleIf/requiredIf, per Conditional logic
  • Multi-selects include an escape option (why)
  • Sensitive questions are optional, offer Prefer not to say, and carry a handling admonition in the docs page
  • Nothing is asked twice — cross-reference the existing field instead
  • A Red flags subsection is added only if this section's own fields drive one, filtered by field ID, not copied wholesale — see Adding the Red flags subsection
  • The docs page's subsection headings mirror the panel order in the JSON
  • bun scripts/strip-question-tables.ts has re-stamped the Questions count in section-meta from the JSON; the Time estimate is still set by hand
  • bun web-apps/questionnaire/build.ts (or --review) passes
  • The Previous/Next placeholders at the foot are turned into real links — [6. Goals & motivation](06-goals.md), relative to docs/sections/ — and the neighbouring pages point back
  • The section is added to nav in zensical.toml
  • The table in the overview has a row for it

Available icons

Set one in the page's front matter — it shows in the navigation. Any Lucide name works as lucide/<name>. The ones already in use:

Icon Name Used by
lucide/clipboard-list Overview
lucide/workflow How it works
lucide/users-round The subagents
lucide/arrow-left-right Context & handoff
lucide/phone-call ElevenLabs setup
lucide/messages-square The interview protocol
lucide/gavel Core rules
lucide/audio-lines Voicing each answer type
lucide/grid-3x3 Matrix questions by voice
lucide/shield Optional & sensitive questions
lucide/octagon-x Stop conditions
lucide/clipboard-check The handover record
lucide/user 1. About you
lucide/heart-pulse 2. Health & medical history
lucide/stethoscope 3. Systems review
lucide/bandage 4. Injuries & movement
lucide/activity 5. Activity & training history
lucide/target 6. Goals & motivation
lucide/apple 7. Nutrition & hydration
lucide/moon 8. Sleep, stress & recovery
lucide/ruler 9. Measurements & assessments
lucide/settings-2 10. Preferences & logistics
lucide/file-check 11. Consent & sign-off