markform 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -24
- package/dist/ai-sdk.d.mts +1 -2
- package/dist/ai-sdk.mjs +3 -2
- package/dist/{apply-DMQl-VVd.mjs → apply-g23rRn7p.mjs} +28 -3
- package/dist/bin.d.mts +0 -1
- package/dist/bin.mjs +3 -6
- package/dist/{cli-CXjkdym_.mjs → cli-Bqlm-WWw.mjs} +1565 -835
- package/dist/cli.d.mts +0 -1
- package/dist/cli.mjs +2 -6
- package/dist/coreTypes-DCvD7feM.d.mts +3203 -0
- package/dist/{coreTypes-pyctKRgc.mjs → coreTypes-__Cwxz5q.mjs} +10 -3
- package/dist/index.d.mts +105 -3
- package/dist/index.mjs +6 -5
- package/dist/{session-uF0e6m6k.mjs → session-CgCNni0e.mjs} +3 -2
- package/dist/session-DruaYPZ1.mjs +4 -0
- package/dist/{shared-u22MtBRo.mjs → shared-C9yW5FLZ.mjs} +2 -1
- package/dist/{shared-DRlgu2ZJ.mjs → shared-DQ6y3Ggc.mjs} +3 -1
- package/dist/{src-o_5TSoHQ.mjs → src-BiuxbzF3.mjs} +410 -75
- package/docs/markform-spec.md +2 -2
- package/examples/earnings-analysis/earnings-analysis.form.md +1 -0
- package/examples/movie-research/movie-research-basic.form.md +1 -0
- package/examples/movie-research/movie-research-deep.form.md +1 -0
- package/examples/movie-research/{movie-research-minimal.form.md → movie-research-demo.form.md} +4 -3
- package/examples/simple/simple.form.md +1 -0
- package/examples/simple/simple.schema.json +374 -0
- package/examples/startup-deep-research/startup-deep-research.form.md +1 -0
- package/examples/startup-research/startup-research.form.md +1 -0
- package/package.json +11 -9
- package/dist/coreTypes-9XZSNOv6.d.mts +0 -8951
- package/dist/session-B_stoXQn.mjs +0 -4
package/README.md
CHANGED
|
@@ -38,20 +38,22 @@ informal Markdown doc describing a process to a precise Markform process easily.
|
|
|
38
38
|
## Quick Start
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
# to
|
|
44
|
-
npx markform examples
|
|
41
|
+
# Copy example forms to ./forms/ and run one interactively
|
|
42
|
+
# Set OPENAI_API_KEY or ANTHROPIC_API_KEY (or put in .env) for research examples
|
|
43
|
+
npx markform examples # Copy examples to ./forms/, then offers to run one
|
|
45
44
|
|
|
46
|
-
#
|
|
45
|
+
# Or run forms directly
|
|
46
|
+
npx markform run # Browse and run forms interactively
|
|
47
|
+
|
|
48
|
+
# Read the docs (tell your agents to run these; they are agent-friendly!)
|
|
47
49
|
npx markform # CLI help
|
|
48
50
|
npx markform readme # This file
|
|
49
|
-
npx markform docs # Quick
|
|
51
|
+
npx markform docs # Quick reference for writing Markforms
|
|
50
52
|
npx markform spec # Read the full spec
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
The `markform examples` command copies sample forms locally and prompts you to run one.
|
|
56
|
+
Pick `movie-research-demo.form.md` for a quick example.
|
|
55
57
|
|
|
56
58
|
## Installation
|
|
57
59
|
|
|
@@ -76,7 +78,7 @@ It combines YAML frontmatter with Markdoc-tagged content:
|
|
|
76
78
|
---
|
|
77
79
|
markform:
|
|
78
80
|
spec: MF/0.1
|
|
79
|
-
title: Movie Research (
|
|
81
|
+
title: Movie Research (Demo)
|
|
80
82
|
description: Quick movie lookup with just the essentials (title, year, ratings, summary).
|
|
81
83
|
roles:
|
|
82
84
|
- user
|
|
@@ -85,9 +87,9 @@ markform:
|
|
|
85
87
|
user: "Enter the movie title."
|
|
86
88
|
agent: |
|
|
87
89
|
Quickly identify the movie and fill in basic info from IMDB.
|
|
88
|
-
This is a
|
|
90
|
+
This is a demo lookup - just get the core facts.
|
|
89
91
|
---
|
|
90
|
-
{% form id="
|
|
92
|
+
{% form id="movie_research_demo" title="Movie Research (Demo)" %}
|
|
91
93
|
|
|
92
94
|
## Movie Research Example
|
|
93
95
|
|
|
@@ -145,11 +147,12 @@ What movie do you want to research? \[*This field is filled in by the user (`rol
|
|
|
145
147
|
|
|
146
148
|
### Form Report Output
|
|
147
149
|
|
|
148
|
-
Run
|
|
149
|
-
|
|
150
|
+
Run `npx markform examples` to copy examples, then `npx markform run` and select `Movie
|
|
151
|
+
Research (Demo)` to fill it.
|
|
152
|
+
The report output looks like:
|
|
150
153
|
|
|
151
154
|
```markdown
|
|
152
|
-
# Movie Research (
|
|
155
|
+
# Movie Research (Demo)
|
|
153
156
|
|
|
154
157
|
## Movie Identification
|
|
155
158
|
|
|
@@ -180,12 +183,13 @@ Convicted banker Andy Dufresne is sent to Shawshank State Penitentiary, where he
|
|
|
180
183
|
### More Example Forms
|
|
181
184
|
|
|
182
185
|
The package includes example forms.
|
|
183
|
-
View them with `markform examples --list`
|
|
186
|
+
View them with `markform examples --list`, copy with `markform examples`, and run with
|
|
187
|
+
`markform run`:
|
|
184
188
|
|
|
185
189
|
- [`simple.form.md`](https://github.com/jlevy/markform/blob/main/packages/markform/examples/simple/simple.form.md)
|
|
186
190
|
\- Basic form demonstrating all field kinds.
|
|
187
191
|
|
|
188
|
-
- [`movie-research-
|
|
192
|
+
- [`movie-research-demo.form.md`](https://github.com/jlevy/markform/blob/main/packages/markform/examples/movie-research/movie-research-demo.form.md)
|
|
189
193
|
\- The quick example above.
|
|
190
194
|
|
|
191
195
|
- [`movie-research-basic.form.md`](https://github.com/jlevy/markform/blob/main/packages/markform/examples/movie-research/movie-research-basic.form.md)
|
|
@@ -199,17 +203,34 @@ View them with `markform examples --list` or try these interactively:
|
|
|
199
203
|
|
|
200
204
|
## CLI Commands
|
|
201
205
|
|
|
202
|
-
###
|
|
206
|
+
### Copy and Run Examples
|
|
203
207
|
|
|
204
208
|
```bash
|
|
205
|
-
#
|
|
209
|
+
# Copy all bundled examples to ./forms/
|
|
206
210
|
markform examples
|
|
207
211
|
|
|
208
212
|
# List available examples
|
|
209
213
|
markform examples --list
|
|
210
214
|
|
|
211
|
-
#
|
|
212
|
-
markform examples --name
|
|
215
|
+
# Copy a specific example
|
|
216
|
+
markform examples --name movie-research-demo
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Browse and Run Forms
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Browse forms in ./forms/ and run one interactively
|
|
223
|
+
markform run
|
|
224
|
+
|
|
225
|
+
# Run a specific form directly
|
|
226
|
+
markform run forms/movie-research-demo.form.md
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Check Form Status
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
# Show fill progress with per-role breakdown
|
|
233
|
+
markform status my-form.form.md
|
|
213
234
|
```
|
|
214
235
|
|
|
215
236
|
### Inspect Forms
|
|
@@ -445,10 +466,24 @@ But it’s been useful for me already.
|
|
|
445
466
|
|
|
446
467
|
### Was it Vibe Coded?
|
|
447
468
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
469
|
+
This is 100% agent-written code and the planning specs are also 100% agent written,
|
|
470
|
+
using a mix of Opus 4.5, GPT 5.2, GPT-5 Pro, Gemini 3, and occasionally others.
|
|
471
|
+
|
|
472
|
+
But it’s not slop. It is written via a strongly spec-driven process, using rules from my
|
|
473
|
+
[Speculate](https://github.com/jlevy/speculate) repo and Steve Yegge’s
|
|
474
|
+
[beads](https://github.com/steveyegge/beads) for tracking work.
|
|
475
|
+
|
|
476
|
+
See
|
|
477
|
+
[my post](https://github.com/jlevy/speculate/blob/main/about/lessons_in_spec_coding.md)
|
|
478
|
+
for more thoughts on how this works.
|
|
479
|
+
And see [the complete history of
|
|
480
|
+
specs](https://github.com/jlevy/markform/tree/main/docs/project/specs/done) for examples
|
|
481
|
+
of how everything is done with specs and with
|
|
482
|
+
|
|
483
|
+
Although I didn’t have to write much there was a *lot* of management and review by me
|
|
484
|
+
and a lot of thought and iteration for all design decisions.
|
|
485
|
+
And this doc is written by me.
|
|
486
|
+
:)
|
|
452
487
|
|
|
453
488
|
### What are the goals of Markform?
|
|
454
489
|
|
package/dist/ai-sdk.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
|
|
3
|
-
import { Dt as
|
|
2
|
+
import { Dt as ParsedForm, Ot as Patch, Q as Id, V as FieldResponse, kt as PatchSchema, lr as ValidatorRegistry, q as FormSchema, r as ApplyResult, rt as InspectResult } from "./coreTypes-DCvD7feM.mjs";
|
|
4
3
|
import { z } from "zod";
|
|
5
4
|
|
|
6
5
|
//#region src/integrations/toolTypes.d.ts
|
package/dist/ai-sdk.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { L as PatchSchema } from "./coreTypes-__Cwxz5q.mjs";
|
|
3
|
+
import { d as serialize, i as inspect, t as applyPatches } from "./apply-g23rRn7p.mjs";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
|
|
5
6
|
//#region src/integrations/vercelAiSdkTools.ts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
//#region src/llms.ts
|
|
2
3
|
/**
|
|
3
4
|
* Parse a model ID string into provider and model components for display.
|
|
@@ -161,6 +162,11 @@ const DEFAULT_PRIORITY = "medium";
|
|
|
161
162
|
*/
|
|
162
163
|
const DEFAULT_FORMS_DIR = "./forms";
|
|
163
164
|
/**
|
|
165
|
+
* Maximum forms to display in 'markform run' menu.
|
|
166
|
+
* Additional forms are not shown but can be run directly by path.
|
|
167
|
+
*/
|
|
168
|
+
const MAX_FORMS_IN_MENU = 30;
|
|
169
|
+
/**
|
|
164
170
|
* The default port for the serve command.
|
|
165
171
|
*/
|
|
166
172
|
const DEFAULT_PORT = 3344;
|
|
@@ -203,12 +209,18 @@ const EXPORT_EXTENSIONS = {
|
|
|
203
209
|
*/
|
|
204
210
|
const REPORT_EXTENSION = ".report.md";
|
|
205
211
|
/**
|
|
212
|
+
* Schema extension - generated JSON Schema for form structure.
|
|
213
|
+
* Used for validation, code generation, and LLM tooling.
|
|
214
|
+
*/
|
|
215
|
+
const SCHEMA_EXTENSION = ".schema.json";
|
|
216
|
+
/**
|
|
206
217
|
* All recognized markform file extensions.
|
|
207
|
-
* Combines export formats with report
|
|
218
|
+
* Combines export formats with report and schema formats.
|
|
208
219
|
*/
|
|
209
220
|
const ALL_EXTENSIONS = {
|
|
210
221
|
...EXPORT_EXTENSIONS,
|
|
211
|
-
report: REPORT_EXTENSION
|
|
222
|
+
report: REPORT_EXTENSION,
|
|
223
|
+
schema: SCHEMA_EXTENSION
|
|
212
224
|
};
|
|
213
225
|
/**
|
|
214
226
|
* Detect file type from path based on extension.
|
|
@@ -219,6 +231,7 @@ function detectFileType(filePath) {
|
|
|
219
231
|
if (filePath.endsWith(ALL_EXTENSIONS.raw)) return "raw";
|
|
220
232
|
if (filePath.endsWith(ALL_EXTENSIONS.report)) return "report";
|
|
221
233
|
if (filePath.endsWith(ALL_EXTENSIONS.yaml)) return "yaml";
|
|
234
|
+
if (filePath.endsWith(ALL_EXTENSIONS.schema)) return "schema";
|
|
222
235
|
if (filePath.endsWith(ALL_EXTENSIONS.json)) return "json";
|
|
223
236
|
if (filePath.endsWith(".md")) return "raw";
|
|
224
237
|
return "unknown";
|
|
@@ -247,6 +260,18 @@ function deriveReportPath(basePath) {
|
|
|
247
260
|
}
|
|
248
261
|
return base + REPORT_EXTENSION;
|
|
249
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Derive schema path from any markform file path.
|
|
265
|
+
* Strips known extensions and appends .schema.json.
|
|
266
|
+
*/
|
|
267
|
+
function deriveSchemaPath(basePath) {
|
|
268
|
+
let base = basePath;
|
|
269
|
+
for (const ext of Object.values(ALL_EXTENSIONS)) if (base.endsWith(ext)) {
|
|
270
|
+
base = base.slice(0, -ext.length);
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
return base + SCHEMA_EXTENSION;
|
|
274
|
+
}
|
|
250
275
|
|
|
251
276
|
//#endregion
|
|
252
277
|
//#region src/utils/keySort.ts
|
|
@@ -2804,4 +2829,4 @@ function applyPatches(form, patches) {
|
|
|
2804
2829
|
}
|
|
2805
2830
|
|
|
2806
2831
|
//#endregion
|
|
2807
|
-
export {
|
|
2832
|
+
export { deriveSchemaPath as A, DEFAULT_ROLES as C, USER_ROLE as D, REPORT_EXTENSION as E, formatSuggestedLlms as F, getWebSearchConfig as I, hasWebSearchSupport as L, parseRolesFlag as M, SUGGESTED_LLMS as N, deriveExportPath as O, WEB_SEARCH_CONFIG as P, parseModelIdForDisplay as R, DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN as S, MAX_FORMS_IN_MENU as T, DEFAULT_MAX_PATCHES_PER_TURN as _, validate as a, DEFAULT_PRIORITY as b, computeProgressSummary as c, serialize as d, serializeRawMarkdown as f, DEFAULT_MAX_ISSUES_PER_TURN as g, DEFAULT_FORMS_DIR as h, inspect as i, detectFileType as j, deriveReportPath as k, computeStructureSummary as l, AGENT_ROLE as m, getAllFields as n, computeAllSummaries as o, serializeReportMarkdown as p, getFieldsForRoles as r, computeFormState as s, applyPatches as t, isFormComplete as u, DEFAULT_MAX_TURNS as v, DEFAULT_ROLE_INSTRUCTIONS as w, DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN as x, DEFAULT_PORT as y };
|
package/dist/bin.d.mts
CHANGED
package/dist/bin.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "./
|
|
5
|
-
import "./session-uF0e6m6k.mjs";
|
|
6
|
-
import { t as runCli } from "./cli-CXjkdym_.mjs";
|
|
7
|
-
import "./shared-DRlgu2ZJ.mjs";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { t as runCli } from "./cli-Bqlm-WWw.mjs";
|
|
8
5
|
import { resolve } from "node:path";
|
|
9
6
|
import { existsSync } from "node:fs";
|
|
10
7
|
import { config } from "dotenv";
|