{
  "purpose": "Collect native form answers through ordered questions, with explicit answer status, validation, keyboard navigation and local submit/reset authority.",
  "avoid": "A design example does not define scoring or required answers.",
  "classification": "source-bound-reference-with-explicit-decisions",
  "basis": "Pinned React/primitive sources lead API, lifecycle and semantics; native visual observations and explicit reference decisions are mapped in figma/traceability.json.",
  "profile": "interactive-control/1",
  "profileRationale": "The family presents controls or navigation; static depictions do not establish an interactive contract.",
  "componentId": "shadcn:Questionnaire",
  "sourceRule": "Questionnaire is the actual shadcn @shadcn/react0.3.1 form wrapper, not a generic wizard value controller. Root props are native form props excluding value/defaultValue plus item/defaultItem/items/onItemChange/shortcuts. items provides complete ordered collection state on SSR; stable unique names and matching enabled rendered Item/Choice definitions are caller requirements. Controlled item is authoritative, onItemChange(string) is a request with no cancellable eventDetails; answers are separate native input state and FormData. Item is fieldset, Title legend, Description p, native ChoiceInput radio or checkbox when Item.multiple, with a label wrapping real input. Disabled choices cannot answer; disabled items are excluded from navigation. Inactive items remain mounted hidden/inert, preserving previous answers for FormData rather than disabling all inactive answers. Skip clears answer participation/name and marks skipped; only optional questions may skip. Optional unanswered is still invalid until answered or explicitly skipped. Item onStatusChange observes unanswered|answered|skipped, independently from active item. Choice checked/defaultChecked and Input value/defaultValue have their own controlled authority. Choice onChange can preventDefault before source internal selection; controlled choices require caller update. Selecting a single answer does not auto-advance. Next validates active item; invalid focuses its eligible answer, keeps current item and shows Item error (role=alert with registered fieldset error description). Root submit validates all registered items and goes to the first invalid one; only valid form submission reaches onSubmit(event). Root defaults noValidate=true and validates answer presence/external invalid, not arbitrary email patterns. Explicit noValidate=false enables native constraint checking/reportValidity in addition. Reference selects this mode for email. Error children and persistent descriptions explain the required answer; native invalid email uses browser constraint feedback. Root onReset is called first, preventDefault vetoes internal reset; otherwise answers reset to defaults, skipped/invalid attempts clear and initial valid question is requested. Progress is actual labelled progressbar with polite Question n of total text. Previous/Skip/Next/Submit are native buttons with hidden/inert/-1 states when inapplicable, not mere CSS opacity.",
  "keyboardAndFocus": "Tab uses actual form controls. Up/Down move eligible answer focus; native radio Left/Right keep their browser selection behavior. Outside radio/text entry, Left requests previous; Right requests next only after answered/skipped. Enter on a filled answer confirms active item, validating and requesting next or native requestSubmit on last; Ctrl/Meta+Enter confirms from the active question, ignores repeat/composition and conflicting modifiers. Optional letters/numbers shortcuts target enabled choices, focus then click, and do not run in text inputs. Active question changes focus its fieldset or invalid answer, including accepted controlled host updates; ignored controlled requests do not secretly advance. Escape is passive unless a separately composed Dialog owns it.",
  "referenceDecision": "Three explicitly chosen questions: required Plus/Pro plan (Enterprise disabled), optional multiple Progress/Risks with explicit Skip, required contact email. Root has a visible heading/native form name; final FormData and result stay local, no message is sent. The exact source form and individual answer authorities are preserved. No fictitious Root disabled, onValueChange, asynchronous submission or automatic backend persistence is added.",
  "sourceCommit": "45bbf9ba23c9c0f63d38887947e5fb06f59c7da3",
  "sourceFiles": [
    "sources/shadcn/apps/v4/registry/bases/base/ui/questionnaire.tsx.source",
    "sources/shadcn/apps/v4/content/docs/components/base/questionnaire.mdx.source",
    "sources/shadcn/apps/v4/registry/bases/base/examples/questionnaire-example.tsx.source",
    "sources/shadcn/packages/react/src/questionnaire/collection.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/questionnaire-ssr.test.tsx.source",
    "sources/shadcn/packages/react/src/questionnaire/use-questionnaire-choice.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/context.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/utils.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/README.md.source",
    "sources/shadcn/packages/react/src/questionnaire/types.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/questionnaire.browser.test.tsx.source",
    "sources/shadcn/packages/react/src/questionnaire/use-questionnaire-item.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/use-questionnaire-root.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/components.tsx.source",
    "sources/shadcn/packages/react/src/questionnaire/questionnaire.test.tsx.source",
    "sources/shadcn/packages/react/src/questionnaire/index.ts.source",
    "sources/shadcn/packages/react/src/questionnaire/use-questionnaire-input.ts.source"
  ],
  "visualContract": {
    "layoutPolicy": "Every actual exported form wrapper and private native Choice subpart has stable slot identity. Native 64px minimum answer card,10px corner,16px indicator/8px dot and 20px shortcut role remain semantic tokens; preferred 448px form width is capped by its parent and answers grow for longer text. Radio/checkbox decoration follows actual data-type/data-checked; invisible native input still owns focus, labels, selection and FormData. Focus-visible is projected on the actual containing label, not an invented role. Inactive Item and inapplicable action hidden/inert states remain hidden despite flex/grid layout; errors use actual registered alert/description semantics. Source-independent fixtures include required/optional, single/multiple, text/error and focus. Source active item, native answers, skip participation and submission validity are separate authorities. Source Ctrl/Meta+Enter and optional letter shortcuts remain real primitive behavior, never generic value transitions. Preferred spacing/type sizes and 44px form actions are explicit readable reference decisions. No page coordinates, source ID anatomy or hidden native answer replacement.",
    "parts": "component.json#/partBindings",
    "tokenBindings": "component.json#/visualContract/tokens",
    "sourceEvidence": "figma/traceability.json"
  }
}
