markform 0.1.8 → 0.1.10

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 +45 -55
  2. package/dist/ai-sdk.d.mts +1 -1
  3. package/dist/ai-sdk.mjs +2 -2
  4. package/dist/{apply-BUU2QcJ2.mjs → apply-BTFCHpYV.mjs} +402 -341
  5. package/dist/bin.mjs +1 -1
  6. package/dist/{cli-BZh25bvy.mjs → cli-BZa4fYR9.mjs} +518 -65
  7. package/dist/cli.mjs +1 -1
  8. package/dist/{coreTypes-DJtu8OOp.mjs → coreTypes-B1oI7qvV.mjs} +36 -3
  9. package/dist/{coreTypes-BSPJ9H27.d.mts → coreTypes-JCPm418M.d.mts} +215 -9
  10. package/dist/index.d.mts +180 -17
  11. package/dist/index.mjs +5 -5
  12. package/dist/{session-DSTNiHza.mjs → session-CzCh6JeY.mjs} +1 -1
  13. package/dist/{session-CmHdAPyg.mjs → session-Dxqwt0RC.mjs} +3 -3
  14. package/dist/{shared-C9yW5FLZ.mjs → shared-CNqwaxUt.mjs} +1 -1
  15. package/dist/{shared-DQ6y3Ggc.mjs → shared-D3dNi-Gn.mjs} +1 -1
  16. package/dist/{src-kUggXhN1.mjs → src-CYnyLwBe.mjs} +297 -128
  17. package/docs/markform-spec.md +104 -53
  18. package/examples/movie-research/movie-deep-research-mock-filled.form.md +601 -0
  19. package/examples/movie-research/{movie-research-deep.form.md → movie-deep-research.form.md} +2 -2
  20. package/examples/rejection-test/rejection-test.session.yaml +446 -0
  21. package/examples/simple/simple-with-skips.session.yaml +1966 -18
  22. package/examples/simple/simple.session.yaml +1979 -18
  23. package/examples/startup-deep-research/startup-deep-research.form.md +21 -36
  24. package/package.json +1 -1
  25. package/examples/earnings-analysis/earnings-analysis.form.md +0 -159
  26. package/examples/earnings-analysis/earnings-analysis.raw.md +0 -801
  27. package/examples/earnings-analysis/earnings-analysis.valid.ts +0 -198
  28. package/examples/movie-research/movie-research-basic.form.md +0 -169
@@ -58,7 +58,7 @@ The more context you provide, the more accurate and relevant the research will b
58
58
 
59
59
  {% group id="basic_info" title="Company Overview" %}
60
60
 
61
- {% field kind="string" id="website" label="Website URL" %}{% /field %}
61
+ {% field kind="url" id="website" label="Website URL" %}{% /field %}
62
62
 
63
63
  {% instructions ref="website" %}
64
64
  Primary company website.
@@ -107,7 +107,7 @@ Source: linkedin.com/company page, crunchbase.com, or company website.
107
107
  Source: Company website About page, crunchbase.com, Wikipedia if notable.
108
108
  {% /instructions %}
109
109
 
110
- {% field kind="string_list" id="basic_info_sources" label="Company Overview Sources" %}{% /field %}
110
+ {% field kind="url_list" id="basic_info_sources" label="Company Overview Sources" %}{% /field %}
111
111
 
112
112
  {% instructions ref="basic_info_sources" %}
113
113
  URLs used as sources for this section. One URL per line.
@@ -117,36 +117,21 @@ URLs used as sources for this section. One URL per line.
117
117
 
118
118
  {% group id="founders_section" title="Founders & Key People" %}
119
119
 
120
- {% description ref="founders_section" %}
121
- List up to 4 founders/co-founders. Leave unused slots empty.
122
- Sources: Company website Team/About page, linkedin.com profiles, crunchbase.com people section.
123
- {% /description %}
124
-
125
- {% field kind="string" id="founder_1_name" label="Founder 1 Name" %}{% /field %}
126
- {% field kind="string" id="founder_1_title" label="Founder 1 Title" %}{% /field %}
127
- {% field kind="string" id="founder_1_linkedin" label="Founder 1 LinkedIn URL" %}{% /field %}
128
- {% field kind="string" id="founder_1_background" label="Founder 1 Background" maxLength=500 %}{% /field %}
120
+ {% field kind="table" id="founders" label="Founders"
121
+ columnIds=["name", "title", "linkedin", "background"]
122
+ columnLabels=["Name", "Title", "LinkedIn URL", "Background"]
123
+ columnTypes=["string", "string", "url", "string"]
124
+ minRows=1 maxRows=6 %}
125
+ | Name | Title | LinkedIn URL | Background |
126
+ |------|-------|--------------|------------|
127
+ {% /field %}
129
128
 
130
- {% instructions ref="founder_1_background" %}
131
- Brief background: prior companies, notable roles, education.
129
+ {% instructions ref="founders" %}
130
+ List founders and co-founders. Include name, current title, LinkedIn profile URL, and brief background (prior companies, notable roles, education).
131
+ Sources: Company website Team/About page, linkedin.com profiles, crunchbase.com people section.
132
132
  {% /instructions %}
133
133
 
134
- {% field kind="string" id="founder_2_name" label="Founder 2 Name" %}{% /field %}
135
- {% field kind="string" id="founder_2_title" label="Founder 2 Title" %}{% /field %}
136
- {% field kind="string" id="founder_2_linkedin" label="Founder 2 LinkedIn URL" %}{% /field %}
137
- {% field kind="string" id="founder_2_background" label="Founder 2 Background" maxLength=500 %}{% /field %}
138
-
139
- {% field kind="string" id="founder_3_name" label="Founder 3 Name" %}{% /field %}
140
- {% field kind="string" id="founder_3_title" label="Founder 3 Title" %}{% /field %}
141
- {% field kind="string" id="founder_3_linkedin" label="Founder 3 LinkedIn URL" %}{% /field %}
142
- {% field kind="string" id="founder_3_background" label="Founder 3 Background" maxLength=500 %}{% /field %}
143
-
144
- {% field kind="string" id="founder_4_name" label="Founder 4 Name" %}{% /field %}
145
- {% field kind="string" id="founder_4_title" label="Founder 4 Title" %}{% /field %}
146
- {% field kind="string" id="founder_4_linkedin" label="Founder 4 LinkedIn URL" %}{% /field %}
147
- {% field kind="string" id="founder_4_background" label="Founder 4 Background" maxLength=500 %}{% /field %}
148
-
149
- {% field kind="string_list" id="founders_sources" label="Founders Sources" %}{% /field %}
134
+ {% field kind="url_list" id="founders_sources" label="Founders Sources" %}{% /field %}
150
135
 
151
136
  {% instructions ref="founders_sources" %}
152
137
  URLs used as sources for this section. One URL per line.
@@ -183,7 +168,7 @@ Example: Series B | 2023-06 | $50M | Sequoia Capital | https://techcrunch.com/..
183
168
  Source: crunchbase.com funding rounds, pitchbook.com, techcrunch.com, company press releases.
184
169
  {% /instructions %}
185
170
 
186
- {% field kind="string_list" id="funding_sources" label="Funding Sources" %}{% /field %}
171
+ {% field kind="url_list" id="funding_sources" label="Funding Sources" %}{% /field %}
187
172
 
188
173
  {% instructions ref="funding_sources" %}
189
174
  URLs used as sources for this section. One URL per line.
@@ -220,7 +205,7 @@ How does this company differentiate? Key advantages/disadvantages vs competitors
220
205
  Source: Company website, product pages, press interviews, g2.com reviews.
221
206
  {% /instructions %}
222
207
 
223
- {% field kind="string_list" id="competitors_sources" label="Competitors Sources" %}{% /field %}
208
+ {% field kind="url_list" id="competitors_sources" label="Competitors Sources" %}{% /field %}
224
209
 
225
210
  {% instructions ref="competitors_sources" %}
226
211
  URLs used as sources for this section. One URL per line.
@@ -294,7 +279,7 @@ Also note if there are significant discussions in related subreddits.
294
279
  Source: Search reddit.com for company name, check for official subreddit.
295
280
  {% /instructions %}
296
281
 
297
- {% field kind="string_list" id="social_media_sources" label="Social Media Sources" %}{% /field %}
282
+ {% field kind="url_list" id="social_media_sources" label="Social Media Sources" %}{% /field %}
298
283
 
299
284
  {% instructions ref="social_media_sources" %}
300
285
  URLs used as sources for this section. One URL per line.
@@ -317,7 +302,7 @@ Include: Show HN launches, funding announcements, major discussions about the co
317
302
  Source: Search hn.algolia.com for company name, product name, and founder names.
318
303
  {% /instructions %}
319
304
 
320
- {% field kind="string_list" id="hacker_news_sources" label="Hacker News Sources" %}{% /field %}
305
+ {% field kind="url_list" id="hacker_news_sources" label="Hacker News Sources" %}{% /field %}
321
306
 
322
307
  {% instructions ref="hacker_news_sources" %}
323
308
  URLs used as sources for this section. One URL per line.
@@ -339,7 +324,7 @@ Note any badges: Product of the Day/Week/Month, Golden Kitty, etc.
339
324
  Source: Search producthunt.com for company name and product names.
340
325
  {% /instructions %}
341
326
 
342
- {% field kind="string_list" id="product_hunt_sources" label="Product Hunt Sources" %}{% /field %}
327
+ {% field kind="url_list" id="product_hunt_sources" label="Product Hunt Sources" %}{% /field %}
343
328
 
344
329
  {% instructions ref="product_hunt_sources" %}
345
330
  URLs used as sources for this section. One URL per line.
@@ -434,7 +419,7 @@ Example: "2019: Originally 'PaymentsAPI' focused on SMB; 2021: Rebranded, pivote
434
419
  Source: web.archive.org - search for company domain, review snapshots from different years.
435
420
  {% /instructions %}
436
421
 
437
- {% field kind="string_list" id="deep_intel_sources" label="Deep Intel Sources" %}{% /field %}
422
+ {% field kind="url_list" id="deep_intel_sources" label="Deep Intel Sources" %}{% /field %}
438
423
 
439
424
  {% instructions ref="deep_intel_sources" %}
440
425
  URLs used as sources for this section. One URL per line.
@@ -457,7 +442,7 @@ Focus on: funding announcements, major product launches, company profiles, notab
457
442
  Source: techcrunch.com, theinformation.com, bloomberg.com, forbes.com, wired.com, venturebeat.com, company Press page.
458
443
  {% /instructions %}
459
444
 
460
- {% field kind="string_list" id="press_sources" label="Press Coverage Sources" %}{% /field %}
445
+ {% field kind="url_list" id="press_sources" label="Press Coverage Sources" %}{% /field %}
461
446
 
462
447
  {% instructions ref="press_sources" %}
463
448
  URLs used as sources for this section. One URL per line.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markform",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Markdown forms for token-friendly workflows",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Joshua Levy",
@@ -1,159 +0,0 @@
1
- ---
2
- markform:
3
- spec: MF/0.1
4
- title: Earnings Analysis
5
- description: Company earnings analysis with key metrics, outlook, and custom validators.
6
- run_mode: research
7
- roles:
8
- - user
9
- - agent
10
- role_instructions:
11
- user: "Enter the company name and ticker symbol."
12
- agent: |
13
- Research the company and fill in the key financial metrics and analysis.
14
- Focus on the most recent quarterly results and forward outlook.
15
- ---
16
- {% form id="earnings_analysis" title="Earnings Analysis" %}
17
-
18
- ## Company Earnings Analysis
19
-
20
- {% group id="company_input" title="Company Identification" %}
21
-
22
- Which company do you want to analyze? \[*This field is filled in by the user (`role="user"`).*\]
23
-
24
- {% field kind="string" id="company" label="Company" role="user" required=true minLength=1 maxLength=300 %}{% /field %}
25
- {% instructions ref="company" %}Enter the company name and ticker symbol (e.g., "Apple (AAPL)" or "Microsoft MSFT").{% /instructions %}
26
-
27
- {% /group %}
28
-
29
- ## Company Overview
30
-
31
- {% group id="company_overview" title="Company Overview" %}
32
-
33
- **Company name:**
34
-
35
- {% field kind="string" id="company_name" label="Company Name" role="agent" required=true %}{% /field %}
36
- {% instructions ref="company_name" %}Official company name.{% /instructions %}
37
-
38
- **Ticker symbol:**
39
-
40
- {% field kind="string" id="ticker" label="Ticker Symbol" role="agent" required=true %}{% /field %}
41
-
42
- **Exchange:**
43
-
44
- {% field kind="string" id="exchange" label="Exchange" role="agent" %}{% /field %}
45
- {% instructions ref="exchange" %}Primary stock exchange (e.g., NYSE, NASDAQ).{% /instructions %}
46
-
47
- **Sector:**
48
-
49
- {% field kind="string" id="sector" label="Sector" role="agent" %}{% /field %}
50
-
51
- **Business summary:**
52
-
53
- {% field kind="string" id="business_summary" label="Business Summary" role="agent" maxLength=500 validate=[{id: "min_words", min: 20}] %}{% /field %}
54
- {% instructions ref="business_summary" %}Brief description of what the company does. Minimum 20 words.{% /instructions %}
55
-
56
- **Revenue segments:**
57
-
58
- {% field kind="string_list" id="revenue_segments" label="Revenue Segments" role="agent" minItems=1 validate=[{id: "sum_to_percent_list", target: 100}] %}{% /field %}
59
- {% instructions ref="revenue_segments" %}List each segment with percentage of revenue. Format: "Segment Name: XX%". Should sum to 100%.{% /instructions %}
60
-
61
- {% /group %}
62
-
63
- ## Recent Earnings
64
-
65
- {% group id="recent_earnings" title="Recent Earnings" %}
66
-
67
- **Fiscal quarter:**
68
-
69
- {% field kind="string" id="fiscal_quarter" label="Fiscal Quarter" role="agent" required=true %}{% /field %}
70
- {% instructions ref="fiscal_quarter" %}Most recent reported quarter (e.g., "Q3 FY2024" or "Q4 2024").{% /instructions %}
71
-
72
- **Revenue:**
73
-
74
- {% field kind="number" id="revenue" label="Revenue (millions)" role="agent" %}{% /field %}
75
- {% instructions ref="revenue" %}Total revenue in millions USD.{% /instructions %}
76
-
77
- **Revenue growth YoY:**
78
-
79
- {% field kind="number" id="revenue_growth" label="Revenue Growth YoY (%)" role="agent" min=-100 max=1000 %}{% /field %}
80
-
81
- **EPS:**
82
-
83
- {% field kind="number" id="eps" label="Earnings Per Share" role="agent" %}{% /field %}
84
- {% instructions ref="eps" %}Diluted EPS for the quarter.{% /instructions %}
85
-
86
- **Beat/miss consensus:**
87
-
88
- {% field kind="single_select" id="beat_miss" label="Beat/Miss Consensus" role="agent" %}
89
- - [ ] Beat {% #beat %}
90
- - [ ] Met {% #met %}
91
- - [ ] Missed {% #missed %}
92
- {% /field %}
93
-
94
- **Beat/miss details:**
95
-
96
- {% field kind="string" id="beat_miss_details" label="Beat/Miss Details" role="agent" validate=[{id: "required_if_set", when: "beat_miss"}] %}{% /field %}
97
- {% instructions ref="beat_miss_details" %}Required if beat/miss is selected. Explain the variance from consensus.{% /instructions %}
98
-
99
- {% /group %}
100
-
101
- ## Key Metrics
102
-
103
- {% group id="key_metrics" title="Key Metrics" %}
104
-
105
- **Gross margin:**
106
-
107
- {% field kind="number" id="gross_margin" label="Gross Margin (%)" role="agent" min=0 max=100 %}{% /field %}
108
-
109
- **Operating margin:**
110
-
111
- {% field kind="number" id="operating_margin" label="Operating Margin (%)" role="agent" min=-100 max=100 %}{% /field %}
112
-
113
- **Market cap:**
114
-
115
- {% field kind="number" id="market_cap" label="Market Cap (billions)" role="agent" %}{% /field %}
116
- {% instructions ref="market_cap" %}Current market capitalization in billions USD.{% /instructions %}
117
-
118
- **P/E ratio:**
119
-
120
- {% field kind="number" id="pe_ratio" label="P/E Ratio" role="agent" %}{% /field %}
121
- {% instructions ref="pe_ratio" %}Trailing twelve month P/E ratio.{% /instructions %}
122
-
123
- {% /group %}
124
-
125
- ## Outlook
126
-
127
- {% group id="outlook" title="Outlook" %}
128
-
129
- **Guidance:**
130
-
131
- {% field kind="string" id="guidance" label="Forward Guidance" role="agent" maxLength=500 %}{% /field %}
132
- {% instructions ref="guidance" %}Summary of company's forward guidance for next quarter/year.{% /instructions %}
133
-
134
- **Key risks:**
135
-
136
- {% field kind="string_list" id="key_risks" label="Key Risks" role="agent" minItems=0 maxItems=5 %}{% /field %}
137
- {% instructions ref="key_risks" %}Primary risks or concerns (up to 5).{% /instructions %}
138
-
139
- **Analyst sentiment:**
140
-
141
- {% field kind="single_select" id="analyst_sentiment" label="Analyst Sentiment" role="agent" %}
142
- - [ ] Bullish {% #bullish %}
143
- - [ ] Neutral {% #neutral %}
144
- - [ ] Bearish {% #bearish %}
145
- {% /field %}
146
-
147
- **Sentiment rationale:**
148
-
149
- {% field kind="string" id="sentiment_rationale" label="Sentiment Rationale" role="agent" validate=[{id: "required_if_set", when: "analyst_sentiment"}, {id: "min_words", min: 10}] %}{% /field %}
150
- {% instructions ref="sentiment_rationale" %}Required if sentiment is selected. Explain why (minimum 10 words).{% /instructions %}
151
-
152
- **Summary:**
153
-
154
- {% field kind="string" id="summary" label="One-Line Summary" role="agent" maxLength=300 validate=[{id: "min_words", min: 10}, {id: "max_words", max: 50}] %}{% /field %}
155
- {% instructions ref="summary" %}Brief overall assessment (10-50 words).{% /instructions %}
156
-
157
- {% /group %}
158
-
159
- {% /form %}