Repository navigation
Generator: optional concept, label_short, form_title_short and form_subtitle - #72
Merged
Merged
Conversation
…itle The fields formtransform 0.8.0–0.9.x added for the DDI, all optional: - Question gets `concept` (the `concept` column, DDI <concept>) and `labelShort` (`label_short`, the varGrp's labl), parsed from the model output and written only when some question has them; - Survey gets `titleShort` and `subtitle`, optional generator outputs, written to the settings form_title_short / form_subtitle when set; - the survey view shows the subtitle and short title in the header and concept / short label in a question's details; - generate-instructions.md says when to fill them, and the repair prompt keeps them. Forms without them are written exactly as before. Closes #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the form fields that formtransform 0.8.0–0.9.x introduced for the DDI, as an optional feature. A form without them is written exactly as before: no new columns or settings, and existing snapshot entries are unchanged.
What changed
QuestiongetsconceptandlabelShort. The parser readsconcept, andlabel_shortorlabelShort.SurveygetstitleShortandsubtitle. They are new optional outputs of the generator signature (titleShort?,subtitle?), andlead.tspasses them to the survey.xlsform_generator.ts):conceptandlabel_shortcolumns are only written when some question has them.form_title_shortandform_subtitleare only added to the settings when set.SurveyViewshows the subtitle and short title under the title. A question's details show its concept and short label.generate-instructions.mddocumentsconcept: the construct a question measures; for a question-bank item, take its concept; never copy the label.label_short: only for aselect_multipleor a question with a Sonstiges follow-up, since only those become a DDI varGrp.titleShort/subtitle.src/lib/agents/ddi_fields.test.ts. They check thatvalidateSubsetgives no findings and that onexlsformToDdiconversion carries everything through:<concept>comes from the concept column only, on just the one question that has it;varGrp/lablcomes fromlabel_short;altTitlandsubTitlcome from the settings.concept-and-short-label(pyxform + ODK Validate). Only new snapshot entries were added.Choices made
label_shortis limited in the prompt to questions that become a varGrp. formtransform keeps it on other rows only as acdl:column.conceptis in the language of the questions. There is no per-language variant (concept::<lang>), because the web app writes single-language forms.Checks (local)
bun run lint,bun run check(0 errors),bun run test(169 passed),bun run test:e2e(73 vitest + 15 pytest passed) andbun run buildall pass.Closes #70
🤖 Generated with Claude Code