@opendatacapture/instrument-guidelines 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/AGENTS.md +6 -0
  2. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -473,10 +473,16 @@ type FormInstrument<TData extends FormInstrument.Data, TLanguage extends Instrum
473
473
  initialValues?: PartialDeep<TData>;
474
474
  kind: 'FORM';
475
475
  measures: InstrumentMeasures<TData, TLanguage> | null;
476
+ resetButton?: boolean;
476
477
  };
477
478
  ```
478
479
 
479
480
  - `initialValues` — optional pre-populated values, applied when the form is first rendered. This is a _deep_ partial (`PartialDeep<TData>`), so nested composite values (e.g. individual fields within `record-array` rows) may be partially specified.
481
+ - `resetButton` — whether to show a button that clears every answer. Defaults to `false`.
482
+
483
+ **The button takes effect on the first click.** There is no confirmation step and no undo, and the subject loses everything they have entered. Set it on a long form the subject may reasonably want to start over, and leave it off a short one, where a stray click costs more than the button saves.
484
+
485
+ It also governs what happens to the answers after a successful submit: a form with `resetButton: true` is emptied, and a form without it retains its values. Neither is visible in the standard flow, which replaces the form once it is submitted.
480
486
 
481
487
  #### 1.3.2 Interactive Instruments
482
488
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opendatacapture/instrument-guidelines",
3
3
  "type": "module",
4
- "version": "2.2.2",
4
+ "version": "2.2.4",
5
5
  "description": "Guidelines for authoring Open Data Capture instruments, intended to be read by an AI agent (e.g. Claude Code).",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {