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