schema_version: 2 name: generate-codebook layer: A owner_domain: data_documentation maturity: official when_to_use: "Generate a data dictionary and codebook from a dataset." when_NOT_to_use: "Cleaning the data (use clean-data); versioning the dataset (use version-dataset)." inputs: - "analysis dataset (CSV/Excel)" outputs: - "data dictionary" - "codebook" deterministic_scripts: - scripts/generate_codebook.py side_effects: - writes_codebook_artifacts downstream_consumers: - define-variables - version-dataset forbidden_actions: - fabricate_variable_descriptions - infer_units_not_present_in_data # v2.1 quality card purpose: "Derive a structured codebook (variables, types, ranges, missingness) directly from a dataset." safety_boundaries: - "Descriptive statistics are computed from the data by the bundled script, not asserted." - "Variable semantics not present in the data are left blank for the researcher, not invented." known_limitations: - "Computes structure and distributions; does not supply clinical meaning of variables." - "Free-text/semantic descriptions require researcher input." validation_commands: - "python3 scripts/generate_codebook.py " evidence_surface: bundled_script