@markdown-ai/cli 1.0.0-rc.3 → 1.1.0
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/HOW-TO-USE.md +279 -173
- package/README.md +103 -34
- package/dist/cli.js +3488 -272
- package/dist/conformance/compile/46-basic-targets/expected/AGENTS.md +20 -0
- package/dist/conformance/compile/46-basic-targets/expected/MCP-SERVER.md +20 -0
- package/dist/conformance/compile/46-basic-targets/expected/SKILL.md +19 -0
- package/dist/conformance/compile/46-basic-targets/expected/mcp-server.json +5 -0
- package/dist/conformance/compile/46-basic-targets/input.mda +18 -0
- package/dist/conformance/manifest.yaml +55 -49
- package/dist/conformance/valid/27-trust-policy-github-actions.json +14 -11
- package/dist/schemas/mda-trust-policy.schema.json +144 -111
- package/package.json +47 -46
package/HOW-TO-USE.md
CHANGED
|
@@ -1,78 +1,93 @@
|
|
|
1
|
-
# Markdown AI CLI
|
|
1
|
+
# Markdown AI CLI Manual
|
|
2
2
|
|
|
3
|
-
`@markdown-ai/cli` gives you one
|
|
3
|
+
`@markdown-ai/cli` gives you one command: `mda`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use it to create, validate, compile, sign, verify, and release Markdown AI
|
|
6
|
+
(MDA) artifacts. The CLI is built for two readers at the same time: a human at a
|
|
7
|
+
terminal, and an AI agent that needs stable JSON and clear next actions.
|
|
6
8
|
|
|
7
|
-
The
|
|
9
|
+
The short version:
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
mda init hello-skill --out hello.mda
|
|
13
|
+
mda validate hello.mda
|
|
14
|
+
mda compile hello.mda --target SKILL.md AGENTS.md --out-dir out --integrity
|
|
15
|
+
mda validate out/SKILL.md --target SKILL.md
|
|
16
|
+
mda integrity verify out/SKILL.md --target SKILL.md
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
That is the
|
|
19
|
+
That is the center of the tool. Everything else is there to make the same flow
|
|
20
|
+
safer, more explicit, or easier to automate.
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
## Install And Help
|
|
23
|
+
|
|
24
|
+
Run without installing:
|
|
18
25
|
|
|
19
26
|
```sh
|
|
20
|
-
npx @markdown-ai/cli
|
|
27
|
+
npx @markdown-ai/cli --help
|
|
21
28
|
```
|
|
22
29
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
After installation, the binary name is `mda`:
|
|
30
|
+
Install globally:
|
|
26
31
|
|
|
27
32
|
```sh
|
|
28
33
|
npm install -g @markdown-ai/cli
|
|
29
34
|
mda --help
|
|
30
35
|
```
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
The installed binary is `mda`.
|
|
38
|
+
|
|
39
|
+
Running `mda` with no arguments prints help. It does not validate, write, sign,
|
|
40
|
+
verify, or touch the network.
|
|
41
|
+
|
|
42
|
+
## Main Human Flow
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
Start with a source file:
|
|
35
45
|
|
|
36
46
|
```sh
|
|
37
47
|
mda init hello-skill --out hello.mda
|
|
38
48
|
```
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
Open `hello.mda`. Edit the name, description, metadata, and body. Then validate
|
|
51
|
+
it:
|
|
41
52
|
|
|
42
53
|
```sh
|
|
43
54
|
mda validate hello.mda
|
|
44
55
|
```
|
|
45
56
|
|
|
46
|
-
Compile it
|
|
57
|
+
Compile it:
|
|
47
58
|
|
|
48
59
|
```sh
|
|
49
60
|
mda compile hello.mda --target SKILL.md AGENTS.md --out-dir out --integrity
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
Validate the
|
|
63
|
+
Validate the emitted files:
|
|
53
64
|
|
|
54
65
|
```sh
|
|
55
66
|
mda validate out/SKILL.md --target SKILL.md
|
|
56
67
|
mda validate out/AGENTS.md --target AGENTS.md
|
|
68
|
+
mda integrity verify out/SKILL.md --target SKILL.md
|
|
57
69
|
```
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
Human output includes `Next:` guidance when the next command is obvious. You can
|
|
72
|
+
turn that off with `--no-next`:
|
|
60
73
|
|
|
61
74
|
```sh
|
|
62
|
-
mda
|
|
75
|
+
mda validate hello.mda --no-next
|
|
63
76
|
```
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## For AI Agents
|
|
78
|
+
## Main AI Agent Flow
|
|
68
79
|
|
|
69
80
|
Use `--json` almost every time.
|
|
70
81
|
|
|
71
|
-
Human output is for eyes. JSON output is for code. It
|
|
82
|
+
Human output is for eyes. JSON output is for code. It contains stable fields:
|
|
72
83
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
- `ok`
|
|
85
|
+
- `command`
|
|
86
|
+
- `exitCode`
|
|
87
|
+
- `summary`
|
|
88
|
+
- `artifacts`
|
|
89
|
+
- `diagnostics`
|
|
90
|
+
- `nextActions`
|
|
76
91
|
|
|
77
92
|
Recommended authoring flow:
|
|
78
93
|
|
|
@@ -86,154 +101,259 @@ mda validate out/MCP-SERVER.md --target MCP-SERVER.md --json
|
|
|
86
101
|
mda integrity verify out/SKILL.md --target SKILL.md --json
|
|
87
102
|
```
|
|
88
103
|
|
|
89
|
-
|
|
104
|
+
Agent rules:
|
|
105
|
+
|
|
106
|
+
- Continue only when `ok` is `true` and `exitCode` is `0`.
|
|
107
|
+
- Stop on any non-zero exit.
|
|
108
|
+
- Read `diagnostics[0].code` before reading human messages.
|
|
109
|
+
- Use `artifacts` for paths produced by a command.
|
|
110
|
+
- Use `nextActions` for the next safe command.
|
|
111
|
+
- Pass `--target` when the filename is not exact.
|
|
112
|
+
- Write generated files into a temp or staging directory first.
|
|
113
|
+
|
|
114
|
+
Do not scrape human text when JSON is available. That is noise in the signal
|
|
115
|
+
chain. The JSON is the signal.
|
|
116
|
+
|
|
117
|
+
## Targets
|
|
118
|
+
|
|
119
|
+
Targets tell the CLI what kind of artifact a file is.
|
|
120
|
+
|
|
121
|
+
Allowed targets:
|
|
122
|
+
|
|
123
|
+
- `source`
|
|
124
|
+
- `SKILL.md`
|
|
125
|
+
- `AGENTS.md`
|
|
126
|
+
- `MCP-SERVER.md`
|
|
127
|
+
- `auto`
|
|
128
|
+
|
|
129
|
+
Auto-detection is exact:
|
|
130
|
+
|
|
131
|
+
- `*.mda` means `source`
|
|
132
|
+
- `SKILL.md` means `SKILL.md`
|
|
133
|
+
- `AGENTS.md` means `AGENTS.md`
|
|
134
|
+
- `MCP-SERVER.md` means `MCP-SERVER.md`
|
|
135
|
+
- any other Markdown filename needs `--target`
|
|
136
|
+
|
|
137
|
+
When in doubt, pass `--target`.
|
|
90
138
|
|
|
91
|
-
|
|
139
|
+
## MCP Sidecars
|
|
140
|
+
|
|
141
|
+
Plain validation of `MCP-SERVER.md` does not need a sidecar:
|
|
92
142
|
|
|
93
143
|
```sh
|
|
94
|
-
mda validate
|
|
95
|
-
mda integrity verify config.mda --target source --json
|
|
96
|
-
mda validate SKILL.md --target SKILL.md --json
|
|
97
|
-
mda validate AGENTS.md --target AGENTS.md --json
|
|
98
|
-
mda canonicalize SKILL.md --target SKILL.md --json
|
|
144
|
+
mda validate out/MCP-SERVER.md --target MCP-SERVER.md --json
|
|
99
145
|
```
|
|
100
146
|
|
|
101
|
-
|
|
147
|
+
Canonical bytes and integrity checks need the sidecar when the artifact is
|
|
148
|
+
multi-file:
|
|
102
149
|
|
|
103
150
|
```sh
|
|
104
|
-
mda
|
|
105
|
-
mda integrity verify MCP-SERVER.md --target MCP-SERVER.md --sidecar mcp-server.json --json
|
|
151
|
+
mda canonicalize out/MCP-SERVER.md --target MCP-SERVER.md --sidecar out/mcp-server.json --json
|
|
152
|
+
mda integrity verify out/MCP-SERVER.md --target MCP-SERVER.md --sidecar out/mcp-server.json --json
|
|
106
153
|
```
|
|
107
154
|
|
|
108
|
-
|
|
155
|
+
## Integrity
|
|
109
156
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- If the file is a Markdown file with a non-standard name, pass `--target`.
|
|
113
|
-
- If the command needs to write files, write into a temp or staging directory first.
|
|
157
|
+
Integrity is a stable fingerprint of the canonical artifact bytes. It tells you
|
|
158
|
+
whether the bytes changed. It does not prove who wrote them.
|
|
114
159
|
|
|
115
|
-
|
|
160
|
+
Compute a digest:
|
|
116
161
|
|
|
117
|
-
|
|
162
|
+
```sh
|
|
163
|
+
mda integrity compute hello.mda --target source --json
|
|
164
|
+
```
|
|
118
165
|
|
|
119
|
-
|
|
120
|
-
- `exitCode: 0`
|
|
166
|
+
Write the digest into frontmatter:
|
|
121
167
|
|
|
122
|
-
|
|
168
|
+
```sh
|
|
169
|
+
mda integrity compute hello.mda --target source --write
|
|
170
|
+
```
|
|
123
171
|
|
|
124
|
-
|
|
125
|
-
- Then read `diagnostics[0].message`.
|
|
126
|
-
- Do not scrape human text from stderr when `--json` is available.
|
|
172
|
+
Verify it later:
|
|
127
173
|
|
|
128
|
-
|
|
174
|
+
```sh
|
|
175
|
+
mda integrity verify hello.mda --target source
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
For compiled output:
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
mda compile hello.mda --target SKILL.md AGENTS.md MCP-SERVER.md --out-dir out --integrity --manifest out/compile-manifest.json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The compile manifest records source digest, output digests, compiler version,
|
|
185
|
+
capability summary, and compatibility diagnostics.
|
|
129
186
|
|
|
130
|
-
|
|
187
|
+
Use `--strict-compat` when warnings should block output:
|
|
131
188
|
|
|
132
189
|
```sh
|
|
133
|
-
mda
|
|
190
|
+
mda compile hello.mda --target SKILL.md AGENTS.md --out-dir out --manifest out/compile-manifest.json --strict-compat
|
|
134
191
|
```
|
|
135
192
|
|
|
136
|
-
|
|
193
|
+
## Signing And Verification
|
|
194
|
+
|
|
195
|
+
Signing proves the artifact came from an expected signer. Verification checks
|
|
196
|
+
the signature, payload digest, and local trust policy.
|
|
197
|
+
|
|
198
|
+
### GitHub Actions Sigstore/Rekor
|
|
199
|
+
|
|
200
|
+
Most teams should start here. The production trust shape is GitHub Actions OIDC
|
|
201
|
+
identity, Sigstore/Rekor evidence, and a policy pinned to repository, workflow,
|
|
202
|
+
and exact ref.
|
|
203
|
+
|
|
204
|
+
The CLI 1.1 local gate is deterministic. It consumes explicit evidence through
|
|
205
|
+
`--offline-sigstore-fixture <path>` so signing, verification, release planning,
|
|
206
|
+
and doctor checks do not depend on hidden environment variables or live network
|
|
207
|
+
services.
|
|
208
|
+
|
|
209
|
+
Production shape:
|
|
210
|
+
|
|
211
|
+
- GitHub Actions keyless signing identity.
|
|
212
|
+
- Sigstore bundle or Rekor evidence retained with the release.
|
|
213
|
+
- Trust policy pinned to `repo`, `workflow`, and `ref`.
|
|
214
|
+
|
|
215
|
+
Offline and test shape:
|
|
216
|
+
|
|
217
|
+
- `--offline-sigstore-fixture <path>` supplies explicit replayable evidence.
|
|
218
|
+
- Tests and local release gates should use deterministic evidence files.
|
|
219
|
+
|
|
220
|
+
Create a GitHub Actions policy:
|
|
137
221
|
|
|
138
222
|
```sh
|
|
139
|
-
mda
|
|
223
|
+
mda release trust policy --target llmix-registry --profile github-actions --repo owner/repo --workflow release.yml --ref refs/heads/main --out gha-policy.json
|
|
140
224
|
```
|
|
141
225
|
|
|
142
|
-
|
|
226
|
+
Sign with explicit GitHub Actions evidence:
|
|
143
227
|
|
|
144
228
|
```sh
|
|
145
|
-
mda
|
|
146
|
-
mda integrity verify out/MCP-SERVER.md --target MCP-SERVER.md --sidecar out/mcp-server.json --json
|
|
229
|
+
mda sign release.mda --profile github-actions --repo owner/repo --workflow release.yml --ref refs/heads/main --rekor --offline-sigstore-fixture sigstore-evidence.json --out release.signed.mda
|
|
147
230
|
```
|
|
148
231
|
|
|
149
|
-
|
|
232
|
+
Verify with the same explicit evidence:
|
|
150
233
|
|
|
151
234
|
```sh
|
|
152
|
-
mda
|
|
235
|
+
mda verify release.signed.mda --policy gha-policy.json --offline-sigstore-fixture sigstore-evidence.json --json
|
|
153
236
|
```
|
|
154
237
|
|
|
155
|
-
|
|
238
|
+
`mda verify --offline` is intentionally unsupported. Use
|
|
239
|
+
`--offline-sigstore-fixture <path>` so the evidence is visible in the command.
|
|
240
|
+
No hidden environment, no repo-local default key path.
|
|
241
|
+
|
|
242
|
+
### did:web
|
|
156
243
|
|
|
157
|
-
|
|
244
|
+
Use did:web when your team manages release keys and DID documents directly.
|
|
158
245
|
|
|
159
|
-
|
|
246
|
+
Create a did:web policy:
|
|
160
247
|
|
|
161
248
|
```sh
|
|
162
|
-
mda
|
|
249
|
+
mda release trust policy --target llmix-registry --profile did-web --domain tools.example.com --out did-policy.json
|
|
163
250
|
```
|
|
164
251
|
|
|
165
|
-
|
|
252
|
+
Sign with explicit key material:
|
|
166
253
|
|
|
167
254
|
```sh
|
|
168
|
-
mda
|
|
255
|
+
mda sign release.mda --profile did-web --did did:web:tools.example.com --key-id did:web:tools.example.com#release --key-file did-web-private.pem --out release.signed.mda
|
|
169
256
|
```
|
|
170
257
|
|
|
171
|
-
|
|
258
|
+
Verify with an explicit DID document:
|
|
172
259
|
|
|
173
260
|
```sh
|
|
174
|
-
mda
|
|
261
|
+
mda verify release.signed.mda --policy did-policy.json --did-document did.json --json
|
|
175
262
|
```
|
|
176
263
|
|
|
177
|
-
|
|
264
|
+
There is a compatibility alias for older scripts:
|
|
178
265
|
|
|
179
|
-
|
|
266
|
+
```sh
|
|
267
|
+
mda sign release.mda --method did-web --key did-web-private.pem --identity tools.example.com --out release.signed.mda
|
|
268
|
+
```
|
|
180
269
|
|
|
181
|
-
|
|
270
|
+
## Release Workflow For LLMix Registry
|
|
182
271
|
|
|
183
|
-
|
|
272
|
+
The LLMix flow is there to help a user move from signed source presets to an
|
|
273
|
+
external deployment trust manifest. It does not publish the registry for you.
|
|
274
|
+
It tells you when the inputs are ready, then points to the next step.
|
|
184
275
|
|
|
185
|
-
|
|
276
|
+
### 1. Scaffold An LLMix Preset
|
|
186
277
|
|
|
187
278
|
```sh
|
|
188
|
-
mda
|
|
189
|
-
mda init <name> --out <file.mda>
|
|
190
|
-
mda validate <file> [--target <target>]
|
|
191
|
-
mda compile <file.mda> --target SKILL.md AGENTS.md --out-dir out --integrity
|
|
192
|
-
mda integrity verify <file> --target <target>
|
|
279
|
+
mda init --template llmix-preset --module search_summary --preset openai_fast --provider openai --model gpt-5-mini --out authoring/search_summary/openai_fast.mda
|
|
193
280
|
```
|
|
194
281
|
|
|
195
|
-
|
|
282
|
+
Validate and add integrity:
|
|
196
283
|
|
|
197
284
|
```sh
|
|
198
|
-
mda
|
|
199
|
-
mda integrity compute
|
|
200
|
-
mda conformance --level V --json
|
|
285
|
+
mda validate authoring/search_summary/openai_fast.mda --target source
|
|
286
|
+
mda integrity compute authoring/search_summary/openai_fast.mda --target source --write
|
|
201
287
|
```
|
|
202
288
|
|
|
203
|
-
|
|
289
|
+
### 2. Sign And Verify The Source
|
|
204
290
|
|
|
205
291
|
```sh
|
|
206
|
-
mda
|
|
207
|
-
mda sign
|
|
292
|
+
mda release trust policy --target llmix-registry --profile github-actions --repo owner/repo --workflow release.yml --ref refs/heads/main --out gha-policy.json
|
|
293
|
+
mda sign authoring/search_summary/openai_fast.mda --profile github-actions --repo owner/repo --workflow release.yml --ref refs/heads/main --rekor --offline-sigstore-fixture sigstore-evidence.json --out authoring/search_summary/openai_fast.signed.mda
|
|
294
|
+
mda verify authoring/search_summary/openai_fast.signed.mda --policy gha-policy.json --offline-sigstore-fixture sigstore-evidence.json --json
|
|
208
295
|
```
|
|
209
296
|
|
|
210
|
-
|
|
297
|
+
### 3. Create The Release Plan
|
|
211
298
|
|
|
212
|
-
|
|
299
|
+
```sh
|
|
300
|
+
mda release prepare --target llmix-registry --source authoring --registry-dir registry --policy gha-policy.json --offline-sigstore-fixture sigstore-evidence.json --out release-plan.json
|
|
301
|
+
```
|
|
213
302
|
|
|
214
|
-
|
|
303
|
+
The release plan checks validation, integrity, signatures, signer identity, and
|
|
304
|
+
the expected registry entry identity. It writes deterministic release evidence.
|
|
305
|
+
It does not modify the registry and does not publish registry files.
|
|
215
306
|
|
|
216
|
-
|
|
307
|
+
After this step, run the LLMix publisher with `trustedRuntime: true`. The
|
|
308
|
+
publisher owns registry writes. After publishing or staging the registry, sign
|
|
309
|
+
the registry root. Then use `mda release finalize --target llmix-registry` to verify the signed
|
|
310
|
+
registry root and produce the external deployment trust manifest.
|
|
217
311
|
|
|
218
|
-
|
|
219
|
-
- `SKILL.md`
|
|
220
|
-
- `AGENTS.md`
|
|
221
|
-
- `MCP-SERVER.md`
|
|
222
|
-
- `auto`
|
|
312
|
+
### 4. Create The External Trust Manifest
|
|
223
313
|
|
|
224
|
-
|
|
314
|
+
```sh
|
|
315
|
+
mda release finalize --target llmix-registry --registry-dir registry --registry-root registry/snapshots/current/registry-root.json --release-plan release-plan.json --policy gha-policy.json --derive-root-digest --out release/llmix-trust.json --offline-sigstore-fixture sigstore-evidence.json
|
|
316
|
+
```
|
|
225
317
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
- `MCP-SERVER.md` means `MCP-SERVER.md`
|
|
230
|
-
- any other `.md` file needs `--target`
|
|
318
|
+
The trust manifest must be outside the registry directory. The CLI rejects
|
|
319
|
+
direct paths, relative traversal, and symlink cases that put trust authority back
|
|
320
|
+
inside the registry.
|
|
231
321
|
|
|
232
|
-
|
|
322
|
+
### 5. Generate Deployment Snippets
|
|
323
|
+
|
|
324
|
+
```sh
|
|
325
|
+
mda release finalize --target llmix-registry --registry-dir registry --manifest release/llmix-trust.json --snippet-format json --snippet-out release/llmix-trust-snippet.json
|
|
326
|
+
mda release finalize --target llmix-registry --registry-dir registry --manifest release/llmix-trust.json --snippet-format env --snippet-out release/llmix-trust.env
|
|
327
|
+
mda release finalize --target llmix-registry --registry-dir registry --manifest release/llmix-trust.json --snippet-format kubernetes --snippet-out release/llmix-trust.yaml
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Supported snippet formats:
|
|
331
|
+
|
|
332
|
+
- `json`
|
|
333
|
+
- `env`
|
|
334
|
+
- `kubernetes`
|
|
335
|
+
- `github-actions`
|
|
336
|
+
- `terraform`
|
|
337
|
+
- `typescript`
|
|
338
|
+
- `python`
|
|
339
|
+
- `rust`
|
|
340
|
+
|
|
341
|
+
Snippets reference external trust anchors. They do not tell you to put authority
|
|
342
|
+
inside `config/llm/`.
|
|
343
|
+
|
|
344
|
+
### 6. Run Doctor Before Deployment
|
|
345
|
+
|
|
346
|
+
```sh
|
|
347
|
+
mda doctor release --target llmix-registry --source authoring --registry-dir registry --release-plan release-plan.json --manifest release/llmix-trust.json --offline-sigstore-fixture sigstore-evidence.json
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
`doctor release` is read-only. It checks source readiness, registry root evidence,
|
|
351
|
+
signature trust, manifest placement, manifest schema, freshness, high-watermark,
|
|
352
|
+
and recovery next actions.
|
|
233
353
|
|
|
234
354
|
## Command Reference
|
|
235
355
|
|
|
236
|
-
Print
|
|
356
|
+
Print help:
|
|
237
357
|
|
|
238
358
|
```sh
|
|
239
359
|
mda
|
|
@@ -246,10 +366,11 @@ Create a source scaffold:
|
|
|
246
366
|
mda init <name> [--out <file>] [--json]
|
|
247
367
|
```
|
|
248
368
|
|
|
249
|
-
|
|
369
|
+
Create an LLMix preset source scaffold:
|
|
250
370
|
|
|
251
|
-
|
|
252
|
-
-
|
|
371
|
+
```sh
|
|
372
|
+
mda init --template llmix-preset --module <name> --preset <name> --provider <provider> --model <model> [--out <file>] [--json]
|
|
373
|
+
```
|
|
253
374
|
|
|
254
375
|
Validate a source or output file:
|
|
255
376
|
|
|
@@ -257,91 +378,54 @@ Validate a source or output file:
|
|
|
257
378
|
mda validate <file> [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--json]
|
|
258
379
|
```
|
|
259
380
|
|
|
260
|
-
Options:
|
|
261
|
-
|
|
262
|
-
- `--target <target>` sets the artifact type. Default: `auto`.
|
|
263
|
-
- `--json` prints machine-readable output.
|
|
264
|
-
|
|
265
381
|
Compile a source file:
|
|
266
382
|
|
|
267
383
|
```sh
|
|
268
|
-
mda compile <file.mda> --target <target...> [--out-dir <dir>] [--integrity] [--json]
|
|
384
|
+
mda compile <file.mda> --target <target...> [--out-dir <dir>] [--integrity] [--manifest <path>] [--strict-compat] [--json]
|
|
269
385
|
```
|
|
270
386
|
|
|
271
|
-
Options:
|
|
272
|
-
|
|
273
|
-
- `--target <target...>` is required. Use one or more of `SKILL.md`, `AGENTS.md`, `MCP-SERVER.md`.
|
|
274
|
-
- `--out-dir <dir>` writes outputs into a directory. Default: current directory.
|
|
275
|
-
- `--integrity` adds a `sha256` integrity field to emitted artifacts.
|
|
276
|
-
- `--json` lists planned and written output files.
|
|
277
|
-
|
|
278
387
|
Canonicalize a file:
|
|
279
388
|
|
|
280
389
|
```sh
|
|
281
390
|
mda canonicalize <file> [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--sidecar <path>] [--json]
|
|
282
391
|
```
|
|
283
392
|
|
|
284
|
-
Options:
|
|
285
|
-
|
|
286
|
-
- `--target <target>` sets the artifact type. Default: `auto`.
|
|
287
|
-
- `--sidecar <path>` is required only for MCP multi-file canonical bytes.
|
|
288
|
-
- `--json` returns base64 canonical bytes and metadata. Without `--json`, raw canonical bytes are printed.
|
|
289
|
-
|
|
290
393
|
Compute integrity:
|
|
291
394
|
|
|
292
395
|
```sh
|
|
293
|
-
mda integrity compute <file> [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--sidecar <path>] [--algorithm sha256|sha384|sha512] [--json]
|
|
396
|
+
mda integrity compute <file> [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--sidecar <path>] [--algorithm sha256|sha384|sha512] [--write] [--json]
|
|
294
397
|
```
|
|
295
398
|
|
|
296
|
-
Options:
|
|
297
|
-
|
|
298
|
-
- `--target <target>` sets the artifact type. Default: `auto`.
|
|
299
|
-
- `--sidecar <path>` is required only for `MCP-SERVER.md` multi-file integrity.
|
|
300
|
-
- `--algorithm <name>` chooses `sha256`, `sha384`, or `sha512`. Default: `sha256`.
|
|
301
|
-
- `--json` prints the digest in JSON.
|
|
302
|
-
|
|
303
399
|
Verify integrity:
|
|
304
400
|
|
|
305
401
|
```sh
|
|
306
402
|
mda integrity verify <file> [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--sidecar <path>] [--json]
|
|
307
403
|
```
|
|
308
404
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
- `--target <target>` sets the artifact type. Default: `auto`.
|
|
312
|
-
- `--sidecar <path>` is required only for `MCP-SERVER.md` multi-file integrity.
|
|
313
|
-
- `--json` prints the verification result in JSON.
|
|
314
|
-
|
|
315
|
-
Verify trust policy and signatures:
|
|
405
|
+
Sign an artifact:
|
|
316
406
|
|
|
317
407
|
```sh
|
|
318
|
-
mda
|
|
408
|
+
mda sign <file> --profile did-web --did <did> --key-id <key-id> --key-file <path> (--out <file>|--in-place) [--json]
|
|
409
|
+
mda sign <file> --profile github-actions --repo <owner/repo> --workflow <workflow> --ref <ref> --rekor --offline-sigstore-fixture <path> (--out <file>|--in-place) [--json]
|
|
410
|
+
mda sign <file> --method did-web --key <path> --identity <domain> (--out <file>|--in-place) [--json]
|
|
319
411
|
```
|
|
320
412
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
- `--policy <path>` is required.
|
|
324
|
-
- `--target <target>` sets the artifact type. Default: `auto`.
|
|
325
|
-
- `--sidecar <path>` is required only for `MCP-SERVER.md` multi-file integrity.
|
|
326
|
-
- `--json` prints the result in JSON.
|
|
327
|
-
- `--offline` exists only as an unsupported MVP flag. It exits with a usage error.
|
|
328
|
-
|
|
329
|
-
Sign an artifact:
|
|
413
|
+
Verify signatures:
|
|
330
414
|
|
|
331
415
|
```sh
|
|
332
|
-
mda
|
|
416
|
+
mda verify <file> --policy <path> [--did-document <path>] [--offline-sigstore-fixture <path>] [--target source|SKILL.md|AGENTS.md|MCP-SERVER.md|auto] [--sidecar <path>] [--json]
|
|
333
417
|
```
|
|
334
418
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
- `--method did-web` is required.
|
|
338
|
-
- `--key <path>` is required.
|
|
339
|
-
- `--identity <domain>` is required.
|
|
340
|
-
- `--out <file>` writes signed output to a new file.
|
|
341
|
-
- `--in-place` replaces the input file.
|
|
342
|
-
- `--json` prints the result in JSON.
|
|
419
|
+
Run release workflow helpers:
|
|
343
420
|
|
|
344
|
-
|
|
421
|
+
```sh
|
|
422
|
+
mda release trust policy --target llmix-registry --profile did-web --domain <domain> [--min-signatures <n>] [--out <file>] [--json]
|
|
423
|
+
mda release trust policy --target llmix-registry --profile github-actions --repo <owner/repo> --workflow <workflow> --ref <ref> [--out <file>] [--json]
|
|
424
|
+
mda release prepare --target llmix-registry --source <dir> --registry-dir <dir> --policy <path> --out <file> [--did-document <path>] [--offline-sigstore-fixture <path>] [--json]
|
|
425
|
+
mda release finalize --target llmix-registry --registry-dir <dir> --registry-root <file> --release-plan <file> --policy <path> (--expected-root-digest <digest>|--derive-root-digest) --out <file> [--did-document <path>] [--offline-sigstore-fixture <path>] [--json]
|
|
426
|
+
mda release finalize --target llmix-registry --registry-dir <dir> --manifest <path> --snippet-format json|env|kubernetes|github-actions|terraform|typescript|python|rust --snippet-out <path> [--json]
|
|
427
|
+
mda doctor release --target llmix-registry --source <dir> --registry-dir <dir> --release-plan <path> --manifest <path> [--did-document <path>] [--offline-sigstore-fixture <path>] [--json]
|
|
428
|
+
```
|
|
345
429
|
|
|
346
430
|
Run conformance:
|
|
347
431
|
|
|
@@ -349,21 +433,14 @@ Run conformance:
|
|
|
349
433
|
mda conformance [--suite <path>] [--level V|C] [--json]
|
|
350
434
|
```
|
|
351
435
|
|
|
352
|
-
Options:
|
|
353
|
-
|
|
354
|
-
- `--suite <path>` points to a conformance suite directory.
|
|
355
|
-
- `--level V|C` selects validation or compile conformance. Default: `V`.
|
|
356
|
-
- `--json` prints pass and fail counts in JSON.
|
|
357
|
-
|
|
358
436
|
## Global Flags
|
|
359
437
|
|
|
360
|
-
These flags work across commands:
|
|
361
|
-
|
|
362
438
|
- `--json` prints stable JSON only on stdout.
|
|
363
439
|
- `--quiet` suppresses non-essential human output.
|
|
364
440
|
- `--verbose` includes extra diagnostic context where available.
|
|
365
441
|
- `--no-color` disables ANSI color.
|
|
366
|
-
-
|
|
442
|
+
- `--no-next` hides human `Next:` guidance. JSON `nextActions` are unchanged.
|
|
443
|
+
- `-h`, `--help` prints help.
|
|
367
444
|
|
|
368
445
|
For agents, prefer `--json`. For humans, plain output is easier to read.
|
|
369
446
|
|
|
@@ -375,12 +452,41 @@ For agents, prefer `--json`. For humans, plain output is easier to read.
|
|
|
375
452
|
- `3`: IO or configuration error, such as overwrite refusal or unreadable policy
|
|
376
453
|
- `4`: internal bug
|
|
377
454
|
|
|
378
|
-
Agents should use the exit code and JSON fields together. Humans can usually
|
|
455
|
+
Agents should use the exit code and JSON fields together. Humans can usually
|
|
456
|
+
read the printed diagnostic and follow `Next:`.
|
|
379
457
|
|
|
380
|
-
##
|
|
458
|
+
## Conformance And Release Gates
|
|
459
|
+
|
|
460
|
+
Use validation conformance:
|
|
381
461
|
|
|
382
|
-
|
|
462
|
+
```sh
|
|
463
|
+
mda conformance --level V --json
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Use compile/equality conformance:
|
|
467
|
+
|
|
468
|
+
```sh
|
|
469
|
+
mda conformance --level C --json
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
For local development of this CLI package, the useful gates are:
|
|
473
|
+
|
|
474
|
+
```sh
|
|
475
|
+
pnpm -C apps/cli build
|
|
476
|
+
pnpm -C apps/cli test
|
|
477
|
+
node scripts/validate-conformance.mjs
|
|
478
|
+
pnpm -C apps/cli smoke:package
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
The package smoke test installs the packed package in a temporary directory
|
|
482
|
+
outside the repository and runs the real `mda` binary. That matters. A local
|
|
483
|
+
source tree can hide problems a packed package cannot.
|
|
484
|
+
|
|
485
|
+
## Status
|
|
383
486
|
|
|
384
|
-
|
|
487
|
+
This is the 1.1 CLI.
|
|
385
488
|
|
|
386
|
-
|
|
489
|
+
The covered path is source authoring, validation, compile, integrity, GitHub
|
|
490
|
+
Actions Sigstore/Rekor signing evidence, did:web signing and verification,
|
|
491
|
+
LLMix release planning, external trust manifests, deployment snippets, doctor
|
|
492
|
+
checks, and Level V/Level C conformance.
|