markform 0.1.7 → 0.1.9

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 (40) hide show
  1. package/README.md +451 -240
  2. package/dist/ai-sdk.d.mts +1 -1
  3. package/dist/ai-sdk.mjs +2 -2
  4. package/dist/{apply-g23rRn7p.mjs → apply-B2kt6C2z.mjs} +136 -32
  5. package/dist/bin.mjs +1 -1
  6. package/dist/{cli-Bqlm-WWw.mjs → cli-Dt_PlYi_.mjs} +519 -60
  7. package/dist/cli.mjs +1 -1
  8. package/dist/{coreTypes-__Cwxz5q.mjs → coreTypes-B1oI7qvV.mjs} +52 -4
  9. package/dist/{coreTypes-DCvD7feM.d.mts → coreTypes-JCPm418M.d.mts} +265 -9
  10. package/dist/index.d.mts +22 -10
  11. package/dist/index.mjs +5 -5
  12. package/dist/{session-DruaYPZ1.mjs → session-CzCh6JeY.mjs} +1 -1
  13. package/dist/{session-CgCNni0e.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-BiuxbzF3.mjs → src-DFsC5wwy.mjs} +308 -59
  17. package/docs/markform-apis.md +30 -1
  18. package/docs/markform-reference.md +65 -6
  19. package/docs/markform-spec.md +3 -3
  20. package/examples/movie-research/{movie-research-deep.form.md → movie-deep-research.form.md} +17 -58
  21. package/examples/movie-research/movie-research-demo.form.md +25 -34
  22. package/examples/rejection-test/rejection-test-mock-filled.form.md +41 -0
  23. package/examples/rejection-test/rejection-test-mock-filled.report.md +15 -0
  24. package/examples/rejection-test/rejection-test-mock-filled.schema.json +59 -0
  25. package/examples/rejection-test/rejection-test-mock-filled.yml +13 -0
  26. package/examples/rejection-test/rejection-test.form.md +35 -0
  27. package/examples/rejection-test/rejection-test.session.yaml +534 -0
  28. package/examples/simple/simple-mock-filled.report.md +96 -0
  29. package/examples/simple/simple-mock-filled.schema.json +374 -0
  30. package/examples/simple/simple-mock-filled.yml +87 -0
  31. package/examples/simple/simple-skipped-filled.report.md +90 -0
  32. package/examples/simple/simple-skipped-filled.schema.json +374 -0
  33. package/examples/simple/simple-skipped-filled.yml +77 -0
  34. package/examples/simple/simple-with-skips.session.yaml +1969 -21
  35. package/examples/simple/simple.session.yaml +1982 -21
  36. package/package.json +1 -1
  37. package/examples/earnings-analysis/earnings-analysis.form.md +0 -159
  38. package/examples/earnings-analysis/earnings-analysis.raw.md +0 -801
  39. package/examples/earnings-analysis/earnings-analysis.valid.ts +0 -198
  40. package/examples/movie-research/movie-research-basic.form.md +0 -169
@@ -120,9 +120,656 @@ turns:
120
120
  test: na
121
121
  after:
122
122
  required_issue_count: 2
123
- markdown_sha256: e2bc5c169fc2650828ad870267eeb83c2ed4a219afb38570c5004e753260290d
123
+ markdown_sha256: e6cb237f40f14343b6616099b1ab4cededabc99e9434c2e72ea600b4473d0048
124
124
  answered_field_count: 10
125
125
  skipped_field_count: 0
126
+ context:
127
+ system_prompt: |-
128
+ # Form Instructions
129
+ Carefully research answers to all questions in the form, using all available tools you have.
130
+
131
+ Guidelines:
132
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
133
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
134
+ 3. NEVER fabricate or guess information - only use data you can verify
135
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
136
+ 5. For string fields: use appropriate text from verified sources
137
+ 6. For number fields: use appropriate numeric values from verified sources
138
+ 7. For single_select: choose one valid option ID
139
+ 8. For multi_select: choose one or more valid option IDs
140
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
141
+ - Mode "simple": done (checked) or todo (unchecked)
142
+ - Mode "multi": done, todo, or na (not applicable)
143
+ - Mode "explicit": yes or no (must explicitly answer)
144
+
145
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
146
+
147
+ Always use the fill_form tool to submit your field values.
148
+
149
+
150
+ # Instructions for agent role
151
+ Complete the remaining fields based on the provided context.
152
+
153
+ # Field-specific instructions
154
+ **confirmations:** Answer yes or no for each confirmation. All must be explicitly answered.
155
+ **event_date:** Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
156
+ **founded_year:** Enter the year the company was founded (1900-2030).
157
+ **name:** Enter your full name (2-50 characters).
158
+ **tags:** Add 1-5 unique tags (each at least 2 characters).
159
+ **tasks_multi:** Track task progress. All must reach done or na state to complete.
160
+ context_prompt: |-
161
+ # Current Form State
162
+
163
+ Below is the complete form with all currently filled values.
164
+ Fields marked with `[ ]` or empty values still need to be filled.
165
+
166
+ ```markdown
167
+ ---
168
+ markform:
169
+ spec: "MF/0.1"
170
+ run_mode: "interactive"
171
+ role_instructions:
172
+ user: "Fill in the fields you have direct knowledge of."
173
+ agent: "Complete the remaining fields based on the provided context."
174
+ ---
175
+
176
+ {% form id="simple_test" title="Simple Test Form" %}
177
+
178
+ {% description ref="simple_test" %}
179
+ A fully interactive form demonstrating all Markform v0.1 field types.
180
+ Fill all fields using interactive prompts - no LLM API key needed.
181
+ {% /description %}
182
+
183
+ {% group id="basic_fields" title="Basic Fields" %}
184
+
185
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}{% /field %}
186
+
187
+ {% instructions ref="name" %}
188
+ Enter your full name (2-50 characters).
189
+ {% /instructions %}
190
+
191
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}{% /field %}
192
+
193
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}{% /field %}
194
+
195
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}{% /field %}
196
+
197
+ {% instructions ref="score" %}
198
+ Enter a score between 0 and 100 (optional).
199
+ {% /instructions %}
200
+
201
+ {% /group %}
202
+
203
+ {% group id="list_fields" title="List Fields" %}
204
+
205
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}{% /field %}
206
+
207
+ {% instructions ref="tags" %}
208
+ Add 1-5 unique tags (each at least 2 characters).
209
+ {% /instructions %}
210
+
211
+ {% /group %}
212
+
213
+ {% group id="selection_fields" title="Selection Fields" %}
214
+
215
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
216
+ - [ ] Low {% #low %}
217
+ - [ ] Medium {% #medium %}
218
+ - [ ] High {% #high %}
219
+ {% /field %}
220
+
221
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
222
+ - [ ] Frontend {% #frontend %}
223
+ - [ ] Backend {% #backend %}
224
+ - [ ] Database {% #database %}
225
+ - [ ] DevOps {% #devops %}
226
+ {% /field %}
227
+
228
+ {% /group %}
229
+
230
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
231
+
232
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
233
+ - [ ] Research {% #research %}
234
+ - [ ] Design {% #design %}
235
+ - [ ] Implement {% #implement %}
236
+ - [ ] Test {% #test %}
237
+ {% /field %}
238
+
239
+ {% instructions ref="tasks_multi" %}
240
+ Track task progress. All must reach done or na state to complete.
241
+ {% /instructions %}
242
+
243
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
244
+ - [ ] I have read the guidelines {% #read_guidelines %}
245
+ - [ ] I agree to the terms {% #agree_terms %}
246
+ {% /field %}
247
+
248
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
249
+ - [ ] Data has been backed up {% #backed_up %}
250
+ - [ ] Stakeholders notified {% #notified %}
251
+ {% /field %}
252
+
253
+ {% instructions ref="confirmations" %}
254
+ Answer yes or no for each confirmation. All must be explicitly answered.
255
+ {% /instructions %}
256
+
257
+ {% /group %}
258
+
259
+ {% group id="url_fields" title="URL Fields" %}
260
+
261
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}{% /field %}
262
+
263
+ {% instructions ref="website" %}
264
+ Enter your website URL (must be http or https).
265
+ {% /instructions %}
266
+
267
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}{% /field %}
268
+
269
+ {% instructions ref="references" %}
270
+ Add 1-5 unique reference URLs for sources or documentation.
271
+ {% /instructions %}
272
+
273
+ {% /group %}
274
+
275
+ {% group id="date_fields" title="Date and Year Fields" %}
276
+
277
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}{% /field %}
278
+
279
+ {% instructions ref="event_date" %}
280
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
281
+ {% /instructions %}
282
+
283
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}{% /field %}
284
+
285
+ {% instructions ref="founded_year" %}
286
+ Enter the year the company was founded (1900-2030).
287
+ {% /instructions %}
288
+
289
+ {% /group %}
290
+
291
+ {% group id="table_fields" title="Table Fields" %}
292
+
293
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
294
+
295
+ {% instructions ref="team_members" %}
296
+ Add team members with their name (required), role, and start date.
297
+ {% /instructions %}
298
+
299
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 %}{% /field %}
300
+
301
+ {% instructions ref="project_tasks" %}
302
+ Optionally add project tasks with estimated hours and reference links.
303
+ {% /instructions %}
304
+
305
+ {% /group %}
306
+
307
+ {% group id="optional_fields" title="Optional Fields" %}
308
+
309
+ {% field kind="string" id="notes" role="user" label="Notes" %}{% /field %}
310
+
311
+ {% instructions ref="notes" %}
312
+ Add any relevant notes or observations (optional).
313
+ {% /instructions %}
314
+
315
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" %}{% /field %}
316
+
317
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}{% /field %}
318
+
319
+ {% instructions ref="related_url" %}
320
+ Optionally add a URL to related documentation or resources.
321
+ {% /instructions %}
322
+
323
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" %}{% /field %}
324
+
325
+ {% instructions ref="optional_date" %}
326
+ Optionally add a date (YYYY-MM-DD format).
327
+ {% /instructions %}
328
+
329
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" %}{% /field %}
330
+
331
+ {% instructions ref="optional_year" %}
332
+ Optionally add a year.
333
+ {% /instructions %}
334
+
335
+ {% /group %}
336
+
337
+ {% /form %}
338
+
339
+ ```
340
+
341
+ # Current Form Issues
342
+
343
+ You need to address 10 issues. Here are the current issues:
344
+
345
+ - **age** (field): Required field "Age" is empty
346
+ Severity: required, Priority: P1
347
+ Type: number
348
+ Set: { op: "set_number", fieldId: "age", value: 123 }
349
+ This field is required.
350
+
351
+ - **categories** (field): Required field "Categories" has no selections
352
+ Severity: required, Priority: P1
353
+ Type: multi_select
354
+ Options: frontend, backend, database, devops
355
+ Set: { op: "set_multi_select", fieldId: "categories", selected: ["opt1", "opt2"] }
356
+ This field is required.
357
+
358
+ - **confirmations** (field): All items in "Confirmations (Explicit Mode)" must be answered (2 unfilled)
359
+ Severity: required, Priority: P1
360
+ Type: checkboxes
361
+ Options: backed_up, notified
362
+ Mode: explicit
363
+ Set: { op: "set_checkboxes", fieldId: "confirmations", values: { "opt1": "done", "opt2": "todo" } }
364
+ This field is required.
365
+
366
+ - **email** (field): Required field "Email" is empty
367
+ Severity: required, Priority: P1
368
+ Type: string
369
+ Set: { op: "set_string", fieldId: "email", value: "..." }
370
+ This field is required.
371
+
372
+ - **event_date** (field): Required field "Event Date" is empty
373
+ Severity: required, Priority: P1
374
+ Type: date
375
+ Set: { op: "set_date", fieldId: "event_date", value: "2024-01-15" }
376
+ This field is required.
377
+
378
+ - **founded_year** (field): Required field "Founded Year" is empty
379
+ Severity: required, Priority: P1
380
+ Type: year
381
+ Set: { op: "set_year", fieldId: "founded_year", value: 2024 }
382
+ This field is required.
383
+
384
+ - **name** (field): Required field "Name" is empty
385
+ Severity: required, Priority: P1
386
+ Type: string
387
+ Set: { op: "set_string", fieldId: "name", value: "..." }
388
+ This field is required.
389
+
390
+ - **priority** (field): Required field "Priority" has no selection
391
+ Severity: required, Priority: P1
392
+ Type: single_select
393
+ Options: low, medium, high
394
+ Set: { op: "set_single_select", fieldId: "priority", selected: "option_id" }
395
+ This field is required.
396
+
397
+ - **tags** (field): Required field "Tags" is empty
398
+ Severity: required, Priority: P1
399
+ Type: string_list
400
+ Set: { op: "set_string_list", fieldId: "tags", items: ["...", "..."] }
401
+ This field is required.
402
+
403
+ - **tasks_multi** (field): All items in "Tasks (Multi Mode)" must be completed
404
+ Severity: required, Priority: P1
405
+ Type: checkboxes
406
+ Options: research, design, implement, test
407
+ Mode: multi
408
+ Set: { op: "set_checkboxes", fieldId: "tasks_multi", values: { "opt1": "done", "opt2": "todo" } }
409
+ This field is required.
410
+
411
+ # General Instructions
412
+
413
+ Use the fill_form tool to submit patches for the fields above.
414
+ For table fields, each row is an object with column ID keys.
415
+ wire:
416
+ request:
417
+ system: |-
418
+ # Form Instructions
419
+ Carefully research answers to all questions in the form, using all available tools you have.
420
+
421
+ Guidelines:
422
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
423
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
424
+ 3. NEVER fabricate or guess information - only use data you can verify
425
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
426
+ 5. For string fields: use appropriate text from verified sources
427
+ 6. For number fields: use appropriate numeric values from verified sources
428
+ 7. For single_select: choose one valid option ID
429
+ 8. For multi_select: choose one or more valid option IDs
430
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
431
+ - Mode "simple": done (checked) or todo (unchecked)
432
+ - Mode "multi": done, todo, or na (not applicable)
433
+ - Mode "explicit": yes or no (must explicitly answer)
434
+
435
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
436
+
437
+ Always use the fill_form tool to submit your field values.
438
+
439
+
440
+ # Instructions for agent role
441
+ Complete the remaining fields based on the provided context.
442
+
443
+ # Field-specific instructions
444
+ **confirmations:** Answer yes or no for each confirmation. All must be explicitly answered.
445
+ **event_date:** Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
446
+ **founded_year:** Enter the year the company was founded (1900-2030).
447
+ **name:** Enter your full name (2-50 characters).
448
+ **tags:** Add 1-5 unique tags (each at least 2 characters).
449
+ **tasks_multi:** Track task progress. All must reach done or na state to complete.
450
+ prompt: |-
451
+ # Current Form State
452
+
453
+ Below is the complete form with all currently filled values.
454
+ Fields marked with `[ ]` or empty values still need to be filled.
455
+
456
+ ```markdown
457
+ ---
458
+ markform:
459
+ spec: "MF/0.1"
460
+ run_mode: "interactive"
461
+ role_instructions:
462
+ user: "Fill in the fields you have direct knowledge of."
463
+ agent: "Complete the remaining fields based on the provided context."
464
+ ---
465
+
466
+ {% form id="simple_test" title="Simple Test Form" %}
467
+
468
+ {% description ref="simple_test" %}
469
+ A fully interactive form demonstrating all Markform v0.1 field types.
470
+ Fill all fields using interactive prompts - no LLM API key needed.
471
+ {% /description %}
472
+
473
+ {% group id="basic_fields" title="Basic Fields" %}
474
+
475
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}{% /field %}
476
+
477
+ {% instructions ref="name" %}
478
+ Enter your full name (2-50 characters).
479
+ {% /instructions %}
480
+
481
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}{% /field %}
482
+
483
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}{% /field %}
484
+
485
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}{% /field %}
486
+
487
+ {% instructions ref="score" %}
488
+ Enter a score between 0 and 100 (optional).
489
+ {% /instructions %}
490
+
491
+ {% /group %}
492
+
493
+ {% group id="list_fields" title="List Fields" %}
494
+
495
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}{% /field %}
496
+
497
+ {% instructions ref="tags" %}
498
+ Add 1-5 unique tags (each at least 2 characters).
499
+ {% /instructions %}
500
+
501
+ {% /group %}
502
+
503
+ {% group id="selection_fields" title="Selection Fields" %}
504
+
505
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
506
+ - [ ] Low {% #low %}
507
+ - [ ] Medium {% #medium %}
508
+ - [ ] High {% #high %}
509
+ {% /field %}
510
+
511
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
512
+ - [ ] Frontend {% #frontend %}
513
+ - [ ] Backend {% #backend %}
514
+ - [ ] Database {% #database %}
515
+ - [ ] DevOps {% #devops %}
516
+ {% /field %}
517
+
518
+ {% /group %}
519
+
520
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
521
+
522
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
523
+ - [ ] Research {% #research %}
524
+ - [ ] Design {% #design %}
525
+ - [ ] Implement {% #implement %}
526
+ - [ ] Test {% #test %}
527
+ {% /field %}
528
+
529
+ {% instructions ref="tasks_multi" %}
530
+ Track task progress. All must reach done or na state to complete.
531
+ {% /instructions %}
532
+
533
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
534
+ - [ ] I have read the guidelines {% #read_guidelines %}
535
+ - [ ] I agree to the terms {% #agree_terms %}
536
+ {% /field %}
537
+
538
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
539
+ - [ ] Data has been backed up {% #backed_up %}
540
+ - [ ] Stakeholders notified {% #notified %}
541
+ {% /field %}
542
+
543
+ {% instructions ref="confirmations" %}
544
+ Answer yes or no for each confirmation. All must be explicitly answered.
545
+ {% /instructions %}
546
+
547
+ {% /group %}
548
+
549
+ {% group id="url_fields" title="URL Fields" %}
550
+
551
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}{% /field %}
552
+
553
+ {% instructions ref="website" %}
554
+ Enter your website URL (must be http or https).
555
+ {% /instructions %}
556
+
557
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}{% /field %}
558
+
559
+ {% instructions ref="references" %}
560
+ Add 1-5 unique reference URLs for sources or documentation.
561
+ {% /instructions %}
562
+
563
+ {% /group %}
564
+
565
+ {% group id="date_fields" title="Date and Year Fields" %}
566
+
567
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}{% /field %}
568
+
569
+ {% instructions ref="event_date" %}
570
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
571
+ {% /instructions %}
572
+
573
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}{% /field %}
574
+
575
+ {% instructions ref="founded_year" %}
576
+ Enter the year the company was founded (1900-2030).
577
+ {% /instructions %}
578
+
579
+ {% /group %}
580
+
581
+ {% group id="table_fields" title="Table Fields" %}
582
+
583
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
584
+
585
+ {% instructions ref="team_members" %}
586
+ Add team members with their name (required), role, and start date.
587
+ {% /instructions %}
588
+
589
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 %}{% /field %}
590
+
591
+ {% instructions ref="project_tasks" %}
592
+ Optionally add project tasks with estimated hours and reference links.
593
+ {% /instructions %}
594
+
595
+ {% /group %}
596
+
597
+ {% group id="optional_fields" title="Optional Fields" %}
598
+
599
+ {% field kind="string" id="notes" role="user" label="Notes" %}{% /field %}
600
+
601
+ {% instructions ref="notes" %}
602
+ Add any relevant notes or observations (optional).
603
+ {% /instructions %}
604
+
605
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" %}{% /field %}
606
+
607
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}{% /field %}
608
+
609
+ {% instructions ref="related_url" %}
610
+ Optionally add a URL to related documentation or resources.
611
+ {% /instructions %}
612
+
613
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" %}{% /field %}
614
+
615
+ {% instructions ref="optional_date" %}
616
+ Optionally add a date (YYYY-MM-DD format).
617
+ {% /instructions %}
618
+
619
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" %}{% /field %}
620
+
621
+ {% instructions ref="optional_year" %}
622
+ Optionally add a year.
623
+ {% /instructions %}
624
+
625
+ {% /group %}
626
+
627
+ {% /form %}
628
+
629
+ ```
630
+
631
+ # Current Form Issues
632
+
633
+ You need to address 10 issues. Here are the current issues:
634
+
635
+ - **age** (field): Required field "Age" is empty
636
+ Severity: required, Priority: P1
637
+ Type: number
638
+ Set: { op: "set_number", fieldId: "age", value: 123 }
639
+ This field is required.
640
+
641
+ - **categories** (field): Required field "Categories" has no selections
642
+ Severity: required, Priority: P1
643
+ Type: multi_select
644
+ Options: frontend, backend, database, devops
645
+ Set: { op: "set_multi_select", fieldId: "categories", selected: ["opt1", "opt2"] }
646
+ This field is required.
647
+
648
+ - **confirmations** (field): All items in "Confirmations (Explicit Mode)" must be answered (2 unfilled)
649
+ Severity: required, Priority: P1
650
+ Type: checkboxes
651
+ Options: backed_up, notified
652
+ Mode: explicit
653
+ Set: { op: "set_checkboxes", fieldId: "confirmations", values: { "opt1": "done", "opt2": "todo" } }
654
+ This field is required.
655
+
656
+ - **email** (field): Required field "Email" is empty
657
+ Severity: required, Priority: P1
658
+ Type: string
659
+ Set: { op: "set_string", fieldId: "email", value: "..." }
660
+ This field is required.
661
+
662
+ - **event_date** (field): Required field "Event Date" is empty
663
+ Severity: required, Priority: P1
664
+ Type: date
665
+ Set: { op: "set_date", fieldId: "event_date", value: "2024-01-15" }
666
+ This field is required.
667
+
668
+ - **founded_year** (field): Required field "Founded Year" is empty
669
+ Severity: required, Priority: P1
670
+ Type: year
671
+ Set: { op: "set_year", fieldId: "founded_year", value: 2024 }
672
+ This field is required.
673
+
674
+ - **name** (field): Required field "Name" is empty
675
+ Severity: required, Priority: P1
676
+ Type: string
677
+ Set: { op: "set_string", fieldId: "name", value: "..." }
678
+ This field is required.
679
+
680
+ - **priority** (field): Required field "Priority" has no selection
681
+ Severity: required, Priority: P1
682
+ Type: single_select
683
+ Options: low, medium, high
684
+ Set: { op: "set_single_select", fieldId: "priority", selected: "option_id" }
685
+ This field is required.
686
+
687
+ - **tags** (field): Required field "Tags" is empty
688
+ Severity: required, Priority: P1
689
+ Type: string_list
690
+ Set: { op: "set_string_list", fieldId: "tags", items: ["...", "..."] }
691
+ This field is required.
692
+
693
+ - **tasks_multi** (field): All items in "Tasks (Multi Mode)" must be completed
694
+ Severity: required, Priority: P1
695
+ Type: checkboxes
696
+ Options: research, design, implement, test
697
+ Mode: multi
698
+ Set: { op: "set_checkboxes", fieldId: "tasks_multi", values: { "opt1": "done", "opt2": "todo" } }
699
+ This field is required.
700
+
701
+ # General Instructions
702
+
703
+ Use the fill_form tool to submit patches for the fields above.
704
+ For table fields, each row is an object with column ID keys.
705
+ tools:
706
+ fill_form:
707
+ description: Fill form fields by submitting patches. Each patch sets a value for one field. Use the field IDs from the issues list. Return patches for all issues you can address.
708
+ input_schema:
709
+ $defs:
710
+ patch:
711
+ description: A patch operation (see tool description for full schema)
712
+ properties:
713
+ patches:
714
+ description: Array of patches to apply to the form
715
+ items:
716
+ $ref: '#/$defs/patch'
717
+ type: array
718
+ required:
719
+ - patches
720
+ type: object
721
+ response:
722
+ steps:
723
+ - tool_calls:
724
+ - tool_name: fill_form
725
+ input:
726
+ patches:
727
+ - field_id: age
728
+ op: set_number
729
+ value: 32
730
+ - field_id: categories
731
+ op: set_multi_select
732
+ selected:
733
+ - frontend
734
+ - backend
735
+ - field_id: confirmations
736
+ op: set_checkboxes
737
+ values:
738
+ backed_up: yes
739
+ notified: no
740
+ - field_id: email
741
+ op: set_string
742
+ value: alice@example.com
743
+ - field_id: event_date
744
+ op: set_date
745
+ value: 2025-06-15
746
+ - field_id: founded_year
747
+ op: set_year
748
+ value: 2020
749
+ - field_id: name
750
+ op: set_string
751
+ value: Alice Johnson
752
+ - field_id: priority
753
+ op: set_single_select
754
+ selected: medium
755
+ - field_id: tags
756
+ items:
757
+ - typescript
758
+ - testing
759
+ - forms
760
+ op: set_string_list
761
+ - field_id: tasks_multi
762
+ op: set_checkboxes
763
+ values:
764
+ design: done
765
+ implement: done
766
+ research: done
767
+ test: na
768
+ tool_results: []
769
+ text: null
770
+ usage:
771
+ input_tokens: 0
772
+ output_tokens: 0
126
773
  - turn: 2
127
774
  inspect:
128
775
  issues:
@@ -140,50 +787,50 @@ turns:
140
787
  priority: 1
141
788
  - ref: notes
142
789
  scope: field
143
- reason: optional_empty
144
- message: Optional field has no value
790
+ reason: optional_unanswered
791
+ message: Optional field not yet addressed
145
792
  severity: recommended
146
793
  priority: 3
147
794
  - ref: optional_date
148
795
  scope: field
149
- reason: optional_empty
150
- message: Optional field has no value
796
+ reason: optional_unanswered
797
+ message: Optional field not yet addressed
151
798
  severity: recommended
152
799
  priority: 3
153
800
  - ref: optional_number
154
801
  scope: field
155
- reason: optional_empty
156
- message: Optional field has no value
802
+ reason: optional_unanswered
803
+ message: Optional field not yet addressed
157
804
  severity: recommended
158
805
  priority: 3
159
806
  - ref: optional_year
160
807
  scope: field
161
- reason: optional_empty
162
- message: Optional field has no value
808
+ reason: optional_unanswered
809
+ message: Optional field not yet addressed
163
810
  severity: recommended
164
811
  priority: 3
165
812
  - ref: project_tasks
166
813
  scope: field
167
- reason: optional_empty
168
- message: Optional field has no value
814
+ reason: optional_unanswered
815
+ message: Optional field not yet addressed
169
816
  severity: recommended
170
817
  priority: 3
171
818
  - ref: references
172
819
  scope: field
173
- reason: optional_empty
174
- message: Optional field has no value
820
+ reason: optional_unanswered
821
+ message: Optional field not yet addressed
175
822
  severity: recommended
176
823
  priority: 3
177
824
  - ref: related_url
178
825
  scope: field
179
- reason: optional_empty
180
- message: Optional field has no value
826
+ reason: optional_unanswered
827
+ message: Optional field not yet addressed
181
828
  severity: recommended
182
829
  priority: 3
183
830
  - ref: score
184
831
  scope: field
185
- reason: optional_empty
186
- message: Optional field has no value
832
+ reason: optional_unanswered
833
+ message: Optional field not yet addressed
187
834
  severity: recommended
188
835
  priority: 3
189
836
  apply:
@@ -229,16 +876,713 @@ turns:
229
876
  value: 87.5
230
877
  after:
231
878
  required_issue_count: 0
232
- markdown_sha256: e508fd266c842961a1fae7cd203be0ab529c71c8c3565d76ca766256ebe4fb44
879
+ markdown_sha256: 54b5d3fe131f5dd0179a116bf7d25f356ada1eb5cec0df2223a2716e145801ee
233
880
  answered_field_count: 16
234
881
  skipped_field_count: 4
882
+ context:
883
+ system_prompt: |-
884
+ # Form Instructions
885
+ Carefully research answers to all questions in the form, using all available tools you have.
886
+
887
+ Guidelines:
888
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
889
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
890
+ 3. NEVER fabricate or guess information - only use data you can verify
891
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
892
+ 5. For string fields: use appropriate text from verified sources
893
+ 6. For number fields: use appropriate numeric values from verified sources
894
+ 7. For single_select: choose one valid option ID
895
+ 8. For multi_select: choose one or more valid option IDs
896
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
897
+ - Mode "simple": done (checked) or todo (unchecked)
898
+ - Mode "multi": done, todo, or na (not applicable)
899
+ - Mode "explicit": yes or no (must explicitly answer)
900
+
901
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
902
+
903
+ Always use the fill_form tool to submit your field values.
904
+
905
+
906
+ # Instructions for agent role
907
+ Complete the remaining fields based on the provided context.
908
+
909
+ # Field-specific instructions
910
+ **website:** Enter your website URL (must be http or https).
911
+ **notes:** Add any relevant notes or observations (optional).
912
+ **optional_date:** Optionally add a date (YYYY-MM-DD format).
913
+ **optional_year:** Optionally add a year.
914
+ **project_tasks:** Optionally add project tasks with estimated hours and reference links.
915
+ **references:** Add 1-5 unique reference URLs for sources or documentation.
916
+ **related_url:** Optionally add a URL to related documentation or resources.
917
+ **score:** Enter a score between 0 and 100 (optional).
918
+ context_prompt: |-
919
+ # Current Form State
920
+
921
+ Below is the complete form with all currently filled values.
922
+ Fields marked with `[ ]` or empty values still need to be filled.
923
+
924
+ ```markdown
925
+ ---
926
+ markform:
927
+ spec: "MF/0.1"
928
+ run_mode: "interactive"
929
+ role_instructions:
930
+ user: "Fill in the fields you have direct knowledge of."
931
+ agent: "Complete the remaining fields based on the provided context."
932
+ ---
933
+
934
+ {% form id="simple_test" title="Simple Test Form" %}
935
+
936
+ {% description ref="simple_test" %}
937
+ A fully interactive form demonstrating all Markform v0.1 field types.
938
+ Fill all fields using interactive prompts - no LLM API key needed.
939
+ {% /description %}
940
+
941
+ {% group id="basic_fields" title="Basic Fields" %}
942
+
943
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}
944
+ ```value
945
+ Alice Johnson
946
+ ```
947
+ {% /field %}
948
+
949
+ {% instructions ref="name" %}
950
+ Enter your full name (2-50 characters).
951
+ {% /instructions %}
952
+
953
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}
954
+ ```value
955
+ alice@example.com
956
+ ```
957
+ {% /field %}
958
+
959
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}
960
+ ```value
961
+ 32
962
+ ```
963
+ {% /field %}
964
+
965
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}{% /field %}
966
+
967
+ {% instructions ref="score" %}
968
+ Enter a score between 0 and 100 (optional).
969
+ {% /instructions %}
970
+
971
+ {% /group %}
972
+
973
+ {% group id="list_fields" title="List Fields" %}
974
+
975
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}
976
+ ```value
977
+ typescript
978
+ testing
979
+ forms
980
+ ```
981
+ {% /field %}
982
+
983
+ {% instructions ref="tags" %}
984
+ Add 1-5 unique tags (each at least 2 characters).
985
+ {% /instructions %}
986
+
987
+ {% /group %}
988
+
989
+ {% group id="selection_fields" title="Selection Fields" %}
990
+
991
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
992
+ - [ ] Low {% #low %}
993
+ - [x] Medium {% #medium %}
994
+ - [ ] High {% #high %}
995
+ {% /field %}
996
+
997
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
998
+ - [x] Frontend {% #frontend %}
999
+ - [x] Backend {% #backend %}
1000
+ - [ ] Database {% #database %}
1001
+ - [ ] DevOps {% #devops %}
1002
+ {% /field %}
1003
+
1004
+ {% /group %}
1005
+
1006
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
1007
+
1008
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
1009
+ - [x] Research {% #research %}
1010
+ - [x] Design {% #design %}
1011
+ - [x] Implement {% #implement %}
1012
+ - [-] Test {% #test %}
1013
+ {% /field %}
1014
+
1015
+ {% instructions ref="tasks_multi" %}
1016
+ Track task progress. All must reach done or na state to complete.
1017
+ {% /instructions %}
1018
+
1019
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
1020
+ - [ ] I have read the guidelines {% #read_guidelines %}
1021
+ - [ ] I agree to the terms {% #agree_terms %}
1022
+ {% /field %}
1023
+
1024
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
1025
+ - [y] Data has been backed up {% #backed_up %}
1026
+ - [n] Stakeholders notified {% #notified %}
1027
+ {% /field %}
1028
+
1029
+ {% instructions ref="confirmations" %}
1030
+ Answer yes or no for each confirmation. All must be explicitly answered.
1031
+ {% /instructions %}
1032
+
1033
+ {% /group %}
1034
+
1035
+ {% group id="url_fields" title="URL Fields" %}
1036
+
1037
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}{% /field %}
1038
+
1039
+ {% instructions ref="website" %}
1040
+ Enter your website URL (must be http or https).
1041
+ {% /instructions %}
1042
+
1043
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}{% /field %}
1044
+
1045
+ {% instructions ref="references" %}
1046
+ Add 1-5 unique reference URLs for sources or documentation.
1047
+ {% /instructions %}
1048
+
1049
+ {% /group %}
1050
+
1051
+ {% group id="date_fields" title="Date and Year Fields" %}
1052
+
1053
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}
1054
+ ```value
1055
+ 2025-06-15
1056
+ ```
1057
+ {% /field %}
1058
+
1059
+ {% instructions ref="event_date" %}
1060
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
1061
+ {% /instructions %}
1062
+
1063
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}
1064
+ ```value
1065
+ 2020
1066
+ ```
1067
+ {% /field %}
1068
+
1069
+ {% instructions ref="founded_year" %}
1070
+ Enter the year the company was founded (1900-2030).
1071
+ {% /instructions %}
1072
+
1073
+ {% /group %}
1074
+
1075
+ {% group id="table_fields" title="Table Fields" %}
1076
+
1077
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
1078
+
1079
+ {% instructions ref="team_members" %}
1080
+ Add team members with their name (required), role, and start date.
1081
+ {% /instructions %}
1082
+
1083
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 %}{% /field %}
1084
+
1085
+ {% instructions ref="project_tasks" %}
1086
+ Optionally add project tasks with estimated hours and reference links.
1087
+ {% /instructions %}
1088
+
1089
+ {% /group %}
1090
+
1091
+ {% group id="optional_fields" title="Optional Fields" %}
1092
+
1093
+ {% field kind="string" id="notes" role="user" label="Notes" %}{% /field %}
1094
+
1095
+ {% instructions ref="notes" %}
1096
+ Add any relevant notes or observations (optional).
1097
+ {% /instructions %}
1098
+
1099
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" %}{% /field %}
1100
+
1101
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}{% /field %}
1102
+
1103
+ {% instructions ref="related_url" %}
1104
+ Optionally add a URL to related documentation or resources.
1105
+ {% /instructions %}
1106
+
1107
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" %}{% /field %}
1108
+
1109
+ {% instructions ref="optional_date" %}
1110
+ Optionally add a date (YYYY-MM-DD format).
1111
+ {% /instructions %}
1112
+
1113
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" %}{% /field %}
1114
+
1115
+ {% instructions ref="optional_year" %}
1116
+ Optionally add a year.
1117
+ {% /instructions %}
1118
+
1119
+ {% /group %}
1120
+
1121
+ {% /form %}
1122
+
1123
+ ```
1124
+
1125
+ # Current Form Issues
1126
+
1127
+ You need to address 10 issues. Here are the current issues:
1128
+
1129
+ - **tasks_simple** (field): All items in "Agreements (Simple Mode)" must be checked (2 unchecked)
1130
+ Severity: required, Priority: P1
1131
+ Type: checkboxes
1132
+ Options: read_guidelines, agree_terms
1133
+ Mode: simple
1134
+ Set: { op: "set_checkboxes", fieldId: "tasks_simple", values: { "opt1": "done", "opt2": "todo" } }
1135
+ This field is required.
1136
+
1137
+ - **website** (field): Required field "Website" is empty
1138
+ Severity: required, Priority: P1
1139
+ Type: url
1140
+ Set: { op: "set_url", fieldId: "website", value: "https://..." }
1141
+ This field is required.
1142
+
1143
+ - **notes** (field): Optional field not yet addressed
1144
+ Severity: recommended, Priority: P3
1145
+ Type: string
1146
+ Set: { op: "set_string", fieldId: "notes", value: "..." }
1147
+ Skip: { op: "skip_field", fieldId: "notes", reason: "..." }
1148
+
1149
+ - **optional_date** (field): Optional field not yet addressed
1150
+ Severity: recommended, Priority: P3
1151
+ Type: date
1152
+ Set: { op: "set_date", fieldId: "optional_date", value: "2024-01-15" }
1153
+ Skip: { op: "skip_field", fieldId: "optional_date", reason: "..." }
1154
+
1155
+ - **optional_number** (field): Optional field not yet addressed
1156
+ Severity: recommended, Priority: P3
1157
+ Type: number
1158
+ Set: { op: "set_number", fieldId: "optional_number", value: 123 }
1159
+ Skip: { op: "skip_field", fieldId: "optional_number", reason: "..." }
1160
+
1161
+ - **optional_year** (field): Optional field not yet addressed
1162
+ Severity: recommended, Priority: P3
1163
+ Type: year
1164
+ Set: { op: "set_year", fieldId: "optional_year", value: 2024 }
1165
+ Skip: { op: "skip_field", fieldId: "optional_year", reason: "..." }
1166
+
1167
+ - **project_tasks** (field): Optional field not yet addressed
1168
+ Severity: recommended, Priority: P3
1169
+ Type: table
1170
+ Columns: task (required), estimate_hrs, link
1171
+ Rows: min: 0, max: 10
1172
+ Set: { op: "set_table", fieldId: "project_tasks", rows: [{ "task": "...", "estimate_hrs": "...", "link": "..." }, ...] }
1173
+ Skip: { op: "skip_field", fieldId: "project_tasks", reason: "..." }
1174
+
1175
+ - **references** (field): Optional field not yet addressed
1176
+ Severity: recommended, Priority: P3
1177
+ Type: url_list
1178
+ Set: { op: "set_url_list", fieldId: "references", items: ["https://...", "https://..."] }
1179
+ Skip: { op: "skip_field", fieldId: "references", reason: "..." }
1180
+
1181
+ - **related_url** (field): Optional field not yet addressed
1182
+ Severity: recommended, Priority: P3
1183
+ Type: url
1184
+ Set: { op: "set_url", fieldId: "related_url", value: "https://..." }
1185
+ Skip: { op: "skip_field", fieldId: "related_url", reason: "..." }
1186
+
1187
+ - **score** (field): Optional field not yet addressed
1188
+ Severity: recommended, Priority: P3
1189
+ Type: number
1190
+ Set: { op: "set_number", fieldId: "score", value: 123 }
1191
+ Skip: { op: "skip_field", fieldId: "score", reason: "..." }
1192
+
1193
+ # General Instructions
1194
+
1195
+ Use the fill_form tool to submit patches for the fields above.
1196
+ For table fields, each row is an object with column ID keys.
1197
+ wire:
1198
+ request:
1199
+ system: |-
1200
+ # Form Instructions
1201
+ Carefully research answers to all questions in the form, using all available tools you have.
1202
+
1203
+ Guidelines:
1204
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
1205
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
1206
+ 3. NEVER fabricate or guess information - only use data you can verify
1207
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
1208
+ 5. For string fields: use appropriate text from verified sources
1209
+ 6. For number fields: use appropriate numeric values from verified sources
1210
+ 7. For single_select: choose one valid option ID
1211
+ 8. For multi_select: choose one or more valid option IDs
1212
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
1213
+ - Mode "simple": done (checked) or todo (unchecked)
1214
+ - Mode "multi": done, todo, or na (not applicable)
1215
+ - Mode "explicit": yes or no (must explicitly answer)
1216
+
1217
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
1218
+
1219
+ Always use the fill_form tool to submit your field values.
1220
+
1221
+
1222
+ # Instructions for agent role
1223
+ Complete the remaining fields based on the provided context.
1224
+
1225
+ # Field-specific instructions
1226
+ **website:** Enter your website URL (must be http or https).
1227
+ **notes:** Add any relevant notes or observations (optional).
1228
+ **optional_date:** Optionally add a date (YYYY-MM-DD format).
1229
+ **optional_year:** Optionally add a year.
1230
+ **project_tasks:** Optionally add project tasks with estimated hours and reference links.
1231
+ **references:** Add 1-5 unique reference URLs for sources or documentation.
1232
+ **related_url:** Optionally add a URL to related documentation or resources.
1233
+ **score:** Enter a score between 0 and 100 (optional).
1234
+ prompt: |-
1235
+ # Current Form State
1236
+
1237
+ Below is the complete form with all currently filled values.
1238
+ Fields marked with `[ ]` or empty values still need to be filled.
1239
+
1240
+ ```markdown
1241
+ ---
1242
+ markform:
1243
+ spec: "MF/0.1"
1244
+ run_mode: "interactive"
1245
+ role_instructions:
1246
+ user: "Fill in the fields you have direct knowledge of."
1247
+ agent: "Complete the remaining fields based on the provided context."
1248
+ ---
1249
+
1250
+ {% form id="simple_test" title="Simple Test Form" %}
1251
+
1252
+ {% description ref="simple_test" %}
1253
+ A fully interactive form demonstrating all Markform v0.1 field types.
1254
+ Fill all fields using interactive prompts - no LLM API key needed.
1255
+ {% /description %}
1256
+
1257
+ {% group id="basic_fields" title="Basic Fields" %}
1258
+
1259
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}
1260
+ ```value
1261
+ Alice Johnson
1262
+ ```
1263
+ {% /field %}
1264
+
1265
+ {% instructions ref="name" %}
1266
+ Enter your full name (2-50 characters).
1267
+ {% /instructions %}
1268
+
1269
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}
1270
+ ```value
1271
+ alice@example.com
1272
+ ```
1273
+ {% /field %}
1274
+
1275
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}
1276
+ ```value
1277
+ 32
1278
+ ```
1279
+ {% /field %}
1280
+
1281
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}{% /field %}
1282
+
1283
+ {% instructions ref="score" %}
1284
+ Enter a score between 0 and 100 (optional).
1285
+ {% /instructions %}
1286
+
1287
+ {% /group %}
1288
+
1289
+ {% group id="list_fields" title="List Fields" %}
1290
+
1291
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}
1292
+ ```value
1293
+ typescript
1294
+ testing
1295
+ forms
1296
+ ```
1297
+ {% /field %}
1298
+
1299
+ {% instructions ref="tags" %}
1300
+ Add 1-5 unique tags (each at least 2 characters).
1301
+ {% /instructions %}
1302
+
1303
+ {% /group %}
1304
+
1305
+ {% group id="selection_fields" title="Selection Fields" %}
1306
+
1307
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
1308
+ - [ ] Low {% #low %}
1309
+ - [x] Medium {% #medium %}
1310
+ - [ ] High {% #high %}
1311
+ {% /field %}
1312
+
1313
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
1314
+ - [x] Frontend {% #frontend %}
1315
+ - [x] Backend {% #backend %}
1316
+ - [ ] Database {% #database %}
1317
+ - [ ] DevOps {% #devops %}
1318
+ {% /field %}
1319
+
1320
+ {% /group %}
1321
+
1322
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
1323
+
1324
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
1325
+ - [x] Research {% #research %}
1326
+ - [x] Design {% #design %}
1327
+ - [x] Implement {% #implement %}
1328
+ - [-] Test {% #test %}
1329
+ {% /field %}
1330
+
1331
+ {% instructions ref="tasks_multi" %}
1332
+ Track task progress. All must reach done or na state to complete.
1333
+ {% /instructions %}
1334
+
1335
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
1336
+ - [ ] I have read the guidelines {% #read_guidelines %}
1337
+ - [ ] I agree to the terms {% #agree_terms %}
1338
+ {% /field %}
1339
+
1340
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
1341
+ - [y] Data has been backed up {% #backed_up %}
1342
+ - [n] Stakeholders notified {% #notified %}
1343
+ {% /field %}
1344
+
1345
+ {% instructions ref="confirmations" %}
1346
+ Answer yes or no for each confirmation. All must be explicitly answered.
1347
+ {% /instructions %}
1348
+
1349
+ {% /group %}
1350
+
1351
+ {% group id="url_fields" title="URL Fields" %}
1352
+
1353
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}{% /field %}
1354
+
1355
+ {% instructions ref="website" %}
1356
+ Enter your website URL (must be http or https).
1357
+ {% /instructions %}
1358
+
1359
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}{% /field %}
1360
+
1361
+ {% instructions ref="references" %}
1362
+ Add 1-5 unique reference URLs for sources or documentation.
1363
+ {% /instructions %}
1364
+
1365
+ {% /group %}
1366
+
1367
+ {% group id="date_fields" title="Date and Year Fields" %}
1368
+
1369
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}
1370
+ ```value
1371
+ 2025-06-15
1372
+ ```
1373
+ {% /field %}
1374
+
1375
+ {% instructions ref="event_date" %}
1376
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
1377
+ {% /instructions %}
1378
+
1379
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}
1380
+ ```value
1381
+ 2020
1382
+ ```
1383
+ {% /field %}
1384
+
1385
+ {% instructions ref="founded_year" %}
1386
+ Enter the year the company was founded (1900-2030).
1387
+ {% /instructions %}
1388
+
1389
+ {% /group %}
1390
+
1391
+ {% group id="table_fields" title="Table Fields" %}
1392
+
1393
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
1394
+
1395
+ {% instructions ref="team_members" %}
1396
+ Add team members with their name (required), role, and start date.
1397
+ {% /instructions %}
1398
+
1399
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 %}{% /field %}
1400
+
1401
+ {% instructions ref="project_tasks" %}
1402
+ Optionally add project tasks with estimated hours and reference links.
1403
+ {% /instructions %}
1404
+
1405
+ {% /group %}
1406
+
1407
+ {% group id="optional_fields" title="Optional Fields" %}
1408
+
1409
+ {% field kind="string" id="notes" role="user" label="Notes" %}{% /field %}
1410
+
1411
+ {% instructions ref="notes" %}
1412
+ Add any relevant notes or observations (optional).
1413
+ {% /instructions %}
1414
+
1415
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" %}{% /field %}
1416
+
1417
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}{% /field %}
1418
+
1419
+ {% instructions ref="related_url" %}
1420
+ Optionally add a URL to related documentation or resources.
1421
+ {% /instructions %}
1422
+
1423
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" %}{% /field %}
1424
+
1425
+ {% instructions ref="optional_date" %}
1426
+ Optionally add a date (YYYY-MM-DD format).
1427
+ {% /instructions %}
1428
+
1429
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" %}{% /field %}
1430
+
1431
+ {% instructions ref="optional_year" %}
1432
+ Optionally add a year.
1433
+ {% /instructions %}
1434
+
1435
+ {% /group %}
1436
+
1437
+ {% /form %}
1438
+
1439
+ ```
1440
+
1441
+ # Current Form Issues
1442
+
1443
+ You need to address 10 issues. Here are the current issues:
1444
+
1445
+ - **tasks_simple** (field): All items in "Agreements (Simple Mode)" must be checked (2 unchecked)
1446
+ Severity: required, Priority: P1
1447
+ Type: checkboxes
1448
+ Options: read_guidelines, agree_terms
1449
+ Mode: simple
1450
+ Set: { op: "set_checkboxes", fieldId: "tasks_simple", values: { "opt1": "done", "opt2": "todo" } }
1451
+ This field is required.
1452
+
1453
+ - **website** (field): Required field "Website" is empty
1454
+ Severity: required, Priority: P1
1455
+ Type: url
1456
+ Set: { op: "set_url", fieldId: "website", value: "https://..." }
1457
+ This field is required.
1458
+
1459
+ - **notes** (field): Optional field not yet addressed
1460
+ Severity: recommended, Priority: P3
1461
+ Type: string
1462
+ Set: { op: "set_string", fieldId: "notes", value: "..." }
1463
+ Skip: { op: "skip_field", fieldId: "notes", reason: "..." }
1464
+
1465
+ - **optional_date** (field): Optional field not yet addressed
1466
+ Severity: recommended, Priority: P3
1467
+ Type: date
1468
+ Set: { op: "set_date", fieldId: "optional_date", value: "2024-01-15" }
1469
+ Skip: { op: "skip_field", fieldId: "optional_date", reason: "..." }
1470
+
1471
+ - **optional_number** (field): Optional field not yet addressed
1472
+ Severity: recommended, Priority: P3
1473
+ Type: number
1474
+ Set: { op: "set_number", fieldId: "optional_number", value: 123 }
1475
+ Skip: { op: "skip_field", fieldId: "optional_number", reason: "..." }
1476
+
1477
+ - **optional_year** (field): Optional field not yet addressed
1478
+ Severity: recommended, Priority: P3
1479
+ Type: year
1480
+ Set: { op: "set_year", fieldId: "optional_year", value: 2024 }
1481
+ Skip: { op: "skip_field", fieldId: "optional_year", reason: "..." }
1482
+
1483
+ - **project_tasks** (field): Optional field not yet addressed
1484
+ Severity: recommended, Priority: P3
1485
+ Type: table
1486
+ Columns: task (required), estimate_hrs, link
1487
+ Rows: min: 0, max: 10
1488
+ Set: { op: "set_table", fieldId: "project_tasks", rows: [{ "task": "...", "estimate_hrs": "...", "link": "..." }, ...] }
1489
+ Skip: { op: "skip_field", fieldId: "project_tasks", reason: "..." }
1490
+
1491
+ - **references** (field): Optional field not yet addressed
1492
+ Severity: recommended, Priority: P3
1493
+ Type: url_list
1494
+ Set: { op: "set_url_list", fieldId: "references", items: ["https://...", "https://..."] }
1495
+ Skip: { op: "skip_field", fieldId: "references", reason: "..." }
1496
+
1497
+ - **related_url** (field): Optional field not yet addressed
1498
+ Severity: recommended, Priority: P3
1499
+ Type: url
1500
+ Set: { op: "set_url", fieldId: "related_url", value: "https://..." }
1501
+ Skip: { op: "skip_field", fieldId: "related_url", reason: "..." }
1502
+
1503
+ - **score** (field): Optional field not yet addressed
1504
+ Severity: recommended, Priority: P3
1505
+ Type: number
1506
+ Set: { op: "set_number", fieldId: "score", value: 123 }
1507
+ Skip: { op: "skip_field", fieldId: "score", reason: "..." }
1508
+
1509
+ # General Instructions
1510
+
1511
+ Use the fill_form tool to submit patches for the fields above.
1512
+ For table fields, each row is an object with column ID keys.
1513
+ tools:
1514
+ fill_form:
1515
+ description: Fill form fields by submitting patches. Each patch sets a value for one field. Use the field IDs from the issues list. Return patches for all issues you can address.
1516
+ input_schema:
1517
+ $defs:
1518
+ patch:
1519
+ description: A patch operation (see tool description for full schema)
1520
+ properties:
1521
+ patches:
1522
+ description: Array of patches to apply to the form
1523
+ items:
1524
+ $ref: '#/$defs/patch'
1525
+ type: array
1526
+ required:
1527
+ - patches
1528
+ type: object
1529
+ response:
1530
+ steps:
1531
+ - tool_calls:
1532
+ - tool_name: fill_form
1533
+ input:
1534
+ patches:
1535
+ - field_id: tasks_simple
1536
+ op: set_checkboxes
1537
+ values:
1538
+ agree_terms: done
1539
+ read_guidelines: done
1540
+ - field_id: website
1541
+ op: set_url
1542
+ value: https://alice.dev
1543
+ - field_id: notes
1544
+ op: set_string
1545
+ value: This is a test note.
1546
+ - field_id: optional_date
1547
+ op: skip_field
1548
+ reason: No value in mock form
1549
+ role: agent
1550
+ - field_id: optional_number
1551
+ op: skip_field
1552
+ reason: No value in mock form
1553
+ role: agent
1554
+ - field_id: optional_year
1555
+ op: skip_field
1556
+ reason: No value in mock form
1557
+ role: agent
1558
+ - field_id: project_tasks
1559
+ op: skip_field
1560
+ reason: No value in mock form
1561
+ role: agent
1562
+ - field_id: references
1563
+ items:
1564
+ - https://docs.example.com/guide
1565
+ - https://github.com/example/project
1566
+ - https://medium.com/article-about-forms
1567
+ op: set_url_list
1568
+ - field_id: related_url
1569
+ op: set_url
1570
+ value: https://markform.dev/docs
1571
+ - field_id: score
1572
+ op: set_number
1573
+ value: 87.5
1574
+ tool_results: []
1575
+ text: null
1576
+ usage:
1577
+ input_tokens: 0
1578
+ output_tokens: 0
235
1579
  - turn: 3
236
1580
  inspect:
237
1581
  issues:
238
1582
  - ref: team_members
239
1583
  scope: field
240
- reason: optional_empty
241
- message: Optional field has no value
1584
+ reason: optional_unanswered
1585
+ message: Optional field not yet addressed
242
1586
  severity: recommended
243
1587
  priority: 3
244
1588
  apply:
@@ -254,9 +1598,626 @@ turns:
254
1598
  start_date: 2023-06-01
255
1599
  after:
256
1600
  required_issue_count: 0
257
- markdown_sha256: 0835d5fb6a05a52885e3200fa55584981e73dcd801c05405ddc341d60bdc8b91
1601
+ markdown_sha256: b59a771c156f4391e4fcb352a98cea568aac90660a8b264f8de8390cafb0bc02
258
1602
  answered_field_count: 17
259
1603
  skipped_field_count: 4
1604
+ context:
1605
+ system_prompt: |-
1606
+ # Form Instructions
1607
+ Carefully research answers to all questions in the form, using all available tools you have.
1608
+
1609
+ Guidelines:
1610
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
1611
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
1612
+ 3. NEVER fabricate or guess information - only use data you can verify
1613
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
1614
+ 5. For string fields: use appropriate text from verified sources
1615
+ 6. For number fields: use appropriate numeric values from verified sources
1616
+ 7. For single_select: choose one valid option ID
1617
+ 8. For multi_select: choose one or more valid option IDs
1618
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
1619
+ - Mode "simple": done (checked) or todo (unchecked)
1620
+ - Mode "multi": done, todo, or na (not applicable)
1621
+ - Mode "explicit": yes or no (must explicitly answer)
1622
+
1623
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
1624
+
1625
+ Always use the fill_form tool to submit your field values.
1626
+
1627
+
1628
+ # Instructions for agent role
1629
+ Complete the remaining fields based on the provided context.
1630
+
1631
+ # Field-specific instructions
1632
+ **team_members:** Add team members with their name (required), role, and start date.
1633
+ context_prompt: |-
1634
+ # Current Form State
1635
+
1636
+ Below is the complete form with all currently filled values.
1637
+ Fields marked with `[ ]` or empty values still need to be filled.
1638
+
1639
+ ```markdown
1640
+ ---
1641
+ markform:
1642
+ spec: "MF/0.1"
1643
+ run_mode: "interactive"
1644
+ role_instructions:
1645
+ user: "Fill in the fields you have direct knowledge of."
1646
+ agent: "Complete the remaining fields based on the provided context."
1647
+ ---
1648
+
1649
+ {% form id="simple_test" title="Simple Test Form" %}
1650
+
1651
+ {% description ref="simple_test" %}
1652
+ A fully interactive form demonstrating all Markform v0.1 field types.
1653
+ Fill all fields using interactive prompts - no LLM API key needed.
1654
+ {% /description %}
1655
+
1656
+ {% group id="basic_fields" title="Basic Fields" %}
1657
+
1658
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}
1659
+ ```value
1660
+ Alice Johnson
1661
+ ```
1662
+ {% /field %}
1663
+
1664
+ {% instructions ref="name" %}
1665
+ Enter your full name (2-50 characters).
1666
+ {% /instructions %}
1667
+
1668
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}
1669
+ ```value
1670
+ alice@example.com
1671
+ ```
1672
+ {% /field %}
1673
+
1674
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}
1675
+ ```value
1676
+ 32
1677
+ ```
1678
+ {% /field %}
1679
+
1680
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}
1681
+ ```value
1682
+ 87.5
1683
+ ```
1684
+ {% /field %}
1685
+
1686
+ {% instructions ref="score" %}
1687
+ Enter a score between 0 and 100 (optional).
1688
+ {% /instructions %}
1689
+
1690
+ {% /group %}
1691
+
1692
+ {% group id="list_fields" title="List Fields" %}
1693
+
1694
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}
1695
+ ```value
1696
+ typescript
1697
+ testing
1698
+ forms
1699
+ ```
1700
+ {% /field %}
1701
+
1702
+ {% instructions ref="tags" %}
1703
+ Add 1-5 unique tags (each at least 2 characters).
1704
+ {% /instructions %}
1705
+
1706
+ {% /group %}
1707
+
1708
+ {% group id="selection_fields" title="Selection Fields" %}
1709
+
1710
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
1711
+ - [ ] Low {% #low %}
1712
+ - [x] Medium {% #medium %}
1713
+ - [ ] High {% #high %}
1714
+ {% /field %}
1715
+
1716
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
1717
+ - [x] Frontend {% #frontend %}
1718
+ - [x] Backend {% #backend %}
1719
+ - [ ] Database {% #database %}
1720
+ - [ ] DevOps {% #devops %}
1721
+ {% /field %}
1722
+
1723
+ {% /group %}
1724
+
1725
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
1726
+
1727
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
1728
+ - [x] Research {% #research %}
1729
+ - [x] Design {% #design %}
1730
+ - [x] Implement {% #implement %}
1731
+ - [-] Test {% #test %}
1732
+ {% /field %}
1733
+
1734
+ {% instructions ref="tasks_multi" %}
1735
+ Track task progress. All must reach done or na state to complete.
1736
+ {% /instructions %}
1737
+
1738
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
1739
+ - [x] I have read the guidelines {% #read_guidelines %}
1740
+ - [x] I agree to the terms {% #agree_terms %}
1741
+ {% /field %}
1742
+
1743
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
1744
+ - [y] Data has been backed up {% #backed_up %}
1745
+ - [n] Stakeholders notified {% #notified %}
1746
+ {% /field %}
1747
+
1748
+ {% instructions ref="confirmations" %}
1749
+ Answer yes or no for each confirmation. All must be explicitly answered.
1750
+ {% /instructions %}
1751
+
1752
+ {% /group %}
1753
+
1754
+ {% group id="url_fields" title="URL Fields" %}
1755
+
1756
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}
1757
+ ```value
1758
+ https://alice.dev
1759
+ ```
1760
+ {% /field %}
1761
+
1762
+ {% instructions ref="website" %}
1763
+ Enter your website URL (must be http or https).
1764
+ {% /instructions %}
1765
+
1766
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}
1767
+ ```value
1768
+ https://docs.example.com/guide
1769
+ https://github.com/example/project
1770
+ https://medium.com/article-about-forms
1771
+ ```
1772
+ {% /field %}
1773
+
1774
+ {% instructions ref="references" %}
1775
+ Add 1-5 unique reference URLs for sources or documentation.
1776
+ {% /instructions %}
1777
+
1778
+ {% /group %}
1779
+
1780
+ {% group id="date_fields" title="Date and Year Fields" %}
1781
+
1782
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}
1783
+ ```value
1784
+ 2025-06-15
1785
+ ```
1786
+ {% /field %}
1787
+
1788
+ {% instructions ref="event_date" %}
1789
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
1790
+ {% /instructions %}
1791
+
1792
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}
1793
+ ```value
1794
+ 2020
1795
+ ```
1796
+ {% /field %}
1797
+
1798
+ {% instructions ref="founded_year" %}
1799
+ Enter the year the company was founded (1900-2030).
1800
+ {% /instructions %}
1801
+
1802
+ {% /group %}
1803
+
1804
+ {% group id="table_fields" title="Table Fields" %}
1805
+
1806
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
1807
+
1808
+ {% instructions ref="team_members" %}
1809
+ Add team members with their name (required), role, and start date.
1810
+ {% /instructions %}
1811
+
1812
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 state="skipped" %}
1813
+ ```value
1814
+ %SKIP% (No value in mock form)
1815
+ ```
1816
+ {% /field %}
1817
+
1818
+ {% instructions ref="project_tasks" %}
1819
+ Optionally add project tasks with estimated hours and reference links.
1820
+ {% /instructions %}
1821
+
1822
+ {% /group %}
1823
+
1824
+ {% group id="optional_fields" title="Optional Fields" %}
1825
+
1826
+ {% field kind="string" id="notes" role="user" label="Notes" %}
1827
+ ```value
1828
+ This is a test note.
1829
+ ```
1830
+ {% /field %}
1831
+
1832
+ {% instructions ref="notes" %}
1833
+ Add any relevant notes or observations (optional).
1834
+ {% /instructions %}
1835
+
1836
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" state="skipped" %}
1837
+ ```value
1838
+ %SKIP% (No value in mock form)
1839
+ ```
1840
+ {% /field %}
1841
+
1842
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}
1843
+ ```value
1844
+ https://markform.dev/docs
1845
+ ```
1846
+ {% /field %}
1847
+
1848
+ {% instructions ref="related_url" %}
1849
+ Optionally add a URL to related documentation or resources.
1850
+ {% /instructions %}
1851
+
1852
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" state="skipped" %}
1853
+ ```value
1854
+ %SKIP% (No value in mock form)
1855
+ ```
1856
+ {% /field %}
1857
+
1858
+ {% instructions ref="optional_date" %}
1859
+ Optionally add a date (YYYY-MM-DD format).
1860
+ {% /instructions %}
1861
+
1862
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" state="skipped" %}
1863
+ ```value
1864
+ %SKIP% (No value in mock form)
1865
+ ```
1866
+ {% /field %}
1867
+
1868
+ {% instructions ref="optional_year" %}
1869
+ Optionally add a year.
1870
+ {% /instructions %}
1871
+
1872
+ {% /group %}
1873
+
1874
+ {% /form %}
1875
+
1876
+ ```
1877
+
1878
+ # Current Form Issues
1879
+
1880
+ You need to address 1 issue. Here are the current issues:
1881
+
1882
+ - **team_members** (field): Optional field not yet addressed
1883
+ Severity: recommended, Priority: P3
1884
+ Type: table
1885
+ Columns: name (required), role, start_date
1886
+ Rows: min: 0, max: 5
1887
+ Set: { op: "set_table", fieldId: "team_members", rows: [{ "name": "...", "role": "...", "start_date": "..." }, ...] }
1888
+ Skip: { op: "skip_field", fieldId: "team_members", reason: "..." }
1889
+
1890
+ # General Instructions
1891
+
1892
+ Use the fill_form tool to submit patches for the fields above.
1893
+ For table fields, each row is an object with column ID keys.
1894
+ wire:
1895
+ request:
1896
+ system: |-
1897
+ # Form Instructions
1898
+ Carefully research answers to all questions in the form, using all available tools you have.
1899
+
1900
+ Guidelines:
1901
+ 1. Focus on required fields first (severity: "required"), then address optional fields (severity: "recommended")
1902
+ 2. You MUST address ALL issues shown to you - both required AND recommended (optional)
1903
+ 3. NEVER fabricate or guess information - only use data you can verify
1904
+ 4. If you cannot find verifiable information for a field, use skip_field to mark it as skipped with a reason
1905
+ 5. For string fields: use appropriate text from verified sources
1906
+ 6. For number fields: use appropriate numeric values from verified sources
1907
+ 7. For single_select: choose one valid option ID
1908
+ 8. For multi_select: choose one or more valid option IDs
1909
+ 9. For checkboxes: use the appropriate state for the checkbox mode:
1910
+ - Mode "simple": done (checked) or todo (unchecked)
1911
+ - Mode "multi": done, todo, or na (not applicable)
1912
+ - Mode "explicit": yes or no (must explicitly answer)
1913
+
1914
+ CRITICAL: Accuracy is more important than completeness. Use skip_field when information cannot be verified.
1915
+
1916
+ Always use the fill_form tool to submit your field values.
1917
+
1918
+
1919
+ # Instructions for agent role
1920
+ Complete the remaining fields based on the provided context.
1921
+
1922
+ # Field-specific instructions
1923
+ **team_members:** Add team members with their name (required), role, and start date.
1924
+ prompt: |-
1925
+ # Current Form State
1926
+
1927
+ Below is the complete form with all currently filled values.
1928
+ Fields marked with `[ ]` or empty values still need to be filled.
1929
+
1930
+ ```markdown
1931
+ ---
1932
+ markform:
1933
+ spec: "MF/0.1"
1934
+ run_mode: "interactive"
1935
+ role_instructions:
1936
+ user: "Fill in the fields you have direct knowledge of."
1937
+ agent: "Complete the remaining fields based on the provided context."
1938
+ ---
1939
+
1940
+ {% form id="simple_test" title="Simple Test Form" %}
1941
+
1942
+ {% description ref="simple_test" %}
1943
+ A fully interactive form demonstrating all Markform v0.1 field types.
1944
+ Fill all fields using interactive prompts - no LLM API key needed.
1945
+ {% /description %}
1946
+
1947
+ {% group id="basic_fields" title="Basic Fields" %}
1948
+
1949
+ {% field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true %}
1950
+ ```value
1951
+ Alice Johnson
1952
+ ```
1953
+ {% /field %}
1954
+
1955
+ {% instructions ref="name" %}
1956
+ Enter your full name (2-50 characters).
1957
+ {% /instructions %}
1958
+
1959
+ {% field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true %}
1960
+ ```value
1961
+ alice@example.com
1962
+ ```
1963
+ {% /field %}
1964
+
1965
+ {% field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true %}
1966
+ ```value
1967
+ 32
1968
+ ```
1969
+ {% /field %}
1970
+
1971
+ {% field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" %}
1972
+ ```value
1973
+ 87.5
1974
+ ```
1975
+ {% /field %}
1976
+
1977
+ {% instructions ref="score" %}
1978
+ Enter a score between 0 and 100 (optional).
1979
+ {% /instructions %}
1980
+
1981
+ {% /group %}
1982
+
1983
+ {% group id="list_fields" title="List Fields" %}
1984
+
1985
+ {% field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true %}
1986
+ ```value
1987
+ typescript
1988
+ testing
1989
+ forms
1990
+ ```
1991
+ {% /field %}
1992
+
1993
+ {% instructions ref="tags" %}
1994
+ Add 1-5 unique tags (each at least 2 characters).
1995
+ {% /instructions %}
1996
+
1997
+ {% /group %}
1998
+
1999
+ {% group id="selection_fields" title="Selection Fields" %}
2000
+
2001
+ {% field kind="single_select" id="priority" role="user" label="Priority" required=true %}
2002
+ - [ ] Low {% #low %}
2003
+ - [x] Medium {% #medium %}
2004
+ - [ ] High {% #high %}
2005
+ {% /field %}
2006
+
2007
+ {% field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true %}
2008
+ - [x] Frontend {% #frontend %}
2009
+ - [x] Backend {% #backend %}
2010
+ - [ ] Database {% #database %}
2011
+ - [ ] DevOps {% #devops %}
2012
+ {% /field %}
2013
+
2014
+ {% /group %}
2015
+
2016
+ {% group id="checkbox_fields" title="Checkbox Fields" %}
2017
+
2018
+ {% field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true %}
2019
+ - [x] Research {% #research %}
2020
+ - [x] Design {% #design %}
2021
+ - [x] Implement {% #implement %}
2022
+ - [-] Test {% #test %}
2023
+ {% /field %}
2024
+
2025
+ {% instructions ref="tasks_multi" %}
2026
+ Track task progress. All must reach done or na state to complete.
2027
+ {% /instructions %}
2028
+
2029
+ {% field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true %}
2030
+ - [x] I have read the guidelines {% #read_guidelines %}
2031
+ - [x] I agree to the terms {% #agree_terms %}
2032
+ {% /field %}
2033
+
2034
+ {% field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true %}
2035
+ - [y] Data has been backed up {% #backed_up %}
2036
+ - [n] Stakeholders notified {% #notified %}
2037
+ {% /field %}
2038
+
2039
+ {% instructions ref="confirmations" %}
2040
+ Answer yes or no for each confirmation. All must be explicitly answered.
2041
+ {% /instructions %}
2042
+
2043
+ {% /group %}
2044
+
2045
+ {% group id="url_fields" title="URL Fields" %}
2046
+
2047
+ {% field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true %}
2048
+ ```value
2049
+ https://alice.dev
2050
+ ```
2051
+ {% /field %}
2052
+
2053
+ {% instructions ref="website" %}
2054
+ Enter your website URL (must be http or https).
2055
+ {% /instructions %}
2056
+
2057
+ {% field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true %}
2058
+ ```value
2059
+ https://docs.example.com/guide
2060
+ https://github.com/example/project
2061
+ https://medium.com/article-about-forms
2062
+ ```
2063
+ {% /field %}
2064
+
2065
+ {% instructions ref="references" %}
2066
+ Add 1-5 unique reference URLs for sources or documentation.
2067
+ {% /instructions %}
2068
+
2069
+ {% /group %}
2070
+
2071
+ {% group id="date_fields" title="Date and Year Fields" %}
2072
+
2073
+ {% field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true %}
2074
+ ```value
2075
+ 2025-06-15
2076
+ ```
2077
+ {% /field %}
2078
+
2079
+ {% instructions ref="event_date" %}
2080
+ Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
2081
+ {% /instructions %}
2082
+
2083
+ {% field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true %}
2084
+ ```value
2085
+ 2020
2086
+ ```
2087
+ {% /field %}
2088
+
2089
+ {% instructions ref="founded_year" %}
2090
+ Enter the year the company was founded (1900-2030).
2091
+ {% /instructions %}
2092
+
2093
+ {% /group %}
2094
+
2095
+ {% group id="table_fields" title="Table Fields" %}
2096
+
2097
+ {% field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 %}{% /field %}
2098
+
2099
+ {% instructions ref="team_members" %}
2100
+ Add team members with their name (required), role, and start date.
2101
+ {% /instructions %}
2102
+
2103
+ {% field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 state="skipped" %}
2104
+ ```value
2105
+ %SKIP% (No value in mock form)
2106
+ ```
2107
+ {% /field %}
2108
+
2109
+ {% instructions ref="project_tasks" %}
2110
+ Optionally add project tasks with estimated hours and reference links.
2111
+ {% /instructions %}
2112
+
2113
+ {% /group %}
2114
+
2115
+ {% group id="optional_fields" title="Optional Fields" %}
2116
+
2117
+ {% field kind="string" id="notes" role="user" label="Notes" %}
2118
+ ```value
2119
+ This is a test note.
2120
+ ```
2121
+ {% /field %}
2122
+
2123
+ {% instructions ref="notes" %}
2124
+ Add any relevant notes or observations (optional).
2125
+ {% /instructions %}
2126
+
2127
+ {% field kind="number" id="optional_number" role="user" label="Optional Number" state="skipped" %}
2128
+ ```value
2129
+ %SKIP% (No value in mock form)
2130
+ ```
2131
+ {% /field %}
2132
+
2133
+ {% field kind="url" id="related_url" role="user" label="Related URL" %}
2134
+ ```value
2135
+ https://markform.dev/docs
2136
+ ```
2137
+ {% /field %}
2138
+
2139
+ {% instructions ref="related_url" %}
2140
+ Optionally add a URL to related documentation or resources.
2141
+ {% /instructions %}
2142
+
2143
+ {% field kind="date" id="optional_date" role="user" label="Optional Date" state="skipped" %}
2144
+ ```value
2145
+ %SKIP% (No value in mock form)
2146
+ ```
2147
+ {% /field %}
2148
+
2149
+ {% instructions ref="optional_date" %}
2150
+ Optionally add a date (YYYY-MM-DD format).
2151
+ {% /instructions %}
2152
+
2153
+ {% field kind="year" id="optional_year" role="user" label="Optional Year" state="skipped" %}
2154
+ ```value
2155
+ %SKIP% (No value in mock form)
2156
+ ```
2157
+ {% /field %}
2158
+
2159
+ {% instructions ref="optional_year" %}
2160
+ Optionally add a year.
2161
+ {% /instructions %}
2162
+
2163
+ {% /group %}
2164
+
2165
+ {% /form %}
2166
+
2167
+ ```
2168
+
2169
+ # Current Form Issues
2170
+
2171
+ You need to address 1 issue. Here are the current issues:
2172
+
2173
+ - **team_members** (field): Optional field not yet addressed
2174
+ Severity: recommended, Priority: P3
2175
+ Type: table
2176
+ Columns: name (required), role, start_date
2177
+ Rows: min: 0, max: 5
2178
+ Set: { op: "set_table", fieldId: "team_members", rows: [{ "name": "...", "role": "...", "start_date": "..." }, ...] }
2179
+ Skip: { op: "skip_field", fieldId: "team_members", reason: "..." }
2180
+
2181
+ # General Instructions
2182
+
2183
+ Use the fill_form tool to submit patches for the fields above.
2184
+ For table fields, each row is an object with column ID keys.
2185
+ tools:
2186
+ fill_form:
2187
+ description: Fill form fields by submitting patches. Each patch sets a value for one field. Use the field IDs from the issues list. Return patches for all issues you can address.
2188
+ input_schema:
2189
+ $defs:
2190
+ patch:
2191
+ description: A patch operation (see tool description for full schema)
2192
+ properties:
2193
+ patches:
2194
+ description: Array of patches to apply to the form
2195
+ items:
2196
+ $ref: '#/$defs/patch'
2197
+ type: array
2198
+ required:
2199
+ - patches
2200
+ type: object
2201
+ response:
2202
+ steps:
2203
+ - tool_calls:
2204
+ - tool_name: fill_form
2205
+ input:
2206
+ patches:
2207
+ - field_id: team_members
2208
+ op: set_table
2209
+ rows:
2210
+ - name: Alice
2211
+ role: Engineer
2212
+ start_date: 2024-01-15
2213
+ - name: Bob
2214
+ role: Designer
2215
+ start_date: 2023-06-01
2216
+ tool_results: []
2217
+ text: null
2218
+ usage:
2219
+ input_tokens: 0
2220
+ output_tokens: 0
260
2221
  final:
261
2222
  expect_complete: true
262
2223
  expected_completed_form: simple-mock-filled.form.md