agent-contracts 0.19.5 → 0.20.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/cli-contract.yaml +15 -1
- package/docs/cli-reference.md +58 -16
- package/package.json +1 -1
package/cli-contract.yaml
CHANGED
|
@@ -3,7 +3,7 @@ cliContracts: 0.1.0
|
|
|
3
3
|
|
|
4
4
|
info:
|
|
5
5
|
title: agent-contracts CLI
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.20.0
|
|
7
7
|
description: >-
|
|
8
8
|
Declarative YAML DSL toolkit for defining, validating, and rendering
|
|
9
9
|
multi-agent development workflows. Provides static validation,
|
|
@@ -117,6 +117,8 @@ commandSets:
|
|
|
117
117
|
requiresConfirmation: false
|
|
118
118
|
idempotent: true
|
|
119
119
|
sideEffects: []
|
|
120
|
+
expectedDurationMs: 3000
|
|
121
|
+
retryableExitCodes: []
|
|
120
122
|
|
|
121
123
|
# ── validate ──────────────────────────────────────
|
|
122
124
|
validate:
|
|
@@ -206,6 +208,8 @@ commandSets:
|
|
|
206
208
|
requiresConfirmation: false
|
|
207
209
|
idempotent: true
|
|
208
210
|
sideEffects: []
|
|
211
|
+
expectedDurationMs: 3000
|
|
212
|
+
retryableExitCodes: []
|
|
209
213
|
|
|
210
214
|
# ── lint ──────────────────────────────────────────
|
|
211
215
|
lint:
|
|
@@ -294,6 +298,8 @@ commandSets:
|
|
|
294
298
|
requiresConfirmation: false
|
|
295
299
|
idempotent: true
|
|
296
300
|
sideEffects: []
|
|
301
|
+
expectedDurationMs: 3000
|
|
302
|
+
retryableExitCodes: []
|
|
297
303
|
|
|
298
304
|
# ── render ────────────────────────────────────────
|
|
299
305
|
render:
|
|
@@ -369,6 +375,8 @@ commandSets:
|
|
|
369
375
|
recommendedBeforeUse:
|
|
370
376
|
- Ensure agent-contracts.config.yaml exists with render targets.
|
|
371
377
|
- Run validate first to confirm DSL is valid.
|
|
378
|
+
expectedDurationMs: 5000
|
|
379
|
+
retryableExitCodes: []
|
|
372
380
|
|
|
373
381
|
# ── check ─────────────────────────────────────────
|
|
374
382
|
check:
|
|
@@ -449,6 +457,8 @@ commandSets:
|
|
|
449
457
|
sideEffects: []
|
|
450
458
|
recommendedBeforeUse:
|
|
451
459
|
- Ensure agent-contracts.config.yaml exists.
|
|
460
|
+
expectedDurationMs: 10000
|
|
461
|
+
retryableExitCodes: []
|
|
452
462
|
|
|
453
463
|
# ── score ─────────────────────────────────────────
|
|
454
464
|
score:
|
|
@@ -535,6 +545,8 @@ commandSets:
|
|
|
535
545
|
requiresConfirmation: false
|
|
536
546
|
idempotent: true
|
|
537
547
|
sideEffects: []
|
|
548
|
+
expectedDurationMs: 5000
|
|
549
|
+
retryableExitCodes: []
|
|
538
550
|
|
|
539
551
|
# ── audit ───────────────────────────────────────────
|
|
540
552
|
audit:
|
|
@@ -832,3 +844,5 @@ commandSets:
|
|
|
832
844
|
recommendedBeforeUse:
|
|
833
845
|
- Ensure agent-contracts.config.yaml exists with binding definitions.
|
|
834
846
|
- Run validate first to confirm DSL is valid.
|
|
847
|
+
expectedDurationMs: 5000
|
|
848
|
+
retryableExitCodes: []
|
package/docs/cli-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Declarative YAML DSL toolkit for defining, validating, and rendering multi-agent development workflows. Provides static validation, semantic linting, prompt rendering, guardrail generation, and completeness scoring for agent contract definitions.
|
|
4
4
|
|
|
5
|
-
**Version:** 0.19.
|
|
5
|
+
**Version:** 0.19.4
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
@@ -72,7 +72,7 @@ agent-contracts resolve -c agent-contracts.config.yaml
|
|
|
72
72
|
|
|
73
73
|
**Exit 0:** Resolved DSL output successfully.
|
|
74
74
|
|
|
75
|
-
- **stdout:** format=`
|
|
75
|
+
- **stdout:** format=`{options.format}`
|
|
76
76
|
|
|
77
77
|
**Exit 1:** Resolution failed (file not found, parse error, or config error).
|
|
78
78
|
|
|
@@ -87,6 +87,9 @@ x-agent:
|
|
|
87
87
|
idempotent: true
|
|
88
88
|
sideEffects:
|
|
89
89
|
|
|
90
|
+
expectedDurationMs: 3000
|
|
91
|
+
retryableExitCodes:
|
|
92
|
+
|
|
90
93
|
```
|
|
91
94
|
|
|
92
95
|
---
|
|
@@ -135,7 +138,7 @@ agent-contracts validate --quiet
|
|
|
135
138
|
|
|
136
139
|
**Exit 0:** Validation passed. No errors found.
|
|
137
140
|
|
|
138
|
-
- **stdout:** format=`
|
|
141
|
+
- **stdout:** format=`{options.format}`
|
|
139
142
|
|
|
140
143
|
**Exit 1:** Validation failed or unexpected error.
|
|
141
144
|
|
|
@@ -150,6 +153,9 @@ x-agent:
|
|
|
150
153
|
idempotent: true
|
|
151
154
|
sideEffects:
|
|
152
155
|
|
|
156
|
+
expectedDurationMs: 3000
|
|
157
|
+
retryableExitCodes:
|
|
158
|
+
|
|
153
159
|
```
|
|
154
160
|
|
|
155
161
|
---
|
|
@@ -195,7 +201,7 @@ agent-contracts lint --format json
|
|
|
195
201
|
|
|
196
202
|
**Exit 0:** Lint passed. No errors or warnings.
|
|
197
203
|
|
|
198
|
-
- **stdout:** format=`
|
|
204
|
+
- **stdout:** format=`{options.format}`
|
|
199
205
|
|
|
200
206
|
**Exit 1:** Lint failed or unexpected error.
|
|
201
207
|
|
|
@@ -210,6 +216,9 @@ x-agent:
|
|
|
210
216
|
idempotent: true
|
|
211
217
|
sideEffects:
|
|
212
218
|
|
|
219
|
+
expectedDurationMs: 3000
|
|
220
|
+
retryableExitCodes:
|
|
221
|
+
|
|
213
222
|
```
|
|
214
223
|
|
|
215
224
|
---
|
|
@@ -258,11 +267,17 @@ x-agent:
|
|
|
258
267
|
riskLevel: medium
|
|
259
268
|
requiresConfirmation: false
|
|
260
269
|
idempotent: true
|
|
270
|
+
idempotentNote: Output is deterministic from DSL input and templates. Repeated runs produce identical files. Confirmation is not required because the command is idempotent and --check provides a side-effect-free preview mode.
|
|
261
271
|
sideEffects:
|
|
262
272
|
- file_write
|
|
273
|
+
sideEffectNote: Writes rendered files to configured output paths. No file writes occur when --check is specified.
|
|
274
|
+
safeDryRunOption: check
|
|
263
275
|
recommendedBeforeUse:
|
|
264
276
|
- Ensure agent-contracts.config.yaml exists with render targets.
|
|
265
277
|
- Run validate first to confirm DSL is valid.
|
|
278
|
+
expectedDurationMs: 5000
|
|
279
|
+
retryableExitCodes:
|
|
280
|
+
|
|
266
281
|
```
|
|
267
282
|
|
|
268
283
|
---
|
|
@@ -271,7 +286,7 @@ x-agent:
|
|
|
271
286
|
|
|
272
287
|
Run full pipeline — resolve, validate, lint, render --check.
|
|
273
288
|
|
|
274
|
-
Executes the complete verification pipeline in order: resolve DSL, validate schema and references, run lint rules,
|
|
289
|
+
Executes the complete verification pipeline in order: (1) resolve DSL, (2) validate schema and references, (3) run lint rules, (4) check render drift via render --check. Steps 1–4 always run. Additionally, when the DSL declares cross-team interfaces, (5) verifies interface import consistency and (6) checks team-interface.yaml drift. Steps 5–6 are skipped when no cross-team interfaces exist.
|
|
275
290
|
|
|
276
291
|
**Usage:**
|
|
277
292
|
|
|
@@ -299,7 +314,7 @@ agent-contracts check --format json --quiet
|
|
|
299
314
|
|
|
300
315
|
**Exit 0:** All checks passed.
|
|
301
316
|
|
|
302
|
-
- **stdout:** format=`
|
|
317
|
+
- **stdout:** format=`{options.format}`
|
|
303
318
|
|
|
304
319
|
**Exit 1:** One or more checks failed — validation errors, lint errors, render drift, or missing interface files.
|
|
305
320
|
|
|
@@ -316,6 +331,9 @@ x-agent:
|
|
|
316
331
|
|
|
317
332
|
recommendedBeforeUse:
|
|
318
333
|
- Ensure agent-contracts.config.yaml exists.
|
|
334
|
+
expectedDurationMs: 10000
|
|
335
|
+
retryableExitCodes:
|
|
336
|
+
|
|
319
337
|
```
|
|
320
338
|
|
|
321
339
|
---
|
|
@@ -360,7 +378,7 @@ agent-contracts score -c agent-contracts.config.yaml
|
|
|
360
378
|
|
|
361
379
|
**Exit 0:** Score calculated (and above threshold if specified).
|
|
362
380
|
|
|
363
|
-
- **stdout:** format=`
|
|
381
|
+
- **stdout:** format=`{options.format}`
|
|
364
382
|
|
|
365
383
|
**Exit 1:** Score below threshold, schema validation failed, or unexpected error.
|
|
366
384
|
|
|
@@ -375,6 +393,9 @@ x-agent:
|
|
|
375
393
|
idempotent: true
|
|
376
394
|
sideEffects:
|
|
377
395
|
|
|
396
|
+
expectedDurationMs: 5000
|
|
397
|
+
retryableExitCodes:
|
|
398
|
+
|
|
378
399
|
```
|
|
379
400
|
|
|
380
401
|
---
|
|
@@ -426,22 +447,31 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
|
|
|
426
447
|
| `--dry-run` | | No | `false` | Output the audit prompt without calling LLM. |
|
|
427
448
|
| `--adapter` | | No | | SDK adapter to use for LLM calls (overrides config audit.adapter). |
|
|
428
449
|
| `--model` | | No | | LLM model override (overrides config audit.model). |
|
|
450
|
+
| `--fail-on` | | No | `"critical"` | Minimum finding severity that causes exit 10 (info|warning|error|critical). |
|
|
451
|
+
| `--output` | -o | No | | Write result to a file instead of stdout. |
|
|
452
|
+
| `--report-format` | | No | `"text"` | Alias for --format. When both are specified, --report-format takes precedence. |
|
|
429
453
|
|
|
430
454
|
#### Exit Codes
|
|
431
455
|
|
|
432
|
-
**Exit 0:** No
|
|
456
|
+
**Exit 0:** Audit succeeded. No findings at or above --fail-on threshold.
|
|
433
457
|
|
|
434
|
-
- **stdout:** format=`
|
|
458
|
+
- **stdout:** format=`{options.format}`
|
|
435
459
|
|
|
436
|
-
**Exit 1:**
|
|
460
|
+
**Exit 1:** Unexpected error (invalid input, config error, or internal failure).
|
|
437
461
|
|
|
438
|
-
- **
|
|
462
|
+
- **stderr:** format=`text`
|
|
463
|
+
|
|
464
|
+
**Exit 10:** Findings at or above --fail-on severity threshold detected.
|
|
465
|
+
|
|
466
|
+
- **stdout:** format=`{options.format}`
|
|
467
|
+
|
|
468
|
+
- **stderr:** format=`text`
|
|
439
469
|
|
|
440
|
-
**Exit
|
|
470
|
+
**Exit 11:** Runtime dependency missing (agent-contracts-runtime not installed).
|
|
441
471
|
|
|
442
472
|
- **stderr:** format=`text`
|
|
443
473
|
|
|
444
|
-
**Exit
|
|
474
|
+
**Exit 12:** LLM provider or adapter error (API failure, auth error).
|
|
445
475
|
|
|
446
476
|
- **stderr:** format=`text`
|
|
447
477
|
|
|
@@ -449,11 +479,17 @@ agent-contracts audit dsl --scope agents:architect,implementer -c config.yaml
|
|
|
449
479
|
|
|
450
480
|
```yaml
|
|
451
481
|
x-agent:
|
|
452
|
-
riskLevel:
|
|
482
|
+
riskLevel: medium
|
|
453
483
|
requiresConfirmation: false
|
|
454
|
-
idempotent:
|
|
484
|
+
idempotent: false
|
|
485
|
+
idempotentNote: Safe to repeat (no persistent side effects beyond network calls), but LLM inference is non-deterministic — identical inputs may produce different findings, severity assignments, and recommendation text across runs.
|
|
455
486
|
sideEffects:
|
|
456
|
-
|
|
487
|
+
- network
|
|
488
|
+
sideEffectNote: Makes LLM API calls to the configured adapter (e.g. OpenAI, Gemini, Cursor) unless --dry-run is specified. Incurs token cost and sends DSL content to the LLM provider.
|
|
489
|
+
safeDryRunOption: dry-run
|
|
490
|
+
expectedDurationMs: 120000
|
|
491
|
+
retryableExitCodes:
|
|
492
|
+
- 12
|
|
457
493
|
recommendedBeforeUse:
|
|
458
494
|
- Ensure agent-contracts.config.yaml exists with render targets.
|
|
459
495
|
- Run validate first to confirm DSL is valid.
|
|
@@ -527,11 +563,17 @@ x-agent:
|
|
|
527
563
|
riskLevel: medium
|
|
528
564
|
requiresConfirmation: false
|
|
529
565
|
idempotent: true
|
|
566
|
+
idempotentNote: Output is deterministic from DSL input, policies, and bindings. Repeated runs produce identical files. Confirmation is not required because the command is idempotent and --dry-run provides a side-effect-free preview mode.
|
|
530
567
|
sideEffects:
|
|
531
568
|
- file_write
|
|
569
|
+
sideEffectNote: Writes guardrail binding files or team interface files to configured output paths. No file writes occur when --dry-run is specified.
|
|
570
|
+
safeDryRunOption: dry-run
|
|
532
571
|
recommendedBeforeUse:
|
|
533
572
|
- Ensure agent-contracts.config.yaml exists with binding definitions.
|
|
534
573
|
- Run validate first to confirm DSL is valid.
|
|
574
|
+
expectedDurationMs: 5000
|
|
575
|
+
retryableExitCodes:
|
|
576
|
+
|
|
535
577
|
```
|
|
536
578
|
|
|
537
579
|
---
|
package/package.json
CHANGED