Skip to content

Document the import JSONL schemas (questions / respondents / answers) #26

Description

@johnjosephhorton

Severity: high — the single biggest onboarding friction in this run.

What happened
The guide names questions.jsonl / respondents.jsonl / answers.jsonl but never specifies their fields, and question|respondent|answer import --help show only --survey/--path. I had to read survey_commands.py / cli.py to learn:

  • question: question_name, question_type (multiple_choice is the only closed/eligible type — probability_jobs.py:65, twin_jobs.py:434), question_options, role, source{raw_id,note}, option_labels.
  • answer: respondent_id, question, and answer or missing_code; answer must be in question_options when that list is non-empty or the row is quarantined (survey_commands.py:cmd_answer_import, cli.py:validate_answer).
  • respondent: respondent_id, weight, metadata, source.
  • Undocumented: source.known_options is used as the context option list when question_options is empty (cli.py:context_question_options).

Suggested fix
Add zwill guide show import-format (and expand the import --help) with the full per-file schema, the rank-item and multi-select conventions, the option-validation rule, and a copy-pasteable example row for each file.


Found while building a digital-twin validation for a 33-respondent SMB survey (smb.csv) end-to-end via zwill guide (survey → import → commit → one-shot marginals → twin-probability job → twin-validate → report). File/line refs are from zwill/ at that checkout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationtwin-workflow-reviewFindings from end-to-end survey->twin validation dogfooding (smb.csv)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions