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.
- package/README.md +40 -53
- package/dist/ai-sdk.d.mts +1 -1
- package/dist/ai-sdk.mjs +1 -1
- package/dist/{apply-C54EMAJ1.mjs → apply-BCCiJzQr.mjs} +3 -3
- package/dist/bin.mjs +3 -3
- package/dist/{cli-BhWhn6L9.mjs → cli-D469amuk.mjs} +5 -11
- package/dist/cli.mjs +3 -3
- package/dist/{coreTypes-cbNTYAcb.d.mts → coreTypes-9XZSNOv6.d.mts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{src-BNh7Cx9P.mjs → src-Df0XX7UB.mjs} +19 -6
- package/docs/markform-reference.md +19 -19
- package/docs/markform-spec.md +20 -20
- package/examples/earnings-analysis/earnings-analysis.form.md +86 -808
- package/examples/earnings-analysis/earnings-analysis.valid.ts +16 -148
- package/examples/movie-research/movie-research-basic.form.md +16 -16
- package/examples/movie-research/movie-research-deep.form.md +36 -36
- package/examples/movie-research/movie-research-minimal.form.md +4 -4
- package/examples/simple/simple-mock-filled.form.md +16 -16
- package/examples/simple/simple-skipped-filled.form.md +16 -16
- package/examples/simple/simple-with-skips.session.yaml +3 -3
- package/examples/simple/simple.form.md +16 -16
- package/examples/simple/simple.session.yaml +3 -3
- package/examples/startup-deep-research/startup-deep-research.form.md +22 -22
- package/examples/startup-research/startup-research-mock-filled.form.md +12 -12
- package/examples/startup-research/startup-research.form.md +12 -12
- package/package.json +1 -1
- package/examples/celebrity-deep-research/celebrity-deep-research.form.md +0 -967
package/docs/markform-spec.md
CHANGED
|
@@ -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,
|
|
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
|
-
- `
|
|
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 `
|
|
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
|
-
{%
|
|
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 %} {% /
|
|
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
|
-
{%
|
|
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
|
-
{% /
|
|
853
|
+
{% /group %}
|
|
854
854
|
|
|
855
|
-
{%
|
|
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
|
-
{% /
|
|
862
|
+
{% /group %}
|
|
863
863
|
|
|
864
|
-
{%
|
|
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
|
-
{% /
|
|
868
|
+
{% /group %}
|
|
869
869
|
|
|
870
|
-
{%
|
|
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
|
-
{% /
|
|
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
|
-
{%
|
|
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 %} {% /
|
|
899
|
+
required=true %}{% /field %} {% /group %}
|
|
900
900
|
|
|
901
|
-
{%
|
|
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 %} {% /
|
|
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
|
|
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 `
|
|
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
|
-
{%
|
|
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):**
|