markform 0.1.4 → 0.1.5

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 (28) hide show
  1. package/README.md +40 -53
  2. package/dist/ai-sdk.d.mts +1 -1
  3. package/dist/ai-sdk.mjs +1 -1
  4. package/dist/{apply-C54EMAJ1.mjs → apply-BCCiJzQr.mjs} +3 -3
  5. package/dist/bin.mjs +3 -3
  6. package/dist/{cli-BhWhn6L9.mjs → cli-D469amuk.mjs} +5 -11
  7. package/dist/cli.mjs +3 -3
  8. package/dist/{coreTypes-cbNTYAcb.d.mts → coreTypes-9XZSNOv6.d.mts} +2 -2
  9. package/dist/index.d.mts +1 -1
  10. package/dist/index.mjs +2 -2
  11. package/dist/{src-BNh7Cx9P.mjs → src-Df0XX7UB.mjs} +19 -6
  12. package/docs/markform-reference.md +19 -19
  13. package/docs/markform-spec.md +20 -20
  14. package/examples/earnings-analysis/earnings-analysis.form.md +86 -808
  15. package/examples/earnings-analysis/earnings-analysis.valid.ts +16 -148
  16. package/examples/movie-research/movie-research-basic.form.md +16 -16
  17. package/examples/movie-research/movie-research-deep.form.md +36 -36
  18. package/examples/movie-research/movie-research-minimal.form.md +4 -4
  19. package/examples/simple/simple-mock-filled.form.md +16 -16
  20. package/examples/simple/simple-skipped-filled.form.md +16 -16
  21. package/examples/simple/simple-with-skips.session.yaml +3 -3
  22. package/examples/simple/simple.form.md +16 -16
  23. package/examples/simple/simple.session.yaml +3 -3
  24. package/examples/startup-deep-research/startup-deep-research.form.md +22 -22
  25. package/examples/startup-research/startup-research-mock-filled.form.md +12 -12
  26. package/examples/startup-research/startup-research.form.md +12 -12
  27. package/package.json +1 -1
  28. package/examples/celebrity-deep-research/celebrity-deep-research.form.md +0 -967
@@ -143,7 +143,7 @@ Data Model section for complete type definitions.
143
143
 
144
144
  IDs are organized into **two scoping levels** with different uniqueness requirements:
145
145
 
146
- **1. Structural IDs** (form, field-group, field):
146
+ **1. Structural IDs** (form, group, field):
147
147
 
148
148
  - *required:* Must be globally unique across the entire document
149
149
 
@@ -196,7 +196,7 @@ Markform defines its own scoping rules where option IDs are field-scoped.
196
196
 
197
197
  - `form` — the root container
198
198
 
199
- - `field-group` — containers for fields or nested groups
199
+ - `group` — containers for fields or nested groups
200
200
 
201
201
  #### Field Tags
202
202
 
@@ -494,7 +494,7 @@ Example values or usage...
494
494
 
495
495
  **Placement rules (MF/0.1):**
496
496
 
497
- - Doc blocks MAY appear inside `form` and `field-group` as direct children
497
+ - Doc blocks MAY appear inside `form` and `group` as direct children
498
498
 
499
499
  - *required:* Parser will reject doc blocks that appear inside field tag bodies (doc
500
500
  blocks MUST NOT be nested inside a field tag)
@@ -770,12 +770,12 @@ Analysis completed with partial data due to API limitations.
770
770
  ````md
771
771
  {% form id="quarterly_earnings" title="Quarterly Earnings Analysis" %}
772
772
 
773
- {% field-group id="company_info" title="Company Info" %}
773
+ {% group id="company_info" title="Company Info" %}
774
774
  {% field kind="string" id="company_name" label="Company name" state="skipped" %}
775
775
  ```value
776
776
  %SKIP% (Not applicable for this analysis type)
777
777
  ````
778
- {% /field %} {% /field-group %}
778
+ {% /field %} {% /group %}
779
779
 
780
780
  {% note id="n1" ref="quarterly_earnings" role="agent" %} Analysis completed with partial
781
781
  data due to API limitations.
@@ -846,35 +846,35 @@ markform:
846
846
  Prepare an earnings-call brief by extracting key financials and writing a thesis.
847
847
  {% /description %}
848
848
 
849
- {% field-group id="company_info" title="Company Info" %}
849
+ {% group id="company_info" title="Company Info" %}
850
850
  {% field kind="string" id="company_name" label="Company name" required=true %}{% /field %}
851
851
  {% field kind="string" id="ticker" label="Ticker" required=true %}{% /field %}
852
852
  {% field kind="string" id="fiscal_period" label="Fiscal period" required=true %}{% /field %}
853
- {% /field-group %}
853
+ {% /group %}
854
854
 
855
- {% field-group id="source_docs" title="Source Documents" %}
855
+ {% group id="source_docs" title="Source Documents" %}
856
856
  {% field kind="checkboxes" id="docs_reviewed" label="Documents reviewed" required=true %}
857
857
  - [ ] 10-K {% #ten_k %}
858
858
  - [ ] 10-Q {% #ten_q %}
859
859
  - [ ] Earnings release {% #earnings_release %}
860
860
  - [ ] Earnings call transcript {% #call_transcript %}
861
861
  {% /field %}
862
- {% /field-group %}
862
+ {% /group %}
863
863
 
864
- {% field-group id="financials" title="Key Financials" %}
864
+ {% group id="financials" title="Key Financials" %}
865
865
  {% field kind="number" id="revenue_m" label="Revenue (USD millions)" required=true %}{% /field %}
866
866
  {% field kind="number" id="gross_margin_pct" label="Gross margin (%)" %}{% /field %}
867
867
  {% field kind="number" id="eps_diluted" label="Diluted EPS" required=true %}{% /field %}
868
- {% /field-group %}
868
+ {% /group %}
869
869
 
870
- {% field-group id="analysis" title="Analysis" %}
870
+ {% group id="analysis" title="Analysis" %}
871
871
  {% field kind="single_select" id="rating" label="Overall rating" required=true %}
872
872
  - [ ] Bullish {% #bullish %}
873
873
  - [ ] Neutral {% #neutral %}
874
874
  - [ ] Bearish {% #bearish %}
875
875
  {% /field %}
876
876
  {% field kind="string" id="thesis" label="Investment thesis" required=true %}{% /field %}
877
- {% /field-group %}
877
+ {% /group %}
878
878
 
879
879
  {% /form %}
880
880
  ````
@@ -886,7 +886,7 @@ Hand-authored forms only need the `spec` field.
886
886
  #### Example: Incomplete Form
887
887
 
888
888
  ````md
889
- {% field-group id="company_info" title="Company Info" %}
889
+ {% group id="company_info" title="Company Info" %}
890
890
  {% field kind="string" id="company_name" label="Company name" required=true %}
891
891
  ```value
892
892
  ACME Corp
@@ -896,9 +896,9 @@ ACME Corp
896
896
  ACME
897
897
  ```
898
898
  {% /field %} {% field kind="string" id="fiscal_period" label="Fiscal period"
899
- required=true %}{% /field %} {% /field-group %}
899
+ required=true %}{% /field %} {% /group %}
900
900
 
901
- {% field-group id="source_docs" title="Source Documents" %} {% checkboxes
901
+ {% group id="source_docs" title="Source Documents" %} {% checkboxes
902
902
  id="docs_reviewed" label="Documents reviewed" required=true %}
903
903
 
904
904
  - [x] 10-K {% #ten_k %}
@@ -907,7 +907,7 @@ id="docs_reviewed" label="Documents reviewed" required=true %}
907
907
 
908
908
  - [/] Earnings release {% #earnings_release %}
909
909
 
910
- - [ ] Earnings call transcript {% #call_transcript %} {% /field %} {% /field-group
910
+ - [ ] Earnings call transcript {% #call_transcript %} {% /field %} {% /group
911
911
  %}
912
912
  ````
913
913
 
@@ -1399,7 +1399,7 @@ Describes the static structure of the form schema:
1399
1399
  type FieldKind = 'string' | 'number' | 'string_list' | 'checkboxes' | 'single_select' | 'multi_select' | 'url' | 'url_list';
1400
1400
 
1401
1401
  interface StructureSummary {
1402
- groupCount: number; // total field-groups
1402
+ groupCount: number; // total groups
1403
1403
  fieldCount: number; // total fields (all kinds)
1404
1404
  optionCount: number; // total options across all select/checkbox fields
1405
1405
 
@@ -2051,7 +2051,7 @@ A completed form must have all checkbox options resolved to either `done` or `na
2051
2051
 
2052
2052
  **Field group `required` attribute:**
2053
2053
 
2054
- The `required` attribute on `field-group` is **not supported in MF/0.1**. Groups may
2054
+ The `required` attribute on `group` is **not supported in MF/0.1**. Groups may
2055
2055
  have `validate` references for custom validation, but the `required` attribute should
2056
2056
  not be used on groups.
2057
2057
  If present, it is ignored with a warning.
@@ -2165,7 +2165,7 @@ export const validators: Record<string, (ctx: ValidatorContext) => ValidationIss
2165
2165
 
2166
2166
  <!-- Sum-to validator with configurable target -->
2167
2167
 
2168
- {% field-group id="scenarios" validate=[{id: "sum_to", fields: ["base_prob", "bull_prob", "bear_prob"], target: 100}] %}
2168
+ {% group id="scenarios" validate=[{id: "sum_to", fields: ["base_prob", "bull_prob", "bear_prob"], target: 100}] %}
2169
2169
  ```
2170
2170
 
2171
2171
  **Runtime loading (engine):**