@opendatacapture/instrument-guidelines 2.5.1 → 2.6.0
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.
- package/AGENTS.md +4 -6
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -8,6 +8,7 @@ Adhere to the following guidelines:
|
|
|
8
8
|
4. If a request would misrepresent the source material, explain why and confirm whether the user wants to proceed anyway.
|
|
9
9
|
5. Place generated forms in lib/forms and interactive tasks in lib/interactive.
|
|
10
10
|
6. After generating or modifying an instrument, type-check and lint your work by running `pnpm lint`, and fix any errors it reports.
|
|
11
|
+
7. When modifying an existing scalar instrument, increment its `internal.edition` by one, unless your branch already increments it relative to the main branch. Open Data Capture identifies a scalar instrument by its `name` and `edition`, so a changed instrument with an unchanged edition cannot be uploaded alongside the previous one. If a series instrument references the modified instrument, update the `edition` in the series `content` to match.
|
|
11
12
|
|
|
12
13
|
# Instrument Specification
|
|
13
14
|
|
|
@@ -150,8 +151,7 @@ interface ConstantInstrumentMeasure<TData, TLanguage extends InstrumentLanguage>
|
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
type InstrumentMeasure<TData, TLanguage extends InstrumentLanguage> =
|
|
153
|
-
|
|
|
154
|
-
| ConstantInstrumentMeasure<TData, TLanguage>;
|
|
154
|
+
ComputedInstrumentMeasure<TData, TLanguage> | ConstantInstrumentMeasure<TData, TLanguage>;
|
|
155
155
|
|
|
156
156
|
type InstrumentMeasures<TData, TLanguage extends InstrumentLanguage> = {
|
|
157
157
|
[key: string]: InstrumentMeasure<TData, TLanguage>;
|
|
@@ -197,8 +197,7 @@ type SeriesParams<TItemName extends string = string, TData = any> = {
|
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
type SeriesContent<TItemName extends string = string, TData = any> =
|
|
200
|
-
| ScalarInstrumentInternal[]
|
|
201
|
-
| { items: ScalarInstrumentInternal[]; params?: SeriesParams<TItemName, TData> };
|
|
200
|
+
ScalarInstrumentInternal[] | { items: ScalarInstrumentInternal[]; params?: SeriesParams<TItemName, TData> };
|
|
202
201
|
|
|
203
202
|
interface SeriesInstrument<TLanguage extends InstrumentLanguage> extends BaseInstrument<TLanguage> {
|
|
204
203
|
content: SeriesContent;
|
|
@@ -386,8 +385,7 @@ type DynamicFieldsetField<TLanguage, TFieldsetValue, TValue> = {
|
|
|
386
385
|
|
|
387
386
|
type Fieldset<TLanguage, TFieldset> = {
|
|
388
387
|
[K in keyof TFieldset]:
|
|
389
|
-
|
|
390
|
-
| ScalarField<TLanguage, TFieldset[K]>;
|
|
388
|
+
DynamicFieldsetField<TLanguage, TFieldset, TFieldset[K]> | ScalarField<TLanguage, TFieldset[K]>;
|
|
391
389
|
};
|
|
392
390
|
|
|
393
391
|
interface RecordArrayField<TLanguage, TValue> extends BaseField<TLanguage> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendatacapture/instrument-guidelines",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
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": {
|